@arhan-w/ibex 0.0.0-stage → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +295 -2
  3. package/npm-package/LICENSE +21 -0
  4. package/npm-package/README.md +176 -0
  5. package/npm-package/bin/goat.js +3 -0
  6. package/npm-package/bin/ibex.js +77 -0
  7. package/npm-package/package.json +58 -0
  8. package/npm-package/scripts/install-binary.js +168 -0
  9. package/package.json +69 -6
  10. package/src/agent.ts +695 -0
  11. package/src/agents/loader.ts +110 -0
  12. package/src/ambient.d.ts +2 -0
  13. package/src/code/extract.ts +292 -0
  14. package/src/code/find.ts +244 -0
  15. package/src/code/grammars.ts +88 -0
  16. package/src/code/indexer.ts +242 -0
  17. package/src/code/semantic.ts +253 -0
  18. package/src/code/slash.ts +88 -0
  19. package/src/code/tool.ts +40 -0
  20. package/src/collab/client.ts +141 -0
  21. package/src/collab/handlers.ts +141 -0
  22. package/src/collab/invite.ts +39 -0
  23. package/src/collab/relay.ts +106 -0
  24. package/src/collab/sync.ts +131 -0
  25. package/src/commands.tsx +943 -0
  26. package/src/computer.ts +629 -0
  27. package/src/config.ts +318 -0
  28. package/src/constants.ts +18 -0
  29. package/src/context.ts +73 -0
  30. package/src/data/providers.json +2342 -0
  31. package/src/diff.ts +50 -0
  32. package/src/doctor.ts +443 -0
  33. package/src/errors.ts +139 -0
  34. package/src/gflash.ts +170 -0
  35. package/src/hooks.ts +133 -0
  36. package/src/ide/assets.gen.ts +3 -0
  37. package/src/ide/index.html +844 -0
  38. package/src/ide/server.ts +506 -0
  39. package/src/ide/vendor/marked.umd.js +80 -0
  40. package/src/ide/vendor/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
  41. package/src/ide/vendor/vs/base/worker/workerMain.js +31 -0
  42. package/src/ide/vendor/vs/basic-languages/abap/abap.js +10 -0
  43. package/src/ide/vendor/vs/basic-languages/apex/apex.js +10 -0
  44. package/src/ide/vendor/vs/basic-languages/azcli/azcli.js +10 -0
  45. package/src/ide/vendor/vs/basic-languages/bat/bat.js +10 -0
  46. package/src/ide/vendor/vs/basic-languages/bicep/bicep.js +11 -0
  47. package/src/ide/vendor/vs/basic-languages/cameligo/cameligo.js +10 -0
  48. package/src/ide/vendor/vs/basic-languages/clojure/clojure.js +10 -0
  49. package/src/ide/vendor/vs/basic-languages/coffee/coffee.js +10 -0
  50. package/src/ide/vendor/vs/basic-languages/cpp/cpp.js +10 -0
  51. package/src/ide/vendor/vs/basic-languages/csharp/csharp.js +10 -0
  52. package/src/ide/vendor/vs/basic-languages/csp/csp.js +10 -0
  53. package/src/ide/vendor/vs/basic-languages/css/css.js +12 -0
  54. package/src/ide/vendor/vs/basic-languages/cypher/cypher.js +10 -0
  55. package/src/ide/vendor/vs/basic-languages/dart/dart.js +10 -0
  56. package/src/ide/vendor/vs/basic-languages/dockerfile/dockerfile.js +10 -0
  57. package/src/ide/vendor/vs/basic-languages/ecl/ecl.js +10 -0
  58. package/src/ide/vendor/vs/basic-languages/elixir/elixir.js +10 -0
  59. package/src/ide/vendor/vs/basic-languages/flow9/flow9.js +10 -0
  60. package/src/ide/vendor/vs/basic-languages/freemarker2/freemarker2.js +12 -0
  61. package/src/ide/vendor/vs/basic-languages/fsharp/fsharp.js +10 -0
  62. package/src/ide/vendor/vs/basic-languages/go/go.js +10 -0
  63. package/src/ide/vendor/vs/basic-languages/graphql/graphql.js +10 -0
  64. package/src/ide/vendor/vs/basic-languages/handlebars/handlebars.js +10 -0
  65. package/src/ide/vendor/vs/basic-languages/hcl/hcl.js +10 -0
  66. package/src/ide/vendor/vs/basic-languages/html/html.js +10 -0
  67. package/src/ide/vendor/vs/basic-languages/ini/ini.js +10 -0
  68. package/src/ide/vendor/vs/basic-languages/java/java.js +10 -0
  69. package/src/ide/vendor/vs/basic-languages/javascript/javascript.js +10 -0
  70. package/src/ide/vendor/vs/basic-languages/julia/julia.js +10 -0
  71. package/src/ide/vendor/vs/basic-languages/kotlin/kotlin.js +10 -0
  72. package/src/ide/vendor/vs/basic-languages/less/less.js +11 -0
  73. package/src/ide/vendor/vs/basic-languages/lexon/lexon.js +10 -0
  74. package/src/ide/vendor/vs/basic-languages/liquid/liquid.js +10 -0
  75. package/src/ide/vendor/vs/basic-languages/lua/lua.js +10 -0
  76. package/src/ide/vendor/vs/basic-languages/m3/m3.js +10 -0
  77. package/src/ide/vendor/vs/basic-languages/markdown/markdown.js +10 -0
  78. package/src/ide/vendor/vs/basic-languages/mdx/mdx.js +10 -0
  79. package/src/ide/vendor/vs/basic-languages/mips/mips.js +10 -0
  80. package/src/ide/vendor/vs/basic-languages/msdax/msdax.js +10 -0
  81. package/src/ide/vendor/vs/basic-languages/mysql/mysql.js +10 -0
  82. package/src/ide/vendor/vs/basic-languages/objective-c/objective-c.js +10 -0
  83. package/src/ide/vendor/vs/basic-languages/pascal/pascal.js +10 -0
  84. package/src/ide/vendor/vs/basic-languages/pascaligo/pascaligo.js +10 -0
  85. package/src/ide/vendor/vs/basic-languages/perl/perl.js +10 -0
  86. package/src/ide/vendor/vs/basic-languages/pgsql/pgsql.js +10 -0
  87. package/src/ide/vendor/vs/basic-languages/php/php.js +10 -0
  88. package/src/ide/vendor/vs/basic-languages/pla/pla.js +10 -0
  89. package/src/ide/vendor/vs/basic-languages/postiats/postiats.js +10 -0
  90. package/src/ide/vendor/vs/basic-languages/powerquery/powerquery.js +10 -0
  91. package/src/ide/vendor/vs/basic-languages/powershell/powershell.js +10 -0
  92. package/src/ide/vendor/vs/basic-languages/protobuf/protobuf.js +11 -0
  93. package/src/ide/vendor/vs/basic-languages/pug/pug.js +10 -0
  94. package/src/ide/vendor/vs/basic-languages/python/python.js +10 -0
  95. package/src/ide/vendor/vs/basic-languages/qsharp/qsharp.js +10 -0
  96. package/src/ide/vendor/vs/basic-languages/r/r.js +10 -0
  97. package/src/ide/vendor/vs/basic-languages/razor/razor.js +10 -0
  98. package/src/ide/vendor/vs/basic-languages/redis/redis.js +10 -0
  99. package/src/ide/vendor/vs/basic-languages/redshift/redshift.js +10 -0
  100. package/src/ide/vendor/vs/basic-languages/restructuredtext/restructuredtext.js +10 -0
  101. package/src/ide/vendor/vs/basic-languages/ruby/ruby.js +10 -0
  102. package/src/ide/vendor/vs/basic-languages/rust/rust.js +10 -0
  103. package/src/ide/vendor/vs/basic-languages/sb/sb.js +10 -0
  104. package/src/ide/vendor/vs/basic-languages/scala/scala.js +10 -0
  105. package/src/ide/vendor/vs/basic-languages/scheme/scheme.js +10 -0
  106. package/src/ide/vendor/vs/basic-languages/scss/scss.js +12 -0
  107. package/src/ide/vendor/vs/basic-languages/shell/shell.js +10 -0
  108. package/src/ide/vendor/vs/basic-languages/solidity/solidity.js +10 -0
  109. package/src/ide/vendor/vs/basic-languages/sophia/sophia.js +10 -0
  110. package/src/ide/vendor/vs/basic-languages/sparql/sparql.js +10 -0
  111. package/src/ide/vendor/vs/basic-languages/sql/sql.js +10 -0
  112. package/src/ide/vendor/vs/basic-languages/st/st.js +10 -0
  113. package/src/ide/vendor/vs/basic-languages/swift/swift.js +13 -0
  114. package/src/ide/vendor/vs/basic-languages/systemverilog/systemverilog.js +10 -0
  115. package/src/ide/vendor/vs/basic-languages/tcl/tcl.js +10 -0
  116. package/src/ide/vendor/vs/basic-languages/twig/twig.js +10 -0
  117. package/src/ide/vendor/vs/basic-languages/typescript/typescript.js +10 -0
  118. package/src/ide/vendor/vs/basic-languages/typespec/typespec.js +10 -0
  119. package/src/ide/vendor/vs/basic-languages/vb/vb.js +10 -0
  120. package/src/ide/vendor/vs/basic-languages/wgsl/wgsl.js +307 -0
  121. package/src/ide/vendor/vs/basic-languages/xml/xml.js +10 -0
  122. package/src/ide/vendor/vs/basic-languages/yaml/yaml.js +10 -0
  123. package/src/ide/vendor/vs/editor/editor.main.css +8 -0
  124. package/src/ide/vendor/vs/editor/editor.main.js +798 -0
  125. package/src/ide/vendor/vs/language/css/cssMode.js +13 -0
  126. package/src/ide/vendor/vs/language/css/cssWorker.js +77 -0
  127. package/src/ide/vendor/vs/language/html/htmlMode.js +13 -0
  128. package/src/ide/vendor/vs/language/html/htmlWorker.js +454 -0
  129. package/src/ide/vendor/vs/language/json/jsonMode.js +19 -0
  130. package/src/ide/vendor/vs/language/json/jsonWorker.js +42 -0
  131. package/src/ide/vendor/vs/language/typescript/tsMode.js +20 -0
  132. package/src/ide/vendor/vs/language/typescript/tsWorker.js +51328 -0
  133. package/src/ide/vendor/vs/loader.js +11 -0
  134. package/src/index-shared.ts +117 -0
  135. package/src/index.ts +586 -0
  136. package/src/llm.ts +721 -0
  137. package/src/logger.ts +39 -0
  138. package/src/mcp/client.ts +121 -0
  139. package/src/mcp/types.ts +27 -0
  140. package/src/oauth.ts +205 -0
  141. package/src/onboarding.ts +140 -0
  142. package/src/palette.tsx +199 -0
  143. package/src/permissions.ts +123 -0
  144. package/src/plugins/loader.ts +120 -0
  145. package/src/plugins/marketplace.ts +252 -0
  146. package/src/plugins/sandbox.ts +303 -0
  147. package/src/plugins/tar.ts +241 -0
  148. package/src/pricing.ts +78 -0
  149. package/src/protocol/client.ts +102 -0
  150. package/src/protocol/rpc.ts +43 -0
  151. package/src/protocol/serve.ts +136 -0
  152. package/src/providers.ts +402 -0
  153. package/src/rate-limiter.ts +101 -0
  154. package/src/refs.ts +97 -0
  155. package/src/runtime.ts +144 -0
  156. package/src/session.ts +401 -0
  157. package/src/skills/loader.ts +136 -0
  158. package/src/statusline.ts +70 -0
  159. package/src/system-prompt.ts +28 -0
  160. package/src/tools.ts +1280 -0
  161. package/src/tui.tsx +1355 -0
  162. package/src/update.ts +236 -0
  163. package/src/vendor/flashServer.ts +2 -0
  164. package/src/vendor/gemini-web2api/gemini_web2api.py +1136 -0
  165. package/src/virtual-list.tsx +125 -0
  166. package/src/window.ts +31 -0
  167. package/tsconfig.json +16 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Arhan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,296 @@
1
- # Temporary Holding Version
1
+ <div align="center">
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ <p>
4
+ <img src="docs/assets/banner.jpg" alt="ibex — Minimal Autonomous AI Coding Agent" width="100%" />
5
+ </p>
6
+
7
+ <h1>ibex</h1>
8
+ <p><em>Formerly GoatCode · Minimal, blazing-fast autonomous AI coding agent for the terminal &amp; web</em></p>
9
+
10
+ <p>
11
+ <a href="https://github.com/Arhan-w/ibex/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/Arhan-w/ibex/ci.yml?style=for-the-badge&logo=githubactions&logoColor=white&label=CI&color=a855f7" alt="CI/CD" /></a>
12
+ <a href="rust/Cargo.toml"><img src="https://img.shields.io/badge/Rust-Native_Core-a855f7?style=for-the-badge&logo=rust&logoColor=white" alt="Rust Core" /></a>
13
+ <a href="https://www.npmjs.com/package/goatcode-cli"><img src="https://img.shields.io/npm/v/goatcode-cli?style=for-the-badge&logo=npm&logoColor=white&color=6366f1" alt="npm version" /></a>
14
+ <a href="https://www.npmjs.com/package/goatcode-cli"><img src="https://img.shields.io/npm/dm/goatcode-cli?style=for-the-badge&color=4ade80" alt="npm downloads" /></a>
15
+ <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-38bdf8?style=for-the-badge" alt="License: MIT" /></a>
16
+ <a href="https://github.com/Arhan-w/ibex"><img src="https://img.shields.io/github/stars/Arhan-w/ibex?style=for-the-badge&color=facc15" alt="GitHub Stars" /></a>
17
+ </p>
18
+
19
+ <p>
20
+ <strong>180+ LLM providers</strong> · <strong>Native Rust TUI + Monaco Web IDE</strong> · <strong>Multi-repo code graph</strong> · <strong>P2P collab</strong> · <strong>Signed plugins</strong>
21
+ </p>
22
+
23
+ <p>
24
+ <a href="#-quick-start">Quick Start</a> ·
25
+ <a href="#%EF%B8%8F-tui--web-ide">TUI &amp; Web IDE</a> ·
26
+ <a href="#-comparison">Compare</a> ·
27
+ <a href="#%EF%B8%8F-architecture">Architecture</a> ·
28
+ <a href="#-demos">Demos</a> ·
29
+ <a href="#-commands--shortcuts">Commands</a> ·
30
+ <a href="#-documentation">Docs</a>
31
+ </p>
32
+
33
+ </div>
34
+
35
+ ---
36
+
37
+ <p align="center">
38
+ <img src="docs/assets/showcase.svg" alt="ibex Ratatui TUI and Monaco Web IDE" width="100%" />
39
+ </p>
40
+
41
+ ## ⚡ Why `ibex`?
42
+
43
+ Most terminal coding agents force you into a single vendor, wrap only OpenAI-compatible endpoints, or ship heavy runtimes with no local IDE or code intelligence. **`ibex`** gives you everything in one minimal, unchained binary:
44
+
45
+ - **Native Rust Core (`ibex`) + TypeScript Runtime (`goat`)** — Instant startup, zero-bloat `ratatui` noir TUI, syntax-highlighted fenced code blocks, interactive `Ctrl+P` palette, and visual `[████░░░░]` context meter.
46
+ - **4 Native Wire Formats (180+ Providers)** — OpenAI Chat Completions, **native Anthropic Messages** (with 90% ephemeral prompt caching), OpenAI Responses, and **native Google Gemini**, plus browser/device **OAuth** (`claude`, `codex`, `gemini`, `github-copilot`, `kimi`) and live **`/models --live`** discovery.
47
+ - **Zero-Config Free Tier (`goated-flash`)** — Works immediately with no API key required.
48
+ - **Built-in Local Monaco Web IDE (`ibex ide`)** — Full VS Code editor engine bound to `127.0.0.1` with per-boot token auth, live tool streaming, clickable permission cards, and inline diffs.
49
+ - **Atomic `multiedit` + `/undo` + `/rewind` + `/fork`** — All-or-nothing multi-hunk file edits, turn-level snapshots, crash recovery, and session branching.
50
+ - **Multi-Repo Code Intelligence (`/index`, `/find`)** — Incremental symbol + import graph with ranked keyword, camelCase, and semantic search across multiple repositories.
51
+ - **P2P Collaboration & Agent-as-a-Service** — Real-time WebSocket relay with Lamport clock sync + turn handoff (`/share`, `/handoff`), and JSON-RPC 2.0 server (`ibex serve`).
52
+ - **Signed Plugin Marketplace & MCP** — Ed25519 signature verification, traversal/symlink-safe `tar.gz` extraction, custom `.md` subagents, and full MCP stdio/HTTP/SSE support.
53
+
54
+ ---
55
+
56
+ ## 📊 Comparison
57
+
58
+ | Feature | **ibex** | Crow | Claude Code | OpenCode | Cursor |
59
+ | :--- | :---: | :---: | :---: | :---: | :---: |
60
+ | **Native Rust Binary + TS Runtime** | ✅ `ibex` / `goat` | ❌ Bun only | ❌ Node | ✅ Go/TS | ❌ Electron |
61
+ | **LLM Providers** | **180+** | 207 (OpenAI only) | Anthropic only | Multi | Closed |
62
+ | **Native Anthropic / Gemini / Responses** | ✅ **All 4 + Prompt Cache** | ❌ No Anthropic direct | Anthropic only | Partial | Closed |
63
+ | **OAuth Login (Claude / Codex / Copilot / Gemini)** | ✅ | ❌ | Anthropic only | Partial | Closed |
64
+ | **Live Remote Model Fetch** | ✅ `/models --live` | ✅ | ❌ | ❌ | ❌ |
65
+ | **Built-in Local Web IDE** | ✅ **Monaco (`ibex ide`)** | ❌ | ❌ | ❌ | Proprietary |
66
+ | **Multi-Repo Code Graph** | ✅ `/index` + `/find` | ❌ | ❌ | ❌ | Limited |
67
+ | **Atomic Multi-Edit + Turn Undo/Rewind** | ✅ | Snapshots | ❌ | ❌ | ✅ |
68
+ | **Real-Time P2P Collaboration** | ✅ `/share` + `/handoff` | ❌ | ❌ | ❌ | ❌ |
69
+ | **Signed Plugin Marketplace + MCP** | ✅ **Ed25519 + MCP** | ❌ | MCP | MCP | Proprietary |
70
+ | **JSON-RPC 2.0 Agent-as-a-Service** | ✅ `ibex serve` | ❌ | ❌ | ❌ | ❌ |
71
+ | **Free Built-in Tier** | ✅ `goated-flash` | ❌ | ❌ | ❌ | Limited |
72
+ | **Open Source (MIT)** | ✅ | ✅ | ❌ | ✅ | ❌ |
73
+
74
+ ---
75
+
76
+ ## 🚀 Install & Quick Start
77
+
78
+ ### Option 1 — Global Install via npm / Bun / pnpm
79
+
80
+ ```bash
81
+ # Install directly from GitHub (works immediately, exposes `ibex` + `goat`)
82
+ npm install -g git+https://github.com/Arhan-w/ibex.git
83
+
84
+ # Or via Bun
85
+ bun install -g git+https://github.com/Arhan-w/ibex.git
86
+
87
+ # Once published to npm
88
+ npm install -g ibex-cli
89
+ ```
90
+
91
+ ### Option 2 — One-Line Shell / PowerShell Installer
92
+
93
+ ```bash
94
+ # macOS / Linux / Git Bash
95
+ curl -fsSL https://raw.githubusercontent.com/Arhan-w/ibex/main/install.sh | bash
96
+ ```
97
+
98
+ ```powershell
99
+ # Windows PowerShell
100
+ irm https://raw.githubusercontent.com/Arhan-w/ibex/main/install.ps1 | iex
101
+ ```
102
+
103
+ ### Option 3 — Cargo (Native Rust Binary)
104
+
105
+ ```bash
106
+ cargo install --git https://github.com/Arhan-w/ibex
107
+ ```
108
+
109
+ ### Option 4 — Homebrew (macOS / Linux)
110
+
111
+ ```bash
112
+ brew install --HEAD https://raw.githubusercontent.com/Arhan-w/ibex/main/Formula/ibex.rb
113
+ ```
114
+
115
+ ### Option 5 — Build From Source
116
+
117
+ ```bash
118
+ git clone https://github.com/Arhan-w/ibex.git
119
+ cd ibex
120
+
121
+ # Build optimized native Rust binaries (`ibex` + `goat` compatibility alias)
122
+ cargo build --release --manifest-path rust/Cargo.toml
123
+
124
+ # Run immediately (works with built-in free tier or your own key)
125
+ ./rust/target/release/ibex
126
+ ```
127
+
128
+ ### Connect Any Provider (or run zero-config)
129
+
130
+ ```bash
131
+ ibex auth anthropic --key sk-ant-...
132
+ ibex auth openai --key sk-...
133
+ ibex auth gemini --key ...
134
+
135
+ # Fetch live models from your active provider
136
+ ibex models --live
137
+
138
+ # Headless CI / scripting mode
139
+ ibex -p "explain the architecture" --output-format json
140
+ ```
141
+
142
+ ---
143
+
144
+ ## 🖥️ TUI & Web IDE
145
+
146
+ ### Noir Terminal UI (`ibex`)
147
+ - **Syntax-highlighted fenced code blocks** & markdown headings/lists/quotes right inside the terminal
148
+ - **`Ctrl+P` Command Palette** — fuzzy search every slash command, skill, plugin, and saved session
149
+ - **`Shift+Tab` / `Ctrl+O` Mode Cycle** — `ask before edits` → `accept edits` → `plan (read-only)` → `GOAT MODE (unchained)`
150
+ - **Instant Permission Hotkeys** — `[y/1]` Allow once, `[a/2]` Allow for session, `[n/3/Esc]` Deny
151
+ - **Visual Context Meter & Spend Guard** — `[████░░░░] 42% · $0.0124` with configurable `budget_usd` ceiling
152
+
153
+ ### Local Monaco Web IDE (`ibex ide`)
154
+ ```bash
155
+ ibex ide --port 4847
156
+ ```
157
+ Launches a local-only (`127.0.0.1`) Monaco editor with explorer tree, dirty tabs, `Ctrl+S` save, live SSE agent tool cards, and clickable permission prompts — zero data leaves your machine except model API calls.
158
+
159
+ ---
160
+
161
+ ## 🏗️ Architecture
162
+
163
+ <p align="center">
164
+ <img src="docs/assets/architecture.svg" alt="ibex Architecture Diagram" width="100%" />
165
+ </p>
166
+
167
+ <details>
168
+ <summary><strong>Explore Repository Structure (Rust + TypeScript)</strong></summary>
169
+
170
+ ```text
171
+ ├── rust/ # Native Rust rewrite (ibex + goat binaries)
172
+ │ ├── Cargo.toml # Tokio, Ratatui, Axum, Reqwest, Ed25519, Ignore
173
+ │ └── src/
174
+ │ ├── main.rs / cli.rs # Clap CLI & subcommands
175
+ │ ├── tui.rs # Ratatui noir TUI, palette, markdown, diffs
176
+ │ ├── agent.rs # Agent loop, retry, circuit breaker, parallel batching
177
+ │ ├── llm.rs # 4 native SSE streaming wire formats
178
+ │ ├── tools.rs # Sandboxed file/edit/multiedit/bash/web/undo tools
179
+ │ ├── code.rs # Multi-repo symbol indexer & ranked /find
180
+ │ ├── collab.rs # Axum WebSocket relay & Lamport turn sync
181
+ │ ├── protocol.rs # JSON-RPC 2.0 server & constant-time auth
182
+ │ ├── plugins.rs # Ed25519 verification & safe tar.gz extraction
183
+ │ ├── ide.rs # Local Monaco Web IDE + SSE backend
184
+ │ ├── providers.rs # 183+ embedded catalog + live /models fetch
185
+ │ ├── session.rs # Atomic JSONL persistence, /fork, /search
186
+ │ ├── permissions.rs # Rule matcher (deny > allow > ask, anti-bypass)
187
+ │ ├── hooks.rs # PreToolUse / PostToolUse / Stop command hooks
188
+ │ └── doctor.rs # 8-point system health diagnostics
189
+ ├── src/ # TypeScript / Bun runtime & Monaco assets
190
+ ├── tests/ # 202 TypeScript integration & unit tests
191
+ └── docs/ # Guides, specs, and visual assets
192
+ ```
193
+
194
+ </details>
195
+
196
+ ---
197
+
198
+ ## 🎬 Demos
199
+
200
+ **[🎥 Watch the 60s Launch Reel](https://github.com/Arhan-w/GoatCode/releases/download/v3.2.0/reel_landscape.mp4)**
201
+
202
+ <table>
203
+ <tr>
204
+ <td width="50%" align="center">
205
+ <strong>Multi-Repo Code Intelligence</strong><br />
206
+ <img src="docs/assets/demo-code.gif" alt="Code Intelligence Demo" width="100%" /><br />
207
+ <sub><code>/index</code> builds the workspace graph; <code>/find</code> ranks symbols across repos.</sub>
208
+ </td>
209
+ <td width="50%" align="center">
210
+ <strong>Real-Time P2P Collaboration</strong><br />
211
+ <img src="docs/assets/demo-collab.gif" alt="P2P Collab Demo" width="100%" /><br />
212
+ <sub>Share invite codes with Lamport clock sync and turn handoff.</sub>
213
+ </td>
214
+ </tr>
215
+ <tr>
216
+ <td width="50%" align="center">
217
+ <strong>Parallel Subagent Ultraplan</strong><br />
218
+ <img src="docs/assets/demo-ultra.gif" alt="Ultraplan Demo" width="100%" /><br />
219
+ <sub>Fan out up to 8 parallel subagent scouts and synthesize a plan.</sub>
220
+ </td>
221
+ <td width="50%" align="center">
222
+ <strong>Circuit-Breaker Provider Failover</strong><br />
223
+ <img src="docs/assets/demo-failover.gif" alt="Provider Failover Demo" width="100%" /><br />
224
+ <sub>Automatic fallback chain rotation on rate limits or transient outages.</sub>
225
+ </td>
226
+ </tr>
227
+ <tr>
228
+ <td width="50%" align="center">
229
+ <strong>Zero-Config Free Tier</strong><br />
230
+ <img src="docs/assets/demo-flash.gif" alt="Zero-Config Free Tier Demo" width="100%" /><br />
231
+ <sub>Boots immediately with embedded <code>goated-flash</code> — zero API key setup.</sub>
232
+ </td>
233
+ <td width="50%" align="center">
234
+ <strong>Crash Recovery &amp; Branching</strong><br />
235
+ <img src="docs/assets/demo-recover.gif" alt="Crash Recovery Demo" width="100%" /><br />
236
+ <sub>Atomic JSONL sessions, <code>/fork</code> branching, and <code>/rewind</code> checkpoints.</sub>
237
+ </td>
238
+ </tr>
239
+ </table>
240
+
241
+ ---
242
+
243
+ ## 🛠️ Commands & Shortcuts
244
+
245
+ | Command | Purpose |
246
+ | :--- | :--- |
247
+ | `/model <name>` | Switch model or alias (`sonnet`, `opus`, `gpt`, `gemini`, `deepseek`, `flash`) |
248
+ | `/models [--live]` | List catalog models, or fetch live models directly from provider API |
249
+ | `/providers` | Inspect all 180+ providers and active credential status |
250
+ | `/index` · `/find <q>` | Build incremental multi-repo symbol index & search ranked symbols |
251
+ | `/undo` · `/rewind` · `/diff` | Revert edits, jump back to turn checkpoints, inspect unified diffs |
252
+ | `/fork` · `/compact` · `/search` | Branch conversation, summarize old turns, search saved transcripts |
253
+ | `/share` · `/peers` · `/handoff` | Host/join P2P WebSocket collaboration sessions |
254
+ | `/doctor [--fix] [--json]` | Run 8-point diagnostics across config, keys, sessions, and storage |
255
+ | `Ctrl+P` · `Shift+Tab` · `Esc` | Open command palette · Cycle permission mode · Interrupt generation |
256
+
257
+ ---
258
+
259
+ ## 📖 Documentation
260
+
261
+ | Guide | Description |
262
+ | :--- | :--- |
263
+ | **[Getting Started](docs/GETTING_STARTED.md)** | Installation, authentication, and first session |
264
+ | **[Custom Agents](docs/AGENTS.md)** | Define reusable `.md` subagent personas with tool allowlists & model overrides |
265
+ | **[v3 Rust Plan](V3_PLAN.md)** | Vision and roadmap for the native Rust platform |
266
+ | **[Changelog](CHANGELOG.md)** | Release history and milestones |
267
+ | **[Contributing](CONTRIBUTING.md)** | Development setup, testing, and PR guidelines |
268
+
269
+ ---
270
+
271
+ ## 🧪 Development & Testing
272
+
273
+ ```bash
274
+ # Rust test suite & release build
275
+ cargo test --manifest-path rust/Cargo.toml
276
+ cargo build --release --manifest-path rust/Cargo.toml
277
+
278
+ # TypeScript type check & test suite (202 tests)
279
+ bun install
280
+ bun x tsc --noEmit
281
+ bun test --timeout 30000
282
+ ```
283
+
284
+ ---
285
+
286
+ ## 📜 License
287
+
288
+ MIT License © 2026 [Arhan](https://github.com/Arhan-w). See [LICENSE](LICENSE) for details.
289
+
290
+ <div align="center">
291
+
292
+ <br />
293
+
294
+ **[⬆ Back to Top](#ibex)**
295
+
296
+ </div>
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Arhan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,176 @@
1
+ <div align="center">
2
+
3
+ # ibex v3.6.0
4
+ ### Minimalist Agentic Coding CLI & Web IDE (Rust + TypeScript)
5
+
6
+ [![CI](https://github.com/Arhan-w/ibex/actions/workflows/ci.yml/badge.svg)](https://github.com/Arhan-w/ibex/actions)
7
+ [![Release](https://img.shields.io/github/v/release/Arhan-w/ibex?color=a855f7&label=v3.6.0)](https://github.com/Arhan-w/ibex/releases)
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
9
+
10
+ *Every provider. Built-in Monaco IDE. Multi-repo workspaces. Code intelligence. Custom subagents. P2P collaboration.*
11
+
12
+ [**Install**](#installation) · [**Quick Start**](#quick-start) · [**IDE**](#ibex-ide)
13
+
14
+ </div>
15
+
16
+ ---
17
+
18
+ ## Installation
19
+
20
+ ### npm / Bun
21
+ ```bash
22
+ npm install -g git+https://github.com/Arhan-w/ibex.git
23
+ # or once published to npm:
24
+ npm install -g ibex-cli
25
+ ```
26
+
27
+ ### Shell / PowerShell
28
+ ```bash
29
+ # macOS / Linux / Git Bash
30
+ curl -fsSL https://raw.githubusercontent.com/Arhan-w/ibex/main/install.sh | bash
31
+ ```
32
+ ```powershell
33
+ # Windows PowerShell
34
+ irm https://raw.githubusercontent.com/Arhan-w/ibex/main/install.ps1 | iex
35
+ ```
36
+
37
+ ### Cargo (Rust)
38
+ ```bash
39
+ cargo install --git https://github.com/Arhan-w/ibex
40
+ ```
41
+
42
+ ### Homebrew (macOS / Linux)
43
+ ```bash
44
+ brew install --HEAD https://raw.githubusercontent.com/Arhan-w/ibex/main/Formula/ibex.rb
45
+ ```
46
+
47
+ Exposes both `ibex` and `goat` commands. Precompiled binaries for Windows/Linux/macOS are on the [Releases page](https://github.com/Arhan-w/ibex/releases).
48
+
49
+ ---
50
+
51
+ ## Quick Start
52
+
53
+ 1. **Run it — that's the whole setup.** No key configured? GoatCode boots on **Goated-Flash-Free** (embedded free model):
54
+ ```bash
55
+ goat
56
+ ```
57
+
58
+ 2. **Add a real provider** whenever you want (switch is automatic):
59
+ ```bash
60
+ goat auth openai sk-...
61
+ ```
62
+ Model aliases work: `/model sonnet`, `/model opus`, `/model flash` (free).
63
+
64
+ 3. **Build the code index, search symbols:**
65
+ ```text
66
+ /index
67
+ /find resolveRepos
68
+ ```
69
+
70
+ 4. **Launch the IDE:**
71
+ ```bash
72
+ goat ide
73
+ ```
74
+
75
+ 5. **Diagnostics:**
76
+ ```text
77
+ /doctor
78
+ ```
79
+
80
+ ---
81
+
82
+ ## Ibex IDE
83
+
84
+ ```bash
85
+ ibex ide # opens http://127.0.0.1:<port>/?token=...
86
+ ```
87
+
88
+ - **Editor** — Monaco with the noir theme, tabs, dirty markers, Ctrl+S save, TypeScript/JSON/HTML/CSS language services, 90+ language modes
89
+ - **Agent chat** — the exact engine from the terminal; tools stream live, edits refresh the explorer
90
+ - **Modes** — ask / accept-edits / plan / bypass from the title bar
91
+ - **Local-only** — binds 127.0.0.1 with a per-boot token
92
+
93
+ `--port N` picks a port; `--no-open` skips the browser.
94
+
95
+ ---
96
+
97
+ ## Custom Subagents
98
+
99
+ ```markdown
100
+ # ~/.goatcode/agents/reviewer.md
101
+ ---
102
+ description: Reviews diffs for bugs and security issues
103
+ tools: read, grep, glob
104
+ ---
105
+ You are a meticulous code reviewer. Report only real defects…
106
+ ```
107
+
108
+ ```text
109
+ /agents # list available subagents
110
+ ```
111
+
112
+ The main agent sees the descriptions and spawns them via `task subagent_type=reviewer`. Tool allowlists are enforced at dispatch. See [docs/AGENTS.md](https://github.com/Arhan-w/GoatCode/blob/v2-typescript/docs/AGENTS.md).
113
+
114
+ ---
115
+
116
+ ## Comparison
117
+
118
+ | Feature | GoatCode | Claude Code | Codex CLI | OpenCode |
119
+ | :--- | :---: | :---: | :---: | :---: |
120
+ | **Providers** | **180+** | Anthropic only | OpenAI only | Multi |
121
+ | **Built-in IDE** | ✅ Monaco web IDE | ❌ | ❌ | ❌ |
122
+ | **Multi-Repo Workspace** | ✅ | ❌ | ❌ | ❌ |
123
+ | **Code Intelligence** | ✅ Tree-sitter + semantic | ❌ | ❌ | ❌ |
124
+ | **Custom Subagents** | ✅ markdown-defined | ❌ | ❌ | ❌ |
125
+ | **Collab & Relay** | ✅ P2P + invite codes | ❌ | ❌ | ❌ |
126
+ | **Agent-as-a-Service** | ✅ JSON-RPC 2.0 | ❌ | ❌ | ❌ |
127
+ | **Free Tier** | ✅ Built-in | ❌ | ❌ | ❌ |
128
+ | **License** | **MIT** | Proprietary | Proprietary | MIT |
129
+
130
+ ---
131
+
132
+ ## Slash Commands
133
+
134
+ | Command | Description |
135
+ | :--- | :--- |
136
+ | `/help` | List all commands and shortcuts |
137
+ | `/model <name>` | Switch model or alias (`opus`, `sonnet`, `flash`) |
138
+ | `/ide` *(planned alias: `goat ide`)* | — use `goat ide` from your shell |
139
+ | `/index` / `/find` | Build & search the multi-repo code graph |
140
+ | `/diff` | Every file change this session (+/- lines per file) |
141
+ | `/agents` | List custom subagents |
142
+ | `/ultraplan` | Fan out to parallel scouts, merge one plan |
143
+ | `/share` / `/peers` / `/handoff` | P2P collaboration session |
144
+ | `/rewind` / `/undo` | Roll back transcript and/or files |
145
+ | `/fork` / `/recover` | Branch sessions / crash recovery |
146
+ | `/marketplace` | Signed community plugins |
147
+ | `/doctor` | 8-point system health check |
148
+ | `/compact` | Summarize old context to free space |
149
+
150
+ ---
151
+
152
+ ## Architecture
153
+
154
+ ```tree
155
+ src/
156
+ ├── agent.ts # Agent loop: parallel scheduling, retry, fallback, subagents
157
+ ├── ide/ # GoatCode IDE — Monaco web editor + embedded agent server
158
+ ├── agents/ # Custom subagent loader (.goat/agents/*.md)
159
+ ├── code/ # Tree-sitter indexer, semantic embeddings, hybrid search
160
+ ├── collab/ # P2P relay, Lamport sync, invite codes
161
+ ├── protocol/ # JSON-RPC 2.0 server & remote agent client
162
+ ├── plugins/ # Signed marketplace, sandbox isolation
163
+ ├── tools.ts # read/write/edit/multiedit/bash(grep|glob)/web/undo
164
+ ├── session.ts # Atomic JSONL persistence, crash recovery, branching
165
+ ├── llm.ts # 4 wire formats: openai / claude / responses / gemini
166
+ ├── providers.ts # 180+ provider catalog, rate limiting
167
+ └── tui.tsx # Ink TUI — noir theme, live tool streaming
168
+ ```
169
+
170
+ Run tests: `bun test`
171
+
172
+ ---
173
+
174
+ ## License
175
+
176
+ MIT License © 2026 Arhan (Goated). See [LICENSE](LICENSE).
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ require("./ibex.js");
@@ -0,0 +1,77 @@
1
+ #!/usr/bin/env node
2
+ /*
3
+ * `ibex` launcher (also powers `goat`).
4
+ * Resolution order:
5
+ * 1. Prebuilt native binary in bin/ibex(.exe) or bin/goat(.exe)
6
+ * 2. Local Rust release binary if built (rust/target/release/ibex)
7
+ * 3. Local Bun/TypeScript source entrypoint (when installed via git+https://...)
8
+ * 4. On-demand download from GitHub releases (unless IBEX_NO_DOWNLOAD=1 / GOATCODE_NO_DOWNLOAD=1)
9
+ */
10
+ "use strict";
11
+
12
+ const { spawnSync } = require("child_process");
13
+ const fs = require("fs");
14
+ const path = require("path");
15
+ const { install, targetPath, fallbackTargetPath } = require("../scripts/install-binary.js");
16
+
17
+ function execPass(cmd, args) {
18
+ const r = spawnSync(cmd, args, { stdio: "inherit", windowsHide: true });
19
+ if (r.error) return null;
20
+ return r.status === null ? 1 : r.status;
21
+ }
22
+
23
+ function findExisting() {
24
+ const rootDir = path.join(__dirname, "..", "..");
25
+ const exe = process.platform === "win32" ? ".exe" : "";
26
+ const candidates = [
27
+ targetPath(),
28
+ fallbackTargetPath(),
29
+ path.join(rootDir, "rust", "target", "release", `ibex${exe}`),
30
+ ];
31
+ for (const c of candidates) {
32
+ if (c && fs.existsSync(c)) return c;
33
+ }
34
+ return null;
35
+ }
36
+
37
+ function tryBunSource() {
38
+ const rootEntry = path.join(__dirname, "..", "..", "src", "index.ts");
39
+ if (!fs.existsSync(rootEntry)) return null;
40
+ const bunCheck = spawnSync("bun", ["--version"], { stdio: "ignore", windowsHide: true });
41
+ if (bunCheck.status === 0) {
42
+ return execPass("bun", ["run", rootEntry, ...process.argv.slice(2)]);
43
+ }
44
+ return null;
45
+ }
46
+
47
+ function main(allowDownload) {
48
+ const existing = findExisting();
49
+ if (existing) {
50
+ const status = execPass(existing, process.argv.slice(2));
51
+ if (status !== null) process.exit(status);
52
+ }
53
+
54
+ const bunStatus = tryBunSource();
55
+ if (bunStatus !== null) process.exit(bunStatus);
56
+
57
+ if (!allowDownload) {
58
+ console.error("[ibex] binary missing and downloads disabled — see https://github.com/Arhan-w/ibex#install");
59
+ process.exit(1);
60
+ }
61
+
62
+ process.stderr.write("[ibex] first run: fetching prebuilt binary...\n");
63
+ install((err) => {
64
+ if (err) {
65
+ console.error(`[ibex] download failed: ${err.message}`);
66
+ console.error("[ibex] install from source: curl -fsSL https://raw.githubusercontent.com/Arhan-w/ibex/main/install.sh | bash");
67
+ process.exit(1);
68
+ }
69
+ const bin = findExisting();
70
+ if (!bin) process.exit(1);
71
+ const status = execPass(bin, process.argv.slice(2));
72
+ process.exit(status === null ? 1 : status);
73
+ });
74
+ }
75
+
76
+ const noDl = process.env.IBEX_NO_DOWNLOAD || process.env.GOATCODE_NO_DOWNLOAD;
77
+ main(!noDl);
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "ibex-cli",
3
+ "version": "3.6.0",
4
+ "description": "ibex — Minimal autonomous AI coding agent for the terminal & web. 180+ providers, native Rust core, Monaco IDE, MCP & plugins.",
5
+ "keywords": [
6
+ "ibex",
7
+ "cli",
8
+ "ai",
9
+ "coding-agent",
10
+ "agent",
11
+ "terminal",
12
+ "llm",
13
+ "mcp",
14
+ "anthropic",
15
+ "openai",
16
+ "gemini",
17
+ "copilot",
18
+ "rust",
19
+ "developer-tools",
20
+ "skills"
21
+ ],
22
+ "license": "MIT",
23
+ "author": "Arhan",
24
+ "homepage": "https://github.com/Arhan-w/ibex#readme",
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git+https://github.com/Arhan-w/ibex.git"
28
+ },
29
+ "bugs": {
30
+ "url": "https://github.com/Arhan-w/ibex/issues"
31
+ },
32
+ "bin": {
33
+ "ibex": "bin/ibex.js",
34
+ "goat": "bin/goat.js"
35
+ },
36
+ "files": [
37
+ "bin/ibex.js",
38
+ "bin/goat.js",
39
+ "scripts/install-binary.js",
40
+ "README.md"
41
+ ],
42
+ "engines": {
43
+ "node": ">=16"
44
+ },
45
+ "os": [
46
+ "darwin",
47
+ "linux",
48
+ "win32"
49
+ ],
50
+ "cpu": [
51
+ "x64",
52
+ "arm64"
53
+ ],
54
+ "scripts": {
55
+ "postinstall": "node scripts/install-binary.js",
56
+ "test": "node bin/ibex.js --version"
57
+ }
58
+ }