ather-code 0.0.0-stage → 0.34.4

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 (5) hide show
  1. package/LICENSE +19 -0
  2. package/README.md +551 -2
  3. package/dist/cli.mjs +11314 -0
  4. package/dist/sdk.mjs +279696 -0
  5. package/package.json +213 -4
package/LICENSE ADDED
@@ -0,0 +1,19 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Atharva
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10
+
11
+ THIRD-PARTY PROVIDER & API DISCLAIMER (40+ INTEGRATED SERVICES)
12
+
13
+ This CLI tool acts as an interface that routes, relays, and processes requests across 40+ third-party API providers, including but not limited to: OpenAI, Anthropic, Google Gemini, Groq, Mistral AI, Ollama, OpenRouter, Cohere, Together AI, AWS Bedrock, Azure OpenAI, Perplexity, DeepSeek, Fireworks AI, Replicate, Hugging Face, Cerebras, SambaNova, Anyscale, Voyage AI, Jina AI, DeepInfra, OctoAI, AI21 Labs, Cloudflare Workers AI, MonsterAPI, NLP Cloud, RunPod, Vectara, Novita AI, Lepton AI, Modal, Baseten, Predibase, Scaleway, LocalAI, and LM Studio.
14
+
15
+ CREDENTIAL SECURITY & LIABILITY: The user is solely responsible for securing, managing, and maintaining the confidentiality of all API keys, tokens, and credentials. The authors and copyright holders are not liable for compromised credentials, unauthorized charges, or data exposure resulting from local environment configurations or misuse.
16
+
17
+ TERMS OF SERVICE COMPLIANCE: Use of this software does not exempt the user from the Terms of Service, Acceptable Use Policies, or Rate Limits enforced by each respective API provider. Users are required to strictly follow all guidelines set by connected third-party services.
18
+
19
+ SERVICE AVAILABILITY & PRIVACY: The authors provide no guarantees regarding uptime, latency, data privacy policies, or logging mechanisms of third-party APIs. Transmitted prompts and responses are subject to the privacy policies of the designated endpoint.
package/README.md CHANGED
@@ -1,3 +1,552 @@
1
- # Temporary Holding Version
1
+ <div align="center">
2
+ <img src="docs/assets/ather-code-hero.jpg" alt="Ather Code — open terminal for any LLM" width="720">
2
3
 
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.
4
+ <p>
5
+ <b>v0.32.0</b> · private distribution · TypeScript · Node.js >= 22
6
+ </p>
7
+ </div>
8
+
9
+ # Ather Code
10
+
11
+ **Ather Code is a terminal-first coding agent for cloud and local model providers.**
12
+
13
+ One workflow — prompts, tools, agents, MCP servers, slash commands and streaming
14
+ output — across OpenAI-compatible APIs, Anthropic, Gemini, GitHub Models, Codex
15
+ OAuth, Ollama and other supported backends.
16
+
17
+ [![version](https://img.shields.io/badge/version-0.32.0-0ea5e9)](https://github.com/bguser30-maker/ather-code)
18
+ [![node](https://img.shields.io/badge/node-%3E%3D22-339933)](https://nodejs.org)
19
+ [![license](https://img.shields.io/badge/license-MIT-2563eb)](LICENSE)
20
+
21
+ [Quick Start](#quick-start) | [Build from Source](#build-from-source) | [Setup Guides](#setup-guides) | [Providers](#supported-providers) | [Development](#development) | [VS Code Extension](#vs-code-extension)
22
+
23
+ ## Build from Source
24
+
25
+ Requires [Bun](https://bun.sh). The installed CLI itself targets Node.js `>=22.0.0`.
26
+
27
+ ```bash
28
+ bun install
29
+ bun run build
30
+
31
+ # run the freshly built CLI
32
+ bun dist/cli.mjs --version
33
+ bun dist/cli.mjs
34
+ ```
35
+
36
+ `bun run build` emits two artifacts:
37
+
38
+ | Artifact | Purpose |
39
+ |---|---|
40
+ | `dist/cli.mjs` | the CLI entrypoint |
41
+ | `dist/sdk.mjs` | the embeddable SDK bundle |
42
+
43
+ ### Validation
44
+
45
+ ```bash
46
+ bun run build # CLI + SDK bundles
47
+ bun run typecheck # tsc --noEmit
48
+ bun test # unit suite
49
+ ```
50
+
51
+ ### Configuration
52
+
53
+ ```bash
54
+ export ANTHROPIC_API_KEY=... # or any supported provider key
55
+ export ATHER_CODE_CONFIG_DIR=~/.ather-code
56
+ ```
57
+
58
+ `ATHER_CODE_CONFIG_DIR` relocates all local state — settings, auth, session and
59
+ history data — out of your home directory.
60
+
61
+ ## Partners
62
+
63
+ <table align="center">
64
+ <tr>
65
+ <td align="center" width="150" height="80">
66
+ <a href="https://atharva.com">
67
+ <img src="https://atharva.com/logo.png" alt="Atharva logo" width="72">
68
+ </a>
69
+ </td>
70
+ <td align="center" width="150" height="80">
71
+ <a href="https://bankr.bot">
72
+ <img src="https://bankr.bot/favicon.svg" alt="Bankr.bot logo" width="72">
73
+ </a>
74
+ </td>
75
+ <td align="center" width="150" height="80">
76
+ <a href="https://atomic.chat/">
77
+ <img src="docs/assets/atomic-chat-logo.png" alt="Atomic Chat logo" width="72">
78
+ </a>
79
+ </td>
80
+ <td align="center" width="150" height="80">
81
+ <a href="https://mimo.mi.com">
82
+ <img src="https://mimo.xiaomi.com/mimo-v2-pro/assets/logo.svg" alt="Xiaomi MiMo logo" width="136">
83
+ </a>
84
+ </td>
85
+ <td align="center" width="150" height="80">
86
+ <a href="https://www.atlascloud.ai/">
87
+ <img src="docs/assets/atlas-cloud-banner.png" alt="Atlas Cloud logo" width="136">
88
+ </a>
89
+ </td>
90
+ </tr>
91
+ <tr>
92
+ <td align="center"><a href="https://atharva.com"><strong>Atharva</strong></a></td>
93
+ <td align="center"><a href="https://bankr.bot"><strong>Bankr.bot</strong></a></td>
94
+ <td align="center"><a href="https://atomic.chat/"><strong>Atomic Chat</strong></a></td>
95
+ <td align="center"><a href="https://mimo.mi.com"><strong>Xiaomi MiMo</strong></a></td>
96
+ <td align="center"><a href="https://www.atlascloud.ai/"><strong>Atlas Cloud</strong></a></td>
97
+ </tr>
98
+ <tr>
99
+ <td align="center" width="150" height="80">
100
+ <a href="https://aimlapi.com/">
101
+ <picture>
102
+ <source media="(prefers-color-scheme: dark)" srcset="docs/assets/aimlapi-logo-dark.svg">
103
+ <img src="docs/assets/aimlapi-logo.svg" alt="AI/ML API logo" width="136">
104
+ </picture>
105
+ </a>
106
+ </td>
107
+ <td align="center" width="150" height="80">
108
+ <a href="https://novita.ai/">
109
+ <picture>
110
+ <source media="(prefers-color-scheme: dark)" srcset="docs/assets/novita-logo-dark.svg">
111
+ <img src="docs/assets/novita-logo.svg" alt="Novita AI logo" width="136">
112
+ </picture>
113
+ </a>
114
+ </td>
115
+ <td align="center" width="150" height="80">
116
+ <a href="https://www.apismart.ai">
117
+ <picture>
118
+ <source media="(prefers-color-scheme: dark)" srcset="docs/assets/apismart-logo-dark.png">
119
+ <img src="docs/assets/apismart-logo.png" alt="ApiSmart logo" width="120">
120
+ </picture>
121
+ </a>
122
+ </td>
123
+ <td align="center" width="150" height="80">
124
+ <a href="https://concentrate.ai/">
125
+ <picture>
126
+ <source media="(prefers-color-scheme: dark)" srcset="docs/assets/concentrate-logo-dark.svg">
127
+ <img src="docs/assets/concentrate-logo.svg" alt="Concentrate logo" width="64">
128
+ </picture>
129
+ </a>
130
+ </td>
131
+ <td align="center" width="150" height="80">
132
+ <a href="https://exa.ai/">
133
+ <picture>
134
+ <source media="(prefers-color-scheme: dark)" srcset="docs/assets/exa-logo-dark.svg">
135
+ <img src="docs/assets/exa-logo.svg" alt="Exa logo" width="110">
136
+ </picture>
137
+ </a>
138
+ </td>
139
+ </tr>
140
+ <tr>
141
+ <td align="center"><a href="https://aimlapi.com/"><strong>AI/ML API</strong></a></td>
142
+ <td align="center"><a href="https://novita.ai/"><strong>Novita AI</strong></a></td>
143
+ <td align="center"><a href="https://www.apismart.ai"><strong>ApiSmart</strong></a></td>
144
+ <td align="center"><a href="https://concentrate.ai/"><strong>Concentrate</strong></a></td>
145
+ <td align="center"><a href="https://exa.ai/"><strong>Exa</strong></a></td>
146
+ </tr>
147
+ </table>
148
+
149
+ ## Why Ather Code
150
+
151
+ - One CLI across cloud APIs and local model backends — no per-provider tooling
152
+ - Guided provider setup and saved profiles with `/provider`
153
+ - Coding-agent workflows in one place: bash, file tools, grep, glob, agents, tasks, MCP, and web tools
154
+ - A bundled VS Code extension for launch integration and theme support
155
+ - A pixel-art hero companion who fires an arrow every time you press Enter (really — see [Meet your buddy](#meet-your-buddy))
156
+
157
+ ## Quick Start
158
+
159
+ ### Install
160
+
161
+ Ather Code requires Node.js `>=22.0.0` for npm installs and runtime. Bun is
162
+ only needed for source builds and local development.
163
+
164
+ ```bash
165
+ npm install -g @atharva/ather-code@latest
166
+ ```
167
+
168
+ If you're on Arch Linux, you can install Ather Code from the community-maintained [AUR package](https://aur.archlinux.org/packages/ather-code):
169
+ ```bash
170
+ paru -S ather-code
171
+ ```
172
+
173
+ If the install later reports `ripgrep not found`, install ripgrep system-wide and confirm `rg --version` works in the same terminal before starting Ather Code.
174
+
175
+ **Verify / troubleshoot installed version:**
176
+
177
+ ```bash
178
+ ather-code --version
179
+ npm view @atharva/ather-code dist-tags
180
+ npm install -g @atharva/ather-code@latest
181
+ ```
182
+
183
+ ### Start
184
+
185
+ ```bash
186
+ ather-code
187
+ ```
188
+
189
+ Inside Ather Code:
190
+
191
+ - run `/provider` for guided provider setup and saved profiles
192
+ - run `/onboard-github` for GitHub Models onboarding
193
+
194
+ > **Note:** Ather Code does not automatically load project `.env` files. We recommend using the `/provider` command for setup, which saves provider profiles and credentials in `.ather-code-profile.json`. If you prefer environment variables, export them explicitly or run `ather-code --provider-env-file .env` for provider/setup variables. Export runtime/debug knobs from your shell or launcher.
195
+
196
+ ### Resume or fork a conversation
197
+
198
+ Resume an existing conversation by session ID, or continue the most recent
199
+ conversation in the current directory:
200
+
201
+ ```bash
202
+ ather-code --resume <session-id>
203
+ ather-code --continue
204
+ ```
205
+
206
+ Add `--fork-session` to branch the conversation history into a new session ID
207
+ instead of reusing the original transcript:
208
+
209
+ ```bash
210
+ ather-code --resume <session-id> --fork-session
211
+ ather-code --continue --fork-session
212
+ ```
213
+
214
+ Forking is conversation branching only. It does not create filesystem isolation,
215
+ copy your working tree, or create a git worktree branch.
216
+
217
+ ### Background sessions
218
+
219
+ Run long non-interactive prompts detached from the current terminal:
220
+
221
+ ```bash
222
+ ather-code --bg "fix failing tests"
223
+ ather-code --bg --name auth-refactor "refactor auth middleware"
224
+ ather-code ps
225
+ ather-code logs auth-refactor
226
+ ather-code logs auth-refactor -f
227
+ ather-code kill auth-refactor
228
+ ```
229
+
230
+ Background sessions are local child processes. Ather Code does not start a daemon
231
+ or network service, and permission/provider/model/settings flags are passed to
232
+ the child process the same way they are for a foreground `--print` run. Session
233
+ metadata and logs are stored under the resolved Ather Code config directory,
234
+ usually `~/.ather-code/bg-sessions/`; `ATHER_CODE_CONFIG_DIR` can point
235
+ Ather Code somewhere else. `ATHER_CODE_CONFIG_DIR` is ignored for Ather Code
236
+ background-session storage. Session names can be reused after older sessions
237
+ reach a terminal state; use the session ID to inspect older logs with the same
238
+ name. A naturally finished session is recorded as `exited` when its process
239
+ returns zero and `failed` when it returns nonzero or handles a termination
240
+ signal. `stale` remains the conservative result when the process disappears
241
+ without an observed outcome; an explicit successful `ather-code kill` is
242
+ recorded as `killed`, and `killed` takes precedence over a natural `exited` or
243
+ `failed` outcome for the same process. Terminal outcomes are stored separately
244
+ under `bg-sessions/terminal/`; deleting that directory makes finished sessions
245
+ fall back to liveness-derived status. Ather Code does not infer POSIX signal
246
+ names on Windows.
247
+ Unobservable force termination, host crashes, and power loss remain `stale` on
248
+ every platform.
249
+
250
+ `ather-code attach <id-or-name>` currently reports the matching session and
251
+ points to `ather-code logs <id> -f`; full terminal reattach is not implemented
252
+ for local background sessions yet.
253
+
254
+ ### Ather Code config cutover
255
+
256
+ Ather Code stores its own config under `~/.ather-code` and `~/.ather-code.json`
257
+ by default. It does not read `~/.ather-code`, project `.ather-code/` directories, or
258
+ `ATHER_CODE_CONFIG_DIR`; new users can start with an empty Ather Code config and do
259
+ not need atherCode Code installed.
260
+
261
+ If you previously used Ather Code with `.ather-code` paths, migrate intentionally:
262
+ copy only the settings, commands, agents, skills, scheduled tasks, or other files
263
+ you personally created for Ather Code into the matching `.ather-code` location.
264
+ Do not blanket-copy `.ather-code`, and do not copy atherCode Code credentials or auth
265
+ files. For provider authentication, prefer running Ather Code's provider setup
266
+ again or exporting provider-specific environment variables.
267
+
268
+ ### Fastest OpenAI setup
269
+
270
+ macOS / Linux:
271
+
272
+ ```bash
273
+ export ATHER_CODE_USE_OPENAI=1
274
+ export OPENAI_API_KEY=sk-your-key-here
275
+ export OPENAI_MODEL=gpt-4o
276
+
277
+ ather-code
278
+ ```
279
+
280
+ Windows PowerShell:
281
+
282
+ ```powershell
283
+ $env:ATHER_CODE_USE_OPENAI="1"
284
+ $env:OPENAI_API_KEY="sk-your-key-here"
285
+ $env:OPENAI_MODEL="gpt-4o"
286
+
287
+ ather-code
288
+ ```
289
+
290
+ ### Fastest local Ollama setup
291
+
292
+ macOS / Linux:
293
+
294
+ ```bash
295
+ export ATHER_CODE_USE_OPENAI=1
296
+ export OPENAI_BASE_URL=http://localhost:11434/v1
297
+ export OPENAI_MODEL=qwen2.5-coder:7b
298
+
299
+ ather-code
300
+ ```
301
+
302
+ Windows PowerShell:
303
+
304
+ ```powershell
305
+ $env:ATHER_CODE_USE_OPENAI="1"
306
+ $env:OPENAI_BASE_URL="http://localhost:11434/v1"
307
+ $env:OPENAI_MODEL="qwen2.5-coder:7b"
308
+
309
+ ather-code
310
+ ```
311
+
312
+ For Ollama, Ather Code uses Ollama's native chat API and requests a 32768-token
313
+ context window on each chat request so same-session history is not silently
314
+ truncated by Ollama's OpenAI-compatible shim. Set `ATHER_CODE_OLLAMA_NUM_CTX`
315
+ or `OLLAMA_CONTEXT_LENGTH` if you need a different request-level context size.
316
+ See [Advanced Setup](docs/advanced-setup.md#ollama-context-length) for
317
+ verification with `ollama ps`.
318
+
319
+ ## Setup Guides
320
+
321
+ Beginner-friendly guides:
322
+
323
+ - [Non-Technical Setup](docs/non-technical-setup.md)
324
+ - [Windows Quick Start](docs/quick-start-windows.md)
325
+ - [macOS / Linux Quick Start](docs/quick-start-mac-linux.md)
326
+
327
+ Advanced and source-build guides:
328
+
329
+ - [Advanced Setup](docs/advanced-setup.md)
330
+ - [Smart Auto-Routing](docs/smart-routing.md)
331
+ - [Agent Routing and Step Limits](docs/agent-routing.md)
332
+ - [Headless gRPC Server](docs/grpc-server.md)
333
+ - [Repo Map (codebase intelligence)](docs/repo-map.md)
334
+ - [Skills](docs/skills.md)
335
+ - [Android Install](ANDROID_INSTALL.md)
336
+
337
+ ## Supported Providers
338
+
339
+ | Provider | Setup Path | Notes |
340
+ | --- | --- | --- |
341
+ | OpenAI-compatible | `/provider` or env vars | Works with OpenAI, OpenRouter, DeepSeek, Groq, Mistral, LM Studio, and other compatible `/v1` servers |
342
+ | Z.AI GLM Coding Plan | `/provider` or OpenAI-compatible env vars | Uses `OPENAI_API_KEY` at `https://api.z.ai/api/coding/paas/v4`, defaults to `glm-5.2`, and offers the vision-capable `glm-5.3-flash` option |
343
+ | AI/ML API | `/provider` or `AIMLAPI_API_KEY` ([setup guide](docs/aimlapi-setup.md)) | Uses `https://api.aimlapi.com/v1`, auto-detects the OpenAI-compatible route from `AIMLAPI_API_KEY`, sends Ather Code attribution headers, and discovers chat-capable models from the public `/models` catalog |
344
+ | Concentrate | `/provider` or `CONCENTRATE_API_KEY` | Unified OpenAI-compatible gateway at `https://api.concentrate.ai/v1`; defaults to `deepseek-v4-flash` and auto-discovers the chat model catalog |
345
+ | LLMTR | `/provider` or OpenAI-compatible env vars | Multi-model gateway at `https://llmtr.com/v1`; `/provider` and `--provider llmtr` default to `deepseek/deepseek-v4-flash`, while raw env setup must set `OPENAI_BASE_URL=https://llmtr.com/v1` and `OPENAI_MODEL`; accepts `LLMTR_API_KEY` or `OPENAI_API_KEY` after the route is selected and discovers tool-capable Chat Completions models from the public catalog |
346
+ | Command Code | `/provider` or OpenAI-compatible env vars | Hybrid OpenAI-compatible gateway at `https://api.commandcode.ai/provider/v1`; `/provider` and `--provider commandcode` default to `deepseek/deepseek-v4-flash`, while raw env setup must set `OPENAI_BASE_URL=https://api.commandcode.ai/provider/v1` and `OPENAI_MODEL`; requires `CMD_API_KEY`, `COMMANDCODE_API_KEY`, or the official `COMMAND_CODE_API_KEY` after the route is selected and discovers Chat Completions models from the public catalog. AtherCode models are unsupported by this Chat Completions integration |
347
+ | ApiSmart | `/provider` or `APISMART_API_KEY` | Uses `https://gw.apismart.ai/v1`, defaults to `DEEPSEEK_V4_FLASH`, and supports optional `APISMART_MODEL` plus authenticated model discovery |
348
+ | Hicap | `/provider` or OpenAI-compatible env vars | Uses `api-key` auth, discovers models from unauthenticated `/models`, and supports Responses mode for `gpt-` models |
349
+ | Fireworks AI | `/provider` or env vars | First-class provider with 276 curated models (DeepSeek, Qwen, Llama, Gemma, and more); uses `FIREWORKS_API_KEY` |
350
+ | LongCat | `/provider` or env vars | Meituan LongCat OpenAI-compatible API at `https://api.longcat.chat/openai/v1`; uses `LONGCAT_API_KEY` and defaults to `LongCat-2.0` |
351
+ | ClinePass | `/provider` or env vars | AI model gateway with usage limits (5hr, weekly, monthly); uses `CLINE_API_KEY` at `https://api.cline.bot/api/v1` |
352
+ | Gemini | `/provider` or env vars | Supports API key only |
353
+ | GitHub Models | `/onboard-github` | Interactive onboarding with saved credentials |
354
+ | Codex OAuth | `/provider` | Opens ChatGPT sign-in in your browser and stores Codex credentials securely |
355
+ | Codex | `/provider` | Uses existing Codex CLI auth, Ather Code secure storage, or env credentials |
356
+ | Atharva Opengateway | Startup default, `/provider`, or env vars | Smart gateway at `https://opengateway.atharva.com/v1`; requires an API key from https://atharva.com/opengateway/keys and routes Xiaomi MiMo and GMI Cloud partner models by `OPENAI_MODEL` |
357
+ | OpenCode Zen | `/provider` or env vars | Pay-as-you-go AI gateway (48 models); uses `OPENCODE_API_KEY` via `https://opencode.ai/zen/v1`; shared key with OpenCode Go |
358
+ | OpenCode Go | `/provider` or env vars | $10/mo subscription for open models (13 models); uses `OPENCODE_API_KEY` via `https://opencode.ai/zen/go/v1`; shared key with OpenCode Zen |
359
+ | Xiaomi MiMo | `/provider` or env vars | OpenAI-compatible API at `https://mimo.mi.com`; uses `MIMO_API_KEY` and defaults to `mimo-v2.5-pro` |
360
+ | NEAR AI | `/provider` or env vars | Unified gateway (atherCode, GPT, Gemini + TEE open models); uses `NEARAI_API_KEY` at `https://cloud-api.near.ai/v1` |
361
+ | Cloudflare Workers AI | `/provider` or env vars | OpenAI-compatible API at `https://api.cloudflare.com/client/v4/accounts/<ACCOUNT_ID>/ai/v1`; uses `CLOUDFLARE_API_TOKEN`. Replace `<ACCOUNT_ID>` with your Cloudflare account id. |
362
+ | Ollama | `/provider` or env vars | Local inference with no API key |
363
+ | Atomic Chat | `/provider`, env vars, or `bun run dev:atomic-chat` | Local Model Provider; auto-detects loaded models |
364
+ | Bedrock / Vertex / Foundry | env vars | Anthropic-family cloud routes; Vertex is for atherCode on Vertex AI, not arbitrary Model Garden models |
365
+
366
+ ## What Works
367
+
368
+ - **Tool-driven coding workflows**: Bash, file read/write/edit, grep, glob, agents, tasks, MCP, and slash commands
369
+ - **Streaming responses**: Real-time token output and tool progress
370
+ - **Tool calling**: Multi-step tool loops with model calls, tool execution, and follow-up responses
371
+ - **Images**: URL and base64 image inputs for providers that support vision. Paste from the clipboard with Ctrl+V (Alt+V on Windows). 1080p/4K screenshots still attach. If processing fails and the image is over the 5MB payload limit or the 8000px API edge, the prompt shows that error instead of "No image found". For Anthropic requests containing more than 20 images (including retained conversation history and tool results), local images must fit within 2000×2000 pixels. On Amazon Bedrock and Google Cloud Vertex AI, document blocks also count toward that 20-block threshold. Ather Code attempts to resize them before sending; if processing cannot produce a compliant image, it reports an actionable error rather than silently dropping attachments. Resize the affected images or start a new conversation with fewer images (or documents on those partners).
372
+ - **Provider profiles**: Guided setup plus saved user-level provider profile support
373
+ - **Local and remote model backends**: Cloud APIs, local servers, and Apple Silicon local inference
374
+ - **Codebase intelligence (repo map)**: Structural map of the repository ranked by PageRank importance, auto-injected into context when the `REPO_MAP` flag is enabled or the `REPO_MAP` environment variable is set. Inspect with `/repomap` (2048-token default). See [docs/repo-map.md](docs/repo-map.md) for details.
375
+ - **A companion with signature moves**: A truecolor pixel-art hero who lives beside your prompt and reacts when you work. See below.
376
+
377
+ ## Meet Your Buddy
378
+
379
+ Run `/buddy` to hatch a companion — a truecolor pixel-art hero who stands
380
+ beside your prompt, idles, blinks, and fires their signature move every time
381
+ you submit a message:
382
+
383
+ ```
384
+ /buddy hatch (first run) or pet your companion
385
+ /buddy set robinhood the green archer — arrow shot on every Enter
386
+ /buddy set kaio gold-haired warrior — charges a full-width energy wave
387
+ /buddy set strawhat stretchy punch that snaps back
388
+ /buddy set merlin twinkling sparkle stream
389
+ /buddy set kage spinning shuriken
390
+ /buddy set ember dragon fire with a real heat gradient
391
+ /buddy set corsair cannonball with smoke trail
392
+ /buddy name Robin rename your companion
393
+ /buddy set random back to your rolled hero
394
+ ```
395
+
396
+ Companions respect `prefersReducedMotion`, degrade gracefully to line art in
397
+ low-color terminals, and can be silenced with `/buddy mute`. Requires a
398
+ terminal at least 100 columns wide for the full sprite.
399
+
400
+ ## Provider Notes
401
+
402
+ Ather Code supports multiple providers, but behavior is not identical across all of them.
403
+
404
+ - Anthropic-specific features may not exist on other providers
405
+ - Tool quality depends heavily on the selected model
406
+ - Smaller local models can struggle with long multi-step tool flows
407
+ - Some providers impose lower output caps than the CLI defaults, and Ather Code adapts where possible
408
+ - AI/ML API uses the OpenAI-compatible route, defaults to `gpt-4o`, and only surfaces chat-capable models from its public catalog
409
+ - Atharva Opengateway is the fresh-install startup default and requires an API key from https://atharva.com/opengateway/keys. It uses one OpenAI-compatible base URL; switch between `mimo-*` and `google/gemini-3.1-flash-lite-preview` with `/model`, and do not pin the base URL to `/v1/xiaomi-mimo`.
410
+ - Z.AI GLM Coding Plan uses `https://api.z.ai/api/coding/paas/v4` with `glm-5.2` by default. On that direct route, GLM-5.3-Flash is selectable as `glm-5.3-flash` and accepts image input. Its Ather Code effort choices are `low`, `high`, and `xhigh`, with `xhigh` requesting Z.AI `max`; GLM-5.3 and the existing GLM-5.2 query controls remain supported. These capabilities are not claimed for gateways that happen to carry the same model name.
411
+ - Xiaomi MiMo uses `api-key` header auth on the direct OpenAI-compatible route and currently does not support `/usage` reporting in Ather Code
412
+ - GitHub Copilot serializes sub-agent execution by default to reduce Premium Request consumption — see [Agent Routing and Step Limits](docs/agent-routing.md#github-copilot-sub-agent-optimization) for tuning
413
+
414
+ For best results, use models with strong tool/function calling support.
415
+
416
+
417
+
418
+ ## Agents
419
+
420
+ Route different agents to different models (cost optimization, splitting work
421
+ by model strength), cap sub-agent tool steps with `maxSteps`, and tune GitHub
422
+ Copilot sub-agent behavior. Configured via settings, agent frontmatter, and
423
+ environment variables:
424
+
425
+ - per-agent provider/model overrides via `agentModels` + `agentRouting` in `~/.ather-code/settings.json`
426
+ - model-only routes that reuse your current provider's credentials
427
+ - built-in agents (`Explore` and `Plan` [feature-gated], `verification` [feature-gated: requires `VERIFICATION_AGENT` + `ather_hive_evidence`], `code-reviewer` [requires diff inline]) routable by type name
428
+
429
+ See [Agent Routing and Step Limits](docs/agent-routing.md) for the full guide.
430
+
431
+ ## Web Search and Fetch
432
+
433
+ By default, `WebSearch` works on non-Anthropic models using configured search adapters and then DuckDuckGo. When the active provider is Ollama, Ather Code first uses the signed-in local Ollama Web Search endpoint. Set `OLLAMA_API_KEY` to enable the hosted Ollama endpoint as a fallback.
434
+
435
+ > **Note:** DuckDuckGo fallback works by scraping search results and may be rate-limited, blocked, or subject to DuckDuckGo's Terms of Service. If you want a more reliable supported option, configure Ollama Web Search or Firecrawl.
436
+
437
+ For Anthropic-native backends and Codex responses, Ather Code keeps the native provider web search behavior.
438
+
439
+ To select Ollama search explicitly, use `WEB_SEARCH_PROVIDER=ollama`. A local Ollama route uses its configured `OPENAI_BASE_URL` or `OLLAMA_BASE_URL`; hosted search sends `OLLAMA_API_KEY` only to `https://ollama.com/api/web_search`.
440
+
441
+ `WebFetch` works, but its basic HTTP plus HTML-to-markdown path can still fail on JavaScript-rendered sites or sites that block plain HTTP requests.
442
+
443
+ Set a [Firecrawl](https://firecrawl.dev) API key if you want Firecrawl-powered search/fetch behavior:
444
+
445
+ ```bash
446
+ export FIRECRAWL_API_KEY=your-key-here
447
+ ```
448
+
449
+ With Firecrawl enabled:
450
+
451
+ - `WebSearch` can use Firecrawl's search API while DuckDuckGo remains the default free path for non-ather-code models
452
+ - `WebFetch` uses Firecrawl's scrape endpoint instead of raw HTTP, handling JS-rendered pages correctly
453
+
454
+ Free tier at [firecrawl.dev](https://firecrawl.dev) includes 500 credits. The key is optional.
455
+
456
+ ## Headless gRPC Server
457
+
458
+ Ather Code can run as a headless gRPC service with bidirectional streaming —
459
+ integrate its agentic capabilities into other applications, CI/CD pipelines,
460
+ or custom UIs. Start it with `npm run dev:grpc`; a test CLI client ships with
461
+ the repo. See [Headless gRPC Server](docs/grpc-server.md) for configuration
462
+ and client generation from `src/proto/ather-code.proto`.
463
+
464
+ ## Development
465
+
466
+ Use Node.js `>=22.0.0` and Bun `1.3.13` or newer for source builds.
467
+
468
+ ```bash
469
+ bun install
470
+ bun run build
471
+ node dist/cli.mjs
472
+ ```
473
+
474
+ Day-to-day commands:
475
+
476
+ - `bun run dev` — build and launch from source
477
+ - `bun test` — full unit suite (Bun's built-in runner)
478
+ - `bun test path/to/file.test.ts` — focused runs for the areas you touch
479
+ - `bun run test:coverage` — coverage to `coverage/lcov.info` plus a visual report at `coverage/index.html` (`bun run test:coverage:ui` rebuilds just the UI)
480
+ - `bun run smoke` — smoke checks
481
+ - `bun run doctor:runtime`, `bun run verify:privacy`; for PR intent scanning, use the fresh-upstream, explicit-ref workflow in the [local pre-push validation contract](CONTRIBUTING.md#validation)
482
+
483
+ Focused suites: `bun run test:provider`, `bun run test:provider-recommendation`.
484
+
485
+ To benchmark the launcher module compile cache, build the CLI and run:
486
+
487
+ ```bash
488
+ bun run build
489
+ bun run benchmark:startup
490
+ ```
491
+
492
+ The benchmark requires Node `>=22.8.0`, where the compile-cache API was added;
493
+ the built Ather Code launcher continues to support the declared Node `>=22.0.0`
494
+ runtime range.
495
+
496
+ The benchmark defaults to 30 separate-process warm runs and 10 isolated
497
+ empty-cache runs. It reports the median, IQR, MAD, first cache-populating run,
498
+ first warm-up, Node/OS/CPU details, bundle size, and commit. Direct bundle
499
+ timings are included only as a secondary diagnostic; the full launcher result
500
+ is the decision signal. Use
501
+ `bun run benchmark:startup -- --warm-runs 40 --cold-runs 10` to request a
502
+ larger sample set. The benchmark records results without enforcing a timing
503
+ threshold in CI.
504
+
505
+ Ather Code leaves Node's standard compile-cache controls authoritative. Set
506
+ `NODE_DISABLE_COMPILE_CACHE=1` to disable the optimization, including for V8
507
+ coverage runs that require uncached compilation.
508
+
509
+ Before opening or updating a PR, run the authoritative [local pre-push validation contract](CONTRIBUTING.md#validation). The commands below are useful for narrow iteration, but they do not replace that required preflight:
510
+
511
+ - `bun run build`
512
+ - `bun run smoke`
513
+ - `bun run test:coverage` when your change affects shared runtime or provider logic
514
+ - focused `bun test ...` runs for the files and flows you changed
515
+
516
+ ## Repository Structure
517
+
518
+ - `src/` - core CLI/runtime
519
+ - `scripts/` - build, verification, and maintenance scripts
520
+ - `docs/` - setup, contributor, and project documentation
521
+ - `vscode-extension/ather-code-vscode/` - VS Code extension
522
+ - `.github/` - repo automation, templates, and CI configuration
523
+ - `bin/` - CLI launcher entrypoints
524
+
525
+ ## VS Code Extension
526
+
527
+ The repo includes a VS Code extension in [`vscode-extension/ather-code-vscode`](vscode-extension/ather-code-vscode) for Ather Code launch integration, provider-aware Control Center, in-editor chat, theme support, and optional **Microsoft Foundry / Azure OpenAI** configuration (endpoint, API version, deployment, API key via Secret Storage) injected into launched terminals. See that folder's [README](vscode-extension/ather-code-vscode/README.md).
528
+
529
+ ## Security
530
+
531
+ If you believe you found a security issue, see [SECURITY.md](SECURITY.md).
532
+
533
+ ## Community
534
+
535
+ - Use [GitHub Discussions](https://github.com/Atharva/ather-code/discussions) for Q&A, ideas, and community conversation
536
+ - Use [GitHub Issues](https://github.com/Atharva/ather-code/issues) for confirmed bugs and actionable feature work
537
+ - Join the [Discord](https://discord.gg/k68zFR6AcB) to chat with the community in real time
538
+ - Follow [@atharva on X](https://x.com/atharva) for updates and announcements
539
+
540
+ ## Contributing
541
+
542
+ Contributions are welcome. For larger changes, open an issue first so the
543
+ scope is clear before implementation. See [Development](#development) for the
544
+ build, test, and pre-PR validation commands.
545
+
546
+ ## Disclaimer
547
+
548
+ Ather Code is an independent community project and is not affiliated with, endorsed by, or sponsored by Anthropic.
549
+
550
+ ## License
551
+
552
+ MIT. Copyright (c) 2026 Atharva. [See LICENSE](LICENSE).