nanocode-cli 0.3.35__tar.gz → 0.4.9__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.3.35/nanocode_cli.egg-info → nanocode_cli-0.4.9}/PKG-INFO +26 -17
- {nanocode_cli-0.3.35 → nanocode_cli-0.4.9}/README.md +22 -15
- {nanocode_cli-0.3.35 → nanocode_cli-0.4.9}/nanocode.py +3771 -3389
- {nanocode_cli-0.3.35 → nanocode_cli-0.4.9/nanocode_cli.egg-info}/PKG-INFO +26 -17
- nanocode_cli-0.4.9/nanocode_cli.egg-info/requires.txt +8 -0
- {nanocode_cli-0.3.35 → nanocode_cli-0.4.9}/pyproject.toml +4 -2
- nanocode_cli-0.3.35/nanocode_cli.egg-info/requires.txt +0 -6
- {nanocode_cli-0.3.35 → nanocode_cli-0.4.9}/LICENSE +0 -0
- {nanocode_cli-0.3.35 → nanocode_cli-0.4.9}/MANIFEST.in +0 -0
- {nanocode_cli-0.3.35 → nanocode_cli-0.4.9}/nanocode_cli.egg-info/SOURCES.txt +0 -0
- {nanocode_cli-0.3.35 → nanocode_cli-0.4.9}/nanocode_cli.egg-info/dependency_links.txt +0 -0
- {nanocode_cli-0.3.35 → nanocode_cli-0.4.9}/nanocode_cli.egg-info/entry_points.txt +0 -0
- {nanocode_cli-0.3.35 → nanocode_cli-0.4.9}/nanocode_cli.egg-info/top_level.txt +0 -0
- {nanocode_cli-0.3.35 → nanocode_cli-0.4.9}/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.4.9
|
|
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
|
|
@@ -21,8 +21,10 @@ Classifier: Topic :: Terminals
|
|
|
21
21
|
Requires-Python: >=3.11
|
|
22
22
|
Description-Content-Type: text/markdown
|
|
23
23
|
License-File: LICENSE
|
|
24
|
-
Requires-Dist:
|
|
24
|
+
Requires-Dist: code-symbol-index>=0.1.13
|
|
25
|
+
Requires-Dist: openai>=2.37.0
|
|
25
26
|
Requires-Dist: prompt-toolkit>=3.0
|
|
27
|
+
Requires-Dist: socksio>=1.0.0
|
|
26
28
|
Provides-Extra: dev
|
|
27
29
|
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
28
30
|
Requires-Dist: ruff>=0.4.0; extra == "dev"
|
|
@@ -32,7 +34,7 @@ Dynamic: license-file
|
|
|
32
34
|
|
|
33
35
|
A lightweight terminal-based AI coding assistant.
|
|
34
36
|
|
|
35
|
-
nanocode is used to help building itself
|
|
37
|
+
nanocode is used to help building itself.
|
|
36
38
|
|
|
37
39
|
Pre-1.0 note: nanocode is still evolving quickly. Functionality, commands, configuration, and behavior may change incompatibly before a 1.0 release.
|
|
38
40
|
|
|
@@ -44,9 +46,9 @@ Pre-1.0 note: nanocode is still evolving quickly. Functionality, commands, confi
|
|
|
44
46
|
|
|
45
47
|
## Features
|
|
46
48
|
|
|
47
|
-
- **
|
|
49
|
+
- **Function Tools**: Route model decisions through auditable tools.
|
|
48
50
|
- **Verified Edits**: Reject stale range edits before they touch files.
|
|
49
|
-
- **Autonomous Loop**: Chain reading, editing, running, and
|
|
51
|
+
- **Autonomous Loop**: Chain reading, editing, running, and checks.
|
|
50
52
|
- **Live Telemetry**: Stream tool intent, token use, and status.
|
|
51
53
|
|
|
52
54
|
## Install
|
|
@@ -91,7 +93,6 @@ Ask a source-aware question about nanocode itself:
|
|
|
91
93
|
CLI arguments:
|
|
92
94
|
|
|
93
95
|
- `--yolo`: Skip tool execution confirmations.
|
|
94
|
-
- `--plan`: Plan changes without editing files or running commands.
|
|
95
96
|
- `--debug`: Write request prompts to the current session directory under `~/.nanocode/sessions/`.
|
|
96
97
|
- `--config <path>`: Path to config file (default: `~/.nanocode/config.toml`).
|
|
97
98
|
- `--init-config`: Create a default config file.
|
|
@@ -105,34 +106,42 @@ If you do not fully trust the model, tools, prompts, or workspace, run nanocode
|
|
|
105
106
|
|
|
106
107
|
USE AT YOUR OWN RISK.
|
|
107
108
|
|
|
109
|
+
nanocode currently targets macOS and Linux. Windows is not supported.
|
|
110
|
+
|
|
108
111
|
## Tools
|
|
109
112
|
|
|
110
|
-
- File: `Read`, `LineCount`, `
|
|
111
|
-
-
|
|
113
|
+
- File: `Read`, `LineCount`, `List`, `Search`.
|
|
114
|
+
- Code navigation: `InspectCode` after `/index` builds the project index.
|
|
115
|
+
- Edit: `CreateFile`, `EditFile`.
|
|
112
116
|
- Shell: `Bash`, `Git`.
|
|
113
117
|
- Memory: `Recall` reads stored tool results by key.
|
|
114
118
|
|
|
119
|
+
`Search`, `Read`, and `InspectCode` mode=inspect return 0-based `line:hash|code` lines that can be used as edit anchors. For broad mechanical text replacement, shell text pipelines are acceptable when followed by a focused diff or test.
|
|
120
|
+
|
|
115
121
|
## Commands
|
|
116
122
|
|
|
117
|
-
- Info: `/help [question]`, `/status`, `/rules`, `/
|
|
118
|
-
- Config: `/config`, `/set <key> <value>`, `/model [model_name]`, `/reason`, `/
|
|
119
|
-
- Maintenance: `/clean`.
|
|
123
|
+
- Info: `/help [question]`, `/status`, `/rules`, `/compact`.
|
|
124
|
+
- Config: `/config`, `/set <key> <value>`, `/api [auto|chat|responses]`, `/model [model_name]`, `/reason`, `/reason-payload [value]`, `/provider [name]`, `/yolo`.
|
|
125
|
+
- Maintenance: `/index [force]`, `/clean`.
|
|
120
126
|
- Exit: `/exit`, `/quit`.
|
|
121
127
|
|
|
122
|
-
Selectors support `j`/`k`, arrows, `/keyword`, Enter, and Esc. `/model` lists configured models before discovered ones, then prompts for reasoning
|
|
128
|
+
Selectors support `j`/`k`, arrows, `/keyword`, Enter, and Esc. `/api responses` switches the current provider to Responses format. `/reason` sets `provider.reasoning` to `off` or an effort value; `/reason-payload` controls the Chat-only reasoning payload shape. `/model` lists configured models before discovered ones, then prompts for reasoning.
|
|
129
|
+
During a slow model request, press `Ctrl-G` to cancel that request and resend the same prompt.
|
|
123
130
|
|
|
124
131
|
## Configuration
|
|
125
132
|
|
|
126
133
|
Run `nanocode --init-config` to create `~/.nanocode/config.toml`.
|
|
127
134
|
|
|
128
|
-
- Provider config: `[provider] active = "<name>"` plus `[provider.<name>]` url, key, model, `available_models`, and model options. `
|
|
135
|
+
- Provider config: `[provider] active = "<name>"` plus `[provider.<name>]` url, key, model, `available_models`, and model options. `api` selects `chat`, `responses`, or `auto`; auto uses exact-host profiles. Responses uses standard `reasoning.effort`; Chat reasoning is mapped by provider/model profile when known.
|
|
136
|
+
- Provider auto-detection covers common providers: OpenAI/OpenRouter prefer Responses API; DeepSeek, selected OpenCode models, and DashScope models use their matching Chat reasoning payload shapes.
|
|
129
137
|
- Path config: `[paths] data_dir = "~/.nanocode"`.
|
|
130
138
|
- Runtime config: `[runtime]`.
|
|
139
|
+
- `/context [low|medium|high]` shows or switches tool-result context budgets; lower budgets reduce token usage and observe overhead.
|
|
131
140
|
- Session data: debug prompts and tool-result logs are stored under `~/.nanocode/sessions/<session_id>/`.
|
|
132
|
-
-
|
|
133
|
-
- Project data: user rules are stored under `~/.nanocode/projects/<project_key>/`.
|
|
141
|
+
- Old inactive session directories are auto-cleaned after `runtime.auto_clean_recent` (default `1d`; use `off` to disable). `/clean` removes inactive sessions immediately.
|
|
142
|
+
- Project data: user rules and code indexes are stored under `~/.nanocode/projects/<project_key>/`.
|
|
134
143
|
|
|
135
144
|
## Status
|
|
136
145
|
|
|
137
|
-
- Status bar: active model, reasoning, active yolo
|
|
138
|
-
- `/status`: active provider, model state, session id, runtime state, conversation/tool counters, per-model calls/tokens,
|
|
146
|
+
- Status bar: active model, reasoning, active yolo mode, conversation context, current-turn tool calls, tokens, elapsed time, and active model-call time.
|
|
147
|
+
- `/status`: active provider, model state, session id, runtime state, conversation/tool counters, per-model calls/tokens, goal, and checks.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A lightweight terminal-based AI coding assistant.
|
|
4
4
|
|
|
5
|
-
nanocode is used to help building itself
|
|
5
|
+
nanocode is used to help building itself.
|
|
6
6
|
|
|
7
7
|
Pre-1.0 note: nanocode is still evolving quickly. Functionality, commands, configuration, and behavior may change incompatibly before a 1.0 release.
|
|
8
8
|
|
|
@@ -14,9 +14,9 @@ Pre-1.0 note: nanocode is still evolving quickly. Functionality, commands, confi
|
|
|
14
14
|
|
|
15
15
|
## Features
|
|
16
16
|
|
|
17
|
-
- **
|
|
17
|
+
- **Function Tools**: Route model decisions through auditable tools.
|
|
18
18
|
- **Verified Edits**: Reject stale range edits before they touch files.
|
|
19
|
-
- **Autonomous Loop**: Chain reading, editing, running, and
|
|
19
|
+
- **Autonomous Loop**: Chain reading, editing, running, and checks.
|
|
20
20
|
- **Live Telemetry**: Stream tool intent, token use, and status.
|
|
21
21
|
|
|
22
22
|
## Install
|
|
@@ -61,7 +61,6 @@ Ask a source-aware question about nanocode itself:
|
|
|
61
61
|
CLI arguments:
|
|
62
62
|
|
|
63
63
|
- `--yolo`: Skip tool execution confirmations.
|
|
64
|
-
- `--plan`: Plan changes without editing files or running commands.
|
|
65
64
|
- `--debug`: Write request prompts to the current session directory under `~/.nanocode/sessions/`.
|
|
66
65
|
- `--config <path>`: Path to config file (default: `~/.nanocode/config.toml`).
|
|
67
66
|
- `--init-config`: Create a default config file.
|
|
@@ -75,34 +74,42 @@ If you do not fully trust the model, tools, prompts, or workspace, run nanocode
|
|
|
75
74
|
|
|
76
75
|
USE AT YOUR OWN RISK.
|
|
77
76
|
|
|
77
|
+
nanocode currently targets macOS and Linux. Windows is not supported.
|
|
78
|
+
|
|
78
79
|
## Tools
|
|
79
80
|
|
|
80
|
-
- File: `Read`, `LineCount`, `
|
|
81
|
-
-
|
|
81
|
+
- File: `Read`, `LineCount`, `List`, `Search`.
|
|
82
|
+
- Code navigation: `InspectCode` after `/index` builds the project index.
|
|
83
|
+
- Edit: `CreateFile`, `EditFile`.
|
|
82
84
|
- Shell: `Bash`, `Git`.
|
|
83
85
|
- Memory: `Recall` reads stored tool results by key.
|
|
84
86
|
|
|
87
|
+
`Search`, `Read`, and `InspectCode` mode=inspect return 0-based `line:hash|code` lines that can be used as edit anchors. For broad mechanical text replacement, shell text pipelines are acceptable when followed by a focused diff or test.
|
|
88
|
+
|
|
85
89
|
## Commands
|
|
86
90
|
|
|
87
|
-
- Info: `/help [question]`, `/status`, `/rules`, `/
|
|
88
|
-
- Config: `/config`, `/set <key> <value>`, `/model [model_name]`, `/reason`, `/
|
|
89
|
-
- Maintenance: `/clean`.
|
|
91
|
+
- Info: `/help [question]`, `/status`, `/rules`, `/compact`.
|
|
92
|
+
- Config: `/config`, `/set <key> <value>`, `/api [auto|chat|responses]`, `/model [model_name]`, `/reason`, `/reason-payload [value]`, `/provider [name]`, `/yolo`.
|
|
93
|
+
- Maintenance: `/index [force]`, `/clean`.
|
|
90
94
|
- Exit: `/exit`, `/quit`.
|
|
91
95
|
|
|
92
|
-
Selectors support `j`/`k`, arrows, `/keyword`, Enter, and Esc. `/model` lists configured models before discovered ones, then prompts for reasoning
|
|
96
|
+
Selectors support `j`/`k`, arrows, `/keyword`, Enter, and Esc. `/api responses` switches the current provider to Responses format. `/reason` sets `provider.reasoning` to `off` or an effort value; `/reason-payload` controls the Chat-only reasoning payload shape. `/model` lists configured models before discovered ones, then prompts for reasoning.
|
|
97
|
+
During a slow model request, press `Ctrl-G` to cancel that request and resend the same prompt.
|
|
93
98
|
|
|
94
99
|
## Configuration
|
|
95
100
|
|
|
96
101
|
Run `nanocode --init-config` to create `~/.nanocode/config.toml`.
|
|
97
102
|
|
|
98
|
-
- Provider config: `[provider] active = "<name>"` plus `[provider.<name>]` url, key, model, `available_models`, and model options. `
|
|
103
|
+
- Provider config: `[provider] active = "<name>"` plus `[provider.<name>]` url, key, model, `available_models`, and model options. `api` selects `chat`, `responses`, or `auto`; auto uses exact-host profiles. Responses uses standard `reasoning.effort`; Chat reasoning is mapped by provider/model profile when known.
|
|
104
|
+
- Provider auto-detection covers common providers: OpenAI/OpenRouter prefer Responses API; DeepSeek, selected OpenCode models, and DashScope models use their matching Chat reasoning payload shapes.
|
|
99
105
|
- Path config: `[paths] data_dir = "~/.nanocode"`.
|
|
100
106
|
- Runtime config: `[runtime]`.
|
|
107
|
+
- `/context [low|medium|high]` shows or switches tool-result context budgets; lower budgets reduce token usage and observe overhead.
|
|
101
108
|
- Session data: debug prompts and tool-result logs are stored under `~/.nanocode/sessions/<session_id>/`.
|
|
102
|
-
-
|
|
103
|
-
- Project data: user rules are stored under `~/.nanocode/projects/<project_key>/`.
|
|
109
|
+
- Old inactive session directories are auto-cleaned after `runtime.auto_clean_recent` (default `1d`; use `off` to disable). `/clean` removes inactive sessions immediately.
|
|
110
|
+
- Project data: user rules and code indexes are stored under `~/.nanocode/projects/<project_key>/`.
|
|
104
111
|
|
|
105
112
|
## Status
|
|
106
113
|
|
|
107
|
-
- Status bar: active model, reasoning, active yolo
|
|
108
|
-
- `/status`: active provider, model state, session id, runtime state, conversation/tool counters, per-model calls/tokens,
|
|
114
|
+
- Status bar: active model, reasoning, active yolo mode, conversation context, current-turn tool calls, tokens, elapsed time, and active model-call time.
|
|
115
|
+
- `/status`: active provider, model state, session id, runtime state, conversation/tool counters, per-model calls/tokens, goal, and checks.
|