Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
153 commits
Select commit Hold shift + click to select a range
0130190
docs: add model docs
thdxr Jul 12, 2025
1729c31
switch global config to ~/.config/opencode/opencode.json
thdxr Jul 12, 2025
1254f48
fix issue preventing things from working when node_modules or package…
thdxr Jul 12, 2025
5c3d490
share page hide step-finish events
thdxr Jul 12, 2025
aadca50
fix share page timestamps
thdxr Jul 12, 2025
fd4648d
ignore: update download stats 2025-07-12
actions-user Jul 12, 2025
9aa0c40
feat: add more ignore patterns to the ls tool (#913)
muzzlol Jul 12, 2025
17fa8c1
fix packages being reinstalled on every start
thdxr Jul 12, 2025
d465f15
ignore: update download stats 2025-07-13
actions-user Jul 13, 2025
7361a02
wip: github actions
fwang Jul 13, 2025
bb28b70
Fix: title generation (#949)
rekram1-node Jul 13, 2025
f04a5e5
fix: deduplicate command suggestions (#934)
jhrudden Jul 13, 2025
91f8477
wip: mcp
thdxr Jul 13, 2025
177bfed
ci: github action
thdxr Jul 13, 2025
736396f
Added sharing config with auto/disabled options (#951)
opencode-agent[bot] Jul 13, 2025
90d6c4a
Part data model (#950)
thdxr Jul 13, 2025
73d54c7
fix type error
thdxr Jul 13, 2025
53bb6b4
fix missing tokens
thdxr Jul 14, 2025
67e9bda
ci
thdxr Jul 14, 2025
06554ef
get rid of cli markdown dep
thdxr Jul 14, 2025
139d6e2
Fix clipboard on Wayland systems (#941)
dnouri Jul 14, 2025
052a1e7
fix: file command visual bug (#959)
rekram1-node Jul 14, 2025
457755c
ignore: update download stats 2025-07-14
actions-user Jul 14, 2025
1f4de75
Explain usage of external references in AGENTS.md (#965)
almirsarajcic Jul 14, 2025
7b8b4cf
feat: ctrl+left arrow / ctrl+right arrow key support (#969)
Munawwar Jul 14, 2025
4192d7e
Fix failing git hooks (#966)
almirsarajcic Jul 14, 2025
8d0350d
feat: ability to create new session from session dialog (#920)
nhamilton1 Jul 14, 2025
229a280
fix(tui): find dialog bg color
adamdotdevin Jul 14, 2025
a53d2ea
fix(tui): build and bg color
adamdotdevin Jul 14, 2025
31e0326
fix init command and escape to cancel
thdxr Jul 14, 2025
d8bcf4f
Fix issue: Option to update username shown in conversations. (#975)
opencode-agent[bot] Jul 14, 2025
a2002c8
wip: update sdk
thdxr Jul 14, 2025
86a2ea4
feat(tui): add support for readline list nav (`ctrl-p`/`ctrl-n`) (#955)
dkarter Jul 14, 2025
80b77ca
ignore: share page fix
thdxr Jul 14, 2025
f1e7e7c
feat(tui): even better model selector
adamdotdevin Jul 14, 2025
a1c8e5a
chore: use new search component in find dialog
adamdotdevin Jul 14, 2025
ba676e7
fix(tui): support readline nav in new search component
adamdotdevin Jul 14, 2025
b4e4c3f
wip: snapshot
thdxr Jul 14, 2025
535d79b
docs: fix typo (#982)
timoclsn Jul 14, 2025
2cdb37c
support anthropic console login flow
thdxr Jul 14, 2025
f593792
Standardize parameter description references in Edit and MultiEdit to…
scaryrawr Jul 15, 2025
9368651
docs: README
thdxr Jul 15, 2025
e63a6d4
docs: README
thdxr Jul 15, 2025
d6eff3b
improve error handling and logging for GitHub API failures in upgrade…
CodinCat Jul 15, 2025
2ce694d
Add support for job-control suspend (ctrl+z/SIGSTP). (#944)
rcorre Jul 15, 2025
1cf1d1f
docs: fix agents.md
thdxr Jul 15, 2025
294a117
fix: --continue pull the latest session id consistently (#918)
jase-k Jul 15, 2025
4b2ce14
bring back task tool
thdxr Jul 15, 2025
d62746c
fix panic
thdxr Jul 15, 2025
2eefdae
ignore: fix types
thdxr Jul 15, 2025
95e0957
wip: github actions
fwang Jul 15, 2025
636fe0f
Fix: failed to open session (#999)
rekram1-node Jul 15, 2025
416daca
fix(tui): close completion dialog on ctrl+h (#1005)
jcha0713 Jul 15, 2025
a6dc75a
ignore: update download stats 2025-07-15
actions-user Jul 15, 2025
bcf952b
upgrade ai sdk
thdxr Jul 15, 2025
b5c85d3
fix logic for suprpessing snapshots in big directories
thdxr Jul 15, 2025
533f64f
fix(tui): rework lists and search dialog
adamdotdevin Jul 15, 2025
2487b18
chore: update stainless script to kick off prod build
adamdotdevin Jul 15, 2025
6b98acb
chore: update stainless defs
adamdotdevin Jul 15, 2025
f707fb3
feat(tui): add keymap to remove entries from recently used models (#1…
timoclsn Jul 15, 2025
bbeb579
tweak: (opencode run): adjust tool call rendering, reduce number of "…
rekram1-node Jul 15, 2025
4f955f2
fix(tui): mouse scroll ansi parsing and perf
adamdotdevin Jul 15, 2025
76e256e
fix(tui): wider max width
adamdotdevin Jul 15, 2025
b1ab641
add small model for title generation
thdxr Jul 15, 2025
8bd250f
feat(tui): add /export command to export conversation to editor (#989)
josephschmitt Jul 15, 2025
73b46c2
docs: document base URL
thdxr Jul 15, 2025
749e783
docs: share page task tool
jayair Jul 15, 2025
8a3e581
docs: share fix diff bugs
jayair Jul 15, 2025
1af103d
docs: share handle non bundled langs
jayair Jul 15, 2025
7c91f66
docs: share add copy button to messages in web interface (#902)
jhrudden Jul 15, 2025
bb155db
docs: share tweak copy button
jayair Jul 15, 2025
c1e1ef6
docs: readme
jayair Jul 15, 2025
70c16c4
docs: adding action to notify discord
jayair Jul 15, 2025
48fcaa8
docs: fix config
jayair Jul 15, 2025
7f659cc
docs: Update README.md
jayair Jul 16, 2025
fdfd4d6
add support for modified gemini-cli system prompt (#1033)
spmurrayzzz Jul 16, 2025
1bbd840
move spoof prompt to support anthropic with custom modes (#1031)
nrbrd Jul 16, 2025
05bb127
enable bash tool in plan mode
thdxr Jul 16, 2025
5c860b0
fix share page v1 message
thdxr Jul 16, 2025
0793c3f
clean up export command
thdxr Jul 16, 2025
82a36ac
wip: github action
fwang Jul 16, 2025
a86d421
wip: github actions
fwang Jul 16, 2025
20b8efc
wip: github actions
fwang Jul 16, 2025
867a69a
wip: github actions
fwang Jul 16, 2025
cb032cf
wip: github actions
fwang Jul 16, 2025
7ac0a2b
wip: github actions
fwang Jul 16, 2025
b79167c
sync
fwang Jul 16, 2025
c3c647a
wip: github actions
fwang Jul 16, 2025
e89972a
perf: move ANSI regex compilations to package level (#1040)
matiasinsaurralde Jul 16, 2025
f45deb3
fix: don't sign snapshot commits (#1046)
robin-moser Jul 16, 2025
d41aa2b
chore(tui): simplify messages component, remove navigate, add copy la…
adamdotdevin Jul 15, 2025
01c125b
fix(tui): faster cache algo
adamdotdevin Jul 15, 2025
9f5b59f
chore: messages cleanup
adamdotdevin Jul 16, 2025
a39136a
fix(tui): render attachments in user messages in accent color
adamdotdevin Jul 16, 2025
6a5a424
fix(gh): build
adamdotdevin Jul 16, 2025
7c93bf5
fix(tui): pending tool call width
adamdotdevin Jul 16, 2025
a563fdd
fix(tui): diagnostics rendering
adamdotdevin Jul 16, 2025
81bdb8e
ignore: update download stats 2025-07-16
actions-user Jul 16, 2025
add81b9
Enhance private npm registry support (#998)
nipuna-perera Jul 16, 2025
57d1a60
feat(tui): shift+tab to cycle modes backward (#1049)
AdiY00 Jul 16, 2025
5d67e13
fix: grep omitting text after a colon (#1053)
mutewinter Jul 16, 2025
88b58fd
fix: Prevent division by zero in context percentage calculation (#1055)
monotykamary Jul 16, 2025
050ff94
Fix: Add escape sequence for @ symbols to prevent send blocking (#1029)
jhrudden Jul 16, 2025
70229b1
Fix: better title generation (needs to change due to small models) (#…
rekram1-node Jul 16, 2025
9f44cfd
docs: discord releases
jayair Jul 16, 2025
fdd6d66
docs: rename workflow
jayair Jul 16, 2025
cdc1d8a
feat(tui): layout config to render full width
adamdotdevin Jul 16, 2025
a4664e2
fix: generate title should use same options as model it uses to gen (…
rekram1-node Jul 16, 2025
faea377
fix: missing dependency
adamdotdevin Jul 16, 2025
529fd57
fix: missing dependency
adamdotdevin Jul 16, 2025
360c04c
docs: copying text
adamdotdevin Jul 16, 2025
93c779c
docs: better variable examples
thdxr Jul 16, 2025
f7dd48e
feat(tui): more ways to quit
adamdotdevin Jul 16, 2025
dd34556
only include severity 1 diagnostics from lsp in edit tool output
thdxr Jul 16, 2025
bd244f7
fix(tui): slightly faster scroll speed
adamdotdevin Jul 16, 2025
9d869f7
fix(tui): expand edit calls
adamdotdevin Jul 16, 2025
fc45c0c
docs: fix keybinds documentation to match actual config schema (#867)
danyel117 Jul 16, 2025
dfede9a
Remove binary file opencode (#1069)
scaryrawr Jul 16, 2025
9f6fc1c
docs: edits
jayair Jul 16, 2025
eb4cdf4
docs: config doc
jayair Jul 16, 2025
7520f5e
docs: update enterprise doc
jayair Jul 16, 2025
28b39f5
docs: edit
jayair Jul 16, 2025
d4f9375
fix: type 'reasoning' was provided without its required following ite…
rekram1-node Jul 16, 2025
3c6c2bf
docs(share): add explicit manual share mode (#1074)
timoclsn Jul 16, 2025
60b55f9
feat(tui): remove sharing info from session header when sharing is di…
timoclsn Jul 16, 2025
91ad64f
fix(tui): user defined ctrl+z should take precedence over suspending …
timoclsn Jul 17, 2025
3ce3ac8
fix: message error centering (#1085)
rekram1-node Jul 17, 2025
a493aec
feat(tui): remove share commands from help if sharing is disabled (#1…
timoclsn Jul 17, 2025
20cb7a7
feat(tui): highlight current session in sessions modal (#1093)
drottsgard Jul 17, 2025
2051312
ignore: update download stats 2025-07-17
actions-user Jul 17, 2025
a1fdede
tweak: allow mcp servers to include headers (#1096)
rekram1-node Jul 17, 2025
e681d61
feat: support AWS_BEARER_TOKEN_BEDROCK for amazon bedrock provider au…
ItsWendell Jul 17, 2025
23c3052
only enable ruff if it seems to be used
thdxr Jul 17, 2025
99b9390
Update to a customized beast mode v3 for opencode. (#1109)
scaryrawr Jul 18, 2025
81c88cc
fix(tui): ensure viewport scrolls to bottom on new messages (#1110)
monotykamary Jul 18, 2025
edfea03
tweak: fix [object Object] in logging (#1114)
rekram1-node Jul 18, 2025
571aeaa
tweak: remove needless resorting (#1116)
rekram1-node Jul 18, 2025
df33143
feat(tui): parse for file attachments when exiting EDITOR (#1117)
timoclsn Jul 18, 2025
9964d8e
fix: model cost overrides
adamdotdevin Jul 18, 2025
46c246e
fix: \{return} should be replaced with new line on all lines (#1119)
yihuikhuu Jul 18, 2025
c8321cf
ignore: update download stats 2025-07-18
actions-user Jul 18, 2025
6470243
ignore: update download stats 2025-07-18
actions-user Jul 18, 2025
c952e9a
message rendering performance improvements
thdxr Jul 18, 2025
d56dec4
wip: optional IDs in api (#1128)
thdxr Jul 18, 2025
611854e
feat(tui): simpler layout, always stretched
adamdotdevin Jul 18, 2025
01e7dc2
Added install dir priority & user feedback (#1129)
opencode-agent[bot] Jul 18, 2025
18abcab
feat(config): make small model configurable (#1030)
timoclsn Jul 18, 2025
5c9d191
fix: func called before definition (#1134)
rekram1-node Jul 18, 2025
f1da70b
feat(provider): add Gemini tool schema sanitization (#1132)
necaris Jul 18, 2025
132e26d
docs: Clarify MCP config instructions (#1026)
mybuddymichael Jul 18, 2025
c87a746
ci: rollback install script
thdxr Jul 18, 2025
1676f8b
fix table heading rendering (#1138)
CodinCat Jul 19, 2025
4d83e1b
Resolve merge conflicts in README.md
openhands-agent Jul 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/notify-discord.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: discord

on:
release:
types: [published] # fires only when a release is published

jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Send nicely-formatted embed to Discord
uses: SethCohen/github-releases-to-discord@v1
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
24 changes: 24 additions & 0 deletions .github/workflows/opencode.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: opencode

on:
issue_comment:
types: [created]

jobs:
opencode:
if: startsWith(github.event.comment.body, 'hey opencode')
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Run opencode
uses: sst/opencode/sdks/github@github-v1
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
with:
model: anthropic/claude-sonnet-4-20250514
29 changes: 29 additions & 0 deletions .github/workflows/publish-github-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: publish-github-action

on:
workflow_dispatch:

concurrency: ${{ github.workflow }}-${{ github.ref }}

permissions:
contents: write

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- run: git fetch --force --tags

- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.2.17

- name: Publish
run: |
git config --global user.email "opencode@sst.dev"
git config --global user.name "opencode"
./scripts/publish-github-action.ts
15 changes: 15 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# TUI Agent Guidelines

## Style

- prefer single word variable/function names
- avoid try catch where possible - prefer to let exceptions bubble up
- avoid else statements where possible
- do not make useless helper functions - inline functionality unless the
function is reusable or composable
- prefer Bun apis

## Workflow

- you can regenerate the golang sdk by calling ./scripts/stainless.ts
- we use bun for everything
111 changes: 110 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,110 @@
# Test Project for Git Status Bar
<p align="center">
<a href="https://opencode.ai">
<picture>
<source srcset="packages/web/src/assets/logo-ornate-dark.svg" media="(prefers-color-scheme: dark)">
<source srcset="packages/web/src/assets/logo-ornate-light.svg" media="(prefers-color-scheme: light)">
<img src="packages/web/src/assets/logo-ornate-light.svg" alt="opencode logo">
</picture>
</a>
</p>
<p align="center">AI coding agent, built for the terminal.</p>
<p align="center">
<a href="https://opencode.ai/discord"><img alt="Discord" src="https://img.shields.io/discord/1391832426048651334?style=flat-square&label=discord" /></a>
<a href="https://www.npmjs.com/package/opencode-ai"><img alt="npm" src="https://img.shields.io/npm/v/opencode-ai?style=flat-square" /></a>
<a href="https://github.com/sst/opencode/actions/workflows/publish.yml"><img alt="Build status" src="https://img.shields.io/github/actions/workflow/status/sst/opencode/publish.yml?style=flat-square&branch=dev" /></a>
</p>

[![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
brew install sst/tap/opencode # macOS
paru -S opencode-bin # Arch Linux
```

> [!TIP]
> Remove versions older than 0.1.x before installing.

#### Installation Directory

The install script respects the following priority order for the installation path:

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 exists or can be created)
4. `$HOME/.opencode/bin` - Default fallback

```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
```

### Documentation

For more info on how to configure opencode [**head over to our docs**](https://opencode.ai/docs).

### Contributing

opencode is an opinionated tool so any fundamental feature needs to go through a
design process with the core team.

> [!IMPORTANT]
> We do not accept PRs for core features.

However we still merge a ton of PRs - you can contribute:

- Bug fixes
- Improvements to LLM performance
- Support for new providers
- Fixes for env specific quirks
- Missing standard behavior
- Documentation

Take a look at the git history to see what kind of PRs we end up merging.

> [!NOTE]
> If you do not follow the above guidelines we might close your PR.

To run opencode locally you need.

- Bun
- Golang 1.24.x

And run.

```bash
$ bun install
$ bun run packages/opencode/src/index.ts
```

#### Development Notes

**API Client**: After making changes to the TypeScript API endpoints in `packages/opencode/src/server/server.ts`, you will need the opencode team to generate a new stainless sdk for the clients.

### FAQ

#### How is this different than Claude Code?

It's very similar to Claude Code in terms of capability. Here are the key differences:

- 100% open source
- Not coupled to any provider. Although Anthropic is recommended, opencode can be used with 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.
- 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 can drive it remotely from a mobile app. Meaning that the TUI frontend is just one of the possible clients.

#### What's the other repo?

The other confusingly named repo has no relation to this one. You can [read the story behind it here](https://x.com/thdxr/status/1933561254481666466).

---

**Join our community** [Discord](https://discord.gg/opencode) | [YouTube](https://www.youtube.com/c/sst-dev) | [X.com](https://x.com/SST_dev)
34 changes: 21 additions & 13 deletions STATS.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
# Download Stats

| Date | GitHub Downloads | npm Downloads | Total |
| ---------- | ---------------- | --------------- | ----------------- |
| 2025-06-29 | 18,789 (+0) | 39,420 (+0) | 58,209 (+0) |
| 2025-06-30 | 20,127 (+1,338) | 41,059 (+1,639) | 61,186 (+2,977) |
| 2025-07-01 | 22,108 (+1,981) | 43,745 (+2,686) | 65,853 (+4,667) |
| 2025-07-02 | 24,814 (+2,706) | 46,168 (+2,423) | 70,982 (+5,129) |
| 2025-07-03 | 27,834 (+3,020) | 49,955 (+3,787) | 77,789 (+6,807) |
| 2025-07-04 | 30,608 (+2,774) | 54,758 (+4,803) | 85,366 (+7,577) |
| 2025-07-05 | 32,524 (+1,916) | 58,371 (+3,613) | 90,895 (+5,529) |
| 2025-07-06 | 33,766 (+1,242) | 59,694 (+1,323) | 93,460 (+2,565) |
| 2025-07-08 | 38,052 (+4,286) | 64,468 (+4,774) | 102,520 (+9,060) |
| 2025-07-10 | 43,796 (+5,744) | 71,402 (+6,934) | 115,198 (+12,678) |
| 2025-07-11 | 46,982 (+3,186) | 77,462 (+6,060) | 124,444 (+9,246) |
| Date | GitHub Downloads | npm Downloads | Total |
| ---------- | ---------------- | ---------------- | ----------------- |
| 2025-06-29 | 18,789 (+0) | 39,420 (+0) | 58,209 (+0) |
| 2025-06-30 | 20,127 (+1,338) | 41,059 (+1,639) | 61,186 (+2,977) |
| 2025-07-01 | 22,108 (+1,981) | 43,745 (+2,686) | 65,853 (+4,667) |
| 2025-07-02 | 24,814 (+2,706) | 46,168 (+2,423) | 70,982 (+5,129) |
| 2025-07-03 | 27,834 (+3,020) | 49,955 (+3,787) | 77,789 (+6,807) |
| 2025-07-04 | 30,608 (+2,774) | 54,758 (+4,803) | 85,366 (+7,577) |
| 2025-07-05 | 32,524 (+1,916) | 58,371 (+3,613) | 90,895 (+5,529) |
| 2025-07-06 | 33,766 (+1,242) | 59,694 (+1,323) | 93,460 (+2,565) |
| 2025-07-08 | 38,052 (+4,286) | 64,468 (+4,774) | 102,520 (+9,060) |
| 2025-07-10 | 43,796 (+5,744) | 71,402 (+6,934) | 115,198 (+12,678) |
| 2025-07-11 | 46,982 (+3,186) | 77,462 (+6,060) | 124,444 (+9,246) |
| 2025-07-12 | 49,302 (+2,320) | 82,177 (+4,715) | 131,479 (+7,035) |
| 2025-07-13 | 50,803 (+1,501) | 86,394 (+4,217) | 137,197 (+5,718) |
| 2025-07-14 | 53,283 (+2,480) | 87,860 (+1,466) | 141,143 (+3,946) |
| 2025-07-15 | 57,590 (+4,307) | 91,036 (+3,176) | 148,626 (+7,483) |
| 2025-07-16 | 62,313 (+4,723) | 95,258 (+4,222) | 157,571 (+8,945) |
| 2025-07-17 | 66,684 (+4,371) | 100,048 (+4,790) | 166,732 (+9,161) |
| 2025-07-18 | 70,379 (+3,695) | 102,587 (+2,539) | 172,966 (+6,234) |
| 2025-07-18 | 70,380 (+1) | 102,587 (+0) | 172,967 (+1) |
Loading