nanocode-cli 0.2.9__tar.gz → 0.3.20__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.
- {nanocode_cli-0.2.9/nanocode_cli.egg-info → nanocode_cli-0.3.20}/PKG-INFO +47 -33
- nanocode_cli-0.3.20/README.md +108 -0
- nanocode_cli-0.3.20/nanocode.py +7290 -0
- {nanocode_cli-0.2.9 → nanocode_cli-0.3.20/nanocode_cli.egg-info}/PKG-INFO +47 -33
- {nanocode_cli-0.2.9 → nanocode_cli-0.3.20}/nanocode_cli.egg-info/requires.txt +0 -1
- {nanocode_cli-0.2.9 → nanocode_cli-0.3.20}/pyproject.toml +1 -2
- nanocode_cli-0.2.9/README.md +0 -93
- nanocode_cli-0.2.9/nanocode.py +0 -4120
- {nanocode_cli-0.2.9 → nanocode_cli-0.3.20}/LICENSE +0 -0
- {nanocode_cli-0.2.9 → nanocode_cli-0.3.20}/MANIFEST.in +0 -0
- {nanocode_cli-0.2.9 → nanocode_cli-0.3.20}/nanocode_cli.egg-info/SOURCES.txt +0 -0
- {nanocode_cli-0.2.9 → nanocode_cli-0.3.20}/nanocode_cli.egg-info/dependency_links.txt +0 -0
- {nanocode_cli-0.2.9 → nanocode_cli-0.3.20}/nanocode_cli.egg-info/entry_points.txt +0 -0
- {nanocode_cli-0.2.9 → nanocode_cli-0.3.20}/nanocode_cli.egg-info/top_level.txt +0 -0
- {nanocode_cli-0.2.9 → nanocode_cli-0.3.20}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nanocode-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.20
|
|
4
4
|
Summary: A lightweight terminal-based AI coding assistant
|
|
5
5
|
Author-email: hit9 <hit9@icloud.com>
|
|
6
6
|
License-Expression: BSD-3-Clause
|
|
@@ -23,7 +23,6 @@ Description-Content-Type: text/markdown
|
|
|
23
23
|
License-File: LICENSE
|
|
24
24
|
Requires-Dist: json-repair>=0.39
|
|
25
25
|
Requires-Dist: prompt-toolkit>=3.0
|
|
26
|
-
Requires-Dist: typing-extensions>=4.7
|
|
27
26
|
Provides-Extra: dev
|
|
28
27
|
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
29
28
|
Requires-Dist: ruff>=0.4.0; extra == "dev"
|
|
@@ -35,6 +34,8 @@ A lightweight terminal-based AI coding assistant.
|
|
|
35
34
|
|
|
36
35
|
nanocode is used to help building itself, including features such as `@file` path completion.
|
|
37
36
|
|
|
37
|
+
Pre-1.0 note: nanocode is still evolving quickly. Functionality, commands, configuration, and behavior may change incompatibly before a 1.0 release.
|
|
38
|
+
|
|
38
39
|
## Screenshots
|
|
39
40
|
|
|
40
41
|
| | |
|
|
@@ -46,35 +47,7 @@ nanocode is used to help building itself, including features such as `@file` pat
|
|
|
46
47
|
- **Constrained Output**: Force model replies into auditable action frames.
|
|
47
48
|
- **Verified Edits**: Reject stale range edits before they touch files.
|
|
48
49
|
- **Autonomous Loop**: Chain reading, editing, running, and verification.
|
|
49
|
-
- **Live Telemetry**: Stream tool intent, token use,
|
|
50
|
-
|
|
51
|
-
## Tools
|
|
52
|
-
|
|
53
|
-
- File: `Read`, `LineCount`, `ListDir`, `Search`.
|
|
54
|
-
- Edit: `Edit`, `ReplaceRange`, `BatchReplaceRanges`, `ApplyPatch`.
|
|
55
|
-
- Shell: `Bash`, `Git`.
|
|
56
|
-
- Memory: `Blackboard`.
|
|
57
|
-
|
|
58
|
-
## Commands
|
|
59
|
-
|
|
60
|
-
- Info: `/help [question]`, `/status`.
|
|
61
|
-
- Session: `/compact`, `/blackboard [status|clear]`.
|
|
62
|
-
- Config: `/model`, `/compact-at`, `/reason`, `/reason_effort`, `/stream`, `/yolo`.
|
|
63
|
-
- Exit: `/exit`, `/quit`.
|
|
64
|
-
|
|
65
|
-
## Configuration
|
|
66
|
-
|
|
67
|
-
- Required: `NANOCODE_API_URL`, `NANOCODE_API_KEY`, `NANOCODE_MODEL`.
|
|
68
|
-
- Runtime: `NANOCODE_DIR`, `NANOCODE_TEMPERATURE`, `NANOCODE_STREAM`.
|
|
69
|
-
- Reasoning: `NANOCODE_REASONING`, `NANOCODE_REASONING_EFFORT`.
|
|
70
|
-
- Limits: `NANOCODE_MODEL_TIMEOUT`, `NANOCODE_SHELL_TIMEOUT`, `NANOCODE_COMPACT_AT`, `NANOCODE_MAX_AGENT_STEPS`.
|
|
71
|
-
- Cost: `NANOCODE_PROMPT_PRICE_PER_1M_TOKENS`, `NANOCODE_COMPLETION_PRICE_PER_1M_TOKENS`.
|
|
72
|
-
|
|
73
|
-
## Status
|
|
74
|
-
|
|
75
|
-
- Status bar: model, reasoning, context, tokens/cost, blackboard, elapsed time, and active model-call time.
|
|
76
|
-
- `/status`: model, reasoning, stream, yolo, conversation, tokens/cost, blackboard, goal, and verification.
|
|
77
|
-
|
|
50
|
+
- **Live Telemetry**: Stream tool intent, token use, and status.
|
|
78
51
|
|
|
79
52
|
## Install
|
|
80
53
|
|
|
@@ -115,10 +88,51 @@ Ask a source-aware question about nanocode itself:
|
|
|
115
88
|
/help how does compact work?
|
|
116
89
|
```
|
|
117
90
|
|
|
91
|
+
CLI arguments:
|
|
92
|
+
|
|
93
|
+
- `--yolo`: Skip tool execution confirmations.
|
|
94
|
+
- `--plan`: Plan changes without editing files or running commands.
|
|
95
|
+
- `--debug`: Write request prompts to the current session directory under `~/.nanocode/sessions/`.
|
|
96
|
+
- `--config <path>`: Path to config file (default: `~/.nanocode/config.toml`).
|
|
97
|
+
- `--init-config`: Create a default config file.
|
|
98
|
+
- `-v`, `--version`: Show program version.
|
|
99
|
+
|
|
118
100
|
## Safety
|
|
119
101
|
|
|
120
|
-
nanocode does
|
|
102
|
+
nanocode does NOT provide sandbox protection. It can run shell commands and edit files in the environment where you start it.
|
|
121
103
|
|
|
122
104
|
If you do not fully trust the model, tools, prompts, or workspace, run nanocode inside your own sandbox, container, VM, or other isolated environment.
|
|
123
105
|
|
|
124
|
-
|
|
106
|
+
USE AT YOUR OWN RISK.
|
|
107
|
+
|
|
108
|
+
## Tools
|
|
109
|
+
|
|
110
|
+
- File: `Read`, `LineCount`, `ListDir`, `Search`.
|
|
111
|
+
- Edit: `Edit`, `ReplaceRange`, `ApplyPatch`.
|
|
112
|
+
- Shell: `Bash`, `Git`.
|
|
113
|
+
- Memory: `Recall` reads stored tool results by key.
|
|
114
|
+
|
|
115
|
+
## Commands
|
|
116
|
+
|
|
117
|
+
- Info: `/help [question]`, `/status`, `/rules`, `/knowledge [update]`, `/compact`.
|
|
118
|
+
- Config: `/config`, `/set <key> <value>`, `/model [model_name]`, `/reason`, `/provider [name]`, `/plan [on|off|question]`, `/yolo`.
|
|
119
|
+
- Maintenance: `/clean`.
|
|
120
|
+
- Exit: `/exit`, `/quit`.
|
|
121
|
+
|
|
122
|
+
`/model` selects from the active provider's `available_models` when configured. `/model <model_name>` sets a model directly. Changing model also opens a reasoning effort selector: choose `off` to disable reasoning, or choose an effort to enable reasoning and set it. Use `/reason` to change reasoning without changing model.
|
|
123
|
+
|
|
124
|
+
## Configuration
|
|
125
|
+
|
|
126
|
+
Run `nanocode --init-config` to create `~/.nanocode/config.toml`.
|
|
127
|
+
|
|
128
|
+
- Provider config: `[provider] active = "<name>"` plus `[provider.<name>]` url, key, model, `available_models`, and model options.
|
|
129
|
+
- Path config: `[paths] data_dir = "~/.nanocode"`.
|
|
130
|
+
- Runtime config: `[runtime]`.
|
|
131
|
+
- Session data: debug prompts and tool-result logs are stored under `~/.nanocode/sessions/<session_id>/`.
|
|
132
|
+
- Tool-result logs from inactive sessions are auto-cleaned after `runtime.auto_clean_recent` (default `3d`; use `off` to disable). `/clean` removes inactive session logs immediately.
|
|
133
|
+
- Project data: user rules are stored under `~/.nanocode/projects/<project_key>/`.
|
|
134
|
+
|
|
135
|
+
## Status
|
|
136
|
+
|
|
137
|
+
- Status bar: active model, reasoning, active yolo/plan modes, conversation context, current-turn tool calls, tokens, elapsed time, and active model-call time.
|
|
138
|
+
- `/status`: active provider, model state, session id, runtime state, conversation/tool counters, per-model calls/tokens, task, goal, and verification.
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# nanocode
|
|
2
|
+
|
|
3
|
+
A lightweight terminal-based AI coding assistant.
|
|
4
|
+
|
|
5
|
+
nanocode is used to help building itself, including features such as `@file` path completion.
|
|
6
|
+
|
|
7
|
+
Pre-1.0 note: nanocode is still evolving quickly. Functionality, commands, configuration, and behavior may change incompatibly before a 1.0 release.
|
|
8
|
+
|
|
9
|
+
## Screenshots
|
|
10
|
+
|
|
11
|
+
| | |
|
|
12
|
+
|---|---|
|
|
13
|
+
|  |  |
|
|
14
|
+
|
|
15
|
+
## Features
|
|
16
|
+
|
|
17
|
+
- **Constrained Output**: Force model replies into auditable action frames.
|
|
18
|
+
- **Verified Edits**: Reject stale range edits before they touch files.
|
|
19
|
+
- **Autonomous Loop**: Chain reading, editing, running, and verification.
|
|
20
|
+
- **Live Telemetry**: Stream tool intent, token use, and status.
|
|
21
|
+
|
|
22
|
+
## Install
|
|
23
|
+
|
|
24
|
+
```sh
|
|
25
|
+
uv tool install nanocode-cli
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Upgrade an existing install:
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
uv tool upgrade nanocode-cli
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
For local development:
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
uv sync --extra dev
|
|
38
|
+
uv run nanocode
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Usage
|
|
42
|
+
|
|
43
|
+
Start nanocode:
|
|
44
|
+
|
|
45
|
+
```sh
|
|
46
|
+
nanocode
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Show available commands:
|
|
50
|
+
|
|
51
|
+
```text
|
|
52
|
+
/help
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Ask a source-aware question about nanocode itself:
|
|
56
|
+
|
|
57
|
+
```text
|
|
58
|
+
/help how does compact work?
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
CLI arguments:
|
|
62
|
+
|
|
63
|
+
- `--yolo`: Skip tool execution confirmations.
|
|
64
|
+
- `--plan`: Plan changes without editing files or running commands.
|
|
65
|
+
- `--debug`: Write request prompts to the current session directory under `~/.nanocode/sessions/`.
|
|
66
|
+
- `--config <path>`: Path to config file (default: `~/.nanocode/config.toml`).
|
|
67
|
+
- `--init-config`: Create a default config file.
|
|
68
|
+
- `-v`, `--version`: Show program version.
|
|
69
|
+
|
|
70
|
+
## Safety
|
|
71
|
+
|
|
72
|
+
nanocode does NOT provide sandbox protection. It can run shell commands and edit files in the environment where you start it.
|
|
73
|
+
|
|
74
|
+
If you do not fully trust the model, tools, prompts, or workspace, run nanocode inside your own sandbox, container, VM, or other isolated environment.
|
|
75
|
+
|
|
76
|
+
USE AT YOUR OWN RISK.
|
|
77
|
+
|
|
78
|
+
## Tools
|
|
79
|
+
|
|
80
|
+
- File: `Read`, `LineCount`, `ListDir`, `Search`.
|
|
81
|
+
- Edit: `Edit`, `ReplaceRange`, `ApplyPatch`.
|
|
82
|
+
- Shell: `Bash`, `Git`.
|
|
83
|
+
- Memory: `Recall` reads stored tool results by key.
|
|
84
|
+
|
|
85
|
+
## Commands
|
|
86
|
+
|
|
87
|
+
- Info: `/help [question]`, `/status`, `/rules`, `/knowledge [update]`, `/compact`.
|
|
88
|
+
- Config: `/config`, `/set <key> <value>`, `/model [model_name]`, `/reason`, `/provider [name]`, `/plan [on|off|question]`, `/yolo`.
|
|
89
|
+
- Maintenance: `/clean`.
|
|
90
|
+
- Exit: `/exit`, `/quit`.
|
|
91
|
+
|
|
92
|
+
`/model` selects from the active provider's `available_models` when configured. `/model <model_name>` sets a model directly. Changing model also opens a reasoning effort selector: choose `off` to disable reasoning, or choose an effort to enable reasoning and set it. Use `/reason` to change reasoning without changing model.
|
|
93
|
+
|
|
94
|
+
## Configuration
|
|
95
|
+
|
|
96
|
+
Run `nanocode --init-config` to create `~/.nanocode/config.toml`.
|
|
97
|
+
|
|
98
|
+
- Provider config: `[provider] active = "<name>"` plus `[provider.<name>]` url, key, model, `available_models`, and model options.
|
|
99
|
+
- Path config: `[paths] data_dir = "~/.nanocode"`.
|
|
100
|
+
- Runtime config: `[runtime]`.
|
|
101
|
+
- Session data: debug prompts and tool-result logs are stored under `~/.nanocode/sessions/<session_id>/`.
|
|
102
|
+
- Tool-result logs from inactive sessions are auto-cleaned after `runtime.auto_clean_recent` (default `3d`; use `off` to disable). `/clean` removes inactive session logs immediately.
|
|
103
|
+
- Project data: user rules are stored under `~/.nanocode/projects/<project_key>/`.
|
|
104
|
+
|
|
105
|
+
## Status
|
|
106
|
+
|
|
107
|
+
- Status bar: active model, reasoning, active yolo/plan modes, conversation context, current-turn tool calls, tokens, elapsed time, and active model-call time.
|
|
108
|
+
- `/status`: active provider, model state, session id, runtime state, conversation/tool counters, per-model calls/tokens, task, goal, and verification.
|