From 95a12135448f6a92ff90cbcfd8031ffc58706ead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20M=C3=A2rza?= Date: Sun, 15 Mar 2026 15:53:56 +0200 Subject: [PATCH] chore: docs cleanup, README rewrite, CI autoformat, pre-commit hooks - Remove 21 translated README files (English only for now) - Rewrite README.md for Frankencode - Add prettier format check to CI and pre-commit - Pre-commit: autoformat + typecheck + tests (quiet mode) - Commit-msg: conventional commit validation - Pre-push: bun version check + typecheck + tests - Remove unused upstream typecheck workflow --- .github/workflows/test.yml | 12 +- .github/workflows/typecheck.yml | 18 -- .husky/pre-commit | 10 +- .husky/pre-push | 3 +- README.ar.md | 141 -------------- README.bn.md | 141 -------------- README.br.md | 141 -------------- README.bs.md | 141 -------------- README.da.md | 141 -------------- README.de.md | 141 -------------- README.es.md | 141 -------------- README.fr.md | 141 -------------- README.gr.md | 141 -------------- README.it.md | 141 -------------- README.ja.md | 141 -------------- README.ko.md | 141 -------------- README.md | 174 +++++++----------- README.no.md | 141 -------------- README.pl.md | 141 -------------- README.ru.md | 141 -------------- README.th.md | 141 -------------- README.tr.md | 141 -------------- README.uk.md | 142 -------------- README.vi.md | 141 -------------- README.zh.md | 140 -------------- README.zht.md | 140 -------------- packages/opencode/src/cas/cas.sql.ts | 5 +- packages/opencode/src/cas/graph.ts | 18 +- packages/opencode/src/cas/index.ts | 14 +- packages/opencode/src/context-edit/index.ts | 50 +++-- packages/opencode/src/session/message-v2.ts | 8 +- packages/opencode/src/session/prompt.ts | 14 +- .../opencode/src/session/side-thread.sql.ts | 12 +- packages/opencode/src/session/side-thread.ts | 26 +-- packages/opencode/src/tool/context-edit.ts | 11 +- packages/opencode/src/tool/context-history.ts | 48 ++++- packages/opencode/src/tool/thread-park.ts | 11 +- packages/plugin/src/index.ts | 9 +- packages/sdk/js/src/v2/gen/sdk.gen.ts | 2 + packages/sdk/js/src/v2/gen/types.gen.ts | 145 +++++++++++++++ 40 files changed, 362 insertions(+), 3188 deletions(-) delete mode 100644 .github/workflows/typecheck.yml delete mode 100644 README.ar.md delete mode 100644 README.bn.md delete mode 100644 README.br.md delete mode 100644 README.bs.md delete mode 100644 README.da.md delete mode 100644 README.de.md delete mode 100644 README.es.md delete mode 100644 README.fr.md delete mode 100644 README.gr.md delete mode 100644 README.it.md delete mode 100644 README.ja.md delete mode 100644 README.ko.md delete mode 100644 README.no.md delete mode 100644 README.pl.md delete mode 100644 README.ru.md delete mode 100644 README.th.md delete mode 100644 README.tr.md delete mode 100644 README.uk.md delete mode 100644 README.vi.md delete mode 100644 README.zh.md delete mode 100644 README.zht.md diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6db005a11..cd8ef43dd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,8 +12,8 @@ permissions: contents: read jobs: - unit: - name: unit + ci: + name: format + typecheck + test runs-on: ubuntu-latest steps: - name: Checkout repository @@ -27,5 +27,11 @@ jobs: git config --global user.email "ci@frankencode" git config --global user.name "frankencode-ci" - - name: Run unit tests + - name: Format check + run: bun prettier --check "packages/opencode/src/**/*.ts" "packages/plugin/src/**/*.ts" + + - name: Typecheck + run: bun turbo typecheck + + - name: Unit tests run: bun turbo test diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml deleted file mode 100644 index e9b7b99dc..000000000 --- a/.github/workflows/typecheck.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: typecheck - -on: - pull_request: - workflow_dispatch: - -jobs: - typecheck: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Setup Bun - uses: ./.github/actions/setup-bun - - - name: Run typecheck - run: bun typecheck diff --git a/.husky/pre-commit b/.husky/pre-commit index e2abcc64d..f3ea72c94 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,8 +1,12 @@ #!/bin/sh set -e +# Autoformat staged files +bun prettier --write "packages/opencode/src/**/*.ts" "packages/plugin/src/**/*.ts" +git update-index --again + # Typecheck -bun turbo typecheck +bun turbo typecheck 2>&1 | tail -5 -# Unit tests -bun turbo test +# Unit tests (quiet — show only summary) +bun turbo test 2>&1 | grep -E '(pass|fail|error|Tasks:|FAIL)' | tail -10 diff --git a/.husky/pre-push b/.husky/pre-push index 5d3cc5341..a12f01e04 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -17,4 +17,5 @@ if (process.versions.bun !== expectedBunVersion) { console.warn(`Warning: Bun version ${process.versions.bun} differs from expected ${expectedBunVersion}`); } ' -bun typecheck +bun turbo typecheck +bun turbo test diff --git a/README.ar.md b/README.ar.md deleted file mode 100644 index beb44589e..000000000 --- a/README.ar.md +++ /dev/null @@ -1,141 +0,0 @@ -

- - - - - شعار OpenCode - - -

-

وكيل برمجة بالذكاء الاصطناعي مفتوح المصدر.

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### التثبيت - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# مديري الحزم -npm i -g opencode-ai@latest # او bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS و Linux (موصى به، دائما محدث) -brew install opencode # macOS و Linux (صيغة brew الرسمية، تحديث اقل) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # اي نظام -nix run nixpkgs#opencode # او github:anomalyco/opencode لاحدث فرع dev -``` - -> [!TIP] -> احذف الاصدارات الاقدم من 0.1.x قبل التثبيت. - -### تطبيق سطح المكتب (BETA) - -يتوفر OpenCode ايضا كتطبيق سطح مكتب. قم بالتنزيل مباشرة من [صفحة الاصدارات](https://github.com/anomalyco/opencode/releases) او من [opencode.ai/download](https://opencode.ai/download). - -| المنصة | التنزيل | -| --------------------- | ------------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` | -| macOS (Intel) | `opencode-desktop-darwin-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb` او `.rpm` او AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### مجلد التثبيت - -يحترم سكربت التثبيت ترتيب الاولوية التالي لمسار التثبيت: - -1. `$OPENCODE_INSTALL_DIR` - مجلد تثبيت مخصص -2. `$XDG_BIN_DIR` - مسار متوافق مع مواصفات XDG Base Directory -3. `$HOME/bin` - مجلد الثنائيات القياسي للمستخدم (ان وجد او امكن انشاؤه) -4. `$HOME/.opencode/bin` - المسار الافتراضي الاحتياطي - -```bash -# امثلة -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Agents - -يتضمن OpenCode وكيليْن (Agents) مدمجين يمكنك التبديل بينهما باستخدام زر `Tab`. - -- **build** - الافتراضي، وكيل بصلاحيات كاملة لاعمال التطوير -- **plan** - وكيل للقراءة فقط للتحليل واستكشاف الكود - - يرفض تعديل الملفات افتراضيا - - يطلب الاذن قبل تشغيل اوامر bash - - مثالي لاستكشاف قواعد كود غير مألوفة او لتخطيط التغييرات - -بالاضافة الى ذلك يوجد وكيل فرعي **general** للبحث المعقد والمهام متعددة الخطوات. -يستخدم داخليا ويمكن استدعاؤه بكتابة `@general` في الرسائل. - -تعرف على المزيد حول [agents](https://opencode.ai/docs/agents). - -### التوثيق - -لمزيد من المعلومات حول كيفية ضبط OpenCode، [**راجع التوثيق**](https://opencode.ai/docs). - -### المساهمة - -اذا كنت مهتما بالمساهمة في OpenCode، يرجى قراءة [contributing docs](./CONTRIBUTING.md) قبل ارسال pull request. - -### البناء فوق OpenCode - -اذا كنت تعمل على مشروع مرتبط بـ OpenCode ويستخدم "opencode" كجزء من اسمه (مثل "opencode-dashboard" او "opencode-mobile")، يرجى اضافة ملاحظة في README توضح انه ليس مبنيا بواسطة فريق OpenCode ولا يرتبط بنا بأي شكل. - -### FAQ - -#### ما الفرق عن Claude Code؟ - -هو مشابه جدا لـ Claude Code من حيث القدرات. هذه هي الفروقات الاساسية: - -- 100% مفتوح المصدر -- غير مقترن بمزود معين. نوصي بالنماذج التي نوفرها عبر [OpenCode Zen](https://opencode.ai/zen)؛ لكن يمكن استخدام OpenCode مع Claude او OpenAI او Google او حتى نماذج محلية. مع تطور النماذج ستتقلص الفجوات وستنخفض الاسعار، لذا من المهم ان يكون مستقلا عن المزود. -- دعم LSP جاهز للاستخدام -- تركيز على TUI. تم بناء OpenCode بواسطة مستخدمي neovim ومنشئي [terminal.shop](https://terminal.shop)؛ وسندفع حدود ما هو ممكن داخل الطرفية. -- معمارية عميل/خادم. على سبيل المثال، يمكن تشغيل OpenCode على جهازك بينما تقوده عن بعد من تطبيق جوال. هذا يعني ان واجهة TUI هي واحدة فقط من العملاء الممكنين. - ---- - -**انضم الى مجتمعنا** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.bn.md b/README.bn.md deleted file mode 100644 index c7abc7346..000000000 --- a/README.bn.md +++ /dev/null @@ -1,141 +0,0 @@ -

- - - - - OpenCode logo - - -

-

ওপেন সোর্স এআই কোডিং এজেন্ট।

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### ইনস্টলেশন (Installation) - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# Package managers -npm i -g opencode-ai@latest # or bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS and Linux (recommended, always up to date) -brew install opencode # macOS and Linux (official brew formula, updated less) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # Any OS -nix run nixpkgs#opencode # or github:anomalyco/opencode for latest dev branch -``` - -> [!TIP] -> ইনস্টল করার আগে ০.১.x এর চেয়ে পুরোনো ভার্সনগুলো মুছে ফেলুন। - -### ডেস্কটপ অ্যাপ (BETA) - -OpenCode ডেস্কটপ অ্যাপ্লিকেশন হিসেবেও উপলব্ধ। সরাসরি [রিলিজ পেজ](https://github.com/anomalyco/opencode/releases) অথবা [opencode.ai/download](https://opencode.ai/download) থেকে ডাউনলোড করুন। - -| প্ল্যাটফর্ম | ডাউনলোড | -| --------------------- | ------------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` | -| macOS (Intel) | `opencode-desktop-darwin-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm`, or AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### ইনস্টলেশন ডিরেক্টরি (Installation Directory) - -ইনস্টল স্ক্রিপ্টটি ইনস্টলেশন পাতের জন্য নিম্নলিখিত অগ্রাধিকার ক্রম মেনে চলে: - -1. `$OPENCODE_INSTALL_DIR` - কাস্টম ইনস্টলেশন ডিরেক্টরি -2. `$XDG_BIN_DIR` - XDG বেস ডিরেক্টরি স্পেসিফিকেশন সমর্থিত পাথ -3. `$HOME/bin` - সাধারণ ব্যবহারকারী বাইনারি ডিরেক্টরি (যদি বিদ্যমান থাকে বা তৈরি করা যায়) -4. `$HOME/.opencode/bin` - ডিফল্ট ফলব্যাক - -```bash -# উদাহরণ -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### এজেন্টস (Agents) - -OpenCode এ দুটি বিল্ট-ইন এজেন্ট রয়েছে যা আপনি `Tab` কি(key) দিয়ে পরিবর্তন করতে পারবেন। - -- **build** - ডিফল্ট, ডেভেলপমেন্টের কাজের জন্য সম্পূর্ণ অ্যাক্সেসযুক্ত এজেন্ট -- **plan** - বিশ্লেষণ এবং কোড এক্সপ্লোরেশনের জন্য রিড-ওনলি এজেন্ট - - ডিফল্টভাবে ফাইল এডিট করতে দেয় না - - ব্যাশ কমান্ড চালানোর আগে অনুমতি চায় - - অপরিচিত কোডবেস এক্সপ্লোর করা বা পরিবর্তনের পরিকল্পনা করার জন্য আদর্শ - -এছাড়াও জটিল অনুসন্ধান এবং মাল্টিস্টেপ টাস্কের জন্য একটি **general** সাবএজেন্ট অন্তর্ভুক্ত রয়েছে। -এটি অভ্যন্তরীণভাবে ব্যবহৃত হয় এবং মেসেজে `@general` লিখে ব্যবহার করা যেতে পারে। - -এজেন্টদের সম্পর্কে আরও জানুন: [docs](https://opencode.ai/docs/agents)। - -### ডকুমেন্টেশন (Documentation) - -কিভাবে OpenCode কনফিগার করবেন সে সম্পর্কে আরও তথ্যের জন্য, [**আমাদের ডকস দেখুন**](https://opencode.ai/docs)। - -### অবদান (Contributing) - -আপনি যদি OpenCode এ অবদান রাখতে চান, অনুগ্রহ করে একটি পুল রিকোয়েস্ট সাবমিট করার আগে আমাদের [কন্ট্রিবিউটিং ডকস](./CONTRIBUTING.md) পড়ে নিন। - -### OpenCode এর উপর বিল্ডিং (Building on OpenCode) - -আপনি যদি এমন প্রজেক্টে কাজ করেন যা OpenCode এর সাথে সম্পর্কিত এবং প্রজেক্টের নামের অংশ হিসেবে "opencode" ব্যবহার করেন, উদাহরণস্বরূপ "opencode-dashboard" বা "opencode-mobile", তবে দয়া করে আপনার README তে একটি নোট যোগ করে স্পষ্ট করুন যে এই প্রজেক্টটি OpenCode দল দ্বারা তৈরি হয়নি এবং আমাদের সাথে এর কোনো সরাসরি সম্পর্ক নেই। - -### সচরাচর জিজ্ঞাসিত প্রশ্নাবলী (FAQ) - -#### এটি ক্লড কোড (Claude Code) থেকে কীভাবে আলাদা? - -ক্যাপাবিলিটির দিক থেকে এটি ক্লড কোডের (Claude Code) মতই। এখানে মূল পার্থক্যগুলো দেওয়া হলো: - -- ১০০% ওপেন সোর্স -- কোনো প্রোভাইডারের সাথে আবদ্ধ নয়। যদিও আমরা [OpenCode Zen](https://opencode.ai/zen) এর মাধ্যমে মডেলসমূহ ব্যবহারের পরামর্শ দিই, OpenCode ক্লড (Claude), ওপেনএআই (OpenAI), গুগল (Google), অথবা লোকাল মডেলগুলোর সাথেও ব্যবহার করা যেতে পারে। যেমন যেমন মডেলগুলো উন্নত হবে, তাদের মধ্যকার পার্থক্য কমে আসবে এবং দামও কমবে, তাই প্রোভাইডার-অজ্ঞাস্টিক হওয়া খুবই গুরুত্বপূর্ণ। -- আউট-অফ-দ্য-বক্স LSP সাপোর্ট -- TUI এর উপর ফোকাস। OpenCode নিওভিম (neovim) ব্যবহারকারী এবং [terminal.shop](https://terminal.shop) এর নির্মাতাদের দ্বারা তৈরি; আমরা টার্মিনালে কী কী সম্ভব তার সীমাবদ্ধতা ছাড়িয়ে যাওয়ার চেষ্টা করছি। -- ক্লায়েন্ট/সার্ভার আর্কিটেকচার। এটি যেমন OpenCode কে আপনার কম্পিউটারে চালানোর সুযোগ দেয়, তেমনি আপনি মোবাইল অ্যাপ থেকে রিমোটলি এটি নিয়ন্ত্রণ করতে পারবেন, অর্থাৎ TUI ফ্রন্টএন্ড কেবল সম্ভাব্য ক্লায়েন্টগুলোর মধ্যে একটি। - ---- - -**আমাদের কমিউনিটিতে যুক্ত হোন** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.br.md b/README.br.md deleted file mode 100644 index 6d1de2156..000000000 --- a/README.br.md +++ /dev/null @@ -1,141 +0,0 @@ -

- - - - - Logo do OpenCode - - -

-

O agente de programação com IA de código aberto.

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### Instalação - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# Gerenciadores de pacotes -npm i -g opencode-ai@latest # ou bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS e Linux (recomendado, sempre atualizado) -brew install opencode # macOS e Linux (fórmula oficial do brew, atualiza menos) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # qualquer sistema -nix run nixpkgs#opencode # ou github:anomalyco/opencode para a branch dev mais recente -``` - -> [!TIP] -> Remova versões anteriores a 0.1.x antes de instalar. - -### App desktop (BETA) - -O OpenCode também está disponível como aplicativo desktop. Baixe diretamente pela [página de releases](https://github.com/anomalyco/opencode/releases) ou em [opencode.ai/download](https://opencode.ai/download). - -| Plataforma | Download | -| --------------------- | ------------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` | -| macOS (Intel) | `opencode-desktop-darwin-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm` ou AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### Diretório de instalação - -O script de instalação respeita a seguinte ordem de prioridade para o caminho de instalação: - -1. `$OPENCODE_INSTALL_DIR` - Diretório de instalação personalizado -2. `$XDG_BIN_DIR` - Caminho compatível com a especificação XDG Base Directory -3. `$HOME/bin` - Diretório binário padrão do usuário (se existir ou puder ser criado) -4. `$HOME/.opencode/bin` - Fallback padrão - -```bash -# Exemplos -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Agents - -O OpenCode inclui dois agents integrados, que você pode alternar com a tecla `Tab`. - -- **build** - Padrão, agent com acesso total para trabalho de desenvolvimento -- **plan** - Agent somente leitura para análise e exploração de código - - Nega edições de arquivos por padrão - - Pede permissão antes de executar comandos bash - - Ideal para explorar codebases desconhecidas ou planejar mudanças - -Também há um subagent **general** para buscas complexas e tarefas em várias etapas. -Ele é usado internamente e pode ser invocado com `@general` nas mensagens. - -Saiba mais sobre [agents](https://opencode.ai/docs/agents). - -### Documentação - -Para mais informações sobre como configurar o OpenCode, [**veja nossa documentação**](https://opencode.ai/docs). - -### Contribuir - -Se você tem interesse em contribuir com o OpenCode, leia os [contributing docs](./CONTRIBUTING.md) antes de enviar um pull request. - -### Construindo com OpenCode - -Se você estiver trabalhando em um projeto relacionado ao OpenCode e estiver usando "opencode" como parte do nome (por exemplo, "opencode-dashboard" ou "opencode-mobile"), adicione uma nota no README para deixar claro que não foi construído pela equipe do OpenCode e não é afiliado a nós de nenhuma forma. - -### FAQ - -#### Como isso é diferente do Claude Code? - -É muito parecido com o Claude Code em termos de capacidade. Aqui estão as principais diferenças: - -- 100% open source -- Não está acoplado a nenhum provedor. Embora recomendemos os modelos que oferecemos pelo [OpenCode Zen](https://opencode.ai/zen); o OpenCode pode ser usado com Claude, OpenAI, Google ou até modelos locais. À medida que os modelos evoluem, as diferenças diminuem e os preços caem, então ser provider-agnostic é importante. -- Suporte a LSP pronto para uso -- Foco em TUI. O OpenCode é construído por usuários de neovim e pelos criadores do [terminal.shop](https://terminal.shop); vamos levar ao limite o que é possível no terminal. -- Arquitetura cliente/servidor. Isso, por exemplo, permite executar o OpenCode no seu computador enquanto você o controla remotamente por um aplicativo mobile. Isso significa que o frontend TUI é apenas um dos possíveis clientes. - ---- - -**Junte-se à nossa comunidade** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.bs.md b/README.bs.md deleted file mode 100644 index 2cff8e027..000000000 --- a/README.bs.md +++ /dev/null @@ -1,141 +0,0 @@ -

- - - - - OpenCode logo - - -

-

OpenCode je open source AI agent za programiranje.

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### Instalacija - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# Package manageri -npm i -g opencode-ai@latest # ili bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS i Linux (preporučeno, uvijek ažurno) -brew install opencode # macOS i Linux (zvanična brew formula, rjeđe se ažurira) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # Bilo koji OS -nix run nixpkgs#opencode # ili github:anomalyco/opencode za najnoviji dev branch -``` - -> [!TIP] -> Ukloni verzije starije od 0.1.x prije instalacije. - -### Desktop aplikacija (BETA) - -OpenCode je dostupan i kao desktop aplikacija. Preuzmi je direktno sa [stranice izdanja](https://github.com/anomalyco/opencode/releases) ili sa [opencode.ai/download](https://opencode.ai/download). - -| Platforma | Preuzimanje | -| --------------------- | ------------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` | -| macOS (Intel) | `opencode-desktop-darwin-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm`, ili AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### Instalacijski direktorij - -Instalacijska skripta koristi sljedeći redoslijed prioriteta za putanju instalacije: - -1. `$OPENCODE_INSTALL_DIR` - Prilagođeni instalacijski direktorij -2. `$XDG_BIN_DIR` - Putanja usklađena sa XDG Base Directory specifikacijom -3. `$HOME/bin` - Standardni korisnički bin direktorij (ako postoji ili se može kreirati) -4. `$HOME/.opencode/bin` - Podrazumijevana rezervna lokacija - -```bash -# Primjeri -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Agenti - -OpenCode uključuje dva ugrađena agenta između kojih možeš prebacivati tasterom `Tab`. - -- **build** - Podrazumijevani agent sa punim pristupom za razvoj -- **plan** - Agent samo za čitanje za analizu i istraživanje koda - - Podrazumijevano zabranjuje izmjene datoteka - - Traži dozvolu prije pokretanja bash komandi - - Idealan za istraživanje nepoznatih codebase-ova ili planiranje izmjena - -Uključen je i **general** pod-agent za složene pretrage i višekoračne zadatke. -Koristi se interno i može se pozvati pomoću `@general` u porukama. - -Saznaj više o [agentima](https://opencode.ai/docs/agents). - -### Dokumentacija - -Za više informacija o konfiguraciji OpenCode-a, [**pogledaj dokumentaciju**](https://opencode.ai/docs). - -### Doprinosi - -Ako želiš doprinositi OpenCode-u, pročitaj [upute za doprinošenje](./CONTRIBUTING.md) prije slanja pull requesta. - -### Gradnja na OpenCode-u - -Ako radiš na projektu koji je povezan s OpenCode-om i koristi "opencode" kao dio naziva, npr. "opencode-dashboard" ili "opencode-mobile", dodaj napomenu u svoj README da projekat nije napravio OpenCode tim i da nije povezan s nama. - -### FAQ - -#### Po čemu se razlikuje od Claude Code-a? - -Po mogućnostima je vrlo sličan Claude Code-u. Ključne razlike su: - -- 100% open source -- Nije vezan za jednog provajdera. Iako preporučujemo modele koje nudimo kroz [OpenCode Zen](https://opencode.ai/zen), OpenCode možeš koristiti s Claude, OpenAI, Google ili čak lokalnim modelima. Kako modeli napreduju, razlike među njima će se smanjivati, a cijene padati, zato je nezavisnost od provajdera važna. -- LSP podrška odmah po instalaciji -- Fokus na TUI. OpenCode grade neovim korisnici i kreatori [terminal.shop](https://terminal.shop); pomjeraćemo granice onoga što je moguće u terminalu. -- Klijent/server arhitektura. To, recimo, omogućava da OpenCode radi na tvom računaru dok ga daljinski koristiš iz mobilne aplikacije, što znači da je TUI frontend samo jedan od mogućih klijenata. - ---- - -**Pridruži se našoj zajednici** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.da.md b/README.da.md deleted file mode 100644 index ac522f29c..000000000 --- a/README.da.md +++ /dev/null @@ -1,141 +0,0 @@ -

- - - - - OpenCode logo - - -

-

Den open source AI-kodeagent.

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### Installation - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# Pakkehåndteringer -npm i -g opencode-ai@latest # eller bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS og Linux (anbefalet, altid up to date) -brew install opencode # macOS og Linux (officiel brew formula, opdateres sjældnere) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # alle OS -nix run nixpkgs#opencode # eller github:anomalyco/opencode for nyeste dev-branch -``` - -> [!TIP] -> Fjern versioner ældre end 0.1.x før installation. - -### Desktop-app (BETA) - -OpenCode findes også som desktop-app. Download direkte fra [releases-siden](https://github.com/anomalyco/opencode/releases) eller [opencode.ai/download](https://opencode.ai/download). - -| Platform | Download | -| --------------------- | ------------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` | -| macOS (Intel) | `opencode-desktop-darwin-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm`, eller AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### Installationsmappe - -Installationsscriptet bruger følgende prioriteringsrækkefølge for installationsstien: - -1. `$OPENCODE_INSTALL_DIR` - Tilpasset installationsmappe -2. `$XDG_BIN_DIR` - Sti der følger XDG Base Directory Specification -3. `$HOME/bin` - Standard bruger-bin-mappe (hvis den findes eller kan oprettes) -4. `$HOME/.opencode/bin` - Standard fallback - -```bash -# Eksempler -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Agents - -OpenCode har to indbyggede agents, som du kan skifte mellem med `Tab`-tasten. - -- **build** - Standard, agent med fuld adgang til udviklingsarbejde -- **plan** - Skrivebeskyttet agent til analyse og kodeudforskning - - Afviser filredigering som standard - - Spørger om tilladelse før bash-kommandoer - - Ideel til at udforske ukendte kodebaser eller planlægge ændringer - -Derudover findes der en **general**-subagent til komplekse søgninger og flertrinsopgaver. -Den bruges internt og kan kaldes via `@general` i beskeder. - -Læs mere om [agents](https://opencode.ai/docs/agents). - -### Dokumentation - -For mere info om konfiguration af OpenCode, [**se vores docs**](https://opencode.ai/docs). - -### Bidrag - -Hvis du vil bidrage til OpenCode, så læs vores [contributing docs](./CONTRIBUTING.md) før du sender en pull request. - -### Bygget på OpenCode - -Hvis du arbejder på et projekt der er relateret til OpenCode og bruger "opencode" som en del af navnet; f.eks. "opencode-dashboard" eller "opencode-mobile", så tilføj en note i din README, der tydeliggør at projektet ikke er bygget af OpenCode-teamet og ikke er tilknyttet os på nogen måde. - -### FAQ - -#### Hvordan adskiller dette sig fra Claude Code? - -Det minder meget om Claude Code i forhold til funktionalitet. Her er de vigtigste forskelle: - -- 100% open source -- Ikke låst til en udbyder. Selvom vi anbefaler modellerne via [OpenCode Zen](https://opencode.ai/zen); kan OpenCode bruges med Claude, OpenAI, Google eller endda lokale modeller. Efterhånden som modeller udvikler sig vil forskellene mindskes og priserne falde, så det er vigtigt at være provider-agnostic. -- LSP-support out of the box -- Fokus på TUI. OpenCode er bygget af neovim-brugere og skaberne af [terminal.shop](https://terminal.shop); vi vil skubbe grænserne for hvad der er muligt i terminalen. -- Klient/server-arkitektur. Det kan f.eks. lade OpenCode køre på din computer, mens du styrer den eksternt fra en mobilapp. Det betyder at TUI-frontend'en kun er en af de mulige clients. - ---- - -**Bliv en del af vores community** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.de.md b/README.de.md deleted file mode 100644 index 87a670f3f..000000000 --- a/README.de.md +++ /dev/null @@ -1,141 +0,0 @@ -

- - - - - OpenCode logo - - -

-

Der Open-Source KI-Coding-Agent.

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### Installation - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# Paketmanager -npm i -g opencode-ai@latest # oder bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS und Linux (empfohlen, immer aktuell) -brew install opencode # macOS und Linux (offizielle Brew-Formula, seltener aktualisiert) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # jedes Betriebssystem -nix run nixpkgs#opencode # oder github:anomalyco/opencode für den neuesten dev-Branch -``` - -> [!TIP] -> Entferne Versionen älter als 0.1.x vor der Installation. - -### Desktop-App (BETA) - -OpenCode ist auch als Desktop-Anwendung verfügbar. Lade sie direkt von der [Releases-Seite](https://github.com/anomalyco/opencode/releases) oder [opencode.ai/download](https://opencode.ai/download) herunter. - -| Plattform | Download | -| --------------------- | ------------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` | -| macOS (Intel) | `opencode-desktop-darwin-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm` oder AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### Installationsverzeichnis - -Das Installationsskript beachtet die folgende Prioritätsreihenfolge für den Installationspfad: - -1. `$OPENCODE_INSTALL_DIR` - Benutzerdefiniertes Installationsverzeichnis -2. `$XDG_BIN_DIR` - XDG Base Directory Specification-konformer Pfad -3. `$HOME/bin` - Standard-Binärverzeichnis des Users (falls vorhanden oder erstellbar) -4. `$HOME/.opencode/bin` - Standard-Fallback - -```bash -# Beispiele -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Agents - -OpenCode enthält zwei eingebaute Agents, zwischen denen du mit der `Tab`-Taste wechseln kannst. - -- **build** - Standard-Agent mit vollem Zugriff für Entwicklungsarbeit -- **plan** - Nur-Lese-Agent für Analyse und Code-Exploration - - Verweigert Datei-Edits standardmäßig - - Fragt vor dem Ausführen von bash-Befehlen nach - - Ideal zum Erkunden unbekannter Codebases oder zum Planen von Änderungen - -Außerdem ist ein **general**-Subagent für komplexe Suchen und mehrstufige Aufgaben enthalten. -Dieser wird intern genutzt und kann in Nachrichten mit `@general` aufgerufen werden. - -Mehr dazu unter [Agents](https://opencode.ai/docs/agents). - -### Dokumentation - -Mehr Infos zur Konfiguration von OpenCode findest du in unseren [**Docs**](https://opencode.ai/docs). - -### Beitragen - -Wenn du zu OpenCode beitragen möchtest, lies bitte unsere [Contributing Docs](./CONTRIBUTING.md), bevor du einen Pull Request einreichst. - -### Auf OpenCode aufbauen - -Wenn du an einem Projekt arbeitest, das mit OpenCode zusammenhängt und "opencode" als Teil seines Namens verwendet (z.B. "opencode-dashboard" oder "opencode-mobile"), füge bitte einen Hinweis in deine README ein, dass es nicht vom OpenCode-Team gebaut wird und nicht in irgendeiner Weise mit uns verbunden ist. - -### FAQ - -#### Worin unterscheidet sich das von Claude Code? - -In Bezug auf die Fähigkeiten ist es Claude Code sehr ähnlich. Hier sind die wichtigsten Unterschiede: - -- 100% open source -- Nicht an einen Anbieter gekoppelt. Wir empfehlen die Modelle aus [OpenCode Zen](https://opencode.ai/zen); OpenCode kann aber auch mit Claude, OpenAI, Google oder sogar lokalen Modellen genutzt werden. Mit der Weiterentwicklung der Modelle werden die Unterschiede kleiner und die Preise sinken, deshalb ist Provider-Unabhängigkeit wichtig. -- LSP-Unterstützung direkt nach dem Start -- Fokus auf TUI. OpenCode wird von Neovim-Nutzern und den Machern von [terminal.shop](https://terminal.shop) gebaut; wir treiben die Grenzen dessen, was im Terminal möglich ist. -- Client/Server-Architektur. Das ermöglicht z.B., OpenCode auf deinem Computer laufen zu lassen, während du es von einer mobilen App aus fernsteuerst. Das TUI-Frontend ist nur einer der möglichen Clients. - ---- - -**Tritt unserer Community bei** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.es.md b/README.es.md deleted file mode 100644 index 9e456af1c..000000000 --- a/README.es.md +++ /dev/null @@ -1,141 +0,0 @@ -

- - - - - OpenCode logo - - -

-

El agente de programación con IA de código abierto.

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### Instalación - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# Gestores de paquetes -npm i -g opencode-ai@latest # o bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS y Linux (recomendado, siempre al día) -brew install opencode # macOS y Linux (fórmula oficial de brew, se actualiza menos) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # cualquier sistema -nix run nixpkgs#opencode # o github:anomalyco/opencode para la rama dev más reciente -``` - -> [!TIP] -> Elimina versiones anteriores a 0.1.x antes de instalar. - -### App de escritorio (BETA) - -OpenCode también está disponible como aplicación de escritorio. Descárgala directamente desde la [página de releases](https://github.com/anomalyco/opencode/releases) o desde [opencode.ai/download](https://opencode.ai/download). - -| Plataforma | Descarga | -| --------------------- | ------------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` | -| macOS (Intel) | `opencode-desktop-darwin-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm`, o AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### Directorio de instalación - -El script de instalación respeta el siguiente orden de prioridad para la ruta de instalación: - -1. `$OPENCODE_INSTALL_DIR` - Directorio de instalación personalizado -2. `$XDG_BIN_DIR` - Ruta compatible con la especificación XDG Base Directory -3. `$HOME/bin` - Directorio binario estándar del usuario (si existe o se puede crear) -4. `$HOME/.opencode/bin` - Alternativa por defecto - -```bash -# Ejemplos -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Agents - -OpenCode incluye dos agents integrados que puedes alternar con la tecla `Tab`. - -- **build** - Por defecto, agent con acceso completo para trabajo de desarrollo -- **plan** - Agent de solo lectura para análisis y exploración de código - - Niega ediciones de archivos por defecto - - Pide permiso antes de ejecutar comandos bash - - Ideal para explorar codebases desconocidas o planificar cambios - -Además, incluye un subagent **general** para búsquedas complejas y tareas de varios pasos. -Se usa internamente y se puede invocar con `@general` en los mensajes. - -Más información sobre [agents](https://opencode.ai/docs/agents). - -### Documentación - -Para más información sobre cómo configurar OpenCode, [**ve a nuestra documentación**](https://opencode.ai/docs). - -### Contribuir - -Si te interesa contribuir a OpenCode, lee nuestras [docs de contribución](./CONTRIBUTING.md) antes de enviar un pull request. - -### Construyendo sobre OpenCode - -Si estás trabajando en un proyecto relacionado con OpenCode y usas "opencode" como parte del nombre; por ejemplo, "opencode-dashboard" u "opencode-mobile", agrega una nota en tu README para aclarar que no está construido por el equipo de OpenCode y que no está afiliado con nosotros de ninguna manera. - -### FAQ - -#### ¿En qué se diferencia de Claude Code? - -Es muy similar a Claude Code en cuanto a capacidades. Estas son las diferencias clave: - -- 100% open source -- No está acoplado a ningún proveedor. Aunque recomendamos los modelos que ofrecemos a través de [OpenCode Zen](https://opencode.ai/zen); OpenCode se puede usar con Claude, OpenAI, Google o incluso modelos locales. A medida que evolucionan los modelos, las brechas se cerrarán y los precios bajarán, por lo que ser agnóstico al proveedor es importante. -- Soporte LSP listo para usar -- Un enfoque en la TUI. OpenCode está construido por usuarios de neovim y los creadores de [terminal.shop](https://terminal.shop); vamos a empujar los límites de lo que es posible en la terminal. -- Arquitectura cliente/servidor. Esto, por ejemplo, permite ejecutar OpenCode en tu computadora mientras lo controlas de forma remota desde una app móvil. Esto significa que el frontend TUI es solo uno de los posibles clientes. - ---- - -**Únete a nuestra comunidad** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.fr.md b/README.fr.md deleted file mode 100644 index c1fca2337..000000000 --- a/README.fr.md +++ /dev/null @@ -1,141 +0,0 @@ -

- - - - - Logo OpenCode - - -

-

L'agent de codage IA open source.

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### Installation - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# Gestionnaires de paquets -npm i -g opencode-ai@latest # ou bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS et Linux (recommandé, toujours à jour) -brew install opencode # macOS et Linux (formule officielle brew, mise à jour moins fréquente) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # n'importe quel OS -nix run nixpkgs#opencode # ou github:anomalyco/opencode pour la branche dev la plus récente -``` - -> [!TIP] -> Supprimez les versions antérieures à 0.1.x avant d'installer. - -### Application de bureau (BETA) - -OpenCode est aussi disponible en application de bureau. Téléchargez-la directement depuis la [page des releases](https://github.com/anomalyco/opencode/releases) ou [opencode.ai/download](https://opencode.ai/download). - -| Plateforme | Téléchargement | -| --------------------- | ------------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` | -| macOS (Intel) | `opencode-desktop-darwin-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm`, ou AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### Répertoire d'installation - -Le script d'installation respecte l'ordre de priorité suivant pour le chemin d'installation : - -1. `$OPENCODE_INSTALL_DIR` - Répertoire d'installation personnalisé -2. `$XDG_BIN_DIR` - Chemin conforme à la spécification XDG Base Directory -3. `$HOME/bin` - Répertoire binaire utilisateur standard (s'il existe ou peut être créé) -4. `$HOME/.opencode/bin` - Repli par défaut - -```bash -# Exemples -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Agents - -OpenCode inclut deux agents intégrés que vous pouvez basculer avec la touche `Tab`. - -- **build** - Par défaut, agent avec accès complet pour le travail de développement -- **plan** - Agent en lecture seule pour l'analyse et l'exploration du code - - Refuse les modifications de fichiers par défaut - - Demande l'autorisation avant d'exécuter des commandes bash - - Idéal pour explorer une base de code inconnue ou planifier des changements - -Un sous-agent **general** est aussi inclus pour les recherches complexes et les tâches en plusieurs étapes. -Il est utilisé en interne et peut être invoqué via `@general` dans les messages. - -En savoir plus sur les [agents](https://opencode.ai/docs/agents). - -### Documentation - -Pour plus d'informations sur la configuration d'OpenCode, [**consultez notre documentation**](https://opencode.ai/docs). - -### Contribuer - -Si vous souhaitez contribuer à OpenCode, lisez nos [docs de contribution](./CONTRIBUTING.md) avant de soumettre une pull request. - -### Construire avec OpenCode - -Si vous travaillez sur un projet lié à OpenCode et que vous utilisez "opencode" dans le nom du projet (par exemple, "opencode-dashboard" ou "opencode-mobile"), ajoutez une note dans votre README pour préciser qu'il n'est pas construit par l'équipe OpenCode et qu'il n'est pas affilié à nous. - -### FAQ - -#### En quoi est-ce différent de Claude Code ? - -C'est très similaire à Claude Code en termes de capacités. Voici les principales différences : - -- 100% open source -- Pas couplé à un fournisseur. Nous recommandons les modèles proposés via [OpenCode Zen](https://opencode.ai/zen) ; OpenCode peut être utilisé avec Claude, OpenAI, Google ou même des modèles locaux. Au fur et à mesure que les modèles évoluent, les écarts se réduiront et les prix baisseront, donc être agnostique au fournisseur est important. -- Support LSP prêt à l'emploi -- Un focus sur la TUI. OpenCode est construit par des utilisateurs de neovim et les créateurs de [terminal.shop](https://terminal.shop) ; nous allons repousser les limites de ce qui est possible dans le terminal. -- Architecture client/serveur. Cela permet par exemple de faire tourner OpenCode sur votre ordinateur tout en le pilotant à distance depuis une application mobile. Cela signifie que la TUI n'est qu'un des clients possibles. - ---- - -**Rejoignez notre communauté** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.gr.md b/README.gr.md deleted file mode 100644 index 2b2c2679d..000000000 --- a/README.gr.md +++ /dev/null @@ -1,141 +0,0 @@ -

- - - - - OpenCode logo - - -

-

Ο πράκτορας τεχνητής νοημοσύνης ανοικτού κώδικα για προγραμματισμό.

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### Εγκατάσταση - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# Διαχειριστές πακέτων -npm i -g opencode-ai@latest # ή bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS και Linux (προτείνεται, πάντα ενημερωμένο) -brew install opencode # macOS και Linux (επίσημος τύπος brew, λιγότερο συχνές ενημερώσεις) -sudo pacman -S opencode # Arch Linux (Σταθερό) -paru -S opencode-bin # Arch Linux (Τελευταία έκδοση από AUR) -mise use -g opencode # Οποιοδήποτε λειτουργικό σύστημα -nix run nixpkgs#opencode # ή github:anomalyco/opencode με βάση την πιο πρόσφατη αλλαγή από το dev branch -``` - -> [!TIP] -> Αφαίρεσε παλαιότερες εκδόσεις από τη 0.1.x πριν από την εγκατάσταση. - -### Εφαρμογή Desktop (BETA) - -Το OpenCode είναι επίσης διαθέσιμο ως εφαρμογή. Κατέβασε το απευθείας από τη [σελίδα εκδόσεων](https://github.com/anomalyco/opencode/releases) ή το [opencode.ai/download](https://opencode.ai/download). - -| Πλατφόρμα | Λήψη | -| --------------------- | ------------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` | -| macOS (Intel) | `opencode-desktop-darwin-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm`, ή AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### Κατάλογος Εγκατάστασης - -Το script εγκατάστασης τηρεί την ακόλουθη σειρά προτεραιότητας για τη διαδρομή εγκατάστασης: - -1. `$OPENCODE_INSTALL_DIR` - Προσαρμοσμένος κατάλογος εγκατάστασης -2. `$XDG_BIN_DIR` - Διαδρομή συμβατή με τις προδιαγραφές XDG Base Directory -3. `$HOME/bin` - Τυπικός κατάλογος εκτελέσιμων αρχείων χρήστη (εάν υπάρχει ή μπορεί να δημιουργηθεί) -4. `$HOME/.opencode/bin` - Προεπιλεγμένη εφεδρική διαδρομή - -```bash -# Παραδείγματα -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Πράκτορες - -Το OpenCode περιλαμβάνει δύο ενσωματωμένους πράκτορες μεταξύ των οποίων μπορείτε να εναλλάσσεστε με το πλήκτρο `Tab`. - -- **build** - Προεπιλεγμένος πράκτορας με πλήρη πρόσβαση για εργασία πάνω σε κώδικα -- **plan** - Πράκτορας μόνο ανάγνωσης για ανάλυση και εξερεύνηση κώδικα - - Αρνείται την επεξεργασία αρχείων από προεπιλογή - - Ζητά άδεια πριν εκτελέσει εντολές bash - - Ιδανικός για εξερεύνηση άγνωστων αρχείων πηγαίου κώδικα ή σχεδιασμό αλλαγών - -Περιλαμβάνεται επίσης ένας **general** υποπράκτορας για σύνθετες αναζητήσεις και πολυβηματικές διεργασίες. -Χρησιμοποιείται εσωτερικά και μπορεί να κληθεί χρησιμοποιώντας `@general` στα μηνύματα. - -Μάθετε περισσότερα για τους [πράκτορες](https://opencode.ai/docs/agents). - -### Οδηγός Χρήσης - -Για περισσότερες πληροφορίες σχετικά με τη ρύθμιση του OpenCode, [**πλοηγήσου στον οδηγό χρήσης μας**](https://opencode.ai/docs). - -### Συνεισφορά - -Εάν ενδιαφέρεσαι να συνεισφέρεις στο OpenCode, διαβάστε τα [οδηγό χρήσης συνεισφοράς](./CONTRIBUTING.md) πριν υποβάλεις ένα pull request. - -### Δημιουργία πάνω στο OpenCode - -Εάν εργάζεσαι σε ένα έργο σχετικό με το OpenCode και χρησιμοποιείτε το "opencode" ως μέρος του ονόματός του, για παράδειγμα "opencode-dashboard" ή "opencode-mobile", πρόσθεσε μια σημείωση στο README σας για να διευκρινίσεις ότι δεν είναι κατασκευασμένο από την ομάδα του OpenCode και δεν έχει καμία σχέση με εμάς. - -### Συχνές Ερωτήσεις - -#### Πώς διαφέρει αυτό από το Claude Code; - -Είναι πολύ παρόμοιο με το Claude Code ως προς τις δυνατότητες. Ακολουθούν οι βασικές διαφορές: - -- 100% ανοιχτού κώδικα -- Δεν είναι συνδεδεμένο με κανέναν πάροχο. Αν και συνιστούμε τα μοντέλα που παρέχουμε μέσω του [OpenCode Zen](https://opencode.ai/zen), το OpenCode μπορεί να χρησιμοποιηθεί με Claude, OpenAI, Google, ή ακόμα και τοπικά μοντέλα. Καθώς τα μοντέλα εξελίσσονται, τα κενά μεταξύ τους θα κλείσουν και οι τιμές θα μειωθούν, οπότε είναι σημαντικό να είσαι ανεξάρτητος από τον πάροχο. -- Out-of-the-box υποστήριξη LSP -- Εστίαση στο TUI. Το OpenCode είναι κατασκευασμένο από χρήστες που χρησιμοποιούν neovim και τους δημιουργούς του [terminal.shop](https://terminal.shop)· θα εξαντλήσουμε τα όρια του τι είναι δυνατό στο terminal. -- Αρχιτεκτονική client/server. Αυτό, για παράδειγμα, μπορεί να επιτρέψει στο OpenCode να τρέχει στον υπολογιστή σου ενώ το χειρίζεσαι εξ αποστάσεως από μια εφαρμογή κινητού, που σημαίνει ότι το TUI frontend είναι μόνο ένας από τους πιθανούς clients. - ---- - -**Γίνε μέλος της κοινότητάς μας** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.it.md b/README.it.md deleted file mode 100644 index 3e516a902..000000000 --- a/README.it.md +++ /dev/null @@ -1,141 +0,0 @@ -

- - - - - Logo OpenCode - - -

-

L’agente di coding AI open source.

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### Installazione - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# Package manager -npm i -g opencode-ai@latest # oppure bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS e Linux (consigliato, sempre aggiornato) -brew install opencode # macOS e Linux (formula brew ufficiale, aggiornata meno spesso) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # Qualsiasi OS -nix run nixpkgs#opencode # oppure github:anomalyco/opencode per l’ultima branch di sviluppo -``` - -> [!TIP] -> Rimuovi le versioni precedenti alla 0.1.x prima di installare. - -### App Desktop (BETA) - -OpenCode è disponibile anche come applicazione desktop. Puoi scaricarla direttamente dalla [pagina delle release](https://github.com/anomalyco/opencode/releases) oppure da [opencode.ai/download](https://opencode.ai/download). - -| Piattaforma | Download | -| --------------------- | ------------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` | -| macOS (Intel) | `opencode-desktop-darwin-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm`, oppure AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### Directory di installazione - -Lo script di installazione rispetta il seguente ordine di priorità per il percorso di installazione: - -1. `$OPENCODE_INSTALL_DIR` – Directory di installazione personalizzata -2. `$XDG_BIN_DIR` – Percorso conforme alla XDG Base Directory Specification -3. `$HOME/bin` – Directory binaria standard dell’utente (se esiste o può essere creata) -4. `$HOME/.opencode/bin` – Fallback predefinito - -```bash -# Esempi -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Agenti - -OpenCode include due agenti integrati tra cui puoi passare usando il tasto `Tab`. - -- **build** – Predefinito, agente con accesso completo per il lavoro di sviluppo -- **plan** – Agente in sola lettura per analisi ed esplorazione del codice - - Nega le modifiche ai file per impostazione predefinita - - Chiede il permesso prima di eseguire comandi bash - - Ideale per esplorare codebase sconosciute o pianificare modifiche - -È inoltre incluso un sotto-agente **general** per ricerche complesse e attività multi-step. -Viene utilizzato internamente e può essere invocato usando `@general` nei messaggi. - -Scopri di più sugli [agenti](https://opencode.ai/docs/agents). - -### Documentazione - -Per maggiori informazioni su come configurare OpenCode, [**consulta la nostra documentazione**](https://opencode.ai/docs). - -### Contribuire - -Se sei interessato a contribuire a OpenCode, leggi la nostra [guida alla contribuzione](./CONTRIBUTING.md) prima di inviare una pull request. - -### Costruire su OpenCode - -Se stai lavorando a un progetto correlato a OpenCode e che utilizza “opencode” come parte del nome (ad esempio “opencode-dashboard” o “opencode-mobile”), aggiungi una nota nel tuo README per chiarire che non è sviluppato dal team OpenCode e che non è affiliato in alcun modo con noi. - -### FAQ - -#### In cosa è diverso da Claude Code? - -È molto simile a Claude Code in termini di funzionalità. Ecco le principali differenze: - -- 100% open source -- Non è legato a nessun provider. Anche se consigliamo i modelli forniti tramite [OpenCode Zen](https://opencode.ai/zen), OpenCode può essere utilizzato con Claude, OpenAI, Google o persino modelli locali. Con l’evoluzione dei modelli, le differenze tra di essi si ridurranno e i prezzi scenderanno, quindi essere indipendenti dal provider è importante. -- Supporto LSP pronto all’uso -- Forte attenzione alla TUI. OpenCode è sviluppato da utenti neovim e dai creatori di [terminal.shop](https://terminal.shop); spingeremo al limite ciò che è possibile fare nel terminale. -- Architettura client/server. Questo, ad esempio, permette a OpenCode di girare sul tuo computer mentre lo controlli da remoto tramite un’app mobile. La frontend TUI è quindi solo uno dei possibili client. - ---- - -**Unisciti alla nostra community** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.ja.md b/README.ja.md deleted file mode 100644 index 144dc7b6f..000000000 --- a/README.ja.md +++ /dev/null @@ -1,141 +0,0 @@ -

- - - - - OpenCode logo - - -

-

オープンソースのAIコーディングエージェント。

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### インストール - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# パッケージマネージャー -npm i -g opencode-ai@latest # bun/pnpm/yarn でもOK -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS と Linux(推奨。常に最新) -brew install opencode # macOS と Linux(公式 brew formula。更新頻度は低め) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # どのOSでも -nix run nixpkgs#opencode # または github:anomalyco/opencode で最新 dev ブランチ -``` - -> [!TIP] -> インストール前に 0.1.x より古いバージョンを削除してください。 - -### デスクトップアプリ (BETA) - -OpenCode はデスクトップアプリとしても利用できます。[releases page](https://github.com/anomalyco/opencode/releases) から直接ダウンロードするか、[opencode.ai/download](https://opencode.ai/download) を利用してください。 - -| プラットフォーム | ダウンロード | -| --------------------- | ------------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` | -| macOS (Intel) | `opencode-desktop-darwin-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`、`.rpm`、または AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### インストールディレクトリ - -インストールスクリプトは、インストール先パスを次の優先順位で決定します。 - -1. `$OPENCODE_INSTALL_DIR` - カスタムのインストールディレクトリ -2. `$XDG_BIN_DIR` - XDG Base Directory Specification に準拠したパス -3. `$HOME/bin` - 標準のユーザー用バイナリディレクトリ(存在する場合、または作成できる場合) -4. `$HOME/.opencode/bin` - デフォルトのフォールバック - -```bash -# 例 -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Agents - -OpenCode には組み込みの Agent が2つあり、`Tab` キーで切り替えられます。 - -- **build** - デフォルト。開発向けのフルアクセス Agent -- **plan** - 分析とコード探索向けの読み取り専用 Agent - - デフォルトでファイル編集を拒否 - - bash コマンド実行前に確認 - - 未知のコードベース探索や変更計画に最適 - -また、複雑な検索やマルチステップのタスク向けに **general** サブ Agent も含まれています。 -内部的に使用されており、メッセージで `@general` と入力して呼び出せます。 - -[agents](https://opencode.ai/docs/agents) の詳細はこちら。 - -### ドキュメント - -OpenCode の設定については [**ドキュメント**](https://opencode.ai/docs) を参照してください。 - -### コントリビュート - -OpenCode に貢献したい場合は、Pull Request を送る前に [contributing docs](./CONTRIBUTING.md) を読んでください。 - -### OpenCode の上に構築する - -OpenCode に関連するプロジェクトで、名前に "opencode"(例: "opencode-dashboard" や "opencode-mobile")を含める場合は、そのプロジェクトが OpenCode チームによって作られたものではなく、いかなる形でも関係がないことを README に明記してください。 - -### FAQ - -#### Claude Code との違いは? - -機能面では Claude Code と非常に似ています。主な違いは次のとおりです。 - -- 100% オープンソース -- 特定のプロバイダーに依存しません。[OpenCode Zen](https://opencode.ai/zen) で提供しているモデルを推奨しますが、OpenCode は Claude、OpenAI、Google、またはローカルモデルでも利用できます。モデルが進化すると差は縮まり価格も下がるため、provider-agnostic であることが重要です。 -- そのまま使える LSP サポート -- TUI にフォーカス。OpenCode は neovim ユーザーと [terminal.shop](https://terminal.shop) の制作者によって作られており、ターミナルで可能なことの限界を押し広げます。 -- クライアント/サーバー構成。例えば OpenCode をあなたのPCで動かし、モバイルアプリからリモート操作できます。TUI フロントエンドは複数あるクライアントの1つにすぎません。 - ---- - -**コミュニティに参加** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.ko.md b/README.ko.md deleted file mode 100644 index 32defc0a5..000000000 --- a/README.ko.md +++ /dev/null @@ -1,141 +0,0 @@ -

- - - - - OpenCode logo - - -

-

오픈 소스 AI 코딩 에이전트.

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### 설치 - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# 패키지 매니저 -npm i -g opencode-ai@latest # bun/pnpm/yarn 도 가능 -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS 및 Linux (권장, 항상 최신) -brew install opencode # macOS 및 Linux (공식 brew formula, 업데이트 빈도 낮음) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # 어떤 OS든 -nix run nixpkgs#opencode # 또는 github:anomalyco/opencode 로 최신 dev 브랜치 -``` - -> [!TIP] -> 설치 전에 0.1.x 보다 오래된 버전을 제거하세요. - -### 데스크톱 앱 (BETA) - -OpenCode 는 데스크톱 앱으로도 제공됩니다. [releases page](https://github.com/anomalyco/opencode/releases) 에서 직접 다운로드하거나 [opencode.ai/download](https://opencode.ai/download) 를 이용하세요. - -| 플랫폼 | 다운로드 | -| --------------------- | ------------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` | -| macOS (Intel) | `opencode-desktop-darwin-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm`, 또는 AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### 설치 디렉터리 - -설치 스크립트는 설치 경로를 다음 우선순위로 결정합니다. - -1. `$OPENCODE_INSTALL_DIR` - 사용자 지정 설치 디렉터리 -2. `$XDG_BIN_DIR` - XDG Base Directory Specification 준수 경로 -3. `$HOME/bin` - 표준 사용자 바이너리 디렉터리 (존재하거나 생성 가능할 경우) -4. `$HOME/.opencode/bin` - 기본 폴백 - -```bash -# 예시 -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Agents - -OpenCode 에는 내장 에이전트 2개가 있으며 `Tab` 키로 전환할 수 있습니다. - -- **build** - 기본값, 개발 작업을 위한 전체 권한 에이전트 -- **plan** - 분석 및 코드 탐색을 위한 읽기 전용 에이전트 - - 기본적으로 파일 편집을 거부 - - bash 명령 실행 전에 권한을 요청 - - 낯선 코드베이스를 탐색하거나 변경을 계획할 때 적합 - -또한 복잡한 검색과 여러 단계 작업을 위한 **general** 서브 에이전트가 포함되어 있습니다. -내부적으로 사용되며, 메시지에서 `@general` 로 호출할 수 있습니다. - -[agents](https://opencode.ai/docs/agents) 에 대해 더 알아보세요. - -### 문서 - -OpenCode 설정에 대한 자세한 내용은 [**문서**](https://opencode.ai/docs) 를 참고하세요. - -### 기여하기 - -OpenCode 에 기여하고 싶다면, Pull Request 를 제출하기 전에 [contributing docs](./CONTRIBUTING.md) 를 읽어주세요. - -### OpenCode 기반으로 만들기 - -OpenCode 와 관련된 프로젝트를 진행하면서 이름에 "opencode"(예: "opencode-dashboard" 또는 "opencode-mobile") 를 포함한다면, README 에 해당 프로젝트가 OpenCode 팀이 만든 것이 아니며 어떤 방식으로도 우리와 제휴되어 있지 않다는 점을 명시해 주세요. - -### FAQ - -#### Claude Code 와는 무엇이 다른가요? - -기능 면에서는 Claude Code 와 매우 유사합니다. 주요 차이점은 다음과 같습니다. - -- 100% 오픈 소스 -- 특정 제공자에 묶여 있지 않습니다. [OpenCode Zen](https://opencode.ai/zen) 을 통해 제공하는 모델을 권장하지만, OpenCode 는 Claude, OpenAI, Google 또는 로컬 모델과도 사용할 수 있습니다. 모델이 발전하면서 격차는 줄고 가격은 내려가므로 provider-agnostic 인 것이 중요합니다. -- 기본으로 제공되는 LSP 지원 -- TUI 에 집중. OpenCode 는 neovim 사용자와 [terminal.shop](https://terminal.shop) 제작자가 만들었으며, 터미널에서 가능한 것의 한계를 밀어붙입니다. -- 클라이언트/서버 아키텍처. 예를 들어 OpenCode 를 내 컴퓨터에서 실행하면서 모바일 앱으로 원격 조작할 수 있습니다. 즉, TUI 프런트엔드는 가능한 여러 클라이언트 중 하나일 뿐입니다. - ---- - -**커뮤니티에 참여하기** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.md b/README.md index 79ccf8b34..64cb6f4a8 100644 --- a/README.md +++ b/README.md @@ -1,141 +1,101 @@ -

- - - - - OpenCode logo - - -

-

The open source AI coding agent.

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) +# Frankencode + +A fork of [OpenCode](https://github.com/anomalyco/opencode) with agent-driven context editing. --- -### Installation +## What Frankencode Adds -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# Package managers -npm i -g opencode-ai@latest # or bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS and Linux (recommended, always up to date) -brew install opencode # macOS and Linux (official brew formula, updated less) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # Any OS -nix run nixpkgs#opencode # or github:anomalyco/opencode for latest dev branch -``` +Agents can surgically edit their own conversation context — hiding stale tool output, replacing incorrect statements, externalizing verbose content to a content-addressable store — while preserving all original content in a git-like versioned DAG. + +### Context Editing Tools + +| Tool | What it does | +|------|-------------| +| `context_edit` | Hide, replace, annotate, or externalize conversation parts | +| `context_deref` | Retrieve externalized content by CAS hash | +| `context_history` | Navigate the edit DAG: log, tree, checkout, fork | +| `thread_park` | Park an off-topic finding as a side thread | +| `thread_list` | List side threads for the project | -> [!TIP] -> Remove versions older than 0.1.x before installing. +### Content-Addressable Store -### Desktop App (BETA) +Every edit preserves the original content in a SQLite CAS table (`cas_object`). Content is hashed (SHA-256) and deduplicated. The agent can dereference any hash to retrieve the original. -OpenCode is also available as a desktop application. Download directly from the [releases page](https://github.com/anomalyco/opencode/releases) or [opencode.ai/download](https://opencode.ai/download). +### Edit Graph -| Platform | Download | -| --------------------- | ------------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` | -| macOS (Intel) | `opencode-desktop-darwin-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm`, or AppImage | +Edit history is modeled as a DAG (`edit_graph_node` + `edit_graph_head` tables). Each edit creates a node with a parent pointer. Named branches and checkout enable exploring alternative edit paths. + +### Focus Agent + +A hidden post-turn agent that keeps conversations on-topic by parking off-topic discoveries as side threads. Enabled via: ```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop +OPENCODE_EXPERIMENTAL_FOCUS_AGENT=1 opencode ``` -#### Installation Directory +### Side Threads + +Project-level deferred findings (`side_thread` table) that survive across sessions. The focus agent parks them automatically; users can also park manually via `thread_park`. + +--- -The install script respects the following priority order for the installation path: +## Installation -1. `$OPENCODE_INSTALL_DIR` - Custom installation directory -2. `$XDG_BIN_DIR` - XDG Base Directory Specification compliant path -3. `$HOME/bin` - Standard user binary directory (if it exists or can be created) -4. `$HOME/.opencode/bin` - Default fallback +Frankencode is built from source: ```bash -# Examples -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash +git clone https://github.com/e6qu/frankencode.git +cd frankencode +bun install +bun run --cwd packages/opencode dev ``` -### Agents - -OpenCode includes two built-in agents you can switch between with the `Tab` key. +Requires [Bun](https://bun.sh) 1.3.10+. -- **build** - Default, full-access agent for development work -- **plan** - Read-only agent for analysis and code exploration - - Denies file edits by default - - Asks permission before running bash commands - - Ideal for exploring unfamiliar codebases or planning changes +--- -Also included is a **general** subagent for complex searches and multistep tasks. -This is used internally and can be invoked using `@general` in messages. +## Upstream OpenCode -Learn more about [agents](https://opencode.ai/docs/agents). +Frankencode tracks upstream OpenCode (`dev` branch). All original OpenCode features, agents, providers, tools, and configuration work as documented at [opencode.ai/docs](https://opencode.ai/docs). -### Documentation +### Agents -For more info on how to configure OpenCode, [**head over to our docs**](https://opencode.ai/docs). +- **build** — default, full-access agent for development work +- **plan** — read-only agent for analysis and code exploration +- **general** — subagent for complex searches (invoke with `@general`) +- **focus** — hidden post-turn agent for context curation (Frankencode addition) -### Contributing +--- -If you're interested in contributing to OpenCode, please read our [contributing docs](./CONTRIBUTING.md) before submitting a pull request. +## Design Documents -### Building on OpenCode +Research and design documents in [`docs/research/`](docs/research/): -If you are working on a project that's related to OpenCode and is using "opencode" as part of its name, for example "opencode-dashboard" or "opencode-mobile", please add a note to your README to clarify that it is not built by the OpenCode team and is not affiliated with us in any way. +- `REPORT.md` — deep research on OpenCode architecture +- `CONTEXT_EDITING_MVP.md` — MVP feature set +- `EDITABLE_CONTEXT.md` — base design for editable threads +- `EDITABLE_CONTEXT_MODES.md` — 6 context management modes +- `EDITABLE_CONTEXT_MERKLE.md` — content-addressable storage design +- `EDITABLE_CONTEXT_FOCUS.md` — focus agent and side threads +- `EDITABLE_CONTEXT_PRESS_RELEASE.md` — Amazon-style PR/FAQ +- `DEEP_RESEARCH_POST_FACTUM_CONTEXT_EDITING.md` — literature review (40+ papers/tools) +- `UI_CUSTOMIZATION.md` — TUI/web UI customization reference -### FAQ +--- -#### How is this different from Claude Code? +## Contributing -It's very similar to Claude Code in terms of capability. Here are the key differences: +```bash +bun install +bun test --cwd packages/opencode # run tests +bun turbo typecheck # typecheck all packages +``` -- 100% open source -- Not coupled to any provider. Although we recommend the models we provide through [OpenCode Zen](https://opencode.ai/zen), OpenCode can be used with Claude, OpenAI, Google, or even local models. As models evolve, the gaps between them will close and pricing will drop, so being provider-agnostic is important. -- Out-of-the-box LSP support -- A focus on TUI. OpenCode is built by neovim users and the creators of [terminal.shop](https://terminal.shop); we are going to push the limits of what's possible in the terminal. -- A client/server architecture. This, for example, can allow OpenCode to run on your computer while you drive it remotely from a mobile app, meaning that the TUI frontend is just one of the possible clients. +Commit messages follow [conventional commits](https://www.conventionalcommits.org/): `feat(scope):`, `fix(scope):`, `chore(scope):`, etc. --- -**Join our community** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) +## License + +MIT — same as upstream OpenCode. diff --git a/README.no.md b/README.no.md deleted file mode 100644 index c3348286b..000000000 --- a/README.no.md +++ /dev/null @@ -1,141 +0,0 @@ -

- - - - - OpenCode logo - - -

-

AI-kodeagent med åpen kildekode.

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### Installasjon - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# Pakkehåndterere -npm i -g opencode-ai@latest # eller bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS og Linux (anbefalt, alltid oppdatert) -brew install opencode # macOS og Linux (offisiell brew-formel, oppdateres sjeldnere) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # alle OS -nix run nixpkgs#opencode # eller github:anomalyco/opencode for nyeste dev-branch -``` - -> [!TIP] -> Fjern versjoner eldre enn 0.1.x før du installerer. - -### Desktop-app (BETA) - -OpenCode er også tilgjengelig som en desktop-app. Last ned direkte fra [releases-siden](https://github.com/anomalyco/opencode/releases) eller [opencode.ai/download](https://opencode.ai/download). - -| Plattform | Nedlasting | -| --------------------- | ------------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` | -| macOS (Intel) | `opencode-desktop-darwin-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm` eller AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### Installasjonsmappe - -Installasjonsskriptet bruker følgende prioritet for installasjonsstien: - -1. `$OPENCODE_INSTALL_DIR` - Egendefinert installasjonsmappe -2. `$XDG_BIN_DIR` - Sti som følger XDG Base Directory Specification -3. `$HOME/bin` - Standard brukerbinar-mappe (hvis den finnes eller kan opprettes) -4. `$HOME/.opencode/bin` - Standard fallback - -```bash -# Eksempler -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Agents - -OpenCode har to innebygde agents du kan bytte mellom med `Tab`-tasten. - -- **build** - Standard, agent med full tilgang for utviklingsarbeid -- **plan** - Skrivebeskyttet agent for analyse og kodeutforsking - - Nekter filendringer som standard - - Spør om tillatelse før bash-kommandoer - - Ideell for å utforske ukjente kodebaser eller planlegge endringer - -Det finnes også en **general**-subagent for komplekse søk og flertrinnsoppgaver. -Den brukes internt og kan kalles via `@general` i meldinger. - -Les mer om [agents](https://opencode.ai/docs/agents). - -### Dokumentasjon - -For mer info om hvordan du konfigurerer OpenCode, [**se dokumentasjonen**](https://opencode.ai/docs). - -### Bidra - -Hvis du vil bidra til OpenCode, les [contributing docs](./CONTRIBUTING.md) før du sender en pull request. - -### Bygge på OpenCode - -Hvis du jobber med et prosjekt som er relatert til OpenCode og bruker "opencode" som en del av navnet; for eksempel "opencode-dashboard" eller "opencode-mobile", legg inn en merknad i README som presiserer at det ikke er bygget av OpenCode-teamet og ikke er tilknyttet oss på noen måte. - -### FAQ - -#### Hvordan er dette forskjellig fra Claude Code? - -Det er veldig likt Claude Code når det gjelder funksjonalitet. Her er de viktigste forskjellene: - -- 100% open source -- Ikke knyttet til en bestemt leverandør. Selv om vi anbefaler modellene vi tilbyr gjennom [OpenCode Zen](https://opencode.ai/zen); kan OpenCode brukes med Claude, OpenAI, Google eller til og med lokale modeller. Etter hvert som modellene utvikler seg vil gapene lukkes og prisene gå ned, så det er viktig å være provider-agnostic. -- LSP-støtte rett ut av boksen -- Fokus på TUI. OpenCode er bygget av neovim-brukere og skaperne av [terminal.shop](https://terminal.shop); vi kommer til å presse grensene for hva som er mulig i terminalen. -- Klient/server-arkitektur. Dette kan for eksempel la OpenCode kjøre på maskinen din, mens du styrer den eksternt fra en mobilapp. Det betyr at TUI-frontend'en bare er en av de mulige klientene. - ---- - -**Bli med i fellesskapet** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.pl.md b/README.pl.md deleted file mode 100644 index 4c5a07665..000000000 --- a/README.pl.md +++ /dev/null @@ -1,141 +0,0 @@ -

- - - - - OpenCode logo - - -

-

Otwartoźródłowy agent kodujący AI.

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### Instalacja - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# Menedżery pakietów -npm i -g opencode-ai@latest # albo bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS i Linux (polecane, zawsze aktualne) -brew install opencode # macOS i Linux (oficjalna formuła brew, rzadziej aktualizowana) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # dowolny system -nix run nixpkgs#opencode # lub github:anomalyco/opencode dla najnowszej gałęzi dev -``` - -> [!TIP] -> Przed instalacją usuń wersje starsze niż 0.1.x. - -### Aplikacja desktopowa (BETA) - -OpenCode jest także dostępny jako aplikacja desktopowa. Pobierz ją bezpośrednio ze strony [releases](https://github.com/anomalyco/opencode/releases) lub z [opencode.ai/download](https://opencode.ai/download). - -| Platforma | Pobieranie | -| --------------------- | ------------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` | -| macOS (Intel) | `opencode-desktop-darwin-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm` lub AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### Katalog instalacji - -Skrypt instalacyjny stosuje następujący priorytet wyboru ścieżki instalacji: - -1. `$OPENCODE_INSTALL_DIR` - Własny katalog instalacji -2. `$XDG_BIN_DIR` - Ścieżka zgodna ze specyfikacją XDG Base Directory -3. `$HOME/bin` - Standardowy katalog binarny użytkownika (jeśli istnieje lub można go utworzyć) -4. `$HOME/.opencode/bin` - Domyślny fallback - -```bash -# Przykłady -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Agents - -OpenCode zawiera dwóch wbudowanych agentów, między którymi możesz przełączać się klawiszem `Tab`. - -- **build** - Domyślny agent z pełnym dostępem do pracy developerskiej -- **plan** - Agent tylko do odczytu do analizy i eksploracji kodu - - Domyślnie odmawia edycji plików - - Pyta o zgodę przed uruchomieniem komend bash - - Idealny do poznawania nieznanych baz kodu lub planowania zmian - -Dodatkowo jest subagent **general** do złożonych wyszukiwań i wieloetapowych zadań. -Jest używany wewnętrznie i można go wywołać w wiadomościach przez `@general`. - -Dowiedz się więcej o [agents](https://opencode.ai/docs/agents). - -### Dokumentacja - -Więcej informacji o konfiguracji OpenCode znajdziesz w [**dokumentacji**](https://opencode.ai/docs). - -### Współtworzenie - -Jeśli chcesz współtworzyć OpenCode, przeczytaj [contributing docs](./CONTRIBUTING.md) przed wysłaniem pull requesta. - -### Budowanie na OpenCode - -Jeśli pracujesz nad projektem związanym z OpenCode i używasz "opencode" jako części nazwy (na przykład "opencode-dashboard" lub "opencode-mobile"), dodaj proszę notatkę do swojego README, aby wyjaśnić, że projekt nie jest tworzony przez zespół OpenCode i nie jest z nami w żaden sposób powiązany. - -### FAQ - -#### Czym to się różni od Claude Code? - -Jest bardzo podobne do Claude Code pod względem możliwości. Oto kluczowe różnice: - -- 100% open source -- Niezależne od dostawcy. Chociaż polecamy modele oferowane przez [OpenCode Zen](https://opencode.ai/zen); OpenCode może być używany z Claude, OpenAI, Google, a nawet z modelami lokalnymi. W miarę jak modele ewoluują, różnice będą się zmniejszać, a ceny spadać, więc ważna jest niezależność od dostawcy. -- Wbudowane wsparcie LSP -- Skupienie na TUI. OpenCode jest budowany przez użytkowników neovim i twórców [terminal.shop](https://terminal.shop); przesuwamy granice tego, co jest możliwe w terminalu. -- Architektura klient/serwer. Pozwala np. uruchomić OpenCode na twoim komputerze, a sterować nim zdalnie z aplikacji mobilnej. To znaczy, że frontend TUI jest tylko jednym z możliwych klientów. - ---- - -**Dołącz do naszej społeczności** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.ru.md b/README.ru.md deleted file mode 100644 index e507be70e..000000000 --- a/README.ru.md +++ /dev/null @@ -1,141 +0,0 @@ -

- - - - - OpenCode logo - - -

-

Открытый AI-агент для программирования.

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### Установка - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# Менеджеры пакетов -npm i -g opencode-ai@latest # или bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS и Linux (рекомендуем, всегда актуально) -brew install opencode # macOS и Linux (официальная формула brew, обновляется реже) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # любая ОС -nix run nixpkgs#opencode # или github:anomalyco/opencode для самой свежей ветки dev -``` - -> [!TIP] -> Перед установкой удалите версии старше 0.1.x. - -### Десктопное приложение (BETA) - -OpenCode также доступен как десктопное приложение. Скачайте его со [страницы релизов](https://github.com/anomalyco/opencode/releases) или с [opencode.ai/download](https://opencode.ai/download). - -| Платформа | Загрузка | -| --------------------- | ------------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` | -| macOS (Intel) | `opencode-desktop-darwin-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm` или AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### Каталог установки - -Скрипт установки выбирает путь установки в следующем порядке приоритета: - -1. `$OPENCODE_INSTALL_DIR` - Пользовательский каталог установки -2. `$XDG_BIN_DIR` - Путь, совместимый со спецификацией XDG Base Directory -3. `$HOME/bin` - Стандартный каталог пользовательских бинарников (если существует или можно создать) -4. `$HOME/.opencode/bin` - Fallback по умолчанию - -```bash -# Примеры -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Agents - -В OpenCode есть два встроенных агента, между которыми можно переключаться клавишей `Tab`. - -- **build** - По умолчанию, агент с полным доступом для разработки -- **plan** - Агент только для чтения для анализа и изучения кода - - По умолчанию запрещает редактирование файлов - - Запрашивает разрешение перед выполнением bash-команд - - Идеален для изучения незнакомых кодовых баз или планирования изменений - -Также включен сабагент **general** для сложных поисков и многошаговых задач. -Он используется внутренне и может быть вызван в сообщениях через `@general`. - -Подробнее об [agents](https://opencode.ai/docs/agents). - -### Документация - -Больше информации о том, как настроить OpenCode: [**наши docs**](https://opencode.ai/docs). - -### Вклад - -Если вы хотите внести вклад в OpenCode, прочитайте [contributing docs](./CONTRIBUTING.md) перед тем, как отправлять pull request. - -### Разработка на базе OpenCode - -Если вы делаете проект, связанный с OpenCode, и используете "opencode" как часть имени (например, "opencode-dashboard" или "opencode-mobile"), добавьте примечание в README, чтобы уточнить, что проект не создан командой OpenCode и не аффилирован с нами. - -### FAQ - -#### Чем это отличается от Claude Code? - -По возможностям это очень похоже на Claude Code. Вот ключевые отличия: - -- 100% open source -- Не привязано к одному провайдеру. Мы рекомендуем модели из [OpenCode Zen](https://opencode.ai/zen); но OpenCode можно использовать с Claude, OpenAI, Google или даже локальными моделями. По мере развития моделей разрыв будет сокращаться, а цены падать, поэтому важна независимость от провайдера. -- Поддержка LSP из коробки -- Фокус на TUI. OpenCode построен пользователями neovim и создателями [terminal.shop](https://terminal.shop); мы будем раздвигать границы того, что возможно в терминале. -- Архитектура клиент/сервер. Например, это позволяет запускать OpenCode на вашем компьютере, а управлять им удаленно из мобильного приложения. Это значит, что TUI-фронтенд - лишь один из возможных клиентов. - ---- - -**Присоединяйтесь к нашему сообществу** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.th.md b/README.th.md deleted file mode 100644 index 4a4ea62c9..000000000 --- a/README.th.md +++ /dev/null @@ -1,141 +0,0 @@ -

- - - - - OpenCode logo - - -

-

เอเจนต์การเขียนโค้ดด้วย AI แบบโอเพนซอร์ส

-

- Discord - npm - สถานะการสร้าง -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### การติดตั้ง - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# ตัวจัดการแพ็กเกจ -npm i -g opencode-ai@latest # หรือ bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS และ Linux (แนะนำ อัปเดตเสมอ) -brew install opencode # macOS และ Linux (brew formula อย่างเป็นทางการ อัปเดตน้อยกว่า) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # ระบบปฏิบัติการใดก็ได้ -nix run nixpkgs#opencode # หรือ github:anomalyco/opencode สำหรับสาขาพัฒนาล่าสุด -``` - -> [!TIP] -> ลบเวอร์ชันที่เก่ากว่า 0.1.x ก่อนติดตั้ง - -### แอปพลิเคชันเดสก์ท็อป (เบต้า) - -OpenCode มีให้ใช้งานเป็นแอปพลิเคชันเดสก์ท็อป ดาวน์โหลดโดยตรงจาก [หน้ารุ่น](https://github.com/anomalyco/opencode/releases) หรือ [opencode.ai/download](https://opencode.ai/download) - -| แพลตฟอร์ม | ดาวน์โหลด | -| --------------------- | ------------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` | -| macOS (Intel) | `opencode-desktop-darwin-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm`, หรือ AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### ไดเรกทอรีการติดตั้ง - -สคริปต์การติดตั้งจะใช้ลำดับความสำคัญตามเส้นทางการติดตั้ง: - -1. `$OPENCODE_INSTALL_DIR` - ไดเรกทอรีการติดตั้งที่กำหนดเอง -2. `$XDG_BIN_DIR` - เส้นทางที่สอดคล้องกับ XDG Base Directory Specification -3. `$HOME/bin` - ไดเรกทอรีไบนารีผู้ใช้มาตรฐาน (หากมีอยู่หรือสามารถสร้างได้) -4. `$HOME/.opencode/bin` - ค่าสำรองเริ่มต้น - -```bash -# ตัวอย่าง -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### เอเจนต์ - -OpenCode รวมเอเจนต์ในตัวสองตัวที่คุณสามารถสลับได้ด้วยปุ่ม `Tab` - -- **build** - เอเจนต์เริ่มต้น มีสิทธิ์เข้าถึงแบบเต็มสำหรับงานพัฒนา -- **plan** - เอเจนต์อ่านอย่างเดียวสำหรับการวิเคราะห์และการสำรวจโค้ด - - ปฏิเสธการแก้ไขไฟล์โดยค่าเริ่มต้น - - ขอสิทธิ์ก่อนเรียกใช้คำสั่ง bash - - เหมาะสำหรับสำรวจโค้ดเบสที่ไม่คุ้นเคยหรือวางแผนการเปลี่ยนแปลง - -นอกจากนี้ยังมีเอเจนต์ย่อย **general** สำหรับการค้นหาที่ซับซ้อนและงานหลายขั้นตอน -ใช้ภายในและสามารถเรียกใช้ได้โดยใช้ `@general` ในข้อความ - -เรียนรู้เพิ่มเติมเกี่ยวกับ [เอเจนต์](https://opencode.ai/docs/agents) - -### เอกสารประกอบ - -สำหรับข้อมูลเพิ่มเติมเกี่ยวกับวิธีกำหนดค่า OpenCode [**ไปที่เอกสารของเรา**](https://opencode.ai/docs) - -### การมีส่วนร่วม - -หากคุณสนใจที่จะมีส่วนร่วมใน OpenCode โปรดอ่าน [เอกสารการมีส่วนร่วม](./CONTRIBUTING.md) ก่อนส่ง Pull Request - -### การสร้างบน OpenCode - -หากคุณทำงานในโปรเจกต์ที่เกี่ยวข้องกับ OpenCode และใช้ "opencode" เป็นส่วนหนึ่งของชื่อ เช่น "opencode-dashboard" หรือ "opencode-mobile" โปรดเพิ่มหมายเหตุใน README ของคุณเพื่อชี้แจงว่าไม่ได้สร้างโดยทีม OpenCode และไม่ได้เกี่ยวข้องกับเราในทางใด - -### คำถามที่พบบ่อย - -#### ต่างจาก Claude Code อย่างไร? - -คล้ายกับ Claude Code มากในแง่ความสามารถ นี่คือความแตกต่างหลัก: - -- โอเพนซอร์ส 100% -- ไม่ผูกมัดกับผู้ให้บริการใดๆ แม้ว่าเราจะแนะนำโมเดลที่เราจัดหาให้ผ่าน [OpenCode Zen](https://opencode.ai/zen) OpenCode สามารถใช้กับ Claude, OpenAI, Google หรือแม้กระทั่งโมเดลในเครื่องได้ เมื่อโมเดลพัฒนาช่องว่างระหว่างพวกมันจะปิดลงและราคาจะลดลง ดังนั้นการไม่ผูกมัดกับผู้ให้บริการจึงสำคัญ -- รองรับ LSP ใช้งานได้ทันทีหลังการติดตั้งโดยไม่ต้องปรับแต่งหรือเปลี่ยนแปลงฟังก์ชันการทำงานใด ๆ -- เน้นที่ TUI OpenCode สร้างโดยผู้ใช้ neovim และผู้สร้าง [terminal.shop](https://terminal.shop) เราจะผลักดันขีดจำกัดของสิ่งที่เป็นไปได้ในเทอร์มินัล -- สถาปัตยกรรมไคลเอนต์/เซิร์ฟเวอร์ ตัวอย่างเช่น อาจอนุญาตให้ OpenCode ทำงานบนคอมพิวเตอร์ของคุณ ในขณะที่คุณสามารถขับเคลื่อนจากระยะไกลผ่านแอปมือถือ หมายความว่า TUI frontend เป็นหนึ่งในไคลเอนต์ที่เป็นไปได้เท่านั้น - ---- - -**ร่วมชุมชนของเรา** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.tr.md b/README.tr.md deleted file mode 100644 index e88b40f87..000000000 --- a/README.tr.md +++ /dev/null @@ -1,141 +0,0 @@ -

- - - - - OpenCode logo - - -

-

Açık kaynaklı yapay zeka kodlama asistanı.

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### Kurulum - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# Paket yöneticileri -npm i -g opencode-ai@latest # veya bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS ve Linux (önerilir, her zaman güncel) -brew install opencode # macOS ve Linux (resmi brew formülü, daha az güncellenir) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # Tüm işletim sistemleri -nix run nixpkgs#opencode # veya en güncel geliştirme dalı için github:anomalyco/opencode -``` - -> [!TIP] -> Kurulumdan önce 0.1.x'ten eski sürümleri kaldırın. - -### Masaüstü Uygulaması (BETA) - -OpenCode ayrıca masaüstü uygulaması olarak da mevcuttur. Doğrudan [sürüm sayfasından](https://github.com/anomalyco/opencode/releases) veya [opencode.ai/download](https://opencode.ai/download) adresinden indirebilirsiniz. - -| Platform | İndirme | -| --------------------- | ------------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` | -| macOS (Intel) | `opencode-desktop-darwin-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm` veya AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### Kurulum Dizini (Installation Directory) - -Kurulum betiği (install script), kurulum yolu (installation path) için aşağıdaki öncelik sırasını takip eder: - -1. `$OPENCODE_INSTALL_DIR` - Özel kurulum dizini -2. `$XDG_BIN_DIR` - XDG Base Directory Specification uyumlu yol -3. `$HOME/bin` - Standart kullanıcı binary dizini (varsa veya oluşturulabiliyorsa) -4. `$HOME/.opencode/bin` - Varsayılan yedek konum - -```bash -# Örnekler -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Ajanlar - -OpenCode, `Tab` tuşuyla aralarında geçiş yapabileceğiniz iki yerleşik (built-in) ajan içerir. - -- **build** - Varsayılan, geliştirme çalışmaları için tam erişimli ajan -- **plan** - Analiz ve kod keşfi için salt okunur ajan - - Varsayılan olarak dosya düzenlemelerini reddeder - - Bash komutlarını çalıştırmadan önce izin ister - - Tanımadığınız kod tabanlarını keşfetmek veya değişiklikleri planlamak için ideal - -Ayrıca, karmaşık aramalar ve çok adımlı görevler için bir **genel** alt ajan bulunmaktadır. -Bu dahili olarak kullanılır ve mesajlarda `@general` ile çağrılabilir. - -[Ajanlar](https://opencode.ai/docs/agents) hakkında daha fazla bilgi edinin. - -### Dokümantasyon - -OpenCode'u nasıl yapılandıracağınız hakkında daha fazla bilgi için [**dokümantasyonumuza göz atın**](https://opencode.ai/docs). - -### Katkıda Bulunma - -OpenCode'a katkıda bulunmak istiyorsanız, lütfen bir pull request göndermeden önce [katkıda bulunma dokümanlarımızı](./CONTRIBUTING.md) okuyun. - -### OpenCode Üzerine Geliştirme - -OpenCode ile ilgili bir proje üzerinde çalışıyorsanız ve projenizin adının bir parçası olarak "opencode" kullanıyorsanız (örneğin, "opencode-dashboard" veya "opencode-mobile"), lütfen README dosyanıza projenin OpenCode ekibi tarafından geliştirilmediğini ve bizimle hiçbir şekilde bağlantılı olmadığını belirten bir not ekleyin. - -### SSS - -#### Bu Claude Code'dan nasıl farklı? - -Yetenekler açısından Claude Code'a çok benzer. İşte temel farklar: - -- %100 açık kaynak -- Herhangi bir sağlayıcıya bağlı değil. [OpenCode Zen](https://opencode.ai/zen) üzerinden sunduğumuz modelleri önermekle birlikte; OpenCode, Claude, OpenAI, Google veya hatta yerel modellerle kullanılabilir. Modeller geliştikçe aralarındaki farklar kapanacak ve fiyatlar düşecek, bu nedenle sağlayıcıdan bağımsız olmak önemlidir. -- Kurulum gerektirmeyen hazır LSP desteği -- TUI odaklı yaklaşım. OpenCode, neovim kullanıcıları ve [terminal.shop](https://terminal.shop)'un geliştiricileri tarafından geliştirilmektedir; terminalde olabileceklerin sınırlarını zorlayacağız. -- İstemci/sunucu (client/server) mimarisi. Bu, örneğin OpenCode'un bilgisayarınızda çalışması ve siz onu bir mobil uygulamadan uzaktan yönetmenizi sağlar. TUI arayüzü olası istemcilerden sadece biridir. - ---- - -**Topluluğumuza katılın** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.uk.md b/README.uk.md deleted file mode 100644 index a1a0259b6..000000000 --- a/README.uk.md +++ /dev/null @@ -1,142 +0,0 @@ -

- - - - - OpenCode logo - - -

-

AI-агент для програмування з відкритим кодом.

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### Встановлення - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# Менеджери пакетів -npm i -g opencode-ai@latest # або bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS і Linux (рекомендовано, завжди актуально) -brew install opencode # macOS і Linux (офіційна формула Homebrew, оновлюється рідше) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # Будь-яка ОС -nix run nixpkgs#opencode # або github:anomalyco/opencode для найновішої dev-гілки -``` - -> [!TIP] -> Перед встановленням видаліть версії старші за 0.1.x. - -### Десктопний застосунок (BETA) - -OpenCode також доступний як десктопний застосунок. Завантажуйте напряму зі [сторінки релізів](https://github.com/anomalyco/opencode/releases) або [opencode.ai/download](https://opencode.ai/download). - -| Платформа | Завантаження | -| --------------------- | ------------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` | -| macOS (Intel) | `opencode-desktop-darwin-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm` або AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### Каталог встановлення - -Скрипт встановлення дотримується такого порядку пріоритету для шляху встановлення: - -1. `$OPENCODE_INSTALL_DIR` - Користувацький каталог встановлення -2. `$XDG_BIN_DIR` - Шлях, сумісний зі специфікацією XDG Base Directory -3. `$HOME/bin` - Стандартний каталог користувацьких бінарників (якщо існує або його можна створити) -4. `$HOME/.opencode/bin` - Резервний варіант за замовчуванням - -```bash -# Приклади -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Агенти - -OpenCode містить два вбудовані агенти, між якими можна перемикатися клавішею `Tab`. - -- **build** - Агент за замовчуванням із повним доступом для завдань розробки -- **plan** - Агент лише для читання для аналізу та дослідження коду - - За замовчуванням забороняє редагування файлів - - Запитує дозвіл перед запуском bash-команд - - Ідеально підходить для дослідження незнайомих кодових баз або планування змін - -Також доступний допоміжний агент **general** для складного пошуку та багатокрокових завдань. -Він використовується всередині системи й може бути викликаний у повідомленнях через `@general`. - -Дізнайтеся більше про [agents](https://opencode.ai/docs/agents). - -### Документація - -Щоб дізнатися більше про налаштування OpenCode, [**перейдіть до нашої документації**](https://opencode.ai/docs). - -### Внесок - -Якщо ви хочете зробити внесок в OpenCode, будь ласка, прочитайте нашу [документацію для контриб'юторів](./CONTRIBUTING.md) перед надсиланням pull request. - -### Проєкти на базі OpenCode - -Якщо ви працюєте над проєктом, пов'язаним з OpenCode, і використовуєте "opencode" у назві, наприклад "opencode-dashboard" або "opencode-mobile", додайте примітку до свого README. -Уточніть, що цей проєкт не створений командою OpenCode і жодним чином не афілійований із нами. - -### FAQ - -#### Чим це відрізняється від Claude Code? - -За можливостями це дуже схоже на Claude Code. Ось ключові відмінності: - -- 100% open source -- Немає прив'язки до конкретного провайдера. Ми рекомендуємо моделі, які надаємо через [OpenCode Zen](https://opencode.ai/zen), але OpenCode також працює з Claude, OpenAI, Google і навіть локальними моделями. З розвитком моделей різниця між ними зменшуватиметься, а ціни падатимуть, тому незалежність від провайдера має значення. -- Підтримка LSP з коробки -- Фокус на TUI. OpenCode створено користувачами neovim та авторами [terminal.shop](https://terminal.shop); ми й надалі розширюватимемо межі можливого в терміналі. -- Клієнт-серверна архітектура. Наприклад, це дає змогу запускати OpenCode на вашому комп'ютері й керувати ним віддалено з мобільного застосунку, тобто TUI-фронтенд - лише один із можливих клієнтів. - ---- - -**Приєднуйтеся до нашої спільноти** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.vi.md b/README.vi.md deleted file mode 100644 index 0932c50f7..000000000 --- a/README.vi.md +++ /dev/null @@ -1,141 +0,0 @@ -

- - - - - OpenCode logo - - -

-

Trợ lý lập trình AI mã nguồn mở.

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### Cài đặt - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# Các trình quản lý gói (Package managers) -npm i -g opencode-ai@latest # hoặc bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS và Linux (khuyên dùng, luôn cập nhật) -brew install opencode # macOS và Linux (công thức brew chính thức, ít cập nhật hơn) -sudo pacman -S opencode # Arch Linux (Bản ổn định) -paru -S opencode-bin # Arch Linux (Bản mới nhất từ AUR) -mise use -g opencode # Mọi hệ điều hành -nix run nixpkgs#opencode # hoặc github:anomalyco/opencode cho nhánh dev mới nhất -``` - -> [!TIP] -> Hãy xóa các phiên bản cũ hơn 0.1.x trước khi cài đặt. - -### Ứng dụng Desktop (BETA) - -OpenCode cũng có sẵn dưới dạng ứng dụng desktop. Tải trực tiếp từ [trang releases](https://github.com/anomalyco/opencode/releases) hoặc [opencode.ai/download](https://opencode.ai/download). - -| Nền tảng | Tải xuống | -| --------------------- | ------------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` | -| macOS (Intel) | `opencode-desktop-darwin-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm`, hoặc AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### Thư mục cài đặt - -Tập lệnh cài đặt tuân theo thứ tự ưu tiên sau cho đường dẫn cài đặt: - -1. `$OPENCODE_INSTALL_DIR` - Thư mục cài đặt tùy chỉnh -2. `$XDG_BIN_DIR` - Đường dẫn tuân thủ XDG Base Directory Specification -3. `$HOME/bin` - Thư mục nhị phân tiêu chuẩn của người dùng (nếu tồn tại hoặc có thể tạo) -4. `$HOME/.opencode/bin` - Mặc định dự phòng - -```bash -# Ví dụ -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Agents (Đại diện) - -OpenCode bao gồm hai agent được tích hợp sẵn mà bạn có thể chuyển đổi bằng phím `Tab`. - -- **build** - Agent mặc định, có toàn quyền truy cập cho công việc lập trình -- **plan** - Agent chỉ đọc dùng để phân tích và khám phá mã nguồn - - Mặc định từ chối việc chỉnh sửa tệp - - Hỏi quyền trước khi chạy các lệnh bash - - Lý tưởng để khám phá các codebase lạ hoặc lên kế hoạch thay đổi - -Ngoài ra còn có một subagent **general** dùng cho các tìm kiếm phức tạp và tác vụ nhiều bước. -Agent này được sử dụng nội bộ và có thể gọi bằng cách dùng `@general` trong tin nhắn. - -Tìm hiểu thêm về [agents](https://opencode.ai/docs/agents). - -### Tài liệu - -Để biết thêm thông tin về cách cấu hình OpenCode, [**hãy truy cập tài liệu của chúng tôi**](https://opencode.ai/docs). - -### Đóng góp - -Nếu bạn muốn đóng góp cho OpenCode, vui lòng đọc [tài liệu hướng dẫn đóng góp](./CONTRIBUTING.md) trước khi gửi pull request. - -### Xây dựng trên nền tảng OpenCode - -Nếu bạn đang làm việc trên một dự án liên quan đến OpenCode và sử dụng "opencode" như một phần của tên dự án, ví dụ "opencode-dashboard" hoặc "opencode-mobile", vui lòng thêm một ghi chú vào README của bạn để làm rõ rằng dự án đó không được xây dựng bởi đội ngũ OpenCode và không liên kết với chúng tôi dưới bất kỳ hình thức nào. - -### Các câu hỏi thường gặp (FAQ) - -#### OpenCode khác biệt thế nào so với Claude Code? - -Về mặt tính năng, nó rất giống Claude Code. Dưới đây là những điểm khác biệt chính: - -- 100% mã nguồn mở -- Không bị ràng buộc với bất kỳ nhà cung cấp nào. Mặc dù chúng tôi khuyên dùng các mô hình được cung cấp qua [OpenCode Zen](https://opencode.ai/zen), OpenCode có thể được sử dụng với Claude, OpenAI, Google, hoặc thậm chí các mô hình chạy cục bộ. Khi các mô hình phát triển, khoảng cách giữa chúng sẽ thu hẹp lại và giá cả sẽ giảm, vì vậy việc không phụ thuộc vào nhà cung cấp là rất quan trọng. -- Hỗ trợ LSP ngay từ đầu -- Tập trung vào TUI (Giao diện người dùng dòng lệnh). OpenCode được xây dựng bởi những người dùng neovim và đội ngũ tạo ra [terminal.shop](https://terminal.shop); chúng tôi sẽ đẩy giới hạn của những gì có thể làm được trên terminal lên mức tối đa. -- Kiến trúc client/server. Chẳng hạn, điều này cho phép OpenCode chạy trên máy tính của bạn trong khi bạn điều khiển nó từ xa qua một ứng dụng di động, nghĩa là frontend TUI chỉ là một trong những client có thể dùng. - ---- - -**Tham gia cộng đồng của chúng tôi** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.zh.md b/README.zh.md deleted file mode 100644 index 0859ed11d..000000000 --- a/README.zh.md +++ /dev/null @@ -1,140 +0,0 @@ -

- - - - - OpenCode logo - - -

-

开源的 AI Coding Agent。

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### 安装 - -```bash -# 直接安装 (YOLO) -curl -fsSL https://opencode.ai/install | bash - -# 软件包管理器 -npm i -g opencode-ai@latest # 也可使用 bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS 和 Linux(推荐,始终保持最新) -brew install opencode # macOS 和 Linux(官方 brew formula,更新频率较低) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # 任意系统 -nix run nixpkgs#opencode # 或用 github:anomalyco/opencode 获取最新 dev 分支 -``` - -> [!TIP] -> 安装前请先移除 0.1.x 之前的旧版本。 - -### 桌面应用程序 (BETA) - -OpenCode 也提供桌面版应用。可直接从 [发布页 (releases page)](https://github.com/anomalyco/opencode/releases) 或 [opencode.ai/download](https://opencode.ai/download) 下载。 - -| 平台 | 下载文件 | -| --------------------- | ------------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` | -| macOS (Intel) | `opencode-desktop-darwin-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`、`.rpm` 或 AppImage | - -```bash -# macOS (Homebrew Cask) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### 安装目录 - -安装脚本按照以下优先级决定安装路径: - -1. `$OPENCODE_INSTALL_DIR` - 自定义安装目录 -2. `$XDG_BIN_DIR` - 符合 XDG 基础目录规范的路径 -3. `$HOME/bin` - 如果存在或可创建的用户二进制目录 -4. `$HOME/.opencode/bin` - 默认备用路径 - -```bash -# 示例 -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Agents - -OpenCode 内置两种 Agent,可用 `Tab` 键快速切换: - -- **build** - 默认模式,具备完整权限,适合开发工作 -- **plan** - 只读模式,适合代码分析与探索 - - 默认拒绝修改文件 - - 运行 bash 命令前会询问 - - 便于探索未知代码库或规划改动 - -另外还包含一个 **general** 子 Agent,用于复杂搜索和多步任务,内部使用,也可在消息中输入 `@general` 调用。 - -了解更多 [Agents](https://opencode.ai/docs/agents) 相关信息。 - -### 文档 - -更多配置说明请查看我们的 [**官方文档**](https://opencode.ai/docs)。 - -### 参与贡献 - -如有兴趣贡献代码,请在提交 PR 前阅读 [贡献指南 (Contributing Docs)](./CONTRIBUTING.md)。 - -### 基于 OpenCode 进行开发 - -如果你在项目名中使用了 “opencode”(如 “opencode-dashboard” 或 “opencode-mobile”),请在 README 里注明该项目不是 OpenCode 团队官方开发,且不存在隶属关系。 - -### 常见问题 (FAQ) - -#### 这和 Claude Code 有什么不同? - -功能上很相似,关键差异: - -- 100% 开源。 -- 不绑定特定提供商。推荐使用 [OpenCode Zen](https://opencode.ai/zen) 的模型,但也可搭配 Claude、OpenAI、Google 甚至本地模型。模型迭代会缩小差异、降低成本,因此保持 provider-agnostic 很重要。 -- 内置 LSP 支持。 -- 聚焦终端界面 (TUI)。OpenCode 由 Neovim 爱好者和 [terminal.shop](https://terminal.shop) 的创建者打造,会持续探索终端的极限。 -- 客户端/服务器架构。可在本机运行,同时用移动设备远程驱动。TUI 只是众多潜在客户端之一。 - ---- - -**加入我们的社区** [飞书](https://applink.feishu.cn/client/chat/chatter/add_by_link?link_token=de8k6664-1b5e-43f2-8efd-21d6772647b5&qr_code=true) | [X.com](https://x.com/opencode) diff --git a/README.zht.md b/README.zht.md deleted file mode 100644 index b7d8b8fc4..000000000 --- a/README.zht.md +++ /dev/null @@ -1,140 +0,0 @@ -

- - - - - OpenCode logo - - -

-

開源的 AI Coding Agent。

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### 安裝 - -```bash -# 直接安裝 (YOLO) -curl -fsSL https://opencode.ai/install | bash - -# 套件管理員 -npm i -g opencode-ai@latest # 也可使用 bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS 與 Linux(推薦,始終保持最新) -brew install opencode # macOS 與 Linux(官方 brew formula,更新頻率較低) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # 任何作業系統 -nix run nixpkgs#opencode # 或使用 github:anomalyco/opencode 以取得最新開發分支 -``` - -> [!TIP] -> 安裝前請先移除 0.1.x 以前的舊版本。 - -### 桌面應用程式 (BETA) - -OpenCode 也提供桌面版應用程式。您可以直接從 [發佈頁面 (releases page)](https://github.com/anomalyco/opencode/releases) 或 [opencode.ai/download](https://opencode.ai/download) 下載。 - -| 平台 | 下載連結 | -| --------------------- | ------------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-darwin-aarch64.dmg` | -| macOS (Intel) | `opencode-desktop-darwin-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm`, 或 AppImage | - -```bash -# macOS (Homebrew Cask) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### 安裝目錄 - -安裝腳本會依據以下優先順序決定安裝路徑: - -1. `$OPENCODE_INSTALL_DIR` - 自定義安裝目錄 -2. `$XDG_BIN_DIR` - 符合 XDG 基礎目錄規範的路徑 -3. `$HOME/bin` - 標準使用者執行檔目錄 (若存在或可建立) -4. `$HOME/.opencode/bin` - 預設備用路徑 - -```bash -# 範例 -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Agents - -OpenCode 內建了兩種 Agent,您可以使用 `Tab` 鍵快速切換。 - -- **build** - 預設模式,具備完整權限的 Agent,適用於開發工作。 -- **plan** - 唯讀模式,適用於程式碼分析與探索。 - - 預設禁止修改檔案。 - - 執行 bash 指令前會詢問權限。 - - 非常適合用來探索陌生的程式碼庫或規劃變更。 - -此外,OpenCode 還包含一個 **general** 子 Agent,用於處理複雜搜尋與多步驟任務。此 Agent 供系統內部使用,亦可透過在訊息中輸入 `@general` 來呼叫。 - -了解更多關於 [Agents](https://opencode.ai/docs/agents) 的資訊。 - -### 線上文件 - -關於如何設定 OpenCode 的詳細資訊,請參閱我們的 [**官方文件**](https://opencode.ai/docs)。 - -### 參與貢獻 - -如果您有興趣參與 OpenCode 的開發,請在提交 Pull Request 前先閱讀我們的 [貢獻指南 (Contributing Docs)](./CONTRIBUTING.md)。 - -### 基於 OpenCode 進行開發 - -如果您正在開發與 OpenCode 相關的專案,並在名稱中使用了 "opencode"(例如 "opencode-dashboard" 或 "opencode-mobile"),請在您的 README 中加入聲明,說明該專案並非由 OpenCode 團隊開發,且與我們沒有任何隸屬關係。 - -### 常見問題 (FAQ) - -#### 這跟 Claude Code 有什麼不同? - -在功能面上與 Claude Code 非常相似。以下是關鍵差異: - -- 100% 開源。 -- 不綁定特定的服務提供商。雖然我們推薦使用透過 [OpenCode Zen](https://opencode.ai/zen) 提供的模型,但 OpenCode 也可搭配 Claude, OpenAI, Google 甚至本地模型使用。隨著模型不斷演進,彼此間的差距會縮小且價格會下降,因此具備「不限廠商 (provider-agnostic)」的特性至關重要。 -- 內建 LSP (語言伺服器協定) 支援。 -- 專注於終端機介面 (TUI)。OpenCode 由 Neovim 愛好者與 [terminal.shop](https://terminal.shop) 的創作者打造。我們將不斷挑戰終端機介面的極限。 -- 客戶端/伺服器架構 (Client/Server Architecture)。這讓 OpenCode 能夠在您的電腦上運行的同時,由行動裝置進行遠端操控。這意味著 TUI 前端只是眾多可能的客戶端之一。 - ---- - -**加入我們的社群** [飞书](https://applink.feishu.cn/client/chat/chatter/add_by_link?link_token=de8k6664-1b5e-43f2-8efd-21d6772647b5&qr_code=true) | [X.com](https://x.com/opencode) diff --git a/packages/opencode/src/cas/cas.sql.ts b/packages/opencode/src/cas/cas.sql.ts index 62439e045..c97fb63f1 100644 --- a/packages/opencode/src/cas/cas.sql.ts +++ b/packages/opencode/src/cas/cas.sql.ts @@ -28,10 +28,7 @@ export const EditGraphNodeTable = sqliteTable( agent: text().notNull(), ...Timestamps, }, - (table) => [ - index("edit_graph_session_idx").on(table.session_id), - index("edit_graph_parent_idx").on(table.parent_id), - ], + (table) => [index("edit_graph_session_idx").on(table.session_id), index("edit_graph_parent_idx").on(table.parent_id)], ) export const EditGraphHeadTable = sqliteTable("edit_graph_head", { diff --git a/packages/opencode/src/cas/graph.ts b/packages/opencode/src/cas/graph.ts index b26ce6657..5b75776b3 100644 --- a/packages/opencode/src/cas/graph.ts +++ b/packages/opencode/src/cas/graph.ts @@ -174,7 +174,10 @@ export namespace EditGraph { * Checkout a specific version: undo edits between current head and target, * restoring parts from CAS. */ - export async function checkout(sessionID: string, targetNodeID: string): Promise<{ success: boolean; error?: string }> { + export async function checkout( + sessionID: string, + targetNodeID: string, + ): Promise<{ success: boolean; error?: string }> { const head = getHead(sessionID) if (!head) return { success: false, error: "No edit history for this session" } @@ -225,9 +228,7 @@ export namespace EditGraph { .where(eq(EditGraphHeadTable.session_id, sessionID)) .run() - Database.effect(() => - Bus.publish(Event.CheckedOut, { sessionID, nodeID: targetNodeID }), - ) + Database.effect(() => Bus.publish(Event.CheckedOut, { sessionID, nodeID: targetNodeID })) }) log.info("checked out", { sessionID, targetNodeID, undone: nodesToUndo.length }) @@ -258,9 +259,7 @@ export namespace EditGraph { .where(eq(EditGraphHeadTable.session_id, sessionID)) .run() - Database.effect(() => - Bus.publish(Event.Forked, { sessionID, nodeID, branch: branchName }), - ) + Database.effect(() => Bus.publish(Event.Forked, { sessionID, nodeID, branch: branchName })) }) log.info("forked", { sessionID, nodeID, branchName }) @@ -270,7 +269,10 @@ export namespace EditGraph { /** * Switch to a named branch. */ - export async function switchBranch(sessionID: string, branchName: string): Promise<{ success: boolean; error?: string }> { + export async function switchBranch( + sessionID: string, + branchName: string, + ): Promise<{ success: boolean; error?: string }> { const head = getHead(sessionID) if (!head) return { success: false, error: "No edit history for this session" } diff --git a/packages/opencode/src/cas/index.ts b/packages/opencode/src/cas/index.ts index 2de6d4e8e..1fcaebb39 100644 --- a/packages/opencode/src/cas/index.ts +++ b/packages/opencode/src/cas/index.ts @@ -59,9 +59,7 @@ export namespace CAS { * Retrieve content by hash. Returns null if not found. */ export function get(h: string): Entry | null { - return ( - Database.use((db) => db.select().from(CASObjectTable).where(eq(CASObjectTable.hash, h)).get()) ?? null - ) + return Database.use((db) => db.select().from(CASObjectTable).where(eq(CASObjectTable.hash, h)).get()) ?? null } /** @@ -69,11 +67,7 @@ export namespace CAS { */ export function exists(h: string): boolean { return !!Database.use((db) => - db - .select({ hash: CASObjectTable.hash }) - .from(CASObjectTable) - .where(eq(CASObjectTable.hash, h)) - .get(), + db.select({ hash: CASObjectTable.hash }).from(CASObjectTable).where(eq(CASObjectTable.hash, h)).get(), ) } @@ -81,8 +75,6 @@ export namespace CAS { * List all CAS entries for a session. */ export function listBySession(sessionID: string): Entry[] { - return Database.use((db) => - db.select().from(CASObjectTable).where(eq(CASObjectTable.session_id, sessionID)).all(), - ) + return Database.use((db) => db.select().from(CASObjectTable).where(eq(CASObjectTable.session_id, sessionID)).all()) } } diff --git a/packages/opencode/src/context-edit/index.ts b/packages/opencode/src/context-edit/index.ts index b74fd6d85..b5df6c539 100644 --- a/packages/opencode/src/context-edit/index.ts +++ b/packages/opencode/src/context-edit/index.ts @@ -20,18 +20,42 @@ export namespace ContextEdit { const PROTECTED_RECENT_TURNS = 2 const PROTECTED_TOOLS = ["skill"] - async function pluginGuard(op: string, input: { sessionID: string; partID?: string; messageID?: string; agent: string }): Promise { - const result = await Plugin.trigger("context.edit.before", { - operation: op, sessionID: input.sessionID, partID: input.partID, messageID: input.messageID, agent: input.agent, - }, { allow: true }) + async function pluginGuard( + op: string, + input: { sessionID: string; partID?: string; messageID?: string; agent: string }, + ): Promise { + const result = await Plugin.trigger( + "context.edit.before", + { + operation: op, + sessionID: input.sessionID, + partID: input.partID, + messageID: input.messageID, + agent: input.agent, + }, + { allow: true }, + ) if (!result.allow) return { success: false, error: (result as any).reason ?? "Blocked by plugin" } return null } - async function pluginNotify(op: string, input: { sessionID: string; partID?: string; messageID?: string; agent: string }, success: boolean) { - await Plugin.trigger("context.edit.after", { - operation: op, sessionID: input.sessionID, partID: input.partID, messageID: input.messageID, agent: input.agent, success, - }, {}) + async function pluginNotify( + op: string, + input: { sessionID: string; partID?: string; messageID?: string; agent: string }, + success: boolean, + ) { + await Plugin.trigger( + "context.edit.after", + { + operation: op, + sessionID: input.sessionID, + partID: input.partID, + messageID: input.messageID, + agent: input.agent, + success, + }, + {}, + ) } // ── Types ────────────────────────────────────────────── @@ -103,10 +127,7 @@ export namespace ContextEdit { function validateBudget(messages: MessageV2.WithParts[]): string | null { const totalParts = messages.reduce((n, m) => n + m.parts.length, 0) - const hiddenParts = messages.reduce( - (n, m) => n + m.parts.filter((p) => p.edit?.hidden).length, - 0, - ) + const hiddenParts = messages.reduce((n, m) => n + m.parts.filter((p) => p.edit?.hidden).length, 0) if (totalParts > 0 && (hiddenParts + 1) / totalParts > MAX_HIDDEN_RATIO) return `Cannot hide more than ${MAX_HIDDEN_RATIO * 100}% of all parts` return null @@ -118,10 +139,7 @@ export namespace ContextEdit { return idx >= messages.length - PROTECTED_RECENT_TURNS * 2 } - function findPart( - msg: MessageV2.WithParts, - partID: string, - ): MessageV2.Part | undefined { + function findPart(msg: MessageV2.WithParts, partID: string): MessageV2.Part | undefined { return msg.parts.find((p) => p.id === partID) } diff --git a/packages/opencode/src/session/message-v2.ts b/packages/opencode/src/session/message-v2.ts index ff59cc3f9..6fc40aec1 100644 --- a/packages/opencode/src/session/message-v2.ts +++ b/packages/opencode/src/session/message-v2.ts @@ -870,7 +870,13 @@ export namespace MessageV2 { db.select().from(PartTable).where(eq(PartTable.message_id, message_id)).orderBy(PartTable.id).all(), ) return rows.map( - (row) => ({ ...row.data, id: row.id, sessionID: row.session_id, messageID: row.message_id }) as unknown as MessageV2.Part, + (row) => + ({ + ...row.data, + id: row.id, + sessionID: row.session_id, + messageID: row.message_id, + }) as unknown as MessageV2.Part, ) }) diff --git a/packages/opencode/src/session/prompt.ts b/packages/opencode/src/session/prompt.ts index 5fa9dfc7a..51d9c155d 100644 --- a/packages/opencode/src/session/prompt.ts +++ b/packages/opencode/src/session/prompt.ts @@ -680,7 +680,9 @@ export namespace SessionPrompt { if (threads.length > 5) parts.push(` ...and ${threads.length - 5} more`) } if (parts.length > 0) { - parts.push(`\nStay focused on the objective. If you find unrelated issues, note them briefly. The focus agent will park them.`) + parts.push( + `\nStay focused on the objective. If you find unrelated issues, note them briefly. The focus agent will park them.`, + ) system.push(`## Focus Status\n${parts.join("\n")}`) } } @@ -748,10 +750,7 @@ export namespace SessionPrompt { const focusAgent = await Agent.get("focus") if (focusAgent) { const objective = await Objective.extract(sessionID, msgs) - const focusPrompt = [ - focusAgent.prompt ?? "", - objective ? `\n## Current Objective\n${objective}` : "", - ] + const focusPrompt = [focusAgent.prompt ?? "", objective ? `\n## Current Objective\n${objective}` : ""] .filter(Boolean) .join("\n") const focusMsg = (await Session.updateMessage({ @@ -791,10 +790,7 @@ export namespace SessionPrompt { abort, sessionID, system: [focusPrompt], - messages: MessageV2.toModelMessages( - MessageV2.filterEdited(msgs), - model, - ), + messages: MessageV2.toModelMessages(MessageV2.filterEdited(msgs), model), tools: focusTools, model, }) diff --git a/packages/opencode/src/session/side-thread.sql.ts b/packages/opencode/src/session/side-thread.sql.ts index fe9b3debe..c69f5fb50 100644 --- a/packages/opencode/src/session/side-thread.sql.ts +++ b/packages/opencode/src/session/side-thread.sql.ts @@ -13,9 +13,15 @@ export const SideThreadTable = sqliteTable( .references(() => ProjectTable.id, { onDelete: "cascade" }), title: text().notNull(), description: text().notNull(), - status: text().notNull().$default(() => "parked"), - priority: text().notNull().$default(() => "medium"), - category: text().notNull().$default(() => "other"), + status: text() + .notNull() + .$default(() => "parked"), + priority: text() + .notNull() + .$default(() => "medium"), + category: text() + .notNull() + .$default(() => "other"), source_session_id: text(), source_part_ids: text({ mode: "json" }).$type(), cas_refs: text({ mode: "json" }).$type(), diff --git a/packages/opencode/src/session/side-thread.ts b/packages/opencode/src/session/side-thread.ts index 6d0c35293..7c3fec676 100644 --- a/packages/opencode/src/session/side-thread.ts +++ b/packages/opencode/src/session/side-thread.ts @@ -30,14 +30,8 @@ export namespace SideThread { export type Info = z.infer export const Event = { - Created: BusEvent.define( - "side-thread.created", - z.object({ thread: Info }), - ), - Updated: BusEvent.define( - "side-thread.updated", - z.object({ thread: Info }), - ), + Created: BusEvent.define("side-thread.created", z.object({ thread: Info })), + Updated: BusEvent.define("side-thread.updated", z.object({ thread: Info })), } function rowToInfo(row: typeof SideThreadTable.$inferSelect): Info { @@ -116,27 +110,17 @@ export namespace SideThread { } export function get(id: string): Info | null { - const row = Database.use((db) => - db.select().from(SideThreadTable).where(eq(SideThreadTable.id, id)).get(), - ) + const row = Database.use((db) => db.select().from(SideThreadTable).where(eq(SideThreadTable.id, id)).get()) return row ? rowToInfo(row) : null } - export function list(input: { - projectID: string - status?: Info["status"] | "all" - }): Info[] { + export function list(input: { projectID: string; status?: Info["status"] | "all" }): Info[] { const rows = Database.use((db) => { if (input.status && input.status !== "all") { return db .select() .from(SideThreadTable) - .where( - and( - eq(SideThreadTable.project_id, input.projectID as any), - eq(SideThreadTable.status, input.status), - ), - ) + .where(and(eq(SideThreadTable.project_id, input.projectID as any), eq(SideThreadTable.status, input.status))) .all() } return db diff --git a/packages/opencode/src/tool/context-edit.ts b/packages/opencode/src/tool/context-edit.ts index 3ae3c8ae8..d1b202f5f 100644 --- a/packages/opencode/src/tool/context-edit.ts +++ b/packages/opencode/src/tool/context-edit.ts @@ -25,10 +25,7 @@ Constraints: messageID: z.string().describe("Parent message ID"), replacement: z.string().optional().describe("Replacement text (for replace operation)"), annotation: z.string().optional().describe("Annotation text (for annotate operation)"), - summary: z - .string() - .optional() - .describe("Summary of externalized content (for externalize operation)"), + summary: z.string().optional().describe("Summary of externalized content (for externalize operation)"), }), async execute(args, ctx) { @@ -81,7 +78,11 @@ Constraints: break default: - return { title: "Error", metadata: { operation: args.operation }, output: `Unknown operation: ${args.operation}` } + return { + title: "Error", + metadata: { operation: args.operation }, + output: `Unknown operation: ${args.operation}`, + } } if (!result.success) diff --git a/packages/opencode/src/tool/context-history.ts b/packages/opencode/src/tool/context-history.ts index fd71027c9..df87a602a 100644 --- a/packages/opencode/src/tool/context-history.ts +++ b/packages/opencode/src/tool/context-history.ts @@ -25,7 +25,11 @@ Branches allow exploring alternative edit paths without losing the original.`, case "log": { const nodes = EditGraph.getLog(ctx.sessionID) if (nodes.length === 0) - return { title: "No edit history", metadata: { count: 0, branches: [] as string[] }, output: "No edits have been made in this session." } + return { + title: "No edit history", + metadata: { count: 0, branches: [] as string[] }, + output: "No edits have been made in this session.", + } const lines = nodes.map((n, i) => { const marker = i === 0 ? " (HEAD)" : "" @@ -42,7 +46,11 @@ Branches allow exploring alternative edit paths without losing the original.`, case "tree": { const { nodes, head, branches } = EditGraph.tree(ctx.sessionID) if (nodes.length === 0) - return { title: "No edit history", metadata: { count: 0, branches: [] as string[] }, output: "No edits have been made in this session." } + return { + title: "No edit history", + metadata: { count: 0, branches: [] as string[] }, + output: "No edits have been made in this session.", + } const branchLabels = new Map() for (const [name, nodeID] of Object.entries(branches)) { @@ -53,7 +61,11 @@ Branches allow exploring alternative edit paths without losing the original.`, const lines = nodes.map((n) => { const isHead = n.id === head ? " <- HEAD" : "" - const branchTags = branchLabels.get(n.id)?.map((b) => ` [${b}]`).join("") ?? "" + const branchTags = + branchLabels + .get(n.id) + ?.map((b) => ` [${b}]`) + .join("") ?? "" const parent = n.parent_id ? ` parent:${n.parent_id.slice(0, 12)}` : " (root)" return `${n.id.slice(0, 12)} ${n.operation} on ${n.part_id.slice(0, 12)} by ${n.agent}${parent}${branchTags}${isHead}` }) @@ -66,10 +78,18 @@ Branches allow exploring alternative edit paths without losing the original.`, case "checkout": { if (!args.nodeID) - return { title: "Error", metadata: { count: 0, branches: [] as string[] }, output: "nodeID is required for checkout" } + return { + title: "Error", + metadata: { count: 0, branches: [] as string[] }, + output: "nodeID is required for checkout", + } const result = await EditGraph.checkout(ctx.sessionID, args.nodeID) if (!result.success) - return { title: "Checkout failed", metadata: { count: 0, branches: [] as string[] }, output: `Error: ${result.error}` } + return { + title: "Checkout failed", + metadata: { count: 0, branches: [] as string[] }, + output: `Error: ${result.error}`, + } return { title: `Checked out ${args.nodeID.slice(0, 12)}`, metadata: { count: 0, branches: [] as string[] }, @@ -79,10 +99,18 @@ Branches allow exploring alternative edit paths without losing the original.`, case "fork": { if (!args.nodeID || !args.branch) - return { title: "Error", metadata: { count: 0, branches: [] as string[] }, output: "nodeID and branch are required for fork" } + return { + title: "Error", + metadata: { count: 0, branches: [] as string[] }, + output: "nodeID and branch are required for fork", + } const result = EditGraph.fork(ctx.sessionID, args.nodeID, args.branch) if (!result.success) - return { title: "Fork failed", metadata: { count: 0, branches: [] as string[] }, output: `Error: ${result.error}` } + return { + title: "Fork failed", + metadata: { count: 0, branches: [] as string[] }, + output: `Error: ${result.error}`, + } return { title: `Forked: ${args.branch}`, metadata: { count: 0, branches: [args.branch] }, @@ -91,7 +119,11 @@ Branches allow exploring alternative edit paths without losing the original.`, } default: - return { title: "Error", metadata: { count: 0, branches: [] as string[] }, output: `Unknown operation: ${args.operation}` } + return { + title: "Error", + metadata: { count: 0, branches: [] as string[] }, + output: `Unknown operation: ${args.operation}`, + } } }, }) diff --git a/packages/opencode/src/tool/thread-park.ts b/packages/opencode/src/tool/thread-park.ts index 05e97b3d3..e2ea046f8 100644 --- a/packages/opencode/src/tool/thread-park.ts +++ b/packages/opencode/src/tool/thread-park.ts @@ -16,19 +16,12 @@ Examples of when to park: parameters: z.object({ title: z.string().describe("Short title (under 80 chars)"), description: z.string().describe("2-3 sentence summary: what was found, why it matters"), - priority: z - .enum(["low", "medium", "high", "critical"]) - .default("medium") - .describe("Priority level"), + priority: z.enum(["low", "medium", "high", "critical"]).default("medium").describe("Priority level"), category: z .enum(["bug", "tech-debt", "security", "performance", "test", "other"]) .default("other") .describe("Category of the finding"), - sourcePartIDs: z - .string() - .array() - .optional() - .describe("Part IDs containing the relevant finding"), + sourcePartIDs: z.string().array().optional().describe("Part IDs containing the relevant finding"), relatedFiles: z.string().array().optional().describe("File paths involved"), }), diff --git a/packages/plugin/src/index.ts b/packages/plugin/src/index.ts index c2e2d7be0..f398652cb 100644 --- a/packages/plugin/src/index.ts +++ b/packages/plugin/src/index.ts @@ -236,7 +236,14 @@ export interface Hooks { output: { allow: boolean; reason?: string }, ) => Promise "context.edit.after"?: ( - input: { operation: string; sessionID: string; partID?: string; messageID?: string; agent: string; success: boolean }, + input: { + operation: string + sessionID: string + partID?: string + messageID?: string + agent: string + success: boolean + }, output: {}, ) => Promise } diff --git a/packages/sdk/js/src/v2/gen/sdk.gen.ts b/packages/sdk/js/src/v2/gen/sdk.gen.ts index 27c188838..7b59ed931 100644 --- a/packages/sdk/js/src/v2/gen/sdk.gen.ts +++ b/packages/sdk/js/src/v2/gen/sdk.gen.ts @@ -19,6 +19,7 @@ import type { ConfigProvidersResponses, ConfigUpdateErrors, ConfigUpdateResponses, + EditMeta, EventSubscribeResponses, EventTuiCommandExecute, EventTuiPromptAppend, @@ -2028,6 +2029,7 @@ export class Session2 extends HeyApiClient { variant?: string parts?: Array<{ id?: string + edit?: EditMeta type: "file" mime: string filename?: string diff --git a/packages/sdk/js/src/v2/gen/types.gen.ts b/packages/sdk/js/src/v2/gen/types.gen.ts index 9ab71bd8f..bd2322f03 100644 --- a/packages/sdk/js/src/v2/gen/types.gen.ts +++ b/packages/sdk/js/src/v2/gen/types.gen.ts @@ -360,10 +360,22 @@ export type EventMessageRemoved = { } } +export type EditMeta = { + hidden: boolean + casHash?: string + supersededBy?: string + replacementOf?: string + annotation?: string + editedAt: number + editedBy: string + version?: string +} + export type TextPart = { id: string sessionID: string messageID: string + edit?: EditMeta type: "text" text: string synthetic?: boolean @@ -381,6 +393,7 @@ export type SubtaskPart = { id: string sessionID: string messageID: string + edit?: EditMeta type: "subtask" prompt: string description: string @@ -396,6 +409,7 @@ export type ReasoningPart = { id: string sessionID: string messageID: string + edit?: EditMeta type: "reasoning" text: string metadata?: { @@ -452,6 +466,7 @@ export type FilePart = { id: string sessionID: string messageID: string + edit?: EditMeta type: "file" mime: string filename?: string @@ -520,6 +535,7 @@ export type ToolPart = { id: string sessionID: string messageID: string + edit?: EditMeta type: "tool" callID: string tool: string @@ -533,6 +549,7 @@ export type StepStartPart = { id: string sessionID: string messageID: string + edit?: EditMeta type: "step-start" snapshot?: string } @@ -541,6 +558,7 @@ export type StepFinishPart = { id: string sessionID: string messageID: string + edit?: EditMeta type: "step-finish" reason: string snapshot?: string @@ -561,6 +579,7 @@ export type SnapshotPart = { id: string sessionID: string messageID: string + edit?: EditMeta type: "snapshot" snapshot: string } @@ -569,6 +588,7 @@ export type PatchPart = { id: string sessionID: string messageID: string + edit?: EditMeta type: "patch" hash: string files: Array @@ -578,6 +598,7 @@ export type AgentPart = { id: string sessionID: string messageID: string + edit?: EditMeta type: "agent" name: string source?: { @@ -591,6 +612,7 @@ export type RetryPart = { id: string sessionID: string messageID: string + edit?: EditMeta type: "retry" attempt: number error: ApiError @@ -603,6 +625,7 @@ export type CompactionPart = { id: string sessionID: string messageID: string + edit?: EditMeta type: "compaction" auto: boolean overflow?: boolean @@ -716,6 +739,113 @@ export type EventTodoUpdated = { } } +export type EventEditGraphCommitted = { + type: "edit.graph.committed" + properties: { + sessionID: string + nodeID: string + operation: string + } +} + +export type EventEditGraphCheckedOut = { + type: "edit.graph.checked-out" + properties: { + sessionID: string + nodeID: string + } +} + +export type EventEditGraphForked = { + type: "edit.graph.forked" + properties: { + sessionID: string + nodeID: string + branch: string + } +} + +export type EventContextEditHidden = { + type: "context.edit.hidden" + properties: { + sessionID: string + partID: string + casHash: string + agent: string + } +} + +export type EventContextEditUnhidden = { + type: "context.edit.unhidden" + properties: { + sessionID: string + partID: string + agent: string + } +} + +export type EventContextEditReplaced = { + type: "context.edit.replaced" + properties: { + sessionID: string + oldPartID: string + newPartID: string + casHash: string + agent: string + } +} + +export type EventContextEditAnnotated = { + type: "context.edit.annotated" + properties: { + sessionID: string + partID: string + annotation: string + agent: string + } +} + +export type EventContextEditExternalized = { + type: "context.edit.externalized" + properties: { + sessionID: string + partID: string + casHash: string + agent: string + } +} + +export type SideThread = { + id: string + projectID: string + title: string + description: string + status: "parked" | "investigating" | "resolved" | "deferred" + priority: "low" | "medium" | "high" | "critical" + category: "bug" | "tech-debt" | "security" | "performance" | "test" | "other" + sourceSessionID?: string + sourcePartIDs?: Array + casRefs?: Array + relatedFiles?: Array + createdBy: string + timeCreated: number + timeUpdated: number +} + +export type EventSideThreadCreated = { + type: "side-thread.created" + properties: { + thread: SideThread + } +} + +export type EventSideThreadUpdated = { + type: "side-thread.updated" + properties: { + thread: SideThread + } +} + export type EventTuiPromptAppend = { type: "tui.prompt.append" properties: { @@ -982,6 +1112,16 @@ export type Event = | EventSessionCompacted | EventFileWatcherUpdated | EventTodoUpdated + | EventEditGraphCommitted + | EventEditGraphCheckedOut + | EventEditGraphForked + | EventContextEditHidden + | EventContextEditUnhidden + | EventContextEditReplaced + | EventContextEditAnnotated + | EventContextEditExternalized + | EventSideThreadCreated + | EventSideThreadUpdated | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow @@ -1717,6 +1857,7 @@ export type McpResource = { export type TextPartInput = { id?: string + edit?: EditMeta type: "text" text: string synthetic?: boolean @@ -1732,6 +1873,7 @@ export type TextPartInput = { export type FilePartInput = { id?: string + edit?: EditMeta type: "file" mime: string filename?: string @@ -1741,6 +1883,7 @@ export type FilePartInput = { export type AgentPartInput = { id?: string + edit?: EditMeta type: "agent" name: string source?: { @@ -1752,6 +1895,7 @@ export type AgentPartInput = { export type SubtaskPartInput = { id?: string + edit?: EditMeta type: "subtask" prompt: string description: string @@ -3528,6 +3672,7 @@ export type SessionCommandData = { variant?: string parts?: Array<{ id?: string + edit?: EditMeta type: "file" mime: string filename?: string