anixcode 0.8.0__tar.gz → 0.11.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 (62) hide show
  1. {anixcode-0.8.0/anixcode.egg-info → anixcode-0.11.0}/PKG-INFO +284 -241
  2. anixcode-0.8.0/PKG-INFO → anixcode-0.11.0/README.md +256 -241
  3. {anixcode-0.8.0 → anixcode-0.11.0}/anixcode/__init__.py +1 -1
  4. anixcode-0.11.0/anixcode/agent.py +716 -0
  5. anixcode-0.11.0/anixcode/browser.py +406 -0
  6. {anixcode-0.8.0 → anixcode-0.11.0}/anixcode/cli.py +85 -11
  7. {anixcode-0.8.0 → anixcode-0.11.0}/anixcode/commands.py +25 -6
  8. {anixcode-0.8.0 → anixcode-0.11.0}/anixcode/compaction.py +48 -9
  9. {anixcode-0.8.0 → anixcode-0.11.0}/anixcode/danger.py +39 -0
  10. {anixcode-0.8.0 → anixcode-0.11.0}/anixcode/i18n_en.py +119 -1
  11. anixcode-0.11.0/anixcode/images.py +331 -0
  12. anixcode-0.11.0/anixcode/llm.py +626 -0
  13. anixcode-0.11.0/anixcode/mcp.py +598 -0
  14. {anixcode-0.8.0 → anixcode-0.11.0}/anixcode/mentions.py +48 -14
  15. anixcode-0.11.0/anixcode/prompts.py +140 -0
  16. {anixcode-0.8.0 → anixcode-0.11.0}/anixcode/providers.py +4 -0
  17. {anixcode-0.8.0 → anixcode-0.11.0}/anixcode/settings.py +53 -0
  18. {anixcode-0.8.0 → anixcode-0.11.0}/anixcode/storage.py +27 -10
  19. {anixcode-0.8.0 → anixcode-0.11.0}/anixcode/tools/__init__.py +8 -2
  20. {anixcode-0.8.0 → anixcode-0.11.0}/anixcode/tools/base.py +5 -1
  21. anixcode-0.11.0/anixcode/tools/browser.py +110 -0
  22. {anixcode-0.8.0 → anixcode-0.11.0}/anixcode/tools/files.py +168 -17
  23. {anixcode-0.8.0 → anixcode-0.11.0}/anixcode/tools/search.py +5 -4
  24. {anixcode-0.8.0 → anixcode-0.11.0}/anixcode/tools/shell.py +21 -2
  25. anixcode-0.11.0/anixcode/tools/todo.py +71 -0
  26. anixcode-0.11.0/anixcode/tools/web.py +180 -0
  27. {anixcode-0.8.0 → anixcode-0.11.0}/anixcode/tui/anim.py +24 -23
  28. {anixcode-0.8.0 → anixcode-0.11.0}/anixcode/tui/app.py +543 -35
  29. {anixcode-0.8.0 → anixcode-0.11.0}/anixcode/tui/app.tcss +85 -0
  30. {anixcode-0.8.0 → anixcode-0.11.0}/anixcode/tui/screens.py +8 -8
  31. {anixcode-0.8.0 → anixcode-0.11.0}/anixcode/tui/widgets.py +233 -9
  32. anixcode-0.8.0/README.md → anixcode-0.11.0/anixcode.egg-info/PKG-INFO +90 -23
  33. {anixcode-0.8.0 → anixcode-0.11.0}/anixcode.egg-info/SOURCES.txt +10 -1
  34. {anixcode-0.8.0 → anixcode-0.11.0}/anixcode.egg-info/requires.txt +4 -0
  35. {anixcode-0.8.0 → anixcode-0.11.0}/pyproject.toml +10 -4
  36. {anixcode-0.8.0 → anixcode-0.11.0}/setup.cfg +4 -4
  37. {anixcode-0.8.0 → anixcode-0.11.0}/tests/test_i18n.py +4 -4
  38. anixcode-0.11.0/tests/test_images.py +203 -0
  39. anixcode-0.11.0/tests/test_mcp.py +233 -0
  40. {anixcode-0.8.0 → anixcode-0.11.0}/tests/test_reliability.py +1 -1
  41. anixcode-0.11.0/tests/test_v011_features.py +332 -0
  42. anixcode-0.8.0/anixcode/agent.py +0 -358
  43. anixcode-0.8.0/anixcode/llm.py +0 -258
  44. anixcode-0.8.0/anixcode/prompts.py +0 -64
  45. {anixcode-0.8.0 → anixcode-0.11.0}/LICENSE +0 -0
  46. {anixcode-0.8.0 → anixcode-0.11.0}/anixcode/__main__.py +0 -0
  47. {anixcode-0.8.0 → anixcode-0.11.0}/anixcode/airpc.py +0 -0
  48. {anixcode-0.8.0 → anixcode-0.11.0}/anixcode/checkpoints.py +0 -0
  49. {anixcode-0.8.0 → anixcode-0.11.0}/anixcode/i18n.py +0 -0
  50. {anixcode-0.8.0 → anixcode-0.11.0}/anixcode/projects.py +0 -0
  51. {anixcode-0.8.0 → anixcode-0.11.0}/anixcode/tui/__init__.py +0 -0
  52. {anixcode-0.8.0 → anixcode-0.11.0}/anixcode.egg-info/dependency_links.txt +0 -0
  53. {anixcode-0.8.0 → anixcode-0.11.0}/anixcode.egg-info/entry_points.txt +0 -0
  54. {anixcode-0.8.0 → anixcode-0.11.0}/anixcode.egg-info/top_level.txt +0 -0
  55. {anixcode-0.8.0 → anixcode-0.11.0}/tests/test_agent.py +0 -0
  56. {anixcode-0.8.0 → anixcode-0.11.0}/tests/test_commands.py +0 -0
  57. {anixcode-0.8.0 → anixcode-0.11.0}/tests/test_llm.py +0 -0
  58. {anixcode-0.8.0 → anixcode-0.11.0}/tests/test_projects.py +0 -0
  59. {anixcode-0.8.0 → anixcode-0.11.0}/tests/test_providers.py +0 -0
  60. {anixcode-0.8.0 → anixcode-0.11.0}/tests/test_safety_mentions.py +0 -0
  61. {anixcode-0.8.0 → anixcode-0.11.0}/tests/test_settings.py +0 -0
  62. {anixcode-0.8.0 → anixcode-0.11.0}/tests/test_tools.py +0 -0
@@ -1,241 +1,284 @@
1
- Metadata-Version: 2.4
2
- Name: anixcode
3
- Version: 0.8.0
4
- Summary: AI coding agent for the terminal. Bring your own API key.
5
- Author: an1zy
6
- License: MIT
7
- Project-URL: Homepage, https://github.com/an1zy/anixcode
8
- Project-URL: Issues, https://github.com/an1zy/anixcode/issues
9
- Keywords: ai,agent,coding,terminal,tui,llm,deepseek,openai
10
- Classifier: Development Status :: 3 - Alpha
11
- Classifier: Environment :: Console
12
- Classifier: License :: OSI Approved :: MIT License
13
- Classifier: Programming Language :: Python :: 3
14
- Classifier: Topic :: Software Development
15
- Requires-Python: >=3.11
16
- Description-Content-Type: text/markdown
17
- License-File: LICENSE
18
- Requires-Dist: textual>=1.0
19
- Requires-Dist: httpx>=0.27
20
- Provides-Extra: dev
21
- Requires-Dist: pytest>=8; extra == "dev"
22
- Requires-Dist: ruff>=0.5; extra == "dev"
23
- Dynamic: license-file
24
-
25
- # ANIX Code
26
-
27
- [![tests](https://github.com/an1zy/anixcode/actions/workflows/tests.yml/badge.svg)](https://github.com/an1zy/anixcode/actions/workflows/tests.yml)
28
- ![python](https://img.shields.io/badge/python-3.11%2B-blue) ![license](https://img.shields.io/badge/license-MIT-green)
29
- ![status](https://img.shields.io/badge/status-alpha-orange)
30
-
31
- 🇬🇧 English · 🇷🇺 [Русский](README.ru.md)
32
-
33
- > ⚠️ Early version. The main things work, but bugs are possible: please report them in Issues.
34
-
35
- An AI coding agent for your terminal. Paste an API key from any provider, describe a task, and the agent
36
- reads the project, edits files and runs commands by itself. Every change is shown as a diff, and nothing
37
- is changed without your approval (unless you turn on full access).
38
-
39
- ```
40
- ◆ ANIX Code ~/projects/my-app BUILD
41
- ▎ add a /health endpoint to api.py with a test
42
- ✓ → read api.py 84 lines
43
- ✓ ⌕ grep def test_ 6 matches
44
- ✓ ✎ edit api.py +7 −0
45
- ✓ $ pytest -q → 0
46
- Done: added GET /health and a test in tests/test_api.py, all 7 tests pass.
47
- ```
48
-
49
- ## Install
50
-
51
- Python 3.11+ is required.
52
-
53
- ```bash
54
- pipx install git+https://github.com/an1zy/anixcode # one command
55
- # or for development:
56
- git clone https://github.com/an1zy/anixcode && cd anixcode
57
- pip install -e .
58
- anixcode # open in the current folder
59
- anixcode ~/proj # or in a specific one
60
- ```
61
-
62
- On the first start a connection window opens: choose a provider, paste the key and press “Model list”.
63
- Any OpenAI-compatible server works:
64
-
65
- | Provider | Key |
66
- |---|---|
67
- | DeepSeek | platform.deepseek.com |
68
- | OpenAI, Anthropic, Google Gemini, Groq | in their consoles |
69
- | ANIX Router, Ollama, LM Studio | not needed, they run locally |
70
- | ★ Your own providers | “+ Own” button: name, `/v1` address, key, “Check” |
71
-
72
- The model has to support tool calling (function calling).
73
-
74
- If you start ANIX Code from your home folder or `C:\Windows\System32` (a fresh cmd window), it asks which
75
- project to work in. Switch projects any time with `Ctrl+P` or by clicking the path in the header; you can
76
- also paste a `https://github.com/...` link there to clone a repository.
77
-
78
- The interface language follows your system (Russian or English). Switch it with `/language`.
79
-
80
- ## Usage
81
-
82
- | Keys | |
83
- |---|---|
84
- | `Enter` / `Ctrl+J` | send / new line |
85
- | `Tab` / `Shift+Tab` | **Build** (edits code) ↔ **Plan** (only reads and plans) |
86
- | `Esc` | stop the agent |
87
- | `Ctrl+P` | choose a project: recent, found git repositories, browse disks, clone by link |
88
- | `F2` | full access on/off |
89
- | `Ctrl+O` | model and key |
90
- | `Ctrl+N` / `Ctrl+S` | new session / past sessions |
91
- | `Ctrl+T` | theme picker with preview: ANIX (peach), Noir (black & white), Tokyo Night, Catppuccin, Dracula, Nord… |
92
- | `F1` | help |
93
-
94
- Click an action card to expand its diff or command output.
95
- Logo and progress animations can be turned off in `settings.json`: `"animations": false`.
96
-
97
- **Approvals.** When the agent wants to change a file or run a command, a line appears above the input
98
- (the diff or the command is shown in the card in the chat): `Enter` allows, `Esc` denies, typing text and
99
- pressing `Enter` denies and tells the agent what to do instead. Dangerous commands (`rm -rf`,
100
- `Remove-Item -Recurse`, `del /s`, `git push --force`, `git reset --hard`…) are highlighted in red.
101
- **Full access** (`F2` or click “🔒 ask first” at the bottom right): the agent works without asking until
102
- you turn it off.
103
-
104
- **@files.** Type `@` in a prompt to get suggestions of project files (↑↓, Enter or Tab). The whole file is
105
- sent with the prompt and the agent can edit it right away: `fix the bug in @src/api.py`.
106
- `@folder/` attaches a listing of the folder.
107
-
108
- **Project rules.** `/init`: the agent studies the project and writes `AGENTS.md` (what the project is,
109
- structure, build and test commands, code style). Add your own rules there, for example “tests use vitest,
110
- don't touch the legacy folder”. The agent reads this file before every task.
111
-
112
- **Reliability:**
113
- - `/undo` reverts all file changes from the agent's last answer (several times in a row, also after a
114
- restart); `/redo` brings them back. Terminal commands (`bash`) are not undone.
115
- - The bottom right shows how full the model context is. At 80% the history is compressed automatically:
116
- old command outputs are removed first, then old steps are folded into a summary. Manually: `/compact`.
117
- - On network failures, timeouts, 429 and 5xx responses the request is retried up to 4 times.
118
- - The context size is guessed from the model name. For your own model set it in `settings.json`:
119
- `"context_window": 128000`.
120
-
121
- ## Commands
122
-
123
- Type `/` to get the list with descriptions (↑↓, `Tab` completes, `Enter` runs).
124
- The set follows Claude Code and OpenCode.
125
-
126
- | Command | |
127
- |---|---|
128
- | `/init` | study the project and write `AGENTS.md` |
129
- | `/review [focus]` | review uncommitted changes (or the last commit) |
130
- | `/commit [details]` | commit with a good message in the project's style |
131
- | `/test [what]` | find and run the tests, fix failing ones |
132
- | `/fix <error>` | fix an error from its text or a description |
133
- | `/explain <@file>` | explain code |
134
- | `/pr` | pull request description for the current branch |
135
- | `/undo` / `/redo` | undo the last answer's changes / bring them back |
136
- | `/compact` | compress the history |
137
- | `/new`, `/clear`, `/sessions`, `/resume` | sessions |
138
- | `/model`, `/connect` | model and key |
139
- | `/project` | choose a project |
140
- | `/theme`, `/mode`, `/permissions` | theme, Build/Plan, full access |
141
- | `/status` | summary: project, model, tokens, context |
142
- | `/export` | save the session as Markdown |
143
- | `/doctor` | check git, ripgrep, connection to the model, AI-RPC |
144
- | `/language` | interface language: Русский / English (after a restart) |
145
-
146
- **Quick input:**
147
- - `!command` runs a command in the terminal yourself, without the model; the agent sees the output:
148
- `!pytest -q`, then “fix it”.
149
- - `# text` saves a rule to `AGENTS.md`: `# use pnpm, not npm`.
150
-
151
- **Own commands.** A Markdown file in `.anixcode/commands/name.md` (this project) or in
152
- `%APPDATA%\anixcode\commands\name.md` / `~/.config/anixcode/commands/name.md` (all projects) becomes the
153
- command `/name`. `$ARGUMENTS` is replaced with everything after the command, `$1`, `$2` with single words.
154
- An example is in `.anixcode/commands/check.md`:
155
-
156
- ```markdown
157
- ---
158
- description: run the project tests and show the result
159
- ---
160
- Run `pytest -q`. If tests fail, show the failing test names and the short reason for each. $ARGUMENTS
161
- ```
162
-
163
- Prompt commands also work without the interface: `anixcode run "/review"`.
164
-
165
- **Without the interface:**
166
- ```bash
167
- anixcode run "find where the discount is calculated and explain it" --plan
168
- anixcode run "fix the failing test" -y # -y: allow everything without asking
169
- anixcode connect # connect a model from the console
170
- anixcode models # list the provider's models
171
- ```
172
-
173
- ## Tools
174
-
175
- | Tool | |
176
- |---|---|
177
- | `read` | reads a file with line numbers, big files in parts |
178
- | `ls`, `glob` | folder tree, find files by pattern |
179
- | `grep` | search in code (ripgrep if installed) |
180
- | `edit` | precise text replacement; the file must have been read and not changed since |
181
- | `write` | new file or full rewrite |
182
- | `bash` | commands: tests, git, builds (PowerShell on Windows) |
183
-
184
- File tools never leave the project folder. Edits and commands need approval unless full access is on.
185
- Fine-tuning in `settings.json`: `"permissions": {"edit": "ask", "exec": "ask"}` (`ask` / `allow` / `deny`).
186
-
187
- **AI-RPC.** If [AI-RPC](https://github.com/an1zy/ai-rpc) is running, Discord shows “ANIX Code · Generating”.
188
-
189
- ## Updates and keys
190
-
191
- Keys and settings are stored **outside the code folder**, so you can unpack a new version over the old one
192
- or into another folder: keys, own providers and sessions stay. To move to another computer, copy the whole
193
- folder below.
194
-
195
- `%APPDATA%\anixcode\` (Windows) or `~/.config/anixcode/`:
196
- - `settings.json`: provider, model, theme, permissions, language;
197
- - `auth.json`: API keys (only on your computer, readable only by your user);
198
- - `sessions.db`: session history.
199
-
200
- ## Development
201
-
202
- ```bash
203
- pip install -e ".[dev]" && pytest
204
- ```
205
-
206
- **Full self-test:** `python selftest.py` (on Windows you can double-click `selftest.bat`). It runs the unit
207
- tests, then starts the interface invisibly with a fake model and checks the answers, approvals, full access,
208
- `/undo` and `/redo`, `/` and `@` suggestions, `!command`, `# note`, Build/Plan, `/status`, `/doctor`,
209
- `/export`, `/compact`, all windows, stopping with Esc and `/new`. No API key needed, no money spent, your
210
- settings and sessions are not touched.
211
-
212
- Translations: interface strings are written in Russian in the code as `tr("…")`; English versions live in
213
- `anixcode/i18n_en.py` (a test checks that every string has one).
214
-
215
- ```
216
- anixcode/
217
- llm.py OpenAI-compatible API client: streaming, tool calls, readable errors, retries
218
- agent.py the agent loop, approvals, Build/Plan modes, undo/redo
219
- tools/ read, ls, glob, grep, edit, write, bash
220
- prompts.py system prompt + AGENTS.md
221
- storage.py sessions and file snapshots in SQLite
222
- checkpoints.py file snapshots for /undo
223
- compaction.py history compression to fit the context
224
- danger.py spotting dangerous commands
225
- mentions.py @files: suggestions and attaching
226
- commands.py /commands: built-in, ready-made prompts, own ones from .md
227
- i18n.py Russian / English interface
228
- providers.py provider list
229
- tui/ the Textual interface
230
- ```
231
-
232
- ## Roadmap
233
-
234
- - [x] Undo (`/undo`, `/redo`)
235
- - [x] History compression, retries on failures
236
- - [x] `@file` in prompts, `/init`, dangerous-command highlighting
237
- - [x] `/review`, `/commit`, `/test`…, own commands from `.md`, `!` and `#`
238
- - [x] English interface
239
- - [ ] MCP servers
240
- - [ ] Several agents in parallel
241
- - [ ] Desktop version
1
+ Metadata-Version: 2.4
2
+ Name: anixcode
3
+ Version: 0.11.0
4
+ Summary: AI coding agent for the terminal. Bring your own API key.
5
+ Author: an1zy
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/an1zy/anixcode
8
+ Project-URL: Repository, https://github.com/an1zy/anixcode
9
+ Project-URL: Issues, https://github.com/an1zy/anixcode/issues
10
+ Project-URL: PyPI, https://pypi.org/project/anixcode/
11
+ Keywords: ai,agent,ai-agent,coding-agent,coding-assistant,terminal,tui,cli,llm,mcp,model-context-protocol,claude-code,opencode,deepseek,openai,anthropic,gemini,ollama,textual,headless-browser,developer-tools
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Environment :: Console
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Topic :: Software Development
16
+ Requires-Python: >=3.11
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Requires-Dist: textual>=1.0
20
+ Requires-Dist: httpx>=0.27
21
+ Provides-Extra: dev
22
+ Requires-Dist: pytest>=8; extra == "dev"
23
+ Requires-Dist: ruff>=0.5; extra == "dev"
24
+ Provides-Extra: browser
25
+ Requires-Dist: playwright>=1.45; extra == "browser"
26
+ Requires-Dist: pillow>=10; extra == "browser"
27
+ Dynamic: license-file
28
+
29
+ <div align="center">
30
+
31
+ # ● anixcode
32
+ ### *Terminal AI Coding Agent with Diffs, Checkpoints & MCP Support*
33
+
34
+ [![CI](https://github.com/an1zy/anixcode/actions/workflows/tests.yml/badge.svg?style=for-the-badge)](https://github.com/an1zy/anixcode/actions/workflows/tests.yml)
35
+ [![PyPI](https://img.shields.io/pypi/v/anixcode?style=for-the-badge&color=18181b)](https://pypi.org/project/anixcode/)
36
+ [![Python](https://img.shields.io/badge/python-3.11%2B-18181b.svg?style=for-the-badge&logo=python&logoColor=white)](https://www.python.org/)
37
+ [![License: MIT](https://img.shields.io/badge/license-MIT-18181b.svg?style=for-the-badge)](LICENSE)
38
+
39
+ **English** · [Русский](README.ru.md)
40
+
41
+ <br/>
42
+
43
+ <img src="assets/demo.svg" alt="anixcode demo" width="880" />
44
+
45
+ </div>
46
+
47
+ ---
48
+
49
+ Terminal AI coding agent. Paste an API key from any OpenAI-compatible provider, describe a task, and the agent reads the project, edits files, and runs commands. Every change is shown as a diff, and edits or commands require approval unless full access is enabled.
50
+
51
+ ```
52
+ ◆ ANIX Code ~/projects/my-app BUILD
53
+ ▎ add a /health endpoint to api.py with a test
54
+ ✓ → read api.py 84 lines
55
+ ✓ ⌕ grep def test_ 6 matches
56
+ ✓ ✎ edit api.py +7 −0
57
+ ✓ $ pytest -q → 0
58
+ Done: added GET /health and a test in tests/test_api.py, all 7 tests pass.
59
+ ```
60
+
61
+ ## Install
62
+
63
+ Python 3.11+ is required.
64
+
65
+ ```bash
66
+ pip install anixcode # or: pipx install anixcode
67
+ # or for development:
68
+ git clone https://github.com/an1zy/anixcode && cd anixcode
69
+ pip install -e .
70
+ anixcode # open in the current folder
71
+ anixcode ~/proj # or in a specific one
72
+ ```
73
+
74
+ On the first start a connection window opens: choose a provider, paste the key and press “Model list”.
75
+ Any OpenAI-compatible server works:
76
+
77
+ | Provider | Key |
78
+ |---|---|
79
+ | DeepSeek | platform.deepseek.com |
80
+ | OpenAI, Anthropic, Google Gemini, Groq | in their consoles |
81
+ | ANIX Router, Ollama, LM Studio | not needed, they run locally |
82
+ | ★ Your own providers | “+ Own” button: name, `/v1` address, key, “Check” |
83
+
84
+ The model has to support tool calling (function calling).
85
+
86
+ If you start ANIX Code from your home folder or `C:\Windows\System32` (a fresh cmd window), it asks which
87
+ project to work in. Switch projects any time with `Ctrl+P` or by clicking the path in the header; you can
88
+ also paste a `https://github.com/...` link there to clone a repository.
89
+
90
+ The interface language follows your system (Russian or English). Switch it with `/language`.
91
+
92
+ ## Usage
93
+
94
+ | Keys | |
95
+ |---|---|
96
+ | `Enter` / `Ctrl+J` | send / new line |
97
+ | `Tab` / `Shift+Tab` | **Build** (edits code) ↔ **Plan** (only reads and plans) |
98
+ | `Esc` | stop the agent |
99
+ | `Ctrl+P` | choose a project: recent, found git repositories, browse disks, clone by link |
100
+ | `F2` | full access on/off |
101
+ | `Ctrl+O` | model and key |
102
+ | `Ctrl+N` / `Ctrl+S` | new session / past sessions |
103
+ | `Ctrl+T` | theme picker with preview: ANIX (peach), Noir (black & white), Tokyo Night, Catppuccin, Dracula, Nord… |
104
+ | `Ctrl+B` | toggle the built-in headless browser panel inside the terminal (no external popup windows) |
105
+ | `Alt+V` | paste an image from clipboard (screenshot or copied file) |
106
+ | `F1` | help |
107
+
108
+ Click an action card to expand its diff or command output.
109
+ Logo and progress animations can be turned off in `settings.json`: `"animations": false`.
110
+
111
+ **Approvals.** When the agent wants to change a file or run a command, a line appears above the input
112
+ (the diff or the command is shown in the card in the chat): `Enter` allows, `Esc` denies, typing text and
113
+ pressing `Enter` denies and tells the agent what to do instead. Dangerous commands (`rm -rf`,
114
+ `Remove-Item -Recurse`, `del /s`, `git push --force`, `git reset --hard`…) are highlighted in red.
115
+ **Full access** (`F2` or click “🔒 ask first” at the bottom right): the agent works without asking until
116
+ you turn it off.
117
+
118
+ **@files.** Type `@` in a prompt to get suggestions of project files (↑↓, Enter or Tab). The whole file is
119
+ sent with the prompt and the agent can edit it right away: `fix the bug in @src/api.py`.
120
+ `@folder/` attaches a listing of the folder. Images (`PNG`, `JPG`, `WEBP`, `GIF`) can be attached via `@image.png`,
121
+ `Alt+V` / `Ctrl+V` from clipboard, drag & drop into the terminal, or `/image [path]`.
122
+
123
+ **Project rules.** `/init`: the agent studies the project and writes `AGENTS.md` (what the project is,
124
+ structure, build and test commands, code style). Add your own rules there, for example “tests use vitest,
125
+ don't touch the legacy folder”. The agent reads this file before every task.
126
+
127
+ **Reliability:**
128
+ - `/undo` reverts all file changes from the agent's last answer (several times in a row, also after a
129
+ restart); `/redo` brings them back. Terminal commands (`bash`) are not undone.
130
+ - The bottom right shows how full the model context is. At 80% the history is compressed automatically:
131
+ old command outputs are removed first, then old steps are folded into a summary. Manually: `/compact`.
132
+ - On network failures, timeouts, 429 and 5xx responses the request is retried up to 4 times.
133
+ - The context size is guessed from the model name. For your own model set it in `settings.json`:
134
+ `"context_window": 128000`.
135
+
136
+ ## Commands
137
+
138
+ Type `/` to get the list with descriptions (↑↓, `Tab` completes, `Enter` runs).
139
+ The set follows Claude Code and OpenCode.
140
+
141
+ | Command | |
142
+ |---|---|
143
+ | `/init` | study the project and write `AGENTS.md` |
144
+ | `/review [focus]` | review uncommitted changes (or the last commit) |
145
+ | `/commit [details]` | commit with a good message in the project's style |
146
+ | `/test [what]` | find and run the tests, fix failing ones |
147
+ | `/fix <error>` | fix an error from its text or a description |
148
+ | `/explain <@file>` | explain code |
149
+ | `/pr` | pull request description for the current branch |
150
+ | `/undo` / `/redo` | undo the last answer's changes / bring them back |
151
+ | `/compact` | compress the history |
152
+ | `/new`, `/clear`, `/sessions`, `/resume` | sessions |
153
+ | `/model`, `/connect` | model and key |
154
+ | `/project` | choose a project |
155
+ | `/theme`, `/mode`, `/permissions` | theme, Build/Plan, full access |
156
+ | `/status` | summary: project, model, tokens, context |
157
+ | `/export` | save the session as Markdown |
158
+ | `/doctor` | check git, ripgrep, connection to the model, AI-RPC |
159
+ | `/mcp [add|remove|on|off|tools|reload]` | MCP servers: list, add, remove, turn on/off, show tools, restart |
160
+ | `/goal <objective\|stop>` | autonomous mode: keep iterating and verifying until the goal is complete |
161
+ | `/btw <question>` | quick side question using current context without modifying session history (works while the agent runs) |
162
+ | `/browser [url\|close]` | open or toggle the built-in headless browser pane inside ANIX Code |
163
+ | `/skills` | list discovered project and global `SKILL.md` skills |
164
+ | `/reasoning [off\|low\|medium\|high]` | set model reasoning effort |
165
+ | `/image [path\|clear]`, `/img` | attach an image from clipboard or file, or clear attachments |
166
+ | `/language` | interface language: Русский / English (after a restart) |
167
+
168
+ **Quick input:**
169
+ - `!command` runs a command in the terminal yourself, without the model; the agent sees the output:
170
+ `!pytest -q`, then “fix it”.
171
+ - `# text` saves a rule to `AGENTS.md`: `# use pnpm, not npm`.
172
+
173
+ **Own commands.** A Markdown file in `.anixcode/commands/name.md` (this project) or in
174
+ `%APPDATA%\anixcode\commands\name.md` / `~/.config/anixcode/commands/name.md` (all projects) becomes the
175
+ command `/name`. `$ARGUMENTS` is replaced with everything after the command, `$1`, `$2` with single words.
176
+ An example is in `.anixcode/commands/check.md`:
177
+
178
+ ```markdown
179
+ ---
180
+ description: run the project tests and show the result
181
+ ---
182
+ Run `pytest -q`. If tests fail, show the failing test names and the short reason for each. $ARGUMENTS
183
+ ```
184
+
185
+ Prompt commands also work without the interface: `anixcode run "/review"`.
186
+
187
+ **Without the interface:**
188
+ ```bash
189
+ anixcode run "find where the discount is calculated and explain it" --plan
190
+ anixcode run "fix the failing test" -y # -y: allow everything without asking
191
+ anixcode run -i screen.png "fix the layout" # attach one or more images
192
+ anixcode connect # connect a model from the console
193
+ anixcode models # list the provider's models
194
+ ```
195
+
196
+ ## Tools
197
+
198
+ | Tool | |
199
+ |---|---|
200
+ | `read` | reads a file with line numbers, big files in parts |
201
+ | `ls`, `glob` | folder tree, find files by pattern |
202
+ | `grep` | search in code (ripgrep if installed) |
203
+ | `edit`, `multi_edit` | precise and atomic multi-hunk text replacement (with whitespace-tolerant fallback) |
204
+ | `write` | new file or full rewrite |
205
+ | `bash` | commands: tests, git, builds with live streaming output (PowerShell on Windows) |
206
+ | `browser`, `web_fetch` | built-in headless browser (Playwright Chromium / HTTP) & page reader inside ANIX Code |
207
+ | `subagent`, `todo` | isolated read-only research subagent and live task checklist |
208
+
209
+ File tools never leave the project folder. Edits and commands need approval unless full access is on.
210
+ Fine-tuning in `settings.json`: `"permissions": {"edit": "ask", "exec": "ask"}` (`ask` / `allow` / `deny`).
211
+
212
+ **AI-RPC.** If [AI-RPC](https://github.com/an1zy/ai-rpc) is running, Discord shows “ANIX Code · Generating”.
213
+
214
+ ## Updates and keys
215
+
216
+ Keys and settings are stored **outside the code folder**, so you can unpack a new version over the old one
217
+ or into another folder: keys, own providers and sessions stay. To move to another computer, copy the whole
218
+ folder below.
219
+
220
+ `%APPDATA%\anixcode\` (Windows) or `~/.config/anixcode/`:
221
+ - `settings.json`: provider, model, theme, permissions, language;
222
+ - `auth.json`: API keys (only on your computer, readable only by your user);
223
+ - `sessions.db`: session history.
224
+
225
+ ## Development
226
+
227
+ ```bash
228
+ pip install -e ".[dev]" && pytest
229
+ ```
230
+
231
+ Translations: interface strings are written in Russian in the code as `tr("…")`; English versions live in
232
+ `anixcode/i18n_en.py` (a test checks that every string has one).
233
+
234
+ ## MCP servers
235
+
236
+ Add servers via `/mcp add` or directly in `settings.json` (same format as `mcpServers` in Claude Desktop and Cursor):
237
+
238
+ ```json
239
+ "mcp_servers": {
240
+ "github": {"command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"],
241
+ "env": {"GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"}},
242
+ "context7": {"url": "https://mcp.context7.com/mcp"},
243
+ "big": {"command": "uvx", "args": ["some-server"], "tools": ["search"], "timeout": 300},
244
+ "old": {"command": "...", "disabled": true}
245
+ }
246
+ ```
247
+
248
+ - `command` + `args` + `env`: a local server (stdio), started in the project folder.
249
+ - `url` + `headers`: a remote server (Streamable HTTP).
250
+ - `${VAR}` is taken from the environment, so tokens don't have to be in the file.
251
+ - `tools`: keep only these tools (saves context). `timeout`: seconds per call (default 120).
252
+ - The model sees them as `mcp__<server>__<tool>`. They ask for approval like edits and commands; `"permissions": {"mcp": "allow"}` turns that off.
253
+ - `/mcp`, `/status` and `/doctor` show which servers connected.
254
+
255
+ ```
256
+ anixcode/
257
+ llm.py OpenAI-compatible API client: streaming, tool calls, readable errors, retries
258
+ agent.py the agent loop, approvals, Build/Plan modes, undo/redo
259
+ tools/ read, ls, glob, grep, edit, write, bash
260
+ mcp.py MCP client (stdio + Streamable HTTP)
261
+ prompts.py system prompt + AGENTS.md
262
+ storage.py sessions and file snapshots in SQLite
263
+ checkpoints.py file snapshots for /undo
264
+ compaction.py history compression to fit the context
265
+ danger.py spotting dangerous commands
266
+ mentions.py @files: suggestions and attaching
267
+ images.py image attachments: files, drag & drop, clipboard
268
+ commands.py /commands: built-in, ready-made prompts, own ones from .md
269
+ i18n.py Russian / English interface
270
+ providers.py provider list
271
+ tui/ the Textual interface
272
+ ```
273
+
274
+ ## Roadmap
275
+
276
+ - [x] Undo (`/undo`, `/redo`)
277
+ - [x] History compression, retries on failures
278
+ - [x] `@file` in prompts, `/init`, dangerous-command highlighting
279
+ - [x] `/review`, `/commit`, `/test`…, own commands from `.md`, `!` and `#`
280
+ - [x] English interface
281
+ - [x] MCP servers
282
+ - [x] Parallel read-only tools & isolated subagents
283
+ - [x] Built-in headless browser (`/browser`), `/goal`, `/btw`
284
+ - [ ] Desktop version