nanocode-cli 0.2.8__tar.gz → 0.3.16__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nanocode-cli
3
- Version: 0.2.8
3
+ Version: 0.3.16
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"
@@ -41,6 +40,13 @@ nanocode is used to help building itself, including features such as `@file` pat
41
40
  |---|---|
42
41
  | ![Screenshot 1](https://raw.githubusercontent.com/hit9/nanocode/master/snapshots/nanocode-snapshot1.png) | ![Screenshot 2](https://raw.githubusercontent.com/hit9/nanocode/master/snapshots/nanocode-snapshot2.png) |
43
42
 
43
+ ## Features
44
+
45
+ - **Constrained Output**: Force model replies into auditable action frames.
46
+ - **Verified Edits**: Reject stale range edits before they touch files.
47
+ - **Autonomous Loop**: Chain reading, editing, running, and verification.
48
+ - **Live Telemetry**: Stream tool intent, token use, and status.
49
+
44
50
  ## Install
45
51
 
46
52
  ```sh
@@ -60,29 +66,6 @@ uv sync --extra dev
60
66
  uv run nanocode
61
67
  ```
62
68
 
63
- ## Environment Variables
64
-
65
- Required:
66
-
67
- ```sh
68
- export NANOCODE_API_URL="https://api.example.com/v1"
69
- export NANOCODE_API_KEY="your-api-key"
70
- export NANOCODE_MODEL="your-model"
71
- ```
72
-
73
- Optional:
74
-
75
- ```sh
76
- export NANOCODE_DIR=".nanocode"
77
- export NANOCODE_TEMPERATURE="0.7"
78
- export NANOCODE_REASONING="on"
79
- export NANOCODE_REASONING_EFFORT="medium"
80
- export NANOCODE_STREAM="on"
81
- export NANOCODE_MODEL_TIMEOUT="60"
82
- export NANOCODE_SHELL_TIMEOUT="60"
83
- export NANOCODE_COMPACT_AT="100"
84
- ```
85
-
86
69
  ## Usage
87
70
 
88
71
  Start nanocode:
@@ -103,10 +86,44 @@ Ask a source-aware question about nanocode itself:
103
86
  /help how does compact work?
104
87
  ```
105
88
 
89
+ CLI arguments:
90
+
91
+ - `--yolo`: Skip tool execution confirmations.
92
+ - `--debug`: Write request prompts to `.nanocode/debug`.
93
+ - `--config <path>`: Path to config file (default: `~/.nanocode/config.toml`).
94
+ - `--init-config`: Create a default config file.
95
+ - `-v`, `--version`: Show program version.
96
+
106
97
  ## Safety
107
98
 
108
- nanocode does not provide sandbox protection. It can run shell commands and edit files in the environment where you start it.
99
+ nanocode does NOT provide sandbox protection. It can run shell commands and edit files in the environment where you start it.
109
100
 
110
101
  If you do not fully trust the model, tools, prompts, or workspace, run nanocode inside your own sandbox, container, VM, or other isolated environment.
111
102
 
112
- Use at your own risk.
103
+ USE AT YOUR OWN RISK.
104
+
105
+ ## Tools
106
+
107
+ - File: `Read`, `LineCount`, `ListDir`, `Search`.
108
+ - Edit: `Edit`, `ReplaceRange`, `ApplyPatch`.
109
+ - Shell: `Bash`, `Git`.
110
+ - Memory: `Recall` reads stored tool results by key.
111
+
112
+ ## Commands
113
+
114
+ - Info: `/help [question]`, `/status`, `/rules`, `/knowledge [update]`, `/compact`.
115
+ - Config: `/config`, `/set <key> <value>`, `/model [model_name]`, `/provider [name]`, `/yolo`.
116
+ - Maintenance: `/clean-logs`.
117
+ - Exit: `/exit`, `/quit`.
118
+
119
+ ## Configuration
120
+
121
+ Run `nanocode --init-config` to create `~/.nanocode/config.toml`.
122
+
123
+ - Provider config: `[provider] active = "<name>"` plus `[provider.<name>]` url, key, model, and model options.
124
+ - Runtime config: `[paths]` and `[runtime]`.
125
+
126
+ ## Status
127
+
128
+ - Status bar: active model, reasoning, conversation context, current-turn tool calls, tokens, elapsed time, and active model-call time.
129
+ - `/status`: active provider, model state, runtime state, conversation/tool counters, per-model calls/tokens, task, goal, and verification.
@@ -0,0 +1,99 @@
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
+ ## Screenshots
8
+
9
+ | | |
10
+ |---|---|
11
+ | ![Screenshot 1](https://raw.githubusercontent.com/hit9/nanocode/master/snapshots/nanocode-snapshot1.png) | ![Screenshot 2](https://raw.githubusercontent.com/hit9/nanocode/master/snapshots/nanocode-snapshot2.png) |
12
+
13
+ ## Features
14
+
15
+ - **Constrained Output**: Force model replies into auditable action frames.
16
+ - **Verified Edits**: Reject stale range edits before they touch files.
17
+ - **Autonomous Loop**: Chain reading, editing, running, and verification.
18
+ - **Live Telemetry**: Stream tool intent, token use, and status.
19
+
20
+ ## Install
21
+
22
+ ```sh
23
+ uv tool install nanocode-cli
24
+ ```
25
+
26
+ Upgrade an existing install:
27
+
28
+ ```sh
29
+ uv tool upgrade nanocode-cli
30
+ ```
31
+
32
+ For local development:
33
+
34
+ ```sh
35
+ uv sync --extra dev
36
+ uv run nanocode
37
+ ```
38
+
39
+ ## Usage
40
+
41
+ Start nanocode:
42
+
43
+ ```sh
44
+ nanocode
45
+ ```
46
+
47
+ Show available commands:
48
+
49
+ ```text
50
+ /help
51
+ ```
52
+
53
+ Ask a source-aware question about nanocode itself:
54
+
55
+ ```text
56
+ /help how does compact work?
57
+ ```
58
+
59
+ CLI arguments:
60
+
61
+ - `--yolo`: Skip tool execution confirmations.
62
+ - `--debug`: Write request prompts to `.nanocode/debug`.
63
+ - `--config <path>`: Path to config file (default: `~/.nanocode/config.toml`).
64
+ - `--init-config`: Create a default config file.
65
+ - `-v`, `--version`: Show program version.
66
+
67
+ ## Safety
68
+
69
+ nanocode does NOT provide sandbox protection. It can run shell commands and edit files in the environment where you start it.
70
+
71
+ If you do not fully trust the model, tools, prompts, or workspace, run nanocode inside your own sandbox, container, VM, or other isolated environment.
72
+
73
+ USE AT YOUR OWN RISK.
74
+
75
+ ## Tools
76
+
77
+ - File: `Read`, `LineCount`, `ListDir`, `Search`.
78
+ - Edit: `Edit`, `ReplaceRange`, `ApplyPatch`.
79
+ - Shell: `Bash`, `Git`.
80
+ - Memory: `Recall` reads stored tool results by key.
81
+
82
+ ## Commands
83
+
84
+ - Info: `/help [question]`, `/status`, `/rules`, `/knowledge [update]`, `/compact`.
85
+ - Config: `/config`, `/set <key> <value>`, `/model [model_name]`, `/provider [name]`, `/yolo`.
86
+ - Maintenance: `/clean-logs`.
87
+ - Exit: `/exit`, `/quit`.
88
+
89
+ ## Configuration
90
+
91
+ Run `nanocode --init-config` to create `~/.nanocode/config.toml`.
92
+
93
+ - Provider config: `[provider] active = "<name>"` plus `[provider.<name>]` url, key, model, and model options.
94
+ - Runtime config: `[paths]` and `[runtime]`.
95
+
96
+ ## Status
97
+
98
+ - Status bar: active model, reasoning, conversation context, current-turn tool calls, tokens, elapsed time, and active model-call time.
99
+ - `/status`: active provider, model state, runtime state, conversation/tool counters, per-model calls/tokens, task, goal, and verification.