Compare commits

..
23 Commits
Author SHA1 Message Date
opencode 5b5bd146ea release: v0.5.25 2025-08-25 16:38:24 +00:00
adamdotdevin 836c2060c7 fix(tui): sort custom commands lower 2025-08-25 11:32:15 -05:00
adamdotdevin 6357136ca5 fix(tui): sort custom commands lower 2025-08-25 11:29:56 -05:00
adamdotdevin 0a0b363587 feat(tui): grok free 2025-08-25 11:27:58 -05:00
Jay V f5f6167146 docs: edit 2025-08-25 12:11:02 -04:00
adamdotdevin f1684c9e15 fix(tui): fix logo color 2025-08-25 10:08:52 -05:00
adamdotdevin f597b7287b chore: cleanup 2025-08-25 10:08:10 -05:00
GitHub Action 95fabc1407 ignore: update download stats 2025-08-25 2025-08-25 12:04:21 +00:00
Aiden ClineandGitHub 315c366e11 docs: fix shell examples (#2236) 2025-08-24 23:53:39 -05:00
opencode 5d68a7c2e0 release: v0.5.24 2025-08-24 23:01:00 +00:00
Dax Raad 1b2d3bf659 ci: tweak 2025-08-24 18:55:44 -04:00
opencode 24e4f5b051 release: v0.5.23 2025-08-24 22:53:37 +00:00
Dax Raad 2992c5a6bf ci: retry clone 2025-08-24 18:48:03 -04:00
Dax Raad ca2660ccf8 ci: ignore 2025-08-24 18:31:44 -04:00
Frank 6b4bd590ac Add opencode workflow 2025-08-25 06:16:21 +08:00
Frank 60ba42af15 Add opencode workflow 2025-08-25 06:14:47 +08:00
Frank f22827bdfa Add opencode workflow 2025-08-25 03:39:11 +08:00
Frank f9b5b6d129 Add opencode workflow 2025-08-25 03:38:02 +08:00
Aiden ClineandGitHub cc66e06101 fix: command model selection (#2219) 2025-08-24 12:06:48 -05:00
GitHub Action d4c8d95ec6 ignore: update download stats 2025-08-24 2025-08-24 12:03:59 +00:00
Aiden ClineandGitHub 0fd312346b docs: fix plan agent docs (#2215) 2025-08-23 14:52:02 -05:00
b80046120c docs: document editor --wait flag (#2209)
Co-authored-by: rekram1-node <aidenpcline@gmail.com>
2025-08-23 14:43:20 -05:00
Aiden ClineandGitHub 07ed2a8391 docs: document out of box lsps (#2213) 2025-08-23 14:22:22 -05:00
25 changed files with 151 additions and 83 deletions
+6 -8
View File
@@ -8,22 +8,20 @@ jobs:
opencode:
if: |
contains(github.event.comment.body, ' /oc') ||
startsWith(github.event.comment.body, '/oc') ||
contains(github.event.comment.body, ' /opencode') ||
startsWith(github.event.comment.body, '/opencode')
contains(github.event.comment.body, ' /opencode')
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
contents: read
pull-requests: read
issues: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Run opencode
uses: sst/opencode/github@latest
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
with:
model: anthropic/claude-sonnet-4-20250514
model: opencode/sonic
+1 -1
View File
@@ -107,4 +107,4 @@ The other confusingly named repo has no relation to this one. You can [read the
---
**Join our community** [Discord](https://discord.gg/opencode) | [YouTube](https://www.youtube.com/c/sst-dev) | [X.com](https://x.com/SST_dev)
**Join our community** [Discord](https://discord.gg/opencode) | [YouTube](https://www.youtube.com/c/sst-dev) | [X.com](https://x.com/anomaly_inv)
+2
View File
@@ -57,3 +57,5 @@
| 2025-08-21 | 220,465 (+5,968) | 194,784 (+3,303) | 415,249 (+9,271) |
| 2025-08-22 | 225,899 (+5,434) | 197,204 (+2,420) | 423,103 (+7,854) |
| 2025-08-23 | 229,005 (+3,106) | 199,238 (+2,034) | 428,243 (+5,140) |
| 2025-08-24 | 232,098 (+3,093) | 201,157 (+1,919) | 433,255 (+5,012) |
| 2025-08-25 | 236,607 (+4,509) | 202,650 (+1,493) | 439,257 (+6,002) |
+1 -1
View File
@@ -5,7 +5,7 @@
"dev": "vinxi dev --host 0.0.0.0",
"build": "vinxi build",
"start": "vinxi start",
"version": "0.5.18"
"version": "0.5.25"
},
"dependencies": {
"@ibm/plex": "6.4.1",
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode/cloud-core",
"version": "0.5.18",
"version": "0.5.25",
"private": true,
"type": "module",
"dependencies": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@opencode/cloud-function",
"version": "0.5.18",
"version": "0.5.25",
"$schema": "https://json.schemastore.org/package.json",
"private": true,
"type": "module",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@opencode/cloud-web",
"version": "0.5.18",
"version": "0.5.25",
"private": true,
"description": "",
"type": "module",
@@ -1,15 +0,0 @@
{
"keep": {
"days": true,
"amount": 14
},
"auditLog": "/Users/adam/code/opencode/dev/logs/.496fc674ed58d31f8b883da41cc2adb4564aad58-audit.json",
"files": [
{
"date": 1755891797740,
"name": "/Users/adam/code/opencode/dev/logs/mcp-puppeteer-2025-08-22.log",
"hash": "dd9b1f2e98b661ba2f56b91dd9afbdb25e50adbdd52ed1b0eef1d2045235d17c"
}
],
"hashType": "sha256"
}
-6
View File
@@ -1,6 +0,0 @@
{"level":"info","message":"Starting MCP server","service":"mcp-puppeteer","timestamp":"2025-08-22 14:43:17.765"}
{"level":"info","message":"MCP server started successfully","service":"mcp-puppeteer","timestamp":"2025-08-22 14:43:17.766"}
{"level":"info","message":"Starting MCP server","service":"mcp-puppeteer","timestamp":"2025-08-22 14:46:45.539"}
{"level":"info","message":"MCP server started successfully","service":"mcp-puppeteer","timestamp":"2025-08-22 14:46:45.540"}
{"level":"info","message":"Starting MCP server","service":"mcp-puppeteer","timestamp":"2025-08-22 14:53:08.159"}
{"level":"info","message":"MCP server started successfully","service":"mcp-puppeteer","timestamp":"2025-08-22 14:53:08.160"}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@opencode/function",
"version": "0.5.18",
"version": "0.5.25",
"$schema": "https://json.schemastore.org/package.json",
"private": true,
"type": "module",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/package.json",
"version": "0.5.18",
"version": "0.5.25",
"name": "opencode",
"type": "module",
"private": true,
+52 -5
View File
@@ -97,11 +97,11 @@ if (!snapshot) {
const macX64Sha = await $`sha256sum ./dist/opencode-darwin-x64.zip | cut -d' ' -f1`.text().then((x) => x.trim())
const macArm64Sha = await $`sha256sum ./dist/opencode-darwin-arm64.zip | cut -d' ' -f1`.text().then((x) => x.trim())
const pkgbuild = [
const binaryPkgbuild = [
"# Maintainer: dax",
"# Maintainer: adam",
"",
"pkgname='${pkg}'",
"pkgname='opencode-bin'",
`pkgver=${version.split("-")[0]}`,
"options=('!debug' '!strip')",
"pkgrel=1",
@@ -125,11 +125,58 @@ if (!snapshot) {
"",
].join("\n")
for (const pkg of ["opencode-bin"]) {
// Source-based PKGBUILD for opencode
const sourcePkgbuild = [
"# Maintainer: dax",
"# Maintainer: adam",
"",
"pkgname='opencode'",
`pkgver=${version.split("-")[0]}`,
"options=('!debug' '!strip')",
"pkgrel=1",
"pkgdesc='The AI coding agent built for the terminal.'",
"url='https://github.com/sst/opencode'",
"arch=('aarch64' 'x86_64')",
"license=('MIT')",
"provides=('opencode')",
"conflicts=('opencode-bin')",
"depends=('fzf' 'ripgrep')",
"makedepends=('git' 'bun-bin' 'go')",
"",
`source=("opencode-\${pkgver}.tar.gz::https://github.com/sst/opencode/archive/v${version}.tar.gz")`,
`sha256sums=('SKIP')`,
"",
"build() {",
` cd "opencode-\${pkgver}"`,
` bun install`,
" cd packages/tui",
` CGO_ENABLED=0 go build -ldflags="-s -w -X main.Version=\${pkgver}" -o tui cmd/opencode/main.go`,
" cd ../opencode",
` bun build --define OPENCODE_TUI_PATH="'$(realpath ../tui/tui)'" --define OPENCODE_VERSION="'\${pkgver}'" --compile --target=bun-linux-x64 --outfile=opencode ./src/index.ts`,
"}",
"",
"package() {",
` cd "opencode-\${pkgver}/packages/opencode"`,
' install -Dm755 ./opencode "${pkgdir}/usr/bin/opencode"',
"}",
"",
].join("\n")
for (const [pkg, pkgbuild] of [
["opencode-bin", binaryPkgbuild],
["opencode", sourcePkgbuild],
]) {
await $`rm -rf ./dist/aur-${pkg}`
await $`git clone ssh://aur@aur.archlinux.org/${pkg}.git ./dist/aur-${pkg}`
while (true) {
try {
await $`git clone ssh://aur@aur.archlinux.org/${pkg}.git ./dist/aur-${pkg}`
break
} catch (e) {
continue
}
}
await $`cd ./dist/aur-${pkg} && git checkout master`
await Bun.file(`./dist/aur-${pkg}/PKGBUILD`).write(pkgbuild.replace("${pkg}", pkg))
await Bun.file(`./dist/aur-${pkg}/PKGBUILD`).write(pkgbuild)
await $`cd ./dist/aur-${pkg} && makepkg --printsrcinfo > .SRCINFO`
await $`cd ./dist/aur-${pkg} && git add PKGBUILD .SRCINFO`
await $`cd ./dist/aur-${pkg} && git commit -m "Update to v${version}"`
+8 -4
View File
@@ -1171,12 +1171,16 @@ export namespace Session {
export async function command(input: CommandInput) {
const command = await Command.get(input.command)
const agent = input.agent ?? command.agent ?? "build"
const agent = command.agent ?? input.agent ?? "build"
const fmtModel = (model: { providerID: string; modelID: string }) => `${model.providerID}/${model.modelID}`
const model =
input.model ??
command.model ??
(await Agent.get(agent).then((x) => (x.model ? `${x.model.providerID}/${x.model.modelID}` : undefined))) ??
(await Provider.defaultModel().then((x) => `${x.providerID}/${x.modelID}`))
(command.agent && (await Agent.get(command.agent).then((x) => (x.model ? fmtModel(x.model) : undefined)))) ??
input.model ??
(input.agent && (await Agent.get(input.agent).then((x) => (x.model ? fmtModel(x.model) : undefined)))) ??
fmtModel(await Provider.defaultModel())
let template = command.template.replace("$ARGUMENTS", input.arguments)
const bash = Array.from(template.matchAll(bashRegex))
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode-ai/plugin",
"version": "0.5.18",
"version": "0.5.25",
"type": "module",
"scripts": {
"typecheck": "tsc --noEmit"
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode-ai/sdk",
"version": "0.5.18",
"version": "0.5.25",
"type": "module",
"scripts": {
"typecheck": "tsc --noEmit"
+2
View File
@@ -820,6 +820,8 @@ func (a *App) SendCommand(ctx context.Context, command string, args string) (*Ap
opencode.SessionCommandParams{
Command: opencode.F(command),
Arguments: opencode.F(args),
Agent: opencode.F(a.Agents[a.AgentIndex].Name),
Model: opencode.F(a.State.Provider + "/" + a.State.Model),
},
)
if err != nil {
@@ -92,6 +92,12 @@ func (r CommandRegistry) Sorted() []Command {
if b.Name == AppExitCommand {
return -1
}
if a.Custom && !b.Custom {
return 1
}
if !a.Custom && b.Custom {
return -1
}
return strings.Compare(string(a.Name), string(b.Name))
})
+14 -5
View File
@@ -915,9 +915,10 @@ func (a Model) Cleanup() {
func (a Model) home() (string, int, int) {
t := theme.CurrentTheme()
effectiveWidth := a.width - 4
baseStyle := styles.NewStyle().Background(t.Background())
baseStyle := styles.NewStyle().Foreground(t.Text()).Background(t.Background())
base := baseStyle.Render
muted := styles.NewStyle().Foreground(t.TextMuted()).Background(t.Background()).Render
highlight := styles.NewStyle().Foreground(t.Accent()).Background(t.Background()).Render
open := `
█▀▀█ █▀▀█ █▀▀ █▀▀▄
@@ -952,9 +953,9 @@ func (a Model) home() (string, int, int) {
)
// Use limit of 4 for vscode, 6 for others
limit := 6
limit := 4
if util.IsVSCode() {
limit = 4
limit = 2
}
showVscode := util.IsVSCode()
@@ -971,15 +972,23 @@ func (a Model) home() (string, int, int) {
styles.WhitespaceStyle(t.Background()),
)
grok := highlight("Try Grok Code free for a limited time")
grok = lipgloss.PlaceHorizontal(
effectiveWidth,
lipgloss.Center,
grok,
styles.WhitespaceStyle(t.Background()),
)
lines := []string{}
lines = append(lines, "")
lines = append(lines, "")
lines = append(lines, logoAndVersion)
lines = append(lines, "")
lines = append(lines, "")
lines = append(lines, cmds)
lines = append(lines, "")
lines = append(lines, "")
lines = append(lines, grok)
lines = append(lines, "")
mainHeight := lipgloss.Height(strings.Join(lines, "\n"))
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@opencode/web",
"type": "module",
"version": "0.5.18",
"version": "0.5.25",
"scripts": {
"dev": "astro dev",
"dev:remote": "sst shell --stage=dev --target=Web astro dev",
@@ -58,12 +58,11 @@ Build is the **default** primary agent with all tools enabled. This is the stand
_Mode_: `primary`
A restricted agent designed for planning and analysis. In the plan agent, the following tools are disabled by default:
A restricted agent designed for planning and analysis. We use a permission system to give you more control and prevent unintended changes.
By default, all of the following are set to `ask`:
- `write` - Cannot create new files
- `edit` - Cannot modify existing files
- `patch` - Cannot apply patches
- `bash` - Cannot execute shell commands
- `file edits`: All writes, patches, and edits
- `bash`: All bash commands
This agent is useful when you want the LLM to analyze code, suggest changes, or create plans without making any actual modifications to your codebase.
@@ -59,7 +59,7 @@ Run the command with arguments:
## Inject shell output
Use `!command` to inject shell command output into your prompt.
Use !`command` to inject shell command output into your prompt.
Create `.opencode/command/analyze-coverage.md`:
@@ -69,7 +69,7 @@ description: Analyze test coverage
---
Here are the current test results:
`!npm test`
!`npm test`
Based on these results, suggest improvements to increase coverage.
```
@@ -82,7 +82,7 @@ description: Review recent changes
---
Recent git commits:
`!git log --oneline -10`
!`git log --oneline -10`
Review these changes and suggest any improvements.
```
@@ -9,7 +9,7 @@ you to use opencode at your organization.
To get started, we recommend:
1. Do a trial internally with your team.
2. [**Contact us**](mailto:hello@sst.dev) to discuss pricing and implementation options.
2. [**Contact us**](mailto:hello@anoma.ly) to discuss pricing and implementation options.
---
@@ -55,7 +55,7 @@ We recommend you disable this for your trial.
## Deployment
Once you have completed your trial and you are ready to self-host opencode at
your organization, you can [**contact us**](mailto:hello@sst.dev) to discuss
your organization, you can [**contact us**](mailto:hello@anoma.ly) to discuss
pricing and implementation options.
---
+17 -10
View File
@@ -11,19 +11,26 @@ opencode integrates with your Language Server Protocol (LSP) to help the LLM int
opencode comes with several built-in LSP servers for popular languages:
| LSP Server | Extensions | Requirements |
| ---------- | -------------------------------------------- | ----------------------------------- |
| typescript | .ts, .tsx, .js, .jsx, .mjs, .cjs, .mts, .cts | `typescript` dependency in project |
| eslint | .ts, .tsx, .js, .jsx, .mjs, .cjs, .mts, .cts | `eslint` dependency in project |
| gopls | .go | `go` command available |
| ruby-lsp | .rb, .rake, .gemspec, .ru | `ruby` and `gem` commands available |
| pyright | .py, .pyi | `pyright` dependency installed |
| elixir-ls | .ex, .exs | `elixir` command available |
| zls | .zig, .zon | `zig` command available |
| csharp | .cs | `.NET SDK` installed |
| LSP Server | Extensions | Requirements |
| ---------- | ---------------------------------------------------- | ----------------------------------- |
| typescript | .ts, .tsx, .js, .jsx, .mjs, .cjs, .mts, .cts | `typescript` dependency in project |
| eslint | .ts, .tsx, .js, .jsx, .mjs, .cjs, .mts, .cts, .vue | `eslint` dependency in project |
| gopls | .go | `go` command available |
| ruby-lsp | .rb, .rake, .gemspec, .ru | `ruby` and `gem` commands available |
| pyright | .py, .pyi | `pyright` dependency installed |
| elixir-ls | .ex, .exs | `elixir` command available |
| zls | .zig, .zon | `zig` command available |
| csharp | .cs | `.NET SDK` installed |
| vue | .vue | Auto-installs for Vue projects |
| rust | .rs | `rust-analyzer` command available |
| clangd | .c, .cpp, .cc, .cxx, .c++, .h, .hpp, .hh, .hxx, .h++ | Auto-installs for C/C++ projects |
LSP servers are automatically enabled when one of the above file extensions are detected and the requirements are met.
:::note
You can disable automatic LSP server downloads by setting the `OPENCODE_DISABLE_LSP_DOWNLOAD` environment variable to `true`.
:::
---
## How It Works
+24 -9
View File
@@ -254,37 +254,52 @@ Both the `/editor` and `/export` commands use the editor specified in your `EDIT
<Tabs>
<TabItem label="Linux/macOS">
```bash
export EDITOR=nano # or vim, code, etc.
# Example for nano or vim
export EDITOR=nano
export EDITOR=vim
# For GUI editors (VS Code, Cursor, VSCodium, Windsurf, Zed, etc.) include --wait
export EDITOR="code --wait"
```
To make it permanent, add this to your shell profile;
`~/.bashrc`, `~/.zshrc`, etc.
</TabItem>
<TabItem label="Windows (CMD)">
```bash
set EDITOR=notepad # or code, vim, etc.
set EDITOR=notepad
# For GUI editors (VS Code, Cursor, VSCodium, Windsurf, Zed, etc.) include --wait
set EDITOR=code --wait
```
To make it permanent, use **System Properties** > **Environment
Variables**.
</TabItem>
<TabItem label="Windows (PowerShell)">
```bash
$env:EDITOR = "notepad" # or "code", "vim", etc.
```powershell
$env:EDITOR = "notepad"
# For GUI editors (VS Code, Cursor, VSCodium, Windsurf, Zed, etc.) include --wait
$env:EDITOR = "code --wait"
```
To make it permanent, add this to your PowerShell
profile.
To make it permanent, add this to your PowerShell profile.
</TabItem>
</Tabs>
Popular editor options include:
- `code` - Visual Studio Code
- `cursor` - Cursor
- `windsurf` - Windsurf
- `vim` - Vim editor
- `nano` - Nano editor
- `notepad` - Windows Notepad
- `subl` - Sublime Text
:::tip
Some editors need command-line arguments to run in blocking mode. The --wait flag makes the editor process block until closed, which is necessary for opencode to function correctly.
:::
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "opencode",
"displayName": "opencode",
"description": "opencode for VS Code",
"version": "0.5.18",
"version": "0.5.25",
"publisher": "sst-dev",
"repository": {
"type": "git",