Register and share your invite link to earn from video plays and referrals.

Search results for OpenCode
OpenCode community
One keyword maps to one global community path.
Create community
People
Not Found
Tweets including OpenCode
# OpenCode Features and Practical Usage 🧰 Wish you could decide in one line what your AI agent is allowed to do and what it must never touch? OpenCode's built-in tools plus permissions give you exactly that. 🏷️ Title: Built-in Tools + Permissions 🔗 URL: 📘 Overview OpenCode agents act on your codebase through "tools" such as file editing and shell execution. A rich set ships by default, and each tool can be governed by an allow / ask / deny policy. You get the safety-versus-convenience balance tuned entirely from config. ⚙️ How It Works The main built-in tools are: ・`bash`: run shell commands (git, npm, etc.) ・`edit`: modify existing files via exact string replacement ・`write`: create or overwrite files ・`read`: read files, with optional line ranges ・`grep`: regex search across files ・`glob`: find files by patterns like `**/*.js` ・`webfetch` / `websearch`: fetch and search the web ・helpers like `lsp`, `apply_patch`, `skill`, `todowrite`, `question` Permissions are set in the `permission` field with three states: `allow` (run freely), `ask` (confirm each time), `deny` (forbidden). Note that the `edit` permission governs `edit`, `write`, and `apply_patch` together. 🛠️ Practical Usage In `opencode.json`, you can forbid edits, confirm every bash call, and allow web fetches freely — set `"edit": "deny"`, `"bash": "ask"`, and `"webfetch": "allow"` under the `permission` block. Tools coming from MCP servers can be controlled with wildcards. Writing `"mymcp_*": "ask"` requires confirmation for every tool from that server. 💡 Use Cases On a production-adjacent repo, set `edit` to `deny` and `bash` to `ask` so the agent can plan and investigate but cannot rewrite code or run destructive commands on its own. On a throwaway experiment branch, allow everything to move fast. Switching between the two is just a config change. ⚠️ Caveats By default all tools are allowed, so nothing is restricted until you explicitly narrow it. The `lsp` tool needs `OPENCODE_EXPERIMENTAL_LSP_TOOL=true`, and `websearch` (powered by Exa) needs `OPENCODE_ENABLE_EXA=1`. It is easy to forget that the `edit` permission also covers write and apply_patch. #OpenCode# #AIAgents#
Show more
Opencode pls fix! @opencode Trying to subscribe to Open code Zen/Go but i keep running into this error.
# OpenCode Features and Practical Usage 🤖 The era of dumping everything on one AI is over. With OpenCode's agents, you split planning, exploration, and review into dedicated roles — each with tightly scoped permissions for safe collaboration. 🏷️ Title: Primary / Subagents 🔗 URL: 📘 Overview OpenCode agents come in two kinds: primary agents you interact with directly, and specialized subagents that primary agents call on. Separating roles and tool permissions lets you move through tasks both safely and efficiently. ⚙️ How It Works ・Primary: Build has full tool access for development, while Plan is for planning with edits and bash restricted to "ask" by default. Switch with `Tab`. ・Subagents: built-ins include General for multi-step research, Explore for read-only codebase exploration, and Scout for external docs and dependency research. Invoke them explicitly with `@`, e.g. `@/general ...`, or let a primary agent launch them automatically. ・Custom definitions: define your own agents in JSON (`opencode.json`) or Markdown front matter (`.opencode/agents/*.md`). Key fields include `description` (required), `mode` (`primary`/`subagent`/`all`), `model`, `prompt`, `temperature`, `permission` (`allow`/`deny`/`ask`), `steps`, and `hidden`. 🛠️ Practical Usage Define an audit-only agent with edits disabled to delegate reviews while preventing accidental changes. The `bash` permission supports glob patterns for fine-grained control. For example, a security-audit subagent sets `temperature: 0.1` and `permission` with both `edit: deny` and `bash: deny`, then states the review scope in its body. Running `opencode agent create` walks you through location, purpose, and permissions interactively and generates a Markdown definition. 💡 Use Cases For a large feature, you can divide labor: have Explore survey the relevant code read-only, lock the approach in Plan, implement in Build, and finally inspect with an edit-disabled review agent. ⚠️ Caveats ・Default `permission` differs per agent (Plan sets edit/bash to ask). Setting them explicitly is safer to avoid unintended changes. ・`bash` permissions accept globs, so you can deny dangerous commands individually, e.g. `"rm *": "deny"`. ・Use `hidden` to keep a subagent out of the `@` menu. #OpenCode# #AIAgents#
Show more
OpenCode Go experienced network issues earlier today due to an upstream provider incident. During this time, some requests were delayed or timed out. The issue has now been resolved. More details:
Show more
# OpenCode Features and Practical Usage ⚡ OpenCode is not just a TUI tool. With `opencode run` you can execute prompts non-interactively and wire AI directly into shell scripts and CI pipelines. 🏷️ Title: Programmatic Execution 🔗 URL: 📘 Overview The OpenCode CLI launches a TUI by default, but it can also be driven programmatically through commands and flags. At the center is `opencode run`, which executes a prompt in one shot. ⚙️ How It Works ・`opencode run "..."`: runs a prompt non-interactively. Key flags include `-m/--model` (`provider/model`), `--agent` (a custom agent), `-s/--session` (continue an existing session), `-c/--continue` (resume the last session), `-f/--file` (attach files), `--format` (output as `json`, etc.), and `--attach` (connect to a running server). ・`serve`: starts a headless API server with no UI (`--port`; auth via `OPENCODE_SERVER_PASSWORD`). ・`session`: list and delete conversation history (`session list --format json`, `session delete `). ・`export` / `import`: export and import sessions (`export --sanitize`). ・`models` / `auth` / `agent` / `github` / `mcp` / `stats` / `upgrade`: list models, manage auth, create agents, GitHub integration, manage MCP servers, check usage, and update. 🛠️ Practical Usage Embed non-interactive runs in scripts to automate batch processing of many files or reviews in CI. Keeping a server resident and connecting via `--attach` reduces latency. For example, `opencode run --format json "review this diff" > results.json` captures JSON output to a file, and you can loop over files with `opencode serve &` plus repeated `opencode run --attach ... --file "$f"` calls. 💡 Use Cases Great for machine processing: in CI, pass only the changed files to `opencode run`, receive review comments as JSON, and aggregate or notify in a downstream job. Monitoring daily token spend and cost with `stats` is also valuable. ⚠️ Caveats ・When exposing `serve` externally, always enable authentication via `OPENCODE_SERVER_PASSWORD`. ・If your logic depends on the `--format json` output shape, re-verify it after version upgrades. ・Environment variables like `OPENCODE_DISABLE_AUTOUPDATE` let you suppress auto-updates in CI. #OpenCode# #CLI#
Show more
OpenCode Go users in New Zealand used 40.9B tokens last week, or, 1,734 tokens per sheep
# OpenCode Features and Practical Usage ✨ "Plan first, then build." Learn OpenCode's core operations and you get a development rhythm where you can confidently delegate to the AI while always being able to roll changes back. 🏷️ Title: @/search / Plan & Build / images / /undo / /redo 🔗 URL: 📘 Overview Day-to-day work in OpenCode boils down to a handful of basics: referencing files, switching agent modes, sending images, and undo/redo. Master these and interactive coding becomes smooth. ⚙️ How It Works ・File references with `@`: Typing `@` in a message triggers a fuzzy search over filenames so you can pull a file into context and ask about it. Prefixing a message with `!` runs a shell command and feeds its output back as a tool result. ・Plan vs Build: Plan is a planning mode where edits and bash are restricted to "ask" (confirm first); Build is the implementation mode with access to all tools. Press `Tab` to switch between them. ・Image input: Drag and drop an image into the terminal to pass visual context such as an error screen or a design mockup. ・`/undo` and `/redo`: `/undo` reverts the last message and the file changes it made, and can be run multiple times to go further back. `/redo` reapplies an undone change. 🛠️ Practical Usage 1. Start in Plan mode with something like "draft a refactor plan for `@/src/api/handler.ts`" and review the plan. 2. Once satisfied, press `Tab` to switch to Build and let it implement. 3. If the result is off, `/undo` to roll back, and `/redo` if you change your mind. In short: `@/src/payment.ts` for a file reference, `Tab` to go Plan to Build, `/undo` to revert (repeatable), and `/redo` to reapply. 💡 Use Cases For high-impact refactors, lock down the approach in Plan first, then implement in Build — it is far safer. Because any unexpected AI change can be rolled back instantly with `/undo`, the cost of experimentation drops sharply. ⚠️ Caveats ・`/undo` rolls back per message; be careful when mixing it with manual edits. ・Even in Plan mode, if edits are configured as "ask," approving the prompt will still apply changes — review carefully before confirming. ・Image drag-and-drop support depends on your terminal emulator. #OpenCode# #AICoding#
Show more
OpenCode Go is becoming the best source of data on what models are being used and how we've made a public stats page so you can see the latest
0
91
2.2K
118
Forward to community
OpenCode Go is now our second breakout product Closing in on 1T tokens per day Shoutout to Frank and the team