@arhan-w/ibex 0.0.0-stage → 3.6.1

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 +306 -2
  3. package/npm-package/LICENSE +21 -0
  4. package/npm-package/README.md +178 -0
  5. package/npm-package/bin/goat.js +3 -0
  6. package/npm-package/bin/ibex.js +78 -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,307 @@
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?branch=main&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/ibex-cli"><img src="https://img.shields.io/npm/v/ibex-cli?style=for-the-badge&logo=npm&logoColor=white&label=npm%20ibex-cli&color=6366f1" alt="npm ibex-cli" /></a>
14
+ <a href="https://www.npmjs.com/package/@arhan-w/ibex"><img src="https://img.shields.io/npm/v/%40arhan-w%2Fibex?style=for-the-badge&logo=npm&logoColor=white&label=%40arhan-w%2Fibex&color=4ade80" alt="npm @arhan-w/ibex" /></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="https://www.npmjs.com/package/ibex-cli"><strong>npm (ibex-cli)</strong></a> ·
25
+ <a href="https://www.npmjs.com/package/@arhan-w/ibex"><strong>npm (@arhan-w/ibex)</strong></a> ·
26
+ <a href="https://github.com/Arhan-w/ibex/actions"><strong>CI</strong></a> ·
27
+ <a href="https://github.com/Arhan-w/ibex/releases"><strong>Releases</strong></a> ·
28
+ <a href="https://github.com/Arhan-w/ibex/issues"><strong>Issues</strong></a>
29
+ </p>
30
+
31
+ <p>
32
+ <a href="#-install--quick-start">Install</a> ·
33
+ <a href="#%EF%B8%8F-tui--web-ide">TUI &amp; Web IDE</a> ·
34
+ <a href="#-comparison">Compare</a> ·
35
+ <a href="#%EF%B8%8F-architecture">Architecture</a> ·
36
+ <a href="#-demos">Demos</a> ·
37
+ <a href="#-commands--shortcuts">Commands</a> ·
38
+ <a href="#-documentation">Docs</a>
39
+ </p>
40
+
41
+ </div>
42
+
43
+ ---
44
+
45
+ <p align="center">
46
+ <img src="docs/assets/showcase.svg" alt="ibex Ratatui TUI and Monaco Web IDE" width="100%" />
47
+ </p>
48
+
49
+ ## ⚡ Why `ibex`?
50
+
51
+ 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:
52
+
53
+ - **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.
54
+ - **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.
55
+ - **Zero-Config Free Tier (`goated-flash`)** — Works immediately with no API key required.
56
+ - **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.
57
+ - **Atomic `multiedit` + `/undo` + `/rewind` + `/fork`** — All-or-nothing multi-hunk file edits, turn-level snapshots, crash recovery, and session branching.
58
+ - **Multi-Repo Code Intelligence (`/index`, `/find`)** — Incremental symbol + import graph with ranked keyword, camelCase, and semantic search across multiple repositories.
59
+ - **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`).
60
+ - **Signed Plugin Marketplace & MCP** — Ed25519 signature verification, traversal/symlink-safe `tar.gz` extraction, custom `.md` subagents, and full MCP stdio/HTTP/SSE support.
61
+
62
+ ---
63
+
64
+ ## 📊 Comparison
65
+
66
+ | Feature | **ibex** | Crow | Claude Code | OpenCode | Cursor |
67
+ | :--- | :---: | :---: | :---: | :---: | :---: |
68
+ | **Native Rust Binary + TS Runtime** | ✅ `ibex` / `goat` | ❌ Bun only | ❌ Node | ✅ Go/TS | ❌ Electron |
69
+ | **LLM Providers** | **180+** | 207 (OpenAI only) | Anthropic only | Multi | Closed |
70
+ | **Native Anthropic / Gemini / Responses** | ✅ **All 4 + Prompt Cache** | ❌ No Anthropic direct | Anthropic only | Partial | Closed |
71
+ | **OAuth Login (Claude / Codex / Copilot / Gemini)** | ✅ | ❌ | Anthropic only | Partial | Closed |
72
+ | **Live Remote Model Fetch** | ✅ `/models --live` | ✅ | ❌ | ❌ | ❌ |
73
+ | **Built-in Local Web IDE** | ✅ **Monaco (`ibex ide`)** | ❌ | ❌ | ❌ | Proprietary |
74
+ | **Multi-Repo Code Graph** | ✅ `/index` + `/find` | ❌ | ❌ | ❌ | Limited |
75
+ | **Atomic Multi-Edit + Turn Undo/Rewind** | ✅ | Snapshots | ❌ | ❌ | ✅ |
76
+ | **Real-Time P2P Collaboration** | ✅ `/share` + `/handoff` | ❌ | ❌ | ❌ | ❌ |
77
+ | **Signed Plugin Marketplace + MCP** | ✅ **Ed25519 + MCP** | ❌ | MCP | MCP | Proprietary |
78
+ | **JSON-RPC 2.0 Agent-as-a-Service** | ✅ `ibex serve` | ❌ | ❌ | ❌ | ❌ |
79
+ | **Free Built-in Tier** | ✅ `goated-flash` | ❌ | ❌ | ❌ | Limited |
80
+ | **Open Source (MIT)** | ✅ | ✅ | ❌ | ✅ | ❌ |
81
+
82
+ ---
83
+
84
+ ## 🚀 Install & Quick Start
85
+
86
+ ### Option 1 — Global Install via npm / Bun / pnpm
87
+
88
+ ```bash
89
+ # Install from npm (exposes `ibex` + `goat`)
90
+ npm install -g ibex-cli
91
+
92
+ # Or scoped package
93
+ npm install -g @arhan-w/ibex
94
+
95
+ # Or install directly from GitHub
96
+ npm install -g git+https://github.com/Arhan-w/ibex.git
97
+
98
+ # Or via Bun
99
+ bun install -g ibex-cli
100
+ ```
101
+
102
+ ### Option 2 — One-Line Shell / PowerShell Installer
103
+
104
+ ```bash
105
+ # macOS / Linux / Git Bash
106
+ curl -fsSL https://raw.githubusercontent.com/Arhan-w/ibex/main/install.sh | bash
107
+ ```
108
+
109
+ ```powershell
110
+ # Windows PowerShell
111
+ irm https://raw.githubusercontent.com/Arhan-w/ibex/main/install.ps1 | iex
112
+ ```
113
+
114
+ ### Option 3 — Cargo (Native Rust Binary)
115
+
116
+ ```bash
117
+ cargo install --git https://github.com/Arhan-w/ibex
118
+ ```
119
+
120
+ ### Option 4 — Homebrew (macOS / Linux)
121
+
122
+ ```bash
123
+ brew install --HEAD https://raw.githubusercontent.com/Arhan-w/ibex/main/Formula/ibex.rb
124
+ ```
125
+
126
+ ### Option 5 — Build From Source
127
+
128
+ ```bash
129
+ git clone https://github.com/Arhan-w/ibex.git
130
+ cd ibex
131
+
132
+ # Build optimized native Rust binaries (`ibex` + `goat` compatibility alias)
133
+ cargo build --release --workspace
134
+
135
+ # Run immediately (works with built-in free tier or your own key)
136
+ ./target/release/ibex
137
+ ```
138
+
139
+ ### Connect Any Provider (or run zero-config)
140
+
141
+ ```bash
142
+ ibex auth anthropic --key sk-ant-...
143
+ ibex auth openai --key sk-...
144
+ ibex auth gemini --key ...
145
+
146
+ # Fetch live models from your active provider
147
+ ibex models --live
148
+
149
+ # Headless CI / scripting mode
150
+ ibex -p "explain the architecture" --output-format json
151
+ ```
152
+
153
+ ---
154
+
155
+ ## 🖥️ TUI & Web IDE
156
+
157
+ ### Noir Terminal UI (`ibex`)
158
+ - **Syntax-highlighted fenced code blocks** & markdown headings/lists/quotes right inside the terminal
159
+ - **`Ctrl+P` Command Palette** — fuzzy search every slash command, skill, plugin, and saved session
160
+ - **`Shift+Tab` / `Ctrl+O` Mode Cycle** — `ask before edits` → `accept edits` → `plan (read-only)` → `GOAT MODE (unchained)`
161
+ - **Instant Permission Hotkeys** — `[y/1]` Allow once, `[a/2]` Allow for session, `[n/3/Esc]` Deny
162
+ - **Visual Context Meter & Spend Guard** — `[████░░░░] 42% · $0.0124` with configurable `budget_usd` ceiling
163
+
164
+ ### Local Monaco Web IDE (`ibex ide`)
165
+ ```bash
166
+ ibex ide --port 4847
167
+ ```
168
+ 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.
169
+
170
+ ---
171
+
172
+ ## 🏗️ Architecture
173
+
174
+ <p align="center">
175
+ <img src="docs/assets/architecture.svg" alt="ibex Architecture Diagram" width="100%" />
176
+ </p>
177
+
178
+ <details>
179
+ <summary><strong>Explore Repository Structure (Rust + TypeScript)</strong></summary>
180
+
181
+ ```text
182
+ ├── rust/ # Native Rust rewrite (ibex + goat binaries)
183
+ │ ├── Cargo.toml # Tokio, Ratatui, Axum, Reqwest, Ed25519, Ignore
184
+ │ └── src/
185
+ │ ├── main.rs / cli.rs # Clap CLI & subcommands
186
+ │ ├── tui.rs # Ratatui noir TUI, palette, markdown, diffs
187
+ │ ├── agent.rs # Agent loop, retry, circuit breaker, parallel batching
188
+ │ ├── llm.rs # 4 native SSE streaming wire formats
189
+ │ ├── tools.rs # Sandboxed file/edit/multiedit/bash/web/undo tools
190
+ │ ├── code.rs # Multi-repo symbol indexer & ranked /find
191
+ │ ├── collab.rs # Axum WebSocket relay & Lamport turn sync
192
+ │ ├── protocol.rs # JSON-RPC 2.0 server & constant-time auth
193
+ │ ├── plugins.rs # Ed25519 verification & safe tar.gz extraction
194
+ │ ├── ide.rs # Local Monaco Web IDE + SSE backend
195
+ │ ├── providers.rs # 183+ embedded catalog + live /models fetch
196
+ │ ├── session.rs # Atomic JSONL persistence, /fork, /search
197
+ │ ├── permissions.rs # Rule matcher (deny > allow > ask, anti-bypass)
198
+ │ ├── hooks.rs # PreToolUse / PostToolUse / Stop command hooks
199
+ │ └── doctor.rs # 8-point system health diagnostics
200
+ ├── src/ # TypeScript / Bun runtime & Monaco assets
201
+ ├── tests/ # 202 TypeScript integration & unit tests
202
+ └── docs/ # Guides, specs, and visual assets
203
+ ```
204
+
205
+ </details>
206
+
207
+ ---
208
+
209
+ ## 🎬 Demos
210
+
211
+ **[🎥 Watch the 60s Launch Reel](https://github.com/Arhan-w/GoatCode/releases/download/v3.2.0/reel_landscape.mp4)**
212
+
213
+ <table>
214
+ <tr>
215
+ <td width="50%" align="center">
216
+ <strong>Multi-Repo Code Intelligence</strong><br />
217
+ <img src="docs/assets/demo-code.gif" alt="Code Intelligence Demo" width="100%" /><br />
218
+ <sub><code>/index</code> builds the workspace graph; <code>/find</code> ranks symbols across repos.</sub>
219
+ </td>
220
+ <td width="50%" align="center">
221
+ <strong>Real-Time P2P Collaboration</strong><br />
222
+ <img src="docs/assets/demo-collab.gif" alt="P2P Collab Demo" width="100%" /><br />
223
+ <sub>Share invite codes with Lamport clock sync and turn handoff.</sub>
224
+ </td>
225
+ </tr>
226
+ <tr>
227
+ <td width="50%" align="center">
228
+ <strong>Parallel Subagent Ultraplan</strong><br />
229
+ <img src="docs/assets/demo-ultra.gif" alt="Ultraplan Demo" width="100%" /><br />
230
+ <sub>Fan out up to 8 parallel subagent scouts and synthesize a plan.</sub>
231
+ </td>
232
+ <td width="50%" align="center">
233
+ <strong>Circuit-Breaker Provider Failover</strong><br />
234
+ <img src="docs/assets/demo-failover.gif" alt="Provider Failover Demo" width="100%" /><br />
235
+ <sub>Automatic fallback chain rotation on rate limits or transient outages.</sub>
236
+ </td>
237
+ </tr>
238
+ <tr>
239
+ <td width="50%" align="center">
240
+ <strong>Zero-Config Free Tier</strong><br />
241
+ <img src="docs/assets/demo-flash.gif" alt="Zero-Config Free Tier Demo" width="100%" /><br />
242
+ <sub>Boots immediately with embedded <code>goated-flash</code> — zero API key setup.</sub>
243
+ </td>
244
+ <td width="50%" align="center">
245
+ <strong>Crash Recovery &amp; Branching</strong><br />
246
+ <img src="docs/assets/demo-recover.gif" alt="Crash Recovery Demo" width="100%" /><br />
247
+ <sub>Atomic JSONL sessions, <code>/fork</code> branching, and <code>/rewind</code> checkpoints.</sub>
248
+ </td>
249
+ </tr>
250
+ </table>
251
+
252
+ ---
253
+
254
+ ## 🛠️ Commands & Shortcuts
255
+
256
+ | Command | Purpose |
257
+ | :--- | :--- |
258
+ | `/model <name>` | Switch model or alias (`sonnet`, `opus`, `gpt`, `gemini`, `deepseek`, `flash`) |
259
+ | `/models [--live]` | List catalog models, or fetch live models directly from provider API |
260
+ | `/providers` | Inspect all 180+ providers and active credential status |
261
+ | `/index` · `/find <q>` | Build incremental multi-repo symbol index & search ranked symbols |
262
+ | `/undo` · `/rewind` · `/diff` | Revert edits, jump back to turn checkpoints, inspect unified diffs |
263
+ | `/fork` · `/compact` · `/search` | Branch conversation, summarize old turns, search saved transcripts |
264
+ | `/share` · `/peers` · `/handoff` | Host/join P2P WebSocket collaboration sessions |
265
+ | `/doctor [--fix] [--json]` | Run 8-point diagnostics across config, keys, sessions, and storage |
266
+ | `Ctrl+P` · `Shift+Tab` · `Esc` | Open command palette · Cycle permission mode · Interrupt generation |
267
+
268
+ ---
269
+
270
+ ## 📖 Documentation
271
+
272
+ | Guide | Description |
273
+ | :--- | :--- |
274
+ | **[Getting Started](docs/GETTING_STARTED.md)** | Installation, authentication, and first session |
275
+ | **[Custom Agents](docs/AGENTS.md)** | Define reusable `.md` subagent personas with tool allowlists & model overrides |
276
+ | **[v3 Rust Plan](V3_PLAN.md)** | Vision and roadmap for the native Rust platform |
277
+ | **[Changelog](CHANGELOG.md)** | Release history and milestones |
278
+ | **[Contributing](CONTRIBUTING.md)** | Development setup, testing, and PR guidelines |
279
+
280
+ ---
281
+
282
+ ## 🧪 Development & Testing
283
+
284
+ ```bash
285
+ # Rust test suite & release build
286
+ cargo test --workspace
287
+ cargo build --release --workspace
288
+
289
+ # TypeScript type check & test suite (202 tests)
290
+ bun install
291
+ bun x tsc --noEmit
292
+ bun test --timeout 30000
293
+ ```
294
+
295
+ ---
296
+
297
+ ## 📜 License
298
+
299
+ MIT License © 2026 [Arhan](https://github.com/Arhan-w). See [LICENSE](LICENSE) for details.
300
+
301
+ <div align="center">
302
+
303
+ <br />
304
+
305
+ **[⬆ Back to Top](#ibex)**
306
+
307
+ </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,178 @@
1
+ <div align="center">
2
+
3
+ # ibex v3.6.1
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.1)](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 ibex-cli
23
+ # or scoped:
24
+ npm install -g @arhan-w/ibex
25
+ # or direct from GitHub:
26
+ npm install -g git+https://github.com/Arhan-w/ibex.git
27
+ ```
28
+
29
+ ### Shell / PowerShell
30
+ ```bash
31
+ # macOS / Linux / Git Bash
32
+ curl -fsSL https://raw.githubusercontent.com/Arhan-w/ibex/main/install.sh | bash
33
+ ```
34
+ ```powershell
35
+ # Windows PowerShell
36
+ irm https://raw.githubusercontent.com/Arhan-w/ibex/main/install.ps1 | iex
37
+ ```
38
+
39
+ ### Cargo (Rust)
40
+ ```bash
41
+ cargo install --git https://github.com/Arhan-w/ibex
42
+ ```
43
+
44
+ ### Homebrew (macOS / Linux)
45
+ ```bash
46
+ brew install --HEAD https://raw.githubusercontent.com/Arhan-w/ibex/main/Formula/ibex.rb
47
+ ```
48
+
49
+ Exposes both `ibex` and `goat` commands. Precompiled binaries for Windows/Linux/macOS are on the [Releases page](https://github.com/Arhan-w/ibex/releases).
50
+
51
+ ---
52
+
53
+ ## Quick Start
54
+
55
+ 1. **Run it — that's the whole setup.** No key configured? GoatCode boots on **Goated-Flash-Free** (embedded free model):
56
+ ```bash
57
+ goat
58
+ ```
59
+
60
+ 2. **Add a real provider** whenever you want (switch is automatic):
61
+ ```bash
62
+ goat auth openai sk-...
63
+ ```
64
+ Model aliases work: `/model sonnet`, `/model opus`, `/model flash` (free).
65
+
66
+ 3. **Build the code index, search symbols:**
67
+ ```text
68
+ /index
69
+ /find resolveRepos
70
+ ```
71
+
72
+ 4. **Launch the IDE:**
73
+ ```bash
74
+ goat ide
75
+ ```
76
+
77
+ 5. **Diagnostics:**
78
+ ```text
79
+ /doctor
80
+ ```
81
+
82
+ ---
83
+
84
+ ## Ibex IDE
85
+
86
+ ```bash
87
+ ibex ide # opens http://127.0.0.1:<port>/?token=...
88
+ ```
89
+
90
+ - **Editor** — Monaco with the noir theme, tabs, dirty markers, Ctrl+S save, TypeScript/JSON/HTML/CSS language services, 90+ language modes
91
+ - **Agent chat** — the exact engine from the terminal; tools stream live, edits refresh the explorer
92
+ - **Modes** — ask / accept-edits / plan / bypass from the title bar
93
+ - **Local-only** — binds 127.0.0.1 with a per-boot token
94
+
95
+ `--port N` picks a port; `--no-open` skips the browser.
96
+
97
+ ---
98
+
99
+ ## Custom Subagents
100
+
101
+ ```markdown
102
+ # ~/.goatcode/agents/reviewer.md
103
+ ---
104
+ description: Reviews diffs for bugs and security issues
105
+ tools: read, grep, glob
106
+ ---
107
+ You are a meticulous code reviewer. Report only real defects…
108
+ ```
109
+
110
+ ```text
111
+ /agents # list available subagents
112
+ ```
113
+
114
+ 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).
115
+
116
+ ---
117
+
118
+ ## Comparison
119
+
120
+ | Feature | GoatCode | Claude Code | Codex CLI | OpenCode |
121
+ | :--- | :---: | :---: | :---: | :---: |
122
+ | **Providers** | **180+** | Anthropic only | OpenAI only | Multi |
123
+ | **Built-in IDE** | ✅ Monaco web IDE | ❌ | ❌ | ❌ |
124
+ | **Multi-Repo Workspace** | ✅ | ❌ | ❌ | ❌ |
125
+ | **Code Intelligence** | ✅ Tree-sitter + semantic | ❌ | ❌ | ❌ |
126
+ | **Custom Subagents** | ✅ markdown-defined | ❌ | ❌ | ❌ |
127
+ | **Collab & Relay** | ✅ P2P + invite codes | ❌ | ❌ | ❌ |
128
+ | **Agent-as-a-Service** | ✅ JSON-RPC 2.0 | ❌ | ❌ | ❌ |
129
+ | **Free Tier** | ✅ Built-in | ❌ | ❌ | ❌ |
130
+ | **License** | **MIT** | Proprietary | Proprietary | MIT |
131
+
132
+ ---
133
+
134
+ ## Slash Commands
135
+
136
+ | Command | Description |
137
+ | :--- | :--- |
138
+ | `/help` | List all commands and shortcuts |
139
+ | `/model <name>` | Switch model or alias (`opus`, `sonnet`, `flash`) |
140
+ | `/ide` *(planned alias: `goat ide`)* | — use `goat ide` from your shell |
141
+ | `/index` / `/find` | Build & search the multi-repo code graph |
142
+ | `/diff` | Every file change this session (+/- lines per file) |
143
+ | `/agents` | List custom subagents |
144
+ | `/ultraplan` | Fan out to parallel scouts, merge one plan |
145
+ | `/share` / `/peers` / `/handoff` | P2P collaboration session |
146
+ | `/rewind` / `/undo` | Roll back transcript and/or files |
147
+ | `/fork` / `/recover` | Branch sessions / crash recovery |
148
+ | `/marketplace` | Signed community plugins |
149
+ | `/doctor` | 8-point system health check |
150
+ | `/compact` | Summarize old context to free space |
151
+
152
+ ---
153
+
154
+ ## Architecture
155
+
156
+ ```tree
157
+ src/
158
+ ├── agent.ts # Agent loop: parallel scheduling, retry, fallback, subagents
159
+ ├── ide/ # GoatCode IDE — Monaco web editor + embedded agent server
160
+ ├── agents/ # Custom subagent loader (.goat/agents/*.md)
161
+ ├── code/ # Tree-sitter indexer, semantic embeddings, hybrid search
162
+ ├── collab/ # P2P relay, Lamport sync, invite codes
163
+ ├── protocol/ # JSON-RPC 2.0 server & remote agent client
164
+ ├── plugins/ # Signed marketplace, sandbox isolation
165
+ ├── tools.ts # read/write/edit/multiedit/bash(grep|glob)/web/undo
166
+ ├── session.ts # Atomic JSONL persistence, crash recovery, branching
167
+ ├── llm.ts # 4 wire formats: openai / claude / responses / gemini
168
+ ├── providers.ts # 180+ provider catalog, rate limiting
169
+ └── tui.tsx # Ink TUI — noir theme, live tool streaming
170
+ ```
171
+
172
+ Run tests: `bun test`
173
+
174
+ ---
175
+
176
+ ## License
177
+
178
+ 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,78 @@
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, "target", "release", `ibex${exe}`),
30
+ path.join(rootDir, "rust", "target", "release", `ibex${exe}`),
31
+ ];
32
+ for (const c of candidates) {
33
+ if (c && fs.existsSync(c)) return c;
34
+ }
35
+ return null;
36
+ }
37
+
38
+ function tryBunSource() {
39
+ const rootEntry = path.join(__dirname, "..", "..", "src", "index.ts");
40
+ if (!fs.existsSync(rootEntry)) return null;
41
+ const bunCheck = spawnSync("bun", ["--version"], { stdio: "ignore", windowsHide: true });
42
+ if (bunCheck.status === 0) {
43
+ return execPass("bun", ["run", rootEntry, ...process.argv.slice(2)]);
44
+ }
45
+ return null;
46
+ }
47
+
48
+ function main(allowDownload) {
49
+ const existing = findExisting();
50
+ if (existing) {
51
+ const status = execPass(existing, process.argv.slice(2));
52
+ if (status !== null) process.exit(status);
53
+ }
54
+
55
+ const bunStatus = tryBunSource();
56
+ if (bunStatus !== null) process.exit(bunStatus);
57
+
58
+ if (!allowDownload) {
59
+ console.error("[ibex] binary missing and downloads disabled — see https://github.com/Arhan-w/ibex#install");
60
+ process.exit(1);
61
+ }
62
+
63
+ process.stderr.write("[ibex] first run: fetching prebuilt binary...\n");
64
+ install((err) => {
65
+ if (err) {
66
+ console.error(`[ibex] download failed: ${err.message}`);
67
+ console.error("[ibex] install from source: curl -fsSL https://raw.githubusercontent.com/Arhan-w/ibex/main/install.sh | bash");
68
+ process.exit(1);
69
+ }
70
+ const bin = findExisting();
71
+ if (!bin) process.exit(1);
72
+ const status = execPass(bin, process.argv.slice(2));
73
+ process.exit(status === null ? 1 : status);
74
+ });
75
+ }
76
+
77
+ const noDl = process.env.IBEX_NO_DOWNLOAD || process.env.GOATCODE_NO_DOWNLOAD;
78
+ main(!noDl);
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "ibex-cli",
3
+ "version": "3.6.1",
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
+ }