axio-repl 0.11.3__tar.gz → 0.12.0__tar.gz

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 (36) hide show
  1. {axio_repl-0.11.3 → axio_repl-0.12.0}/.gitignore +1 -0
  2. axio_repl-0.12.0/PKG-INFO +574 -0
  3. axio_repl-0.12.0/README.md +537 -0
  4. {axio_repl-0.11.3 → axio_repl-0.12.0}/pyproject.toml +17 -3
  5. axio_repl-0.12.0/src/axio_repl/__init__.py +1162 -0
  6. axio_repl-0.12.0/src/axio_repl/configuration.py +172 -0
  7. axio_repl-0.12.0/src/axio_repl/mcp_import.py +177 -0
  8. axio_repl-0.12.0/src/axio_repl/paths.py +76 -0
  9. axio_repl-0.12.0/src/axio_repl/presentation.py +127 -0
  10. axio_repl-0.12.0/src/axio_repl/unconfigured.py +22 -0
  11. axio_repl-0.12.0/tests/__init__.py +1 -0
  12. axio_repl-0.12.0/tests/fixtures/transport-plugin/pyproject.toml +18 -0
  13. axio_repl-0.12.0/tests/fixtures/transport-plugin/src/fixture_transport/__init__.py +63 -0
  14. axio_repl-0.12.0/tests/fixtures/transport-plugin/src/fixture_transport/instructions.py +42 -0
  15. axio_repl-0.12.0/tests/instruction_helpers.py +17 -0
  16. axio_repl-0.12.0/tests/skills_server.py +76 -0
  17. axio_repl-0.12.0/tests/test_antigravity.py +175 -0
  18. axio_repl-0.12.0/tests/test_chatgpt.py +407 -0
  19. axio_repl-0.12.0/tests/test_config_commands.py +280 -0
  20. axio_repl-0.12.0/tests/test_instruction_runtime.py +255 -0
  21. axio_repl-0.12.0/tests/test_local_skills.py +36 -0
  22. axio_repl-0.12.0/tests/test_mcp_config.py +306 -0
  23. axio_repl-0.12.0/tests/test_mcp_resources.py +127 -0
  24. axio_repl-0.12.0/tests/test_mcp_runtime.py +307 -0
  25. axio_repl-0.12.0/tests/test_mcp_skills.py +198 -0
  26. axio_repl-0.12.0/tests/test_model_selection.py +80 -0
  27. axio_repl-0.12.0/tests/test_models.py +79 -0
  28. axio_repl-0.12.0/tests/test_optional_plugins.py +81 -0
  29. axio_repl-0.12.0/tests/test_rendering.py +109 -0
  30. axio_repl-0.12.0/tests/test_transport_plugins.py +313 -0
  31. axio_repl-0.12.0/tests/test_workspace_cli.py +203 -0
  32. axio_repl-0.11.3/PKG-INFO +0 -186
  33. axio_repl-0.11.3/README.md +0 -166
  34. axio_repl-0.11.3/src/axio_repl/__init__.py +0 -832
  35. {axio_repl-0.11.3 → axio_repl-0.12.0}/tests/conftest.py +0 -0
  36. {axio_repl-0.11.3 → axio_repl-0.12.0}/tests/test_system_prompt.py +0 -0
@@ -12,3 +12,4 @@ _build/
12
12
  .DS_Store
13
13
  *.sqlite
14
14
  *.db
15
+ .axio/mcp.local.json
@@ -0,0 +1,574 @@
1
+ Metadata-Version: 2.5
2
+ Name: axio-repl
3
+ Version: 0.12.0
4
+ Summary: Interactive REPL coding assistant for Axio
5
+ Project-URL: Documentation, https://docs.axio-agent.com
6
+ Project-URL: Homepage, https://github.com/mosquito/axio-agent
7
+ Project-URL: Repository, https://github.com/mosquito/axio-agent
8
+ License: MIT
9
+ Keywords: agent,ai,coding-assistant,llm,repl
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.12
12
+ Classifier: Programming Language :: Python :: 3.13
13
+ Classifier: Programming Language :: Python :: 3.14
14
+ Requires-Python: >=3.12
15
+ Requires-Dist: aiohttp>=3.11
16
+ Requires-Dist: axio
17
+ Provides-Extra: all
18
+ Requires-Dist: axio-tools-local; extra == 'all'
19
+ Requires-Dist: axio-tools-mcp; extra == 'all'
20
+ Requires-Dist: axio-transport-anthropic; extra == 'all'
21
+ Requires-Dist: axio-transport-codex; extra == 'all'
22
+ Requires-Dist: axio-transport-google; extra == 'all'
23
+ Requires-Dist: axio-transport-openai; extra == 'all'
24
+ Provides-Extra: anthropic
25
+ Requires-Dist: axio-transport-anthropic; extra == 'anthropic'
26
+ Provides-Extra: codex
27
+ Requires-Dist: axio-transport-codex; extra == 'codex'
28
+ Provides-Extra: google
29
+ Requires-Dist: axio-transport-google; extra == 'google'
30
+ Provides-Extra: local
31
+ Requires-Dist: axio-tools-local; extra == 'local'
32
+ Provides-Extra: mcp
33
+ Requires-Dist: axio-tools-mcp; extra == 'mcp'
34
+ Provides-Extra: openai
35
+ Requires-Dist: axio-transport-openai; extra == 'openai'
36
+ Description-Content-Type: text/markdown
37
+
38
+ # axio-repl
39
+
40
+ Interactive REPL coding assistant powered by the [axio](../axio) agent framework.
41
+ Uses pluggable transports with API keys or a saved ChatGPT subscription account.
42
+
43
+ ## Philosophy
44
+
45
+ axio-repl is an opinionated terminal agent that **actually verifies its work**.
46
+ The system prompt encodes hard-won lessons from watching models cut corners:
47
+
48
+ - **Stream everything, hide nothing.** Every piece of information shown to the
49
+ user — tool arguments, stdout/stderr, images, exit codes — must also be
50
+ faithfully presented to the model. The model should see exactly what the user
51
+ sees, so it can reason about the same reality. No summarizing, no truncating,
52
+ no dropping context between what's displayed and what's sent back.
53
+ - **Not tested — not done.** The agent must run tests, re-read edited files,
54
+ and observe actual results instead of assuming success from exit codes.
55
+ - **Iterative UI review.** When building or modifying UI, the agent captures
56
+ real screenshots at multiple viewport sizes (desktop, tablet, mobile) via
57
+ Playwright/Puppeteer, reads every screenshot through the model's vision, and
58
+ critically lists visual defects. It repeats the screenshot → fix → re-screenshot
59
+ loop until zero defects — no premature "looks good".
60
+ - **Ground everything in project context.** Read before editing. List the
61
+ directory before guessing. Never refuse a safe request.
62
+ - **Minimal edits.** Don't reformat surrounding code, don't narrate tool calls.
63
+ The user sees the full tool output in the terminal.
64
+
65
+ ## Features
66
+
67
+ - **Pluggable transports** — auto-detected from API keys via
68
+ `axio.transport` entry points. Ships with support for OpenAI, Anthropic,
69
+ Google (Gemini API & Vertex AI), Nebius, OpenRouter, and Codex.
70
+ - **Runtime model switching** — `/model <query>` to switch models mid-session
71
+ without restarting. Capabilities (vision, reasoning, image generation) are
72
+ re-evaluated and the system prompt adapts automatically.
73
+ - **Streaming tool arguments** — tool call fields appear incrementally as the
74
+ model generates them, so you see what's happening before execution starts.
75
+ - **Streaming tool output** — shell command stdout/stderr streams line-by-line
76
+ in real time instead of buffering until completion.
77
+ - **Vision** — `read_file` on images (PNG, JPG, GIF, WebP) and videos returns
78
+ multimodal content blocks. The model sees the actual pixels, not a description.
79
+ - **Image & video generation** — when the Google transport is installed,
80
+ `generate_image` and `generate_video` tools are available for Gemini Nano
81
+ Banana / Veo models.
82
+ - **AGENTS.md** — global and project instructions loaded at startup, with source
83
+ paths and directory scopes. Offline diagnostics explain which files apply.
84
+ - **Multiline paste** — pasting multi-line text into the prompt is handled
85
+ gracefully with continuation markers (`...`).
86
+ - **Graceful interruption** — Ctrl-C cancels the running agent loop, preserving
87
+ partial tool output in conversation context so the model knows what happened.
88
+ - **Readline history** — persisted across sessions in `~/.axio_repl_history`.
89
+ - **Single-prompt mode** — pass a prompt as argument for scripting and non-interactive use.
90
+
91
+ ## Install
92
+
93
+ ```bash
94
+ uv tool install "axio-repl[local,mcp,openai]"
95
+ ```
96
+
97
+ The base REPL does not install any provider. Choose `openai`, `google`,
98
+ `anthropic`, `codex`, or `all` extras, or install a provider package explicitly:
99
+
100
+ ```bash
101
+ uv tool install axio-repl --with axio-transport-anthropic
102
+ uv tool install axio-repl --with axio-transport-google
103
+ ```
104
+
105
+ Or within the monorepo workspace:
106
+
107
+ ```bash
108
+ uv run axio-repl
109
+ ```
110
+
111
+ The base installation starts without tools or transports. It accepts commands;
112
+ requests explain how to configure a transport. Single-prompt mode exits with an
113
+ error when no transport is configured. Install `local` for local tools,
114
+ AGENTS.md, and local skills; install `mcp` for MCP connections and configuration
115
+ commands. Either extra works independently. `all` includes both tool extras and
116
+ all transport extras.
117
+
118
+ Installed third-party tools and instruction providers are discovered through
119
+ `axio.tools` and `axio.tools.providers`. Providers can implement
120
+ `refresh(*, config=None)` to refresh their tools and instructions from the REPL.
121
+ Both `/skills reload` and `/mcp reload` refresh providers that support this
122
+ capability; `/mcp reload` also rereads MCP configuration. Startup failures are
123
+ reported per provider, and independent providers remain available.
124
+
125
+ ## Usage
126
+
127
+ ```bash
128
+ # Interactive REPL (auto-detects transport from API keys)
129
+ axio-repl
130
+
131
+ # Single prompt (non-interactive)
132
+ axio-repl "list the files in this project"
133
+
134
+ # Explicit transport and model
135
+ axio-repl --transport anthropic --model claude-sonnet-4-20250514
136
+
137
+ # Google Gemini
138
+ axio-repl --transport google --model gemini-3.1-pro-preview
139
+
140
+ # Custom temperature and iteration limit
141
+ axio-repl --temperature 0.5 --max-iterations 100
142
+ ```
143
+
144
+ `--model` requires an exact model ID from the selected transport's catalog.
145
+ An unknown ID exits with an error and lists the available models. This applies
146
+ to every transport. An unsuccessful `/model <query>` keeps the current model.
147
+
148
+ ## Project instructions
149
+
150
+ The REPL preserves its starting working directory. It selects the project root
151
+ from `--project-root`, the nearest ancestor with a `.git` file or directory,
152
+ or the working directory when no Git marker is found. Automatic Git discovery
153
+ stops before the home directory or filesystem root. Use `--project-root` to
154
+ select either explicitly; the selected root must contain the working directory.
155
+
156
+ At startup, instructions load in this order:
157
+
158
+ 1. `$XDG_CONFIG_HOME/axio/AGENTS.md`, or `~/.config/axio/AGENTS.md` when
159
+ `XDG_CONFIG_HOME` is empty, unset, or relative.
160
+ 2. `<project-root>/AGENTS.md` and each exact `AGENTS.md` down to the working directory.
161
+ 3. Files selected with repeated `--instructions-file PATH`, in argument order.
162
+
163
+ Each block identifies its source and scope. Project instructions apply to their
164
+ directory and descendants. Deeper scopes override conflicting broader instructions;
165
+ other rules supplement them. Global and explicit files apply throughout the session.
166
+ Within the same scope, later entries take precedence. Explicit user requests take
167
+ precedence over file instructions. `/model` preserves the current scoped snapshot.
168
+
169
+ ```bash
170
+ axio-repl --project-root /work/repo
171
+ axio-repl --workspace-root /work/another-repo
172
+ axio-repl --instructions-explain services/api/main.py
173
+ axio-repl --isolated --instructions-file ./session-rules.md "review this code"
174
+ ```
175
+
176
+ Additional workspace roots must be independent: nested roots are rejected and
177
+ canonical duplicates are removed. Startup loads only the chain to the working
178
+ directory. `--instructions-explain PATH` inspects another file's chain without
179
+ starting a model, opening network sessions, or changing REPL history. A nonexistent
180
+ target is treated as a file. Sibling instructions do not enter that chain.
181
+
182
+ Paths are resolved through symlinks. An external target uses its registered root,
183
+ if any, and does not inherit the original project's instructions. A project
184
+ `AGENTS.md` symlink outside its root is an error. Explicit instruction files may
185
+ reside outside the project. Each canonical source is read and counted once, while
186
+ all applicable scopes are retained.
187
+
188
+ The default total limit is 131072 UTF-8 bytes. Set `--instructions-max-bytes N`
189
+ to change it. Invalid UTF-8, unreadable files, missing explicit files, and size
190
+ overflow stop startup with a diagnostic. Text is never silently truncated.
191
+ `--isolated` disables automatic instruction loading but retains explicit files.
192
+
193
+ The REPL refreshes known instructions before each model request. Before file
194
+ operations, it loads instructions for their paths. Recursive search checks all
195
+ candidate paths before reading contents. New or changed instructions defer the
196
+ whole tool batch so the model can review them before deciding which calls to retry.
197
+ Instruction-file edits run separately from other calls in their batch; the next
198
+ model request receives the updated rules. Each subtree retains its own scope.
199
+ Shell checks cover only its declared `cwd`; shell commands and MCP servers can
200
+ access other paths internally. These checks do not provide a filesystem sandbox.
201
+
202
+ ## MCP servers
203
+
204
+ The REPL automatically connects to enabled servers from the project's `.mcp.json`.
205
+ It does not ask for confirmation. `/mcp` shows each server's state and available
206
+ tool count. `/mcp reload` rereads configuration and reconnects the servers.
207
+ A failed server has zero tools; other servers can still connect.
208
+ Each server has one initialization deadline for the connection, handshake, and
209
+ catalog discovery. The default is 30 seconds; set `"timeout": 60` in that server's
210
+ configuration to change it. Progress and timeout messages identify the server and
211
+ the limit. After a timeout, the connection closes and `/mcp reload` retries it.
212
+ The same setting bounds tool and resource requests. An interrupted request marks
213
+ the connection unavailable until `/mcp reload` reconnects it.
214
+ Stopping a stdio process can take up to five additional seconds before it is killed.
215
+
216
+ ```json
217
+ {
218
+ "mcpServers": {
219
+ "local-tools": {
220
+ "type": "stdio",
221
+ "command": "my-mcp-server",
222
+ "args": ["--read-only"]
223
+ },
224
+ "company-tools": {
225
+ "type": "http",
226
+ "url": "https://tools.example.org/mcp"
227
+ }
228
+ }
229
+ }
230
+ ```
231
+
232
+ `type` can be omitted: `command` selects stdio, and `url` selects HTTP.
233
+
234
+ Configuration priority, from lowest to highest:
235
+
236
+ 1. `${XDG_CONFIG_HOME:-$HOME/.config}/axio/mcp.json`.
237
+ 2. `<project-root>/.mcp.json`.
238
+ 3. `<project-root>/.axio/mcp.local.json`.
239
+ 4. Each `--mcp-config PATH`, in command-line order.
240
+
241
+ Entries replace earlier entries with the same server name in full.
242
+ `{"enabled": false}` disables an inherited server. Invalid configuration reports
243
+ its source and server; it does not fall back to an earlier entry.
244
+ The REPL uses the selected project root, including when started in a subdirectory.
245
+ It does not search each ancestor for MCP files. Additional workspace roots have
246
+ independent configurations; their tool names use `w1__`, `w2__`, and so on.
247
+ Within one root, tool names use `<server>__<tool>`.
248
+
249
+ `--isolated` disables automatic MCP and instruction loading. Explicit
250
+ `--mcp-config` files still apply. Configured servers connect in both interactive
251
+ and single-prompt mode. Connections close on exit; `/model` preserves MCP tools.
252
+
253
+ Stdio commands run without a shell. Relative command paths and `cwd` use the
254
+ configuration file's directory; that directory is also the default `cwd`.
255
+ A command without `/` uses `PATH`. Arguments remain literal.
256
+ Children inherit only `PATH`, `HOME`, `USER`, `LOGNAME`, `LANG`, `LC_ALL`,
257
+ `LC_CTYPE`, `TMPDIR`, `TMP`, and `TEMP`. `env` adds or overrides values.
258
+ `envFrom` maps child variable names to host variable names; `headersFrom` does
259
+ the same for HTTP header names. Missing variables produce an error for that server.
260
+ For example, `"headersFrom": {"Authorization": "MCP_AUTHORIZATION"}` reads the
261
+ complete authorization header from the environment. HTTP `headers` accepts
262
+ literal values. Keep credentials out of version control.
263
+
264
+ ## Explain configuration and check MCP
265
+
266
+ ```bash
267
+ axio-repl --why
268
+ # Equivalent long form:
269
+ axio-repl --config-explain
270
+ ```
271
+
272
+ Both commands show instruction sources and scopes, MCP configuration layers,
273
+ whole-entry overrides, and effective working directories. They then connect to
274
+ each enabled MCP server and print its state and tool count, as `/mcp` does.
275
+ Disabled servers stay disabled. A failed connection does not stop other servers
276
+ from connecting. All connections close before the command exits.
277
+
278
+ These commands run before model selection and do not require LLM credentials.
279
+ They perform MCP initialization and discovery, including the supported skill
280
+ catalog, without calling tools. Stdio servers start as subprocesses; HTTP servers
281
+ receive network requests. `--isolated` and `--mcp-config` select configurations
282
+ as they do for a normal session. Values in commands, arguments, environment
283
+ entries, headers, and URL paths and queries are redacted. Source paths, server
284
+ names, and endpoint origins remain visible.
285
+
286
+ ## Import MCP configuration
287
+
288
+ Import is explicit. The REPL does not automatically read another client's files.
289
+ Preview the selected source scope and destination first:
290
+
291
+ ```bash
292
+ axio-repl mcp import --from cursor --scope project --target private
293
+ axio-repl mcp import --from cursor --scope project --target private --write
294
+ ```
295
+
296
+ `--write` copies entries and preserves the source file. Conflicting server names
297
+ also require `--replace`; replacement applies to the whole entry. Other destination
298
+ entries remain unchanged. `--server NAME` selects one server and can be repeated.
299
+ Import preview and writing do not connect to servers or start a model.
300
+
301
+ | Source | `--scope` | Location |
302
+ |---|---|---|
303
+ | Claude Code | `user` | `~/.claude.json`, top-level `mcpServers` |
304
+ | Claude Code | `local` | `~/.claude.json`, `projects[canonical project root].mcpServers` |
305
+ | Claude Code | `project` | `<project-root>/.mcp.json` |
306
+ | Cursor | `user` | `~/.cursor/mcp.json` |
307
+ | Cursor | `project` | `<project-root>/.cursor/mcp.json` |
308
+
309
+ See the [Claude Code MCP documentation](https://code.claude.com/docs/en/mcp)
310
+ and [Cursor MCP documentation](https://cursor.com/docs/mcp) for source formats.
311
+ Source scope is explicit; a path under the home directory does not imply user scope.
312
+
313
+ `--target user` writes the global Axio `mcp.json`; `project` writes `.mcp.json`;
314
+ `private` writes `.axio/mcp.local.json`. Add the private path to `.gitignore`.
315
+ Destination files use mode `0600`. The destination must differ from the source.
316
+ If a stdio entry has no `cwd`, supply `--server-cwd PATH`. Relative executable
317
+ paths use that working directory; arguments remain literal after copying.
318
+
319
+ The importer supports stdio and HTTP. Exact Claude `${VAR}` and Cursor
320
+ `${env:VAR}` values in `env` or `headers` become `envFrom` or `headersFrom`
321
+ references. It rejects embedded interpolation, fallback values, other templates,
322
+ SSE, `envFile`, and client-specific authentication settings with a diagnostic.
323
+ Literal environment values, headers, and URL queries require a private or user
324
+ destination. Arbitrary secrets inside arguments or paths cannot be identified
325
+ automatically; inspect the source before copying it into a shared project file.
326
+
327
+ ## MCP resources
328
+
329
+ The model sees each server's resources and URI templates, including resources
330
+ that duplicate skills. `<server>__list_resources` refreshes this catalog;
331
+ `<server>__read_resource` loads an exact URI from that server. Contents return as
332
+ MCP JSON with text or base64 blobs and MIME types. Template parameters let the
333
+ model construct additional resource URIs.
334
+
335
+ Axio sends URIs unchanged. It does not replace `skill://` with
336
+ `mcp-extensions://` or resolve these URIs as local paths. `/model` preserves
337
+ resource access, and `/mcp reload` refreshes catalogs and connections.
338
+
339
+ ## MCP skills
340
+
341
+ `/skills` lists the skills published by connected MCP servers, including each
342
+ server name, skill URI, and description. Ask the agent to use a listed skill,
343
+ for example: `Use workflows:planning to plan this change`.
344
+
345
+ The model receives the catalog at startup. It reads `SKILL.md` and supporting
346
+ text files only when needed, through `<server>__read_skill`. Each read checks
347
+ the file's UTF-8 size and SHA-256 digest against the published manifest.
348
+ Files stay on the MCP server; relative references do not use local paths.
349
+ Identical skill names remain separate by server and URI.
350
+
351
+ `/model` preserves the catalog. `/mcp reload` refreshes it, including removed
352
+ skills. Single-prompt mode uses the same discovery and reading tools.
353
+ An invalid catalog reports an error without removing the server's ordinary tools.
354
+ An interrupted connection requires `/mcp reload`.
355
+
356
+ This implementation supports the Skills compatibility resources under
357
+ `mcp-extensions://io.modelcontextprotocol/skills`, over stdio and HTTP.
358
+ It uses the published `skills/list` resource, with pagination, or the static
359
+ `skills` resource. Native extension RPC methods, unlisted skills, binary files,
360
+ and manifests marked `dynamic` are not supported. Skills must publish a complete
361
+ manifest with at most 512 files and 16 MiB of total content.
362
+
363
+ Skill reads use the exact manifest URI. A rejected URI produces an error without
364
+ trying another scheme. Other advertised resource URIs remain available through
365
+ `<server>__read_resource`.
366
+
367
+ ## Local skills
368
+
369
+ The REPL also discovers [Agent Skills](https://agentskills.io/specification):
370
+ directories with a `SKILL.md` file containing YAML `name` and `description` fields.
371
+ It searches these user locations automatically:
372
+
373
+ - `${XDG_CONFIG_HOME:-$HOME/.config}/axio/skills`
374
+ - `~/.agents/skills`
375
+ - `~/.claude/skills`
376
+ - `~/.codex/skills`
377
+ - `~/.cursor/skills`
378
+ - `${XDG_CONFIG_HOME:-$HOME/.config}/opencode/skills`
379
+
380
+ The format does not prescribe an installation path. `.agents/skills` is a
381
+ [cross-client convention](https://agentskills.io/integrate-skills).
382
+ Search stays within these directories. Add another directory with repeated
383
+ `--skills-dir PATH`; relative paths use the working directory, and `~` is expanded.
384
+ Project skill directories are read only when selected explicitly.
385
+
386
+ ```bash
387
+ axio-repl --skills-list
388
+ axio-repl --skills-dir ./team-skills
389
+ axio-repl --isolated --skills-dir ~/.agents/skills --skills-list
390
+ ```
391
+
392
+ `--skills-list` lists local skills without starting a model or connecting MCP.
393
+ Inside the REPL, `/skills` lists both local and MCP skills. `/skills reload`
394
+ refreshes available providers; `/mcp reload` also rereads MCP configuration. `--isolated`
395
+ disables automatic local discovery while retaining explicit `--skills-dir` paths.
396
+
397
+ The model receives names, descriptions, locations, and optional `compatibility`
398
+ requirements. `read_local_skill` loads instructions and supporting UTF-8 files
399
+ on demand. Relative file paths stay inside the skill's directory. Script and
400
+ asset paths use that directory; discovery does not execute scripts.
401
+ Changed frontmatter requires `/skills reload` before another read.
402
+
403
+ Canonical paths deduplicate symlinked installations. Distinct files with the
404
+ same name remain visible with their full paths. Identical `SKILL.md` content
405
+ does not produce a duplicate warning. Different content, or content that cannot
406
+ be compared, produces a warning. Invalid metadata produces a
407
+ diagnostic without hiding other skills. Nonstandard names produce a warning.
408
+ Skills that disable automatic invocation through `disable-model-invocation`
409
+ or `metadata.opencode/autoinvoke` are excluded. Other client-specific fields
410
+ do not configure Axio tools or permissions. `compatibility` describes requirements;
411
+ it does not verify installed programs or services.
412
+
413
+ Discovery reads frontmatter, limited to 64 KiB per file. For duplicate names,
414
+ it also compares full `SKILL.md` content up to 16 MiB per file. It visits at most
415
+ 2000 directories, to a depth of six below each selected directory. Individual
416
+ text reads are limited to 16 MiB; oversized content fails without truncation.
417
+
418
+ ## ChatGPT account
419
+
420
+ ```bash
421
+ axio-repl --transport chatgpt --model gpt-6-luna
422
+ ```
423
+
424
+ When the credential store is empty, the REPL asks `Sign in now? [y/N]`.
425
+ Answer `y` to authorize in the browser and continue in the same REPL process.
426
+ Over SSH, the sign-in flow prints a URL and accepts the browser redirect URL.
427
+ Declining or reaching end of input cancels startup. Piped input does not trigger
428
+ an interactive login; sign in from a terminal first.
429
+
430
+ `axio-chatgpt` remains available for account management and scripted setup:
431
+
432
+ ```bash
433
+ axio-chatgpt accounts
434
+ axio-chatgpt models
435
+ ```
436
+
437
+ Choose a visible model from `axio-chatgpt models`. ChatGPT requires explicit
438
+ `--transport chatgpt`; API-key auto-detection remains available for other providers.
439
+ The REPL uses the saved selection, or the only saved registration. Use
440
+ `axio-chatgpt select CLIENT_ID` to change the default for future sessions.
441
+ `--account CLIENT_ID` overrides it for one REPL session. `--credentials PATH`
442
+ overrides the default `~/.config/axio/chatgpt.auth` file, or its XDG equivalent.
443
+
444
+ The selected account stays fixed while `/model` switches among its visible models.
445
+ Use `/account` to list registrations and `/account ID` to select one and clear
446
+ history. `/login` reauthorizes the active account; `/logout` clears its tokens and history.
447
+ ChatGPT starts with `medium` reasoning effort when the model supports that level;
448
+ otherwise it leaves the effort unset.
449
+ Override it with `--thinking <effort>` or `/thinking <effort>`.
450
+ `/thinking` lists the selected model's supported levels. Unsupported values are
451
+ rejected locally. A model switch clears an effort that the new model does not support.
452
+ Use `/thinking default` to clear an explicit ChatGPT reasoning effort. Switching
453
+ to a model without declared reasoning support also clears this setting.
454
+ Background token renewal stops when the REPL closes; saved credentials remain.
455
+ Use `axio-chatgpt login --account CLIENT_ID` when reauthorization is required.
456
+ Identity-only sign-in needs ChatGPT plan consent before inference is available.
457
+ `axio-chatgpt status` reports local credential state; `axio-chatgpt logout` signs out.
458
+ For SSH sign-in, use `axio-chatgpt login --manual` and paste the browser redirect URL.
459
+
460
+ ChatGPT accepts `/thinking low` and other supported reasoning effort values.
461
+ It does not support `--temperature`, `--max-tokens`, or `--debug`.
462
+ Its account flow does not require Textual.
463
+
464
+ ## REPL Commands
465
+
466
+ | Command | Description |
467
+ |----------------------|------------------------------------------------|
468
+ | `/mcp` | Show MCP server states and tool counts |
469
+ | `/mcp reload` | Reload configuration and reconnect MCP servers |
470
+ | `/skills` | List local and MCP skills with their sources and descriptions |
471
+ | `/skills reload` | Refresh available tool and instruction providers |
472
+ | `/help` | Show available tools and commands |
473
+ | `/model` | Show current model and list available models |
474
+ | `/model <query>` | Switch to a model matching the query |
475
+ | `/quit` `/exit` `/q` | Exit the REPL |
476
+
477
+ ## Tools
478
+
479
+ | Tool | Description |
480
+ |-----------------|----------------------------------------------------------------|
481
+ | `read_file` | Read file contents; images and videos returned as vision blocks |
482
+ | `write_file` | Create or overwrite files |
483
+ | `patch_file` | Replace line ranges in files (1-indexed, inclusive) |
484
+ | `list_files` | List directory contents |
485
+ | `search_files` | Text/regex search across files |
486
+ | `shell` | Run shell commands with streaming output and process-group cleanup |
487
+ | `generate_image` | Generate images via Gemini Nano Banana (Google transport only) |
488
+ | `generate_video` | Generate videos via Veo (Google transport only) |
489
+
490
+ ## Antigravity subscription
491
+
492
+ ```bash
493
+ axio-repl --transport antigravity
494
+ ```
495
+
496
+ For local development, run `uv sync --all-packages`, then
497
+ `uv run axio-repl --transport antigravity`. A separately installed `axio-repl`
498
+ uses its own package registry and can still report an unknown transport.
499
+
500
+ The first terminal run starts Google browser sign-in. Saved sessions use
501
+ `${XDG_CONFIG_HOME:-$HOME/.config}/axio/antigravity.auth`. `--account ID` pins an
502
+ account; `--credentials PATH` selects another credential file. For SSH, use
503
+ `axio-antigravity login --manual` and paste the full browser redirect URL.
504
+
505
+ `/model` lists the account's live Gemini catalogue. `/account` lists saved accounts
506
+ and identifies the active account. `/account ID` opens that account and clears
507
+ conversation history. `/login` reauthorizes the active account; `/logout` clears
508
+ its local tokens and conversation history. Account changes outside the REPL affect
509
+ future sessions; the active session remains pinned. `/model` preserves its account.
510
+
511
+ `axio-antigravity accounts`, `select --account ID`, `status`, `models`, and `logout`
512
+ work outside the REPL. Use these commands to recover from startup discovery errors.
513
+ `logout --revoke` also requests Google grant revocation. `status` checks the OAuth
514
+ token, not subscription entitlement. `--debug` is unavailable for OAuth sessions.
515
+
516
+ Antigravity supports Gemini completion, reasoning, and function tools. It does not
517
+ expose Claude, media generation, or realtime sessions. Quota errors never trigger
518
+ an automatic account or payment change. See the Google transport guide for the
519
+ internal API limitations and credential storage details.
520
+
521
+ ## Transports
522
+
523
+ Transports are discovered via the `axio.transport` entry point group.
524
+ The REPL checks installed provider metadata and picks the first eligible transport
525
+ with credentials. API-key providers declare these environment variables:
526
+
527
+ | Transport | Env Variable | Package |
528
+ |------------------|--------------------------------|----------------------------|
529
+ | `google` | `GEMINI_API_KEY` | `axio-transport-google` |
530
+ | `google-vertex` | `GOOGLE_GENAI_USE_VERTEXAI` | `axio-transport-google` |
531
+ | `anthropic` | `ANTHROPIC_API_KEY` | `axio-transport-anthropic` |
532
+ | `openai` | `OPENAI_API_KEY` | `axio-transport-openai` |
533
+ | `nebius` | `NEBIUS_API_KEY` | `axio-transport-openai` |
534
+ | `openrouter` | `OPENROUTER_API_KEY` | `axio-transport-openai` |
535
+ | `codex` | *(API key varies)* | `axio-transport-codex` |
536
+
537
+ Use `--transport <name>` to force a specific transport regardless of env vars.
538
+
539
+ ## Capability-Aware System Prompt
540
+
541
+ The system prompt adapts based on the selected model's declared capabilities:
542
+
543
+ - **Vision** — unlocks instructions to `read_file` images and do screenshot-based
544
+ UI review.
545
+ - **Reasoning** — notes that extended thinking is available.
546
+ - **Image generation** — enables inline image generation guidance.
547
+ - **Video** — enables `read_file` for video content.
548
+ - **Tool use** — gates all tool-related rules (edit workflow, testing, verification).
549
+
550
+ This means switching from a text-only model to a vision model mid-session
551
+ (via `/model`) automatically updates what the agent is instructed to do.
552
+
553
+ ## Architecture
554
+
555
+ ```
556
+ ┌─────────────┐ ┌───────────┐ ┌──────────────────┐
557
+ │ axio-repl │────▶│ axio │────▶│ transport │
558
+ │ (terminal │ │ (agent │ │ (anthropic / │
559
+ │ UI, I/O) │ │ loop) │ │ google / openai │
560
+ └─────────────┘ └───────────┘ │ / nebius / ...) │
561
+ │ └──────────────────┘
562
+ ┌─────┴─────┐
563
+ │ tools │
564
+ │ (local fs │
565
+ │ + shell) │
566
+ └───────────┘
567
+ ```
568
+
569
+ - **axio-repl** owns the terminal UI: readline, event rendering, REPL commands.
570
+ - **axio** runs the agent loop: dispatch tools, manage conversation context,
571
+ handle cancellation.
572
+ - **transports** handle LLM communication — message conversion, streaming,
573
+ model registries.
574
+ - **axio-tools-local** provides the file and shell tools.