euron-code 0.1.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 (45) hide show
  1. euron_code-0.1.0/.gitignore +10 -0
  2. euron_code-0.1.0/LICENSE +23 -0
  3. euron_code-0.1.0/PKG-INFO +278 -0
  4. euron_code-0.1.0/README.md +217 -0
  5. euron_code-0.1.0/pyproject.toml +56 -0
  6. euron_code-0.1.0/src/euron_code/__init__.py +3 -0
  7. euron_code-0.1.0/src/euron_code/__main__.py +4 -0
  8. euron_code-0.1.0/src/euron_code/agent.py +595 -0
  9. euron_code-0.1.0/src/euron_code/api.py +364 -0
  10. euron_code-0.1.0/src/euron_code/auth.py +115 -0
  11. euron_code-0.1.0/src/euron_code/cli.py +351 -0
  12. euron_code-0.1.0/src/euron_code/config.py +207 -0
  13. euron_code-0.1.0/src/euron_code/context.py +131 -0
  14. euron_code-0.1.0/src/euron_code/credentials.py +197 -0
  15. euron_code-0.1.0/src/euron_code/doctor.py +88 -0
  16. euron_code-0.1.0/src/euron_code/keys.py +92 -0
  17. euron_code-0.1.0/src/euron_code/memory.py +97 -0
  18. euron_code-0.1.0/src/euron_code/permissions.py +245 -0
  19. euron_code-0.1.0/src/euron_code/prompts.py +98 -0
  20. euron_code-0.1.0/src/euron_code/repl.py +425 -0
  21. euron_code-0.1.0/src/euron_code/sessions.py +186 -0
  22. euron_code-0.1.0/src/euron_code/tools/__init__.py +33 -0
  23. euron_code-0.1.0/src/euron_code/tools/base.py +167 -0
  24. euron_code-0.1.0/src/euron_code/tools/db.py +368 -0
  25. euron_code-0.1.0/src/euron_code/tools/fs.py +412 -0
  26. euron_code-0.1.0/src/euron_code/tools/ignore.py +75 -0
  27. euron_code-0.1.0/src/euron_code/tools/search.py +204 -0
  28. euron_code-0.1.0/src/euron_code/tools/shell.py +214 -0
  29. euron_code-0.1.0/src/euron_code/tools/task.py +41 -0
  30. euron_code-0.1.0/src/euron_code/tools/todo.py +64 -0
  31. euron_code-0.1.0/src/euron_code/tools/web.py +112 -0
  32. euron_code-0.1.0/src/euron_code/ui.py +269 -0
  33. euron_code-0.1.0/src/euron_code/usage_view.py +108 -0
  34. euron_code-0.1.0/tests/conftest.py +55 -0
  35. euron_code-0.1.0/tests/helpers.py +78 -0
  36. euron_code-0.1.0/tests/mock_gateway.py +508 -0
  37. euron_code-0.1.0/tests/test_agent_mock.py +228 -0
  38. euron_code-0.1.0/tests/test_api_shell.py +182 -0
  39. euron_code-0.1.0/tests/test_cli_e2e.py +129 -0
  40. euron_code-0.1.0/tests/test_context_memory_sessions.py +214 -0
  41. euron_code-0.1.0/tests/test_db.py +104 -0
  42. euron_code-0.1.0/tests/test_permissions.py +108 -0
  43. euron_code-0.1.0/tests/test_repl.py +51 -0
  44. euron_code-0.1.0/tests/test_search.py +59 -0
  45. euron_code-0.1.0/tests/test_tools_fs.py +143 -0
@@ -0,0 +1,10 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *.egg-info/
4
+ build/
5
+ dist/
6
+ .venv/
7
+ venv/
8
+ .pytest_cache/
9
+ .euron/settings.local.json
10
+ .coverage
@@ -0,0 +1,23 @@
1
+ Copyright (c) 2026 Euron. All rights reserved.
2
+
3
+ This software and its source code, documentation and associated files (the
4
+ "Software") are proprietary to Euron and are protected by copyright law.
5
+
6
+ Euron grants you a limited, non-exclusive, non-transferable, revocable licence
7
+ to install and run the Software solely to access the Euron Code service with an
8
+ Euron account that is entitled to it (for example Euron Plus or Super 30).
9
+
10
+ You may not, without the prior written permission of Euron:
11
+ - copy, modify, merge, publish, distribute, sublicense or sell the Software
12
+ or any part of it;
13
+ - reverse engineer, decompile or disassemble the Software, except to the
14
+ extent that applicable law expressly permits it;
15
+ - use the Software to access any service other than Euron Code, or to
16
+ circumvent any access control, quota or rate limit of the service.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
20
+ FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL EURON BE LIABLE
21
+ FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
23
+ THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,278 @@
1
+ Metadata-Version: 2.5
2
+ Name: euron-code
3
+ Version: 0.1.0
4
+ Summary: Euron Code: an agentic coding assistant in your terminal for Euron Plus and Super 30 students.
5
+ Project-URL: Homepage, https://euron.one/code-agent
6
+ Author-email: Euron <contact@euron.one>
7
+ License: Copyright (c) 2026 Euron. All rights reserved.
8
+
9
+ This software and its source code, documentation and associated files (the
10
+ "Software") are proprietary to Euron and are protected by copyright law.
11
+
12
+ Euron grants you a limited, non-exclusive, non-transferable, revocable licence
13
+ to install and run the Software solely to access the Euron Code service with an
14
+ Euron account that is entitled to it (for example Euron Plus or Super 30).
15
+
16
+ You may not, without the prior written permission of Euron:
17
+ - copy, modify, merge, publish, distribute, sublicense or sell the Software
18
+ or any part of it;
19
+ - reverse engineer, decompile or disassemble the Software, except to the
20
+ extent that applicable law expressly permits it;
21
+ - use the Software to access any service other than Euron Code, or to
22
+ circumvent any access control, quota or rate limit of the service.
23
+
24
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
26
+ FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL EURON BE LIABLE
27
+ FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
28
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
29
+ THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30
+ License-File: LICENSE
31
+ Keywords: ai,assistant,cli,coding agent,euron
32
+ Classifier: Development Status :: 4 - Beta
33
+ Classifier: Environment :: Console
34
+ Classifier: Intended Audience :: Developers
35
+ Classifier: Intended Audience :: Education
36
+ Classifier: License :: Other/Proprietary License
37
+ Classifier: Operating System :: OS Independent
38
+ Classifier: Programming Language :: Python :: 3
39
+ Classifier: Programming Language :: Python :: 3.9
40
+ Classifier: Programming Language :: Python :: 3.10
41
+ Classifier: Programming Language :: Python :: 3.11
42
+ Classifier: Programming Language :: Python :: 3.12
43
+ Classifier: Programming Language :: Python :: 3.13
44
+ Classifier: Topic :: Software Development
45
+ Requires-Python: >=3.9
46
+ Requires-Dist: httpx<1,>=0.24
47
+ Requires-Dist: keyring>=23.0
48
+ Requires-Dist: prompt-toolkit>=3.0.30
49
+ Requires-Dist: rich>=13.0
50
+ Provides-Extra: db
51
+ Requires-Dist: psycopg[binary]>=3.1; extra == 'db'
52
+ Requires-Dist: pymysql>=1.0; extra == 'db'
53
+ Provides-Extra: dev
54
+ Requires-Dist: build>=1.0; extra == 'dev'
55
+ Requires-Dist: pytest>=7; extra == 'dev'
56
+ Provides-Extra: mysql
57
+ Requires-Dist: pymysql>=1.0; extra == 'mysql'
58
+ Provides-Extra: postgres
59
+ Requires-Dist: psycopg[binary]>=3.1; extra == 'postgres'
60
+ Description-Content-Type: text/markdown
61
+
62
+ # Euron Code
63
+
64
+ An AI coding agent for your terminal, made for Euron students. Ask it to explain a codebase, fix a
65
+ bug, write tests or build a feature: it reads your files, proposes edits, runs commands and checks
66
+ its own work, asking you before it changes anything.
67
+
68
+ Euron Code runs on your computer. Only the conversation goes to Euron's model servers.
69
+
70
+ > **Requires Euron Plus or Super 30.** Euron Code is included with both. Get Plus at
71
+ > https://euron.one/plus
72
+
73
+ ## Install
74
+
75
+ Python 3.9 or newer, on Windows, macOS or Linux.
76
+
77
+ ```bash
78
+ pip install euron-code
79
+ # or, to keep it isolated from your projects:
80
+ pipx install euron-code
81
+ ```
82
+
83
+ Optional database drivers for the database explorer:
84
+
85
+ ```bash
86
+ pip install "euron-code[postgres]" # Postgres
87
+ pip install "euron-code[mysql]" # MySQL / MariaDB
88
+ ```
89
+
90
+ Check the install with `euron --version` and `euron doctor`.
91
+
92
+ ## Log in
93
+
94
+ ```bash
95
+ euron login
96
+ ```
97
+
98
+ Your browser opens a Euron page that shows a code (for example `WXYZ-1234`). Check that it matches
99
+ the code in your terminal and click **Approve**. The terminal finishes by itself. If no browser opens
100
+ (SSH, WSL), copy the link it prints into any browser where you are logged in to euron.one.
101
+
102
+ Your key is saved in the system keychain (Windows Credential Manager, macOS Keychain, Linux Secret
103
+ Service). If there is no keychain it goes in `~/.euron/credentials.json`, readable only by you.
104
+
105
+ ```bash
106
+ euron whoami # who you are logged in as, and your plan
107
+ euron logout # remove the key from this computer
108
+ ```
109
+
110
+ ## Use it
111
+
112
+ Open a terminal **in your project folder** and run:
113
+
114
+ ```bash
115
+ euron
116
+ ```
117
+
118
+ Then type what you want, for example:
119
+
120
+ - `explain how authentication works in this project`
121
+ - `the tests in tests/test_api.py fail, find out why and fix it`
122
+ - `add input validation to the signup form and a test for it`
123
+
124
+ Euron Code works step by step: it looks around, reads files, shows you a diff before each edit, and
125
+ asks before running commands. Answer:
126
+
127
+ | Key | Meaning |
128
+ |---|---|
129
+ | `y` | yes, once |
130
+ | `n` | no (you can then tell it what to do instead) |
131
+ | `a` | always allow this for the rest of the session |
132
+ | `p` | always allow commands starting the same way (e.g. every `npm test ...`) this session |
133
+ | `s` | always, and save the rule to `.euron/settings.local.json` |
134
+
135
+ Press **Esc** or **Ctrl-C** to stop a reply; the session stays open. **Ctrl-D** or `/exit` quits.
136
+ **Esc then Enter** inserts a newline.
137
+
138
+ ### Commands inside a session
139
+
140
+ | Command | What it does |
141
+ |---|---|
142
+ | `/help` | list commands |
143
+ | `/usage` | plan, tokens used today and your daily limit, reset time, last 30 days |
144
+ | `/cost` | tokens used in this session |
145
+ | `/model [id]` | show or switch the model |
146
+ | `/compact [focus]` | summarise the conversation to free context |
147
+ | `/clear` | start a fresh conversation |
148
+ | `/memory`, `/memory edit` | show or edit `EURON.md` memory |
149
+ | `/init` | let Euron Code explore the repo and write `EURON.md` |
150
+ | `/permissions` | show rules; `/permissions mode acceptEdits`, `/permissions allow "Bash(pytest:*)"` |
151
+ | `/thinking show\|collapse\|hide` | how the model's reasoning is displayed |
152
+ | `/todos` | the current task list |
153
+ | `/doctor` | check your setup |
154
+ | `/login`, `/logout`, `/exit` | |
155
+ | `# some note` | save a note to memory (asks: project or user) |
156
+
157
+ The bar at the bottom shows the model, tokens used this session, how full the context is, and how
158
+ many tokens you have left today.
159
+
160
+ ### Continue later
161
+
162
+ Every session is saved under `~/.euron/sessions/`.
163
+
164
+ ```bash
165
+ euron --continue # pick up the latest session in this folder
166
+ euron --resume # choose from a list
167
+ ```
168
+
169
+ ### Usage and limits
170
+
171
+ ```bash
172
+ euron usage
173
+ ```
174
+
175
+ shows your plan (Euron Plus / Super 30), tokens today out of your daily limit, what is left, when it
176
+ resets (in your local time), all-time totals and a day-by-day table for the last 30 days. The daily
177
+ allowance resets at midnight IST.
178
+
179
+ Euron Code sends one request at a time per student. When the servers are busy it waits and retries
180
+ by itself, and tells you.
181
+
182
+ ## Memory: EURON.md
183
+
184
+ Put project instructions in `EURON.md` at the project root (commands to build and test, conventions,
185
+ things to avoid). Euron Code reads it at the start of every session, together with `EURON.md` files in
186
+ parent folders up to the git root and your personal `~/.euron/EURON.md`. Run `/init` to have a first
187
+ version written for you.
188
+
189
+ ## Non-interactive use (scripts, CI)
190
+
191
+ ```bash
192
+ euron -p "summarise what this repo does"
193
+ git diff | euron -p "review this diff"
194
+ euron -p "run the tests and fix failures" --allowed-tools "Edit,Bash(pytest:*)" --max-turns 20
195
+ euron -p "list the API routes" --output-format json
196
+ ```
197
+
198
+ In `-p` mode nothing can ask you, so anything that needs permission is refused unless an allow rule
199
+ covers it (`--allowed-tools`, or settings). `--yolo` skips all prompts: only use it in a throwaway
200
+ folder or container.
201
+
202
+ Exit codes: `0` ok, `1` error, `2` bad usage, `3` no Euron Plus / Super 30 access, `4` not logged in or
203
+ key rejected, `5` daily token allowance used, `6` `--max-turns` reached, `130` interrupted.
204
+
205
+ ## Database explorer
206
+
207
+ Euron Code can look at your app's database while it works. SQLite files inside the project work
208
+ directly (`look at app.db and tell me which tables have no index`). For Postgres or MySQL, name a
209
+ connection in your settings; `${VAR}` reads from the environment so passwords stay out of the file:
210
+
211
+ ```bash
212
+ euron config set --project db.connections.app "postgresql://dev:${PGPASSWORD}@localhost:5432/app"
213
+ ```
214
+
215
+ It is **read-only**: only `SELECT`, `WITH`, `EXPLAIN`, `SHOW`, `PRAGMA` and similar are allowed, and
216
+ the connection itself is opened read-only. To let it write (local dev databases only), run
217
+ `euron config set db.allowWrites true`; every write statement still asks you first.
218
+
219
+ ## Settings
220
+
221
+ `euron config set <key> <value>` writes `~/.euron/settings.json` (add `--project` for
222
+ `.euron/settings.json` in the current folder). `euron config list` shows the merged result.
223
+
224
+ | Key | Default | |
225
+ |---|---|---|
226
+ | `model` | your account default | model id |
227
+ | `reasoning` | `collapse` | `show`, `collapse` or `hide` the model's thinking |
228
+ | `permissions.allow` / `permissions.deny` | `[]` | rules like `Edit`, `Bash(npm test:*)`, `WebFetch(domain:docs.python.org)`, `Read(~/notes/**)` |
229
+ | `permissions.defaultMode` | `default` | `default`, `acceptEdits` (edits inside the project need no prompt) or `yolo` |
230
+ | `bashTimeout` | `120` | seconds before a command is stopped |
231
+ | `shell` | auto | PowerShell on Windows, bash/zsh elsewhere; or `cmd`, `bash`, a path |
232
+ | `autoCompact` | `true` | summarise old turns when the context is 75% full |
233
+ | `webFetch` | `true` | allow the web page tool (it still asks per site) |
234
+ | `db.connections.<name>` | | database DSNs |
235
+
236
+ Environment variables: `EURON_CODE_API` (gateway URL, default
237
+ `https://api.euron.one/api/v1/code-agent`), `EURON_API_KEY` (use a key without logging in, for CI),
238
+ `EURON_HOME` (instead of `~/.euron`), `EURON_NO_BROWSER=1`.
239
+
240
+ ## In VS Code
241
+
242
+ Open your project folder in VS Code, then open the integrated terminal (**Ctrl+`**, or
243
+ **Terminal > New Terminal**) and run `euron`. It works in the folder VS Code opened, and edits show up
244
+ in the editor straight away. Tips:
245
+
246
+ - On Windows the integrated terminal is PowerShell by default; Euron Code runs commands with
247
+ PowerShell too. To use Git Bash instead: `euron config set shell bash`.
248
+ - If `euron` is not found after `pip install`, the Python `Scripts` folder is not on your PATH.
249
+ Use `python -m euron_code`, or install with `pipx` (`pipx ensurepath`), then restart VS Code.
250
+ - Keep your edits saved before asking Euron Code to change the same file.
251
+
252
+ ## Troubleshooting
253
+
254
+ | You see | What to do |
255
+ |---|---|
256
+ | `You don't have Euron Plus access...` | Euron Code needs Euron Plus or an active Super 30 enrolment: https://euron.one/plus |
257
+ | `not logged in` / `key was rejected` | run `euron login` again (keys can be revoked at euron.one/code-agent) |
258
+ | `servers are busy, retrying` | normal at peak times; it retries for you. If it gives up, try again in a few minutes |
259
+ | `Rate limit reached` | too many requests in one minute; it waits and retries |
260
+ | `today's token allowance` | you used today's limit; it resets at the time shown (midnight IST) |
261
+ | `The response stopped part-way` | the connection dropped mid-answer; nothing more was applied, send your message again |
262
+ | `euron: command not found` | see the VS Code tips above, or run `python -m euron_code` |
263
+ | garbled colours on old Windows consoles | use Windows Terminal or VS Code's terminal |
264
+
265
+ `euron doctor` checks Python, the connection, your login and plan, ripgrep (faster search; optional)
266
+ and the keychain.
267
+
268
+ ## Privacy and safety
269
+
270
+ - Your files are only sent as part of the conversation with Euron's model, and only what the agent
271
+ reads. Nothing is uploaded anywhere else. There is no telemetry.
272
+ - Your key is never printed in full and never logged.
273
+ - Edits and commands ask first. Files outside the project folder always ask, even to read.
274
+ - Text inside your files, web pages and command output is treated as data, not instructions.
275
+
276
+ ## Licence
277
+
278
+ Copyright (c) 2026 Euron. All rights reserved. See `LICENSE`.
@@ -0,0 +1,217 @@
1
+ # Euron Code
2
+
3
+ An AI coding agent for your terminal, made for Euron students. Ask it to explain a codebase, fix a
4
+ bug, write tests or build a feature: it reads your files, proposes edits, runs commands and checks
5
+ its own work, asking you before it changes anything.
6
+
7
+ Euron Code runs on your computer. Only the conversation goes to Euron's model servers.
8
+
9
+ > **Requires Euron Plus or Super 30.** Euron Code is included with both. Get Plus at
10
+ > https://euron.one/plus
11
+
12
+ ## Install
13
+
14
+ Python 3.9 or newer, on Windows, macOS or Linux.
15
+
16
+ ```bash
17
+ pip install euron-code
18
+ # or, to keep it isolated from your projects:
19
+ pipx install euron-code
20
+ ```
21
+
22
+ Optional database drivers for the database explorer:
23
+
24
+ ```bash
25
+ pip install "euron-code[postgres]" # Postgres
26
+ pip install "euron-code[mysql]" # MySQL / MariaDB
27
+ ```
28
+
29
+ Check the install with `euron --version` and `euron doctor`.
30
+
31
+ ## Log in
32
+
33
+ ```bash
34
+ euron login
35
+ ```
36
+
37
+ Your browser opens a Euron page that shows a code (for example `WXYZ-1234`). Check that it matches
38
+ the code in your terminal and click **Approve**. The terminal finishes by itself. If no browser opens
39
+ (SSH, WSL), copy the link it prints into any browser where you are logged in to euron.one.
40
+
41
+ Your key is saved in the system keychain (Windows Credential Manager, macOS Keychain, Linux Secret
42
+ Service). If there is no keychain it goes in `~/.euron/credentials.json`, readable only by you.
43
+
44
+ ```bash
45
+ euron whoami # who you are logged in as, and your plan
46
+ euron logout # remove the key from this computer
47
+ ```
48
+
49
+ ## Use it
50
+
51
+ Open a terminal **in your project folder** and run:
52
+
53
+ ```bash
54
+ euron
55
+ ```
56
+
57
+ Then type what you want, for example:
58
+
59
+ - `explain how authentication works in this project`
60
+ - `the tests in tests/test_api.py fail, find out why and fix it`
61
+ - `add input validation to the signup form and a test for it`
62
+
63
+ Euron Code works step by step: it looks around, reads files, shows you a diff before each edit, and
64
+ asks before running commands. Answer:
65
+
66
+ | Key | Meaning |
67
+ |---|---|
68
+ | `y` | yes, once |
69
+ | `n` | no (you can then tell it what to do instead) |
70
+ | `a` | always allow this for the rest of the session |
71
+ | `p` | always allow commands starting the same way (e.g. every `npm test ...`) this session |
72
+ | `s` | always, and save the rule to `.euron/settings.local.json` |
73
+
74
+ Press **Esc** or **Ctrl-C** to stop a reply; the session stays open. **Ctrl-D** or `/exit` quits.
75
+ **Esc then Enter** inserts a newline.
76
+
77
+ ### Commands inside a session
78
+
79
+ | Command | What it does |
80
+ |---|---|
81
+ | `/help` | list commands |
82
+ | `/usage` | plan, tokens used today and your daily limit, reset time, last 30 days |
83
+ | `/cost` | tokens used in this session |
84
+ | `/model [id]` | show or switch the model |
85
+ | `/compact [focus]` | summarise the conversation to free context |
86
+ | `/clear` | start a fresh conversation |
87
+ | `/memory`, `/memory edit` | show or edit `EURON.md` memory |
88
+ | `/init` | let Euron Code explore the repo and write `EURON.md` |
89
+ | `/permissions` | show rules; `/permissions mode acceptEdits`, `/permissions allow "Bash(pytest:*)"` |
90
+ | `/thinking show\|collapse\|hide` | how the model's reasoning is displayed |
91
+ | `/todos` | the current task list |
92
+ | `/doctor` | check your setup |
93
+ | `/login`, `/logout`, `/exit` | |
94
+ | `# some note` | save a note to memory (asks: project or user) |
95
+
96
+ The bar at the bottom shows the model, tokens used this session, how full the context is, and how
97
+ many tokens you have left today.
98
+
99
+ ### Continue later
100
+
101
+ Every session is saved under `~/.euron/sessions/`.
102
+
103
+ ```bash
104
+ euron --continue # pick up the latest session in this folder
105
+ euron --resume # choose from a list
106
+ ```
107
+
108
+ ### Usage and limits
109
+
110
+ ```bash
111
+ euron usage
112
+ ```
113
+
114
+ shows your plan (Euron Plus / Super 30), tokens today out of your daily limit, what is left, when it
115
+ resets (in your local time), all-time totals and a day-by-day table for the last 30 days. The daily
116
+ allowance resets at midnight IST.
117
+
118
+ Euron Code sends one request at a time per student. When the servers are busy it waits and retries
119
+ by itself, and tells you.
120
+
121
+ ## Memory: EURON.md
122
+
123
+ Put project instructions in `EURON.md` at the project root (commands to build and test, conventions,
124
+ things to avoid). Euron Code reads it at the start of every session, together with `EURON.md` files in
125
+ parent folders up to the git root and your personal `~/.euron/EURON.md`. Run `/init` to have a first
126
+ version written for you.
127
+
128
+ ## Non-interactive use (scripts, CI)
129
+
130
+ ```bash
131
+ euron -p "summarise what this repo does"
132
+ git diff | euron -p "review this diff"
133
+ euron -p "run the tests and fix failures" --allowed-tools "Edit,Bash(pytest:*)" --max-turns 20
134
+ euron -p "list the API routes" --output-format json
135
+ ```
136
+
137
+ In `-p` mode nothing can ask you, so anything that needs permission is refused unless an allow rule
138
+ covers it (`--allowed-tools`, or settings). `--yolo` skips all prompts: only use it in a throwaway
139
+ folder or container.
140
+
141
+ Exit codes: `0` ok, `1` error, `2` bad usage, `3` no Euron Plus / Super 30 access, `4` not logged in or
142
+ key rejected, `5` daily token allowance used, `6` `--max-turns` reached, `130` interrupted.
143
+
144
+ ## Database explorer
145
+
146
+ Euron Code can look at your app's database while it works. SQLite files inside the project work
147
+ directly (`look at app.db and tell me which tables have no index`). For Postgres or MySQL, name a
148
+ connection in your settings; `${VAR}` reads from the environment so passwords stay out of the file:
149
+
150
+ ```bash
151
+ euron config set --project db.connections.app "postgresql://dev:${PGPASSWORD}@localhost:5432/app"
152
+ ```
153
+
154
+ It is **read-only**: only `SELECT`, `WITH`, `EXPLAIN`, `SHOW`, `PRAGMA` and similar are allowed, and
155
+ the connection itself is opened read-only. To let it write (local dev databases only), run
156
+ `euron config set db.allowWrites true`; every write statement still asks you first.
157
+
158
+ ## Settings
159
+
160
+ `euron config set <key> <value>` writes `~/.euron/settings.json` (add `--project` for
161
+ `.euron/settings.json` in the current folder). `euron config list` shows the merged result.
162
+
163
+ | Key | Default | |
164
+ |---|---|---|
165
+ | `model` | your account default | model id |
166
+ | `reasoning` | `collapse` | `show`, `collapse` or `hide` the model's thinking |
167
+ | `permissions.allow` / `permissions.deny` | `[]` | rules like `Edit`, `Bash(npm test:*)`, `WebFetch(domain:docs.python.org)`, `Read(~/notes/**)` |
168
+ | `permissions.defaultMode` | `default` | `default`, `acceptEdits` (edits inside the project need no prompt) or `yolo` |
169
+ | `bashTimeout` | `120` | seconds before a command is stopped |
170
+ | `shell` | auto | PowerShell on Windows, bash/zsh elsewhere; or `cmd`, `bash`, a path |
171
+ | `autoCompact` | `true` | summarise old turns when the context is 75% full |
172
+ | `webFetch` | `true` | allow the web page tool (it still asks per site) |
173
+ | `db.connections.<name>` | | database DSNs |
174
+
175
+ Environment variables: `EURON_CODE_API` (gateway URL, default
176
+ `https://api.euron.one/api/v1/code-agent`), `EURON_API_KEY` (use a key without logging in, for CI),
177
+ `EURON_HOME` (instead of `~/.euron`), `EURON_NO_BROWSER=1`.
178
+
179
+ ## In VS Code
180
+
181
+ Open your project folder in VS Code, then open the integrated terminal (**Ctrl+`**, or
182
+ **Terminal > New Terminal**) and run `euron`. It works in the folder VS Code opened, and edits show up
183
+ in the editor straight away. Tips:
184
+
185
+ - On Windows the integrated terminal is PowerShell by default; Euron Code runs commands with
186
+ PowerShell too. To use Git Bash instead: `euron config set shell bash`.
187
+ - If `euron` is not found after `pip install`, the Python `Scripts` folder is not on your PATH.
188
+ Use `python -m euron_code`, or install with `pipx` (`pipx ensurepath`), then restart VS Code.
189
+ - Keep your edits saved before asking Euron Code to change the same file.
190
+
191
+ ## Troubleshooting
192
+
193
+ | You see | What to do |
194
+ |---|---|
195
+ | `You don't have Euron Plus access...` | Euron Code needs Euron Plus or an active Super 30 enrolment: https://euron.one/plus |
196
+ | `not logged in` / `key was rejected` | run `euron login` again (keys can be revoked at euron.one/code-agent) |
197
+ | `servers are busy, retrying` | normal at peak times; it retries for you. If it gives up, try again in a few minutes |
198
+ | `Rate limit reached` | too many requests in one minute; it waits and retries |
199
+ | `today's token allowance` | you used today's limit; it resets at the time shown (midnight IST) |
200
+ | `The response stopped part-way` | the connection dropped mid-answer; nothing more was applied, send your message again |
201
+ | `euron: command not found` | see the VS Code tips above, or run `python -m euron_code` |
202
+ | garbled colours on old Windows consoles | use Windows Terminal or VS Code's terminal |
203
+
204
+ `euron doctor` checks Python, the connection, your login and plan, ripgrep (faster search; optional)
205
+ and the keychain.
206
+
207
+ ## Privacy and safety
208
+
209
+ - Your files are only sent as part of the conversation with Euron's model, and only what the agent
210
+ reads. Nothing is uploaded anywhere else. There is no telemetry.
211
+ - Your key is never printed in full and never logged.
212
+ - Edits and commands ask first. Files outside the project folder always ask, even to read.
213
+ - Text inside your files, web pages and command output is treated as data, not instructions.
214
+
215
+ ## Licence
216
+
217
+ Copyright (c) 2026 Euron. All rights reserved. See `LICENSE`.
@@ -0,0 +1,56 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.18"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "euron-code"
7
+ version = "0.1.0"
8
+ description = "Euron Code: an agentic coding assistant in your terminal for Euron Plus and Super 30 students."
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = { file = "LICENSE" }
12
+ authors = [{ name = "Euron", email = "contact@euron.one" }]
13
+ keywords = ["euron", "coding agent", "cli", "ai", "assistant"]
14
+ classifiers = [
15
+ "Development Status :: 4 - Beta",
16
+ "Environment :: Console",
17
+ "Intended Audience :: Developers",
18
+ "Intended Audience :: Education",
19
+ "License :: Other/Proprietary License",
20
+ "Operating System :: OS Independent",
21
+ "Programming Language :: Python :: 3",
22
+ "Programming Language :: Python :: 3.9",
23
+ "Programming Language :: Python :: 3.10",
24
+ "Programming Language :: Python :: 3.11",
25
+ "Programming Language :: Python :: 3.12",
26
+ "Programming Language :: Python :: 3.13",
27
+ "Topic :: Software Development",
28
+ ]
29
+ dependencies = [
30
+ "httpx>=0.24,<1",
31
+ "rich>=13.0",
32
+ "prompt_toolkit>=3.0.30",
33
+ "keyring>=23.0",
34
+ ]
35
+
36
+ [project.optional-dependencies]
37
+ postgres = ["psycopg[binary]>=3.1"]
38
+ mysql = ["PyMySQL>=1.0"]
39
+ db = ["psycopg[binary]>=3.1", "PyMySQL>=1.0"]
40
+ dev = ["pytest>=7", "build>=1.0"]
41
+
42
+ [project.urls]
43
+ Homepage = "https://euron.one/code-agent"
44
+
45
+ [project.scripts]
46
+ euron = "euron_code.cli:main"
47
+
48
+ [tool.hatch.build.targets.wheel]
49
+ packages = ["src/euron_code"]
50
+
51
+ [tool.hatch.build.targets.sdist]
52
+ include = ["src/euron_code", "tests", "README.md", "LICENSE", "pyproject.toml"]
53
+
54
+ [tool.pytest.ini_options]
55
+ testpaths = ["tests"]
56
+ addopts = "-q"
@@ -0,0 +1,3 @@
1
+ """Euron Code: an agentic coding assistant for the terminal."""
2
+
3
+ __version__ = "0.1.0"
@@ -0,0 +1,4 @@
1
+ from euron_code.cli import main
2
+
3
+ if __name__ == "__main__":
4
+ raise SystemExit(main())