|
1 | | -<p align="center"> |
2 | | - <a href="https://opencode.ai"> |
3 | | - <picture> |
4 | | - <source srcset="packages/console/app/src/asset/logo-ornate-dark.svg" media="(prefers-color-scheme: dark)"> |
5 | | - <source srcset="packages/console/app/src/asset/logo-ornate-light.svg" media="(prefers-color-scheme: light)"> |
6 | | - <img src="packages/console/app/src/asset/logo-ornate-light.svg" alt="OpenCode logo"> |
7 | | - </picture> |
8 | | - </a> |
9 | | -</p> |
10 | | -<p align="center">The open source AI coding agent.</p> |
11 | | -<p align="center"> |
12 | | - <a href="https://opencode.ai/discord"><img alt="Discord" src="https://img.shields.io/discord/1391832426048651334?style=flat-square&label=discord" /></a> |
13 | | - <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> |
14 | | - <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> |
15 | | -</p> |
16 | | - |
17 | | -<p align="center"> |
18 | | - <a href="README.md">English</a> | |
19 | | - <a href="README.zh.md">简体中文</a> | |
20 | | - <a href="README.zht.md">繁體中文</a> | |
21 | | - <a href="README.ko.md">한국어</a> | |
22 | | - <a href="README.de.md">Deutsch</a> | |
23 | | - <a href="README.es.md">Español</a> | |
24 | | - <a href="README.fr.md">Français</a> | |
25 | | - <a href="README.it.md">Italiano</a> | |
26 | | - <a href="README.da.md">Dansk</a> | |
27 | | - <a href="README.ja.md">日本語</a> | |
28 | | - <a href="README.pl.md">Polski</a> | |
29 | | - <a href="README.ru.md">Русский</a> | |
30 | | - <a href="README.bs.md">Bosanski</a> | |
31 | | - <a href="README.ar.md">العربية</a> | |
32 | | - <a href="README.no.md">Norsk</a> | |
33 | | - <a href="README.br.md">Português (Brasil)</a> | |
34 | | - <a href="README.th.md">ไทย</a> | |
35 | | - <a href="README.tr.md">Türkçe</a> | |
36 | | - <a href="README.uk.md">Українська</a> | |
37 | | - <a href="README.bn.md">বাংলা</a> | |
38 | | - <a href="README.gr.md">Ελληνικά</a> | |
39 | | - <a href="README.vi.md">Tiếng Việt</a> |
40 | | -</p> |
41 | | - |
42 | | -[](https://opencode.ai) |
43 | | - |
44 | | ---- |
45 | | - |
46 | | -### Installation |
| 1 | +# UTMStack CLI |
47 | 2 |
|
48 | | -```bash |
49 | | -# YOLO |
50 | | -curl -fsSL https://opencode.ai/install | bash |
51 | | - |
52 | | -# Package managers |
53 | | -npm i -g opencode-ai@latest # or bun/pnpm/yarn |
54 | | -scoop install opencode # Windows |
55 | | -choco install opencode # Windows |
56 | | -brew install anomalyco/tap/opencode # macOS and Linux (recommended, always up to date) |
57 | | -brew install opencode # macOS and Linux (official brew formula, updated less) |
58 | | -sudo pacman -S opencode # Arch Linux (Stable) |
59 | | -paru -S opencode-bin # Arch Linux (Latest from AUR) |
60 | | -mise use -g opencode # Any OS |
61 | | -nix run nixpkgs#opencode # or github:anomalyco/opencode for latest dev branch |
62 | | -``` |
| 3 | +The SIEM-aware coding and security agent — a branded distribution of |
| 4 | +[opencode](https://github.com/anomalyco/opencode) that ships with UTMStack's |
| 5 | +SIEM tooling, the ThreatWinds model provider, and a curated set of skills and |
| 6 | +subagents already configured. |
63 | 7 |
|
64 | | -> [!TIP] |
65 | | -> Remove versions older than 0.1.x before installing. |
| 8 | +## Install |
66 | 9 |
|
67 | | -### Desktop App (BETA) |
| 10 | +```bash |
| 11 | +curl -fsSL https://raw.githubusercontent.com/utmstack/utmstack-cli/main/install | bash |
| 12 | +``` |
68 | 13 |
|
69 | | -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). |
| 14 | +The installer places `utmstack` in `~/.utmstack/bin`, adds it to your `PATH`, |
| 15 | +and installs the [UTMStack MCP server](https://github.com/utmstack/MCP) so the |
| 16 | +SIEM tools work immediately. Set `UTMSTACK_SKIP_MCP=1` to skip that step. |
70 | 17 |
|
71 | | -| Platform | Download | |
72 | | -| --------------------- | ---------------------------------- | |
73 | | -| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | |
74 | | -| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | |
75 | | -| Windows | `opencode-desktop-windows-x64.exe` | |
76 | | -| Linux | `.deb`, `.rpm`, or `.AppImage` | |
| 18 | +## First run |
77 | 19 |
|
78 | 20 | ```bash |
79 | | -# macOS (Homebrew) |
80 | | -brew install --cask opencode-desktop |
81 | | -# Windows (Scoop) |
82 | | -scoop bucket add extras; scoop install extras/opencode-desktop |
| 21 | +utmstack-mcp init # connect your UTMStack server (URL + credentials) |
| 22 | +utmstack # start the CLI, then /connect to paste your ThreatWinds API key |
83 | 23 | ``` |
84 | 24 |
|
85 | | -#### Installation Directory |
| 25 | +`utmstack-mcp init` validates your credentials against the live API before |
| 26 | +saving them, and writes them to a `0600` file outside any CLI config — so no |
| 27 | +credentials end up in shell history or in a config file you might share. |
86 | 28 |
|
87 | | -The install script respects the following priority order for the installation path: |
| 29 | +## What ships out of the box |
88 | 30 |
|
89 | | -1. `$OPENCODE_INSTALL_DIR` - Custom installation directory |
90 | | -2. `$XDG_BIN_DIR` - XDG Base Directory Specification compliant path |
91 | | -3. `$HOME/bin` - Standard user binary directory (if it exists or can be created) |
92 | | -4. `$HOME/.opencode/bin` - Default fallback |
| 31 | +**SIEM tools** — the `utmstack` MCP server is enabled by default: alert search |
| 32 | +and triage, log explorer and SQL, incidents, correlation rules, data filters, |
| 33 | +agent inventory, and remote command execution on endpoints. |
93 | 34 |
|
94 | | -```bash |
95 | | -# Examples |
96 | | -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash |
97 | | -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash |
98 | | -``` |
| 35 | +Remote command execution is **opt-in per server** (`allowAgentCommands`). It |
| 36 | +grants a root/SYSTEM shell on an endpoint, and SIEM log content — which is |
| 37 | +partly written by attackers — reaches the model through log and alert search. |
| 38 | +Enable it only where you want that capability. |
| 39 | + |
| 40 | +**Models** — the `threatwinds` provider is preconfigured |
| 41 | +(`silas-1.6-pro` by default, `silas-1.6` for small tasks). Add your API key with |
| 42 | +`/connect` in the TUI or `utmstack providers login`. |
| 43 | + |
| 44 | +**Skills and subagents** — 26 skills and 9 subagents are embedded in the binary |
| 45 | +and extracted to your config directory on first run, covering planning, code |
| 46 | +review, systematic debugging, test-driven development, and web testing. They are |
| 47 | +version-gated: an upgrade refreshes them without touching skills you added. |
99 | 48 |
|
100 | | -### Agents |
| 49 | +## Configuration |
101 | 50 |
|
102 | | -OpenCode includes two built-in agents you can switch between with the `Tab` key. |
| 51 | +Config lives in `~/.config/utmstack/utmstack.json` (`%APPDATA%\utmstack` on |
| 52 | +Windows). The defaults are written on first run and are yours to edit — the CLI |
| 53 | +never overwrites an existing config. |
103 | 54 |
|
104 | | -- **build** - Default, full-access agent for development work |
105 | | -- **plan** - Read-only agent for analysis and code exploration |
106 | | - - Denies file edits by default |
107 | | - - Asks permission before running bash commands |
108 | | - - Ideal for exploring unfamiliar codebases or planning changes |
| 55 | +The directory is separate from opencode's, so this CLI and a stock opencode |
| 56 | +install coexist without touching each other's settings. An `opencode.json` in |
| 57 | +the same directory is still read, with `utmstack.json` taking precedence. |
109 | 58 |
|
110 | | -Also included is a **general** subagent for complex searches and multistep tasks. |
111 | | -This is used internally and can be invoked using `@general` in messages. |
| 59 | +## Building from source |
112 | 60 |
|
113 | | -Learn more about [agents](https://opencode.ai/docs/agents). |
| 61 | +```bash |
| 62 | +bun install |
| 63 | +cd packages/opencode |
| 64 | +OPENCODE_VERSION=1.0.0 bun run script/build.ts --single |
| 65 | +``` |
114 | 66 |
|
115 | | -### Documentation |
| 67 | +The binary lands in `dist/opencode-<platform>-<arch>/bin/utmstack`. Embedded |
| 68 | +skills and agents are regenerated from `packages/opencode/src/assets` on every |
| 69 | +build; `bundled-assets.gen.ts` is generated and not tracked in git. |
116 | 70 |
|
117 | | -For more info on how to configure OpenCode, [**head over to our docs**](https://opencode.ai/docs). |
| 71 | +## Upstream |
118 | 72 |
|
119 | | -### Contributing |
| 73 | +This is a fork of opencode. Branding and defaults are confined to a small set of |
| 74 | +files so upstream changes remain straightforward to merge: |
120 | 75 |
|
121 | | -If you're interested in contributing to OpenCode, please read our [contributing docs](./CONTRIBUTING.md) before submitting a pull request. |
| 76 | +| Path | Purpose | |
| 77 | +|---|---| |
| 78 | +| `packages/core/src/global.ts` | app name — relocates every config/data/cache directory | |
| 79 | +| `packages/opencode/src/index.ts` | script name, bootstrap invocation | |
| 80 | +| `packages/opencode/src/config/utmstack-bootstrap.ts` | seeds default config, extracts embedded assets | |
| 81 | +| `packages/opencode/src/config/config.ts` | reads `utmstack.json` ahead of `opencode.json` | |
| 82 | +| `packages/opencode/src/plugin/threatwinds.ts` | makes `threatwinds` a first-class auth provider | |
| 83 | +| `packages/opencode/script/gen-bundled-assets.ts` | embeds skills and agents into the binary | |
| 84 | +| `packages/opencode/script/build.ts` | binary name, release asset naming, archive hygiene | |
| 85 | +| `packages/opencode/src/installation/index.ts` | update checks point at this repo, not upstream | |
| 86 | +| `packages/tui/src/logo.ts`, `packages/opencode/src/cli/ui.ts` | wordmarks | |
| 87 | +| `install` | installer, plus the MCP install step | |
122 | 88 |
|
123 | | -### Building on OpenCode |
| 89 | +Skills and subagents come from |
| 90 | +[osmontero/opencode-skills](https://github.com/osmontero/opencode-skills). |
124 | 91 |
|
125 | | -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. |
| 92 | +Upstream opencode documentation is preserved in `README.upstream.md`. |
126 | 93 |
|
127 | | ---- |
| 94 | +## License |
128 | 95 |
|
129 | | -**Join our community** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) |
| 96 | +opencode's license applies to the upstream code. See [LICENSE](LICENSE). |
0 commit comments