Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/compliance-close.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ jobs:
}

const closeMessage = isPR
? 'This pull request has been automatically closed because it was not updated to meet our [contributing guidelines](../blob/main/CONTRIBUTING.md) within the 2-hour window.\n\nFeel free to open a new pull request that follows our guidelines.'
: 'This issue has been automatically closed because it was not updated to meet our [contributing guidelines](../blob/main/CONTRIBUTING.md) within the 2-hour window.\n\nFeel free to open a new issue that follows our issue templates.';
? 'This pull request has been automatically closed because it was not updated to meet our [contributing guidelines](../blob/dev/CONTRIBUTING.md) within the 2-hour window.\n\nFeel free to open a new pull request that follows our guidelines.'
: 'This issue has been automatically closed because it was not updated to meet our [contributing guidelines](../blob/dev/CONTRIBUTING.md) within the 2-hour window.\n\nFeel free to open a new issue that follows our issue templates.';

await github.rest.issues.createComment({
owner: context.repo.owner,
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/duplicate-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:

[If not compliant:]
<!-- issue-compliance -->
This issue doesn't fully meet our [contributing guidelines](../blob/main/CONTRIBUTING.md).
This issue doesn't fully meet our [contributing guidelines](../blob/dev/CONTRIBUTING.md).

**What needs to be fixed:**
- [specific reasons]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Auto Release
on:
push:
branches:
- main
- dev

concurrency:
group: release-${{ github.ref }}
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
run: bun typecheck
working-directory: packages/opencode

- name: Build Grafo CLI packages
- name: Build opencode CLI packages
run: bun ./packages/opencode/script/build.ts
env:
OPENCODE_VERSION: ${{ needs.release-please.outputs.version }}
Expand Down Expand Up @@ -102,11 +102,11 @@ jobs:
name: opencode-cli-windows
path: packages/opencode/dist

- name: Publish Grafo npm packages
- name: Publish opencode npm packages
run: bun ./packages/opencode/script/publish.ts
env:
OPENCODE_VERSION: ${{ needs.release-please.outputs.version }}
OPENCODE_CHANNEL: latest
GRAFO_NPM_ONLY: "true"
OPENCODE_NPM_ONLY: "true"
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: "false"
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: release-github-action
on:
push:
branches:
- main
- dev
paths:
- "github/**"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ name: storybook

on:
push:
branches: [main]
branches: [dev]
paths:
- ".github/workflows/storybook.yml"
- "package.json"
- "bun.lock"
- "packages/storybook/**"
- "packages/ui/**"
pull_request:
branches: [main]
branches: [dev]
paths:
- ".github/workflows/storybook.yml"
- "package.json"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ name: test
on:
push:
branches:
- main
- dev
pull_request:
workflow_dispatch:

concurrency:
# Keep every run on main so cancelled checks do not pollute the default branch
# Keep every run on dev so cancelled checks do not pollute the default branch
# commit history. PRs and other branches still share a group and cancel stale runs.
group: ${{ case(github.ref == 'refs/heads/main', format('{0}-{1}', github.workflow, github.run_id), format('{0}-{1}', github.workflow, github.event.pull_request.number || github.ref)) }}
group: ${{ github.ref == 'refs/heads/dev' && format('{0}-{1}', github.workflow, github.run_id) || format('{0}-{1}', github.workflow, github.event.pull_request.number || github.ref) }}
cancel-in-progress: true

permissions:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: typecheck

on:
push:
branches: [main]
branches: [dev]
pull_request:
branches: [main]
branches: [dev]
workflow_dispatch:

jobs:
Expand Down
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Changelog

## [1.15.0](https://github.com/vinirabli/grafo-cli/compare/v1.14.25...v1.15.0) (2026-04-27)
## [1.15.0](https://github.com/anomalyco/opencode/compare/v1.14.25...v1.15.0) (2026-04-27)


### Features

* **grafo:** rebrand package and terminal UI ([#1](https://github.com/vinirabli/grafo-cli/issues/1)) ([71e6c91](https://github.com/vinirabli/grafo-cli/commit/71e6c911d1263888ae11683f2cd3bead07102038))
* **opencode:** restore package and terminal UI naming ([#1](https://github.com/anomalyco/opencode/issues/1)) ([71e6c91](https://github.com/anomalyco/opencode/commit/71e6c911d1263888ae11683f2cd3bead07102038))


### Bug Fixes

* **README:** update logo to a single SVG file and simplify markup ([1c4df5f](https://github.com/vinirabli/grafo-cli/commit/1c4df5f382225a3248d0983cca0afbe2c28c34ab))
* **README:** update logo to a single SVG file and simplify markup ([1c4df5f](https://github.com/anomalyco/opencode/commit/1c4df5f382225a3248d0983cca0afbe2c28c34ab))

## Changelog

All notable changes to Grafo are documented in this file.
All notable changes to OpenCode are documented in this file.

This changelog is maintained automatically by `release-please` from Conventional Commits.
112 changes: 92 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,108 @@
<p align="center">
<a href="https://opencode.ai">
<img src="packages/console/app/src/asset/logo.svg" alt="Grafo logo">
<picture>
<source srcset="packages/console/app/src/asset/logo-ornate-dark.svg" media="(prefers-color-scheme: dark)">
<source srcset="packages/console/app/src/asset/logo-ornate-light.svg" media="(prefers-color-scheme: light)">
<img src="packages/console/app/src/asset/logo-ornate-light.svg" alt="OpenCode logo">
</picture>
</a>
</p>
<p align="center">Grafo is the open source AI coding agent for the terminal.</p>
<p align="center">The open source AI coding agent.</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/@vinirabli/grafo"><img alt="npm" src="https://img.shields.io/npm/v/%40vinirabli%2Fgrafo?style=flat-square" /></a>
<a href="https://www.npmjs.com/package/%40vinirabli%2Fopencode"><img alt="npm" src="https://img.shields.io/npm/v/%40vinirabli%2Fopencode?style=flat-square" /></a>
<a href="https://github.com/anomalyco/opencode/actions/workflows/publish.yml"><img alt="Build status" src="https://img.shields.io/github/actions/workflow/status/anomalyco/opencode/publish.yml?style=flat-square&branch=dev" /></a>
</p>

![Grafo Terminal UI](packages/console/app/src/asset/lander/grafo-screenshot2.png)
<p align="center">
<a href="README.md">English</a> |
<a href="README.zh.md">简体中文</a> |
<a href="README.zht.md">繁體中文</a> |
<a href="README.ko.md">한국어</a> |
<a href="README.de.md">Deutsch</a> |
<a href="README.es.md">Español</a> |
<a href="README.fr.md">Français</a> |
<a href="README.it.md">Italiano</a> |
<a href="README.da.md">Dansk</a> |
<a href="README.ja.md">日本語</a> |
<a href="README.pl.md">Polski</a> |
<a href="README.ru.md">Русский</a> |
<a href="README.bs.md">Bosanski</a> |
<a href="README.ar.md">العربية</a> |
<a href="README.no.md">Norsk</a> |
<a href="README.br.md">Português (Brasil)</a> |
<a href="README.th.md">ไทย</a> |
<a href="README.tr.md">Türkçe</a> |
<a href="README.uk.md">Українська</a> |
<a href="README.bn.md">বাংলা</a> |
<a href="README.gr.md">Ελληνικά</a> |
<a href="README.vi.md">Tiếng Việt</a>
</p>

[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai)

---

### Installation

```bash
npm i -g @vinirabli/grafo

# or with bun / pnpm / yarn
bun add -g @vinirabli/grafo
pnpm add -g @vinirabli/grafo
yarn global add @vinirabli/grafo
# YOLO
curl -fsSL https://opencode.ai/install | bash

# Package managers
npm i -g @vinirabli/opencode@latest
bun add -g @vinirabli/opencode@latest
pnpm add -g @vinirabli/opencode@latest
yarn global add @vinirabli/opencode@latest
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]
> The published package exposes both `grafo` and `opencode` commands during the transition.
> Remove versions older than 0.1.x before installing.

### Documentation
### Desktop App (BETA)

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).

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

```bash
# macOS (Homebrew)
brew install --cask opencode-desktop
# Windows (Scoop)
scoop bucket add extras; scoop install extras/opencode-desktop
```

#### Installation Directory

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

Docs and links still live under the existing OpenCode URLs for now: [**opencode.ai/docs**](https://opencode.ai/docs).
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

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

### Agents

Grafo includes two built-in agents you can switch between with the `Tab` key.
OpenCode includes two built-in agents you can switch between with the `Tab` key.

- **build** - Default, full-access agent for development work
- **plan** - Read-only agent for analysis and code exploration
Expand All @@ -47,13 +115,17 @@ This is used internally and can be invoked using `@general` in messages.

Learn more about [agents](https://opencode.ai/docs/agents).

### Documentation

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

### Contributing

If you're interested in contributing to Grafo, please read our [contributing docs](./CONTRIBUTING.md) before submitting a pull request.
If you're interested in contributing to OpenCode, please read our [contributing docs](./CONTRIBUTING.md) before submitting a pull request.

### Building on Grafo
### Building on OpenCode

If you are working on a project that's related to Grafo and is using "grafo" or "opencode" as part of its name, please add a note to your README to clarify that it is not built by the Grafo team and is not affiliated with us in any way.
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.

### FAQ

Expand All @@ -62,10 +134,10 @@ If you are working on a project that's related to Grafo and is using "grafo" or
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 we recommend the models we provide through [OpenCode Zen](https://opencode.ai/zen), Grafo 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.
- 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. Grafo 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 Grafo 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.
- 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.

---

Expand Down
2 changes: 1 addition & 1 deletion bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 10 additions & 16 deletions packages/opencode/bin/opencode
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ const childProcess = require("child_process")
const fs = require("fs")
const path = require("path")
const os = require("os")
const commandName = "grafo"
const legacyCommandName = "opencode"
const commandName = "opencode"

function run(target) {
const result = childProcess.spawnSync(target, process.argv.slice(2), {
Expand All @@ -19,19 +18,17 @@ function run(target) {
process.exit(code)
}

const envPath = process.env.GRAFO_BIN_PATH || process.env.OPENCODE_BIN_PATH
const envPath = process.env.OPENCODE_BIN_PATH
if (envPath) {
run(envPath)
}

const scriptPath = fs.realpathSync(__filename)
const scriptDir = path.dirname(scriptPath)

for (const cacheName of [`.${commandName}`, `.${legacyCommandName}`]) {
const cached = path.join(scriptDir, cacheName)
if (fs.existsSync(cached)) {
run(cached)
}
const cached = path.join(scriptDir, `.${commandName}`)
if (fs.existsSync(cached)) {
run(cached)
}

const platformMap = {
Expand All @@ -53,10 +50,9 @@ let arch = archMap[os.arch()]
if (!arch) {
arch = os.arch()
}
const packageBase = "@vinirabli/grafo"
const packageBase = "@vinirabli/opencode"
const base = packageBase + "-" + platform + "-" + arch
const binaryNames =
platform === "windows" ? [`${commandName}.exe`, `${legacyCommandName}.exe`] : [commandName, legacyCommandName]
const binaryName = platform === "windows" ? `${commandName}.exe` : commandName

function supportsAvx2() {
if (arch !== "x64") return false
Expand Down Expand Up @@ -159,10 +155,8 @@ function findBinary(startDir) {
const modules = path.join(current, "node_modules")
if (fs.existsSync(modules)) {
for (const name of names) {
for (const binary of binaryNames) {
const candidate = path.join(modules, name, "bin", binary)
if (fs.existsSync(candidate)) return candidate
}
const candidate = path.join(modules, name, "bin", binaryName)
if (fs.existsSync(candidate)) return candidate
}
}
const parent = path.dirname(current)
Expand All @@ -176,7 +170,7 @@ function findBinary(startDir) {
const resolved = findBinary(scriptDir)
if (!resolved) {
console.error(
"It seems that your package manager failed to install the right version of the grafo CLI for your platform. You can try manually installing " +
"It seems that your package manager failed to install the right version of the opencode CLI for your platform. You can try manually installing " +
names.map((n) => `\"${n}\"`).join(" or ") +
" package",
)
Expand Down
4 changes: 2 additions & 2 deletions packages/opencode/script/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ await import("./generate.ts")
import { Script } from "@opencode-ai/script"
import pkg from "../package.json"

const npmPackageName = "@vinirabli/grafo"
const commandName = "grafo"
const npmPackageName = "@vinirabli/opencode"
const commandName = "opencode"
const legacyCommandName = pkg.name

// Load migrations from migration directories
Expand Down
Loading
Loading