nanocode-cli 0.2.7__tar.gz → 0.2.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nanocode-cli
3
- Version: 0.2.7
3
+ Version: 0.2.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,6 +21,7 @@ Classifier: Topic :: Terminals
21
21
  Requires-Python: >=3.11
22
22
  Description-Content-Type: text/markdown
23
23
  License-File: LICENSE
24
+ Requires-Dist: json-repair>=0.39
24
25
  Requires-Dist: prompt-toolkit>=3.0
25
26
  Requires-Dist: typing-extensions>=4.7
26
27
  Provides-Extra: dev
@@ -40,6 +41,41 @@ nanocode is used to help building itself, including features such as `@file` pat
40
41
  |---|---|
41
42
  | ![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) |
42
43
 
44
+ ## Features
45
+
46
+ - **Constrained Output**: Force model replies into auditable action frames.
47
+ - **Verified Edits**: Reject stale range edits before they touch files.
48
+ - **Autonomous Loop**: Chain reading, editing, running, and verification.
49
+ - **Live Telemetry**: Stream tool intent, token use, cost, and status.
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
+
78
+
43
79
  ## Install
44
80
 
45
81
  ```sh
@@ -59,28 +95,6 @@ uv sync --extra dev
59
95
  uv run nanocode
60
96
  ```
61
97
 
62
- ## Environment Variables
63
-
64
- Required:
65
-
66
- ```sh
67
- export NANOCODE_API_URL="https://api.example.com/v1"
68
- export NANOCODE_API_KEY="your-api-key"
69
- export NANOCODE_MODEL="your-model"
70
- ```
71
-
72
- Optional:
73
-
74
- ```sh
75
- export NANOCODE_DIR=".nanocode"
76
- export NANOCODE_TEMPERATURE="0.7"
77
- export NANOCODE_REASONING="on"
78
- export NANOCODE_REASONING_EFFORT="medium"
79
- export NANOCODE_MODEL_TIMEOUT="60"
80
- export NANOCODE_SHELL_TIMEOUT="60"
81
- export NANOCODE_COMPACT_AT="100"
82
- ```
83
-
84
98
  ## Usage
85
99
 
86
100
  Start nanocode:
@@ -0,0 +1,93 @@
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, cost, and status.
19
+
20
+ ## Tools
21
+
22
+ - File: `Read`, `LineCount`, `ListDir`, `Search`.
23
+ - Edit: `Edit`, `ReplaceRange`, `BatchReplaceRanges`, `ApplyPatch`.
24
+ - Shell: `Bash`, `Git`.
25
+ - Memory: `Blackboard`.
26
+
27
+ ## Commands
28
+
29
+ - Info: `/help [question]`, `/status`.
30
+ - Session: `/compact`, `/blackboard [status|clear]`.
31
+ - Config: `/model`, `/compact-at`, `/reason`, `/reason_effort`, `/stream`, `/yolo`.
32
+ - Exit: `/exit`, `/quit`.
33
+
34
+ ## Configuration
35
+
36
+ - Required: `NANOCODE_API_URL`, `NANOCODE_API_KEY`, `NANOCODE_MODEL`.
37
+ - Runtime: `NANOCODE_DIR`, `NANOCODE_TEMPERATURE`, `NANOCODE_STREAM`.
38
+ - Reasoning: `NANOCODE_REASONING`, `NANOCODE_REASONING_EFFORT`.
39
+ - Limits: `NANOCODE_MODEL_TIMEOUT`, `NANOCODE_SHELL_TIMEOUT`, `NANOCODE_COMPACT_AT`, `NANOCODE_MAX_AGENT_STEPS`.
40
+ - Cost: `NANOCODE_PROMPT_PRICE_PER_1M_TOKENS`, `NANOCODE_COMPLETION_PRICE_PER_1M_TOKENS`.
41
+
42
+ ## Status
43
+
44
+ - Status bar: model, reasoning, context, tokens/cost, blackboard, elapsed time, and active model-call time.
45
+ - `/status`: model, reasoning, stream, yolo, conversation, tokens/cost, blackboard, goal, and verification.
46
+
47
+
48
+ ## Install
49
+
50
+ ```sh
51
+ uv tool install nanocode-cli
52
+ ```
53
+
54
+ Upgrade an existing install:
55
+
56
+ ```sh
57
+ uv tool upgrade nanocode-cli
58
+ ```
59
+
60
+ For local development:
61
+
62
+ ```sh
63
+ uv sync --extra dev
64
+ uv run nanocode
65
+ ```
66
+
67
+ ## Usage
68
+
69
+ Start nanocode:
70
+
71
+ ```sh
72
+ nanocode
73
+ ```
74
+
75
+ Show available commands:
76
+
77
+ ```text
78
+ /help
79
+ ```
80
+
81
+ Ask a source-aware question about nanocode itself:
82
+
83
+ ```text
84
+ /help how does compact work?
85
+ ```
86
+
87
+ ## Safety
88
+
89
+ nanocode does not provide sandbox protection. It can run shell commands and edit files in the environment where you start it.
90
+
91
+ If you do not fully trust the model, tools, prompts, or workspace, run nanocode inside your own sandbox, container, VM, or other isolated environment.
92
+
93
+ Use at your own risk.