@telagod/nocode 0.1.0 → 0.1.2
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.
- package/README.md +183 -0
- package/bin/nocode +4 -1
- package/package.json +6 -4
- package/scripts/postinstall.js +2 -0
package/README.md
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# nocode
|
|
2
|
+
|
|
3
|
+
[中文文档](README_CN.md) | [Development Guide](docs/DEVELOPMENT.md)
|
|
4
|
+
|
|
5
|
+
A terminal-native AI coding assistant built in Rust. 38K LOC, 51 modules, 25 tools, 555 tests.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g @telagod/nocode
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Or build from source:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
git clone https://github.com/telagod/nocode.git
|
|
17
|
+
cd nocode && cargo build --release
|
|
18
|
+
cp target/release/nocode ~/.local/bin/
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Setup
|
|
22
|
+
|
|
23
|
+
Set one API key and go:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
export ANTHROPIC_API_KEY="sk-ant-..." # Claude (default)
|
|
27
|
+
# or
|
|
28
|
+
export OPENAI_API_KEY="sk-..." # OpenAI
|
|
29
|
+
# or
|
|
30
|
+
export GEMINI_API_KEY="..." # Gemini
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Usage
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
nocode --repl # interactive REPL
|
|
37
|
+
nocode --tui # 4-pane terminal UI
|
|
38
|
+
nocode --status # system diagnostics
|
|
39
|
+
nocode --bridge-once "prompt" # single-turn local execution
|
|
40
|
+
nocode --bridge-remote-once "prompt" # single-turn remote execution
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Providers
|
|
44
|
+
|
|
45
|
+
Auto-detected from environment variables. Priority: explicit override > Google > OpenAI > Anthropic > Mock.
|
|
46
|
+
|
|
47
|
+
| Provider | API Key | Default Model |
|
|
48
|
+
|----------|---------|---------------|
|
|
49
|
+
| Anthropic (Claude) | `ANTHROPIC_API_KEY` | `claude-opus-4-6` |
|
|
50
|
+
| OpenAI (GPT) | `OPENAI_API_KEY` | `gpt-5.4` |
|
|
51
|
+
| Google (Gemini) | `GEMINI_API_KEY` | `gemini-3.1-pro` |
|
|
52
|
+
| Custom | `NOCODE_CUSTOM_BASE_URL` | user-specified |
|
|
53
|
+
| Mock | (none, fallback) | `sonnet` |
|
|
54
|
+
|
|
55
|
+
Override provider or model:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
export NOCODE_MODEL_PROVIDER=anthropic
|
|
59
|
+
export NOCODE_MODEL=gpt-5.4
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Use any OpenAI/Claude-compatible endpoint (Ollama, vLLM, LiteLLM, etc.):
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
export NOCODE_MODEL_PROVIDER=custom
|
|
66
|
+
export NOCODE_CUSTOM_BASE_URL=http://localhost:11434/v1
|
|
67
|
+
export NOCODE_CUSTOM_API_FORMAT=openai # anthropic (Messages API) | openai (Chat/Responses) | google (generateContent)
|
|
68
|
+
export NOCODE_MODEL=llama3
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## REPL Commands
|
|
72
|
+
|
|
73
|
+
### Session
|
|
74
|
+
| Command | Description |
|
|
75
|
+
|---------|-------------|
|
|
76
|
+
| `/help` | Show all commands |
|
|
77
|
+
| `/status` | Provider and engine status |
|
|
78
|
+
| `/runtime` | Runtime diagnostics |
|
|
79
|
+
| `/history` | Show conversation history |
|
|
80
|
+
| `/inputs` | Show raw input history |
|
|
81
|
+
| `/quit` | Exit |
|
|
82
|
+
|
|
83
|
+
### Git
|
|
84
|
+
| Command | Description |
|
|
85
|
+
|---------|-------------|
|
|
86
|
+
| `/commit <message>` | `git add -A && git commit -m "..."` |
|
|
87
|
+
| `/diff [args]` | Run `git diff` |
|
|
88
|
+
| `/branch [name]` | Run `git branch` |
|
|
89
|
+
|
|
90
|
+
### Tasks
|
|
91
|
+
| Command | Description |
|
|
92
|
+
|---------|-------------|
|
|
93
|
+
| `/tasks [filter]` | List tasks. Filters: `all`, `completed`, `shell`, `agent`, `status:X type:Y` |
|
|
94
|
+
| `/task-shell <command>` | Spawn a shell task |
|
|
95
|
+
| `/task-agent <agent-id> <prompt>` | Spawn an agent task |
|
|
96
|
+
| `/task-dream [sessions] [description]` | Spawn a dream task |
|
|
97
|
+
| `/task-show <id\|first\|last\|latest\|prev\|next>` | Show task detail |
|
|
98
|
+
| `/task-open` | Open selected task |
|
|
99
|
+
| `/task-queue` | Show task queue |
|
|
100
|
+
| `/task-run-next` | Run next queued task |
|
|
101
|
+
| `/task-run-all` | Run all queued tasks |
|
|
102
|
+
| `/task-stop <task-id>` | Stop a running task |
|
|
103
|
+
|
|
104
|
+
### Teams
|
|
105
|
+
| Command | Description |
|
|
106
|
+
|---------|-------------|
|
|
107
|
+
| `/team-create <subtask1; subtask2; ...>` | Spawn parallel agent team |
|
|
108
|
+
| `/team-status` | Show team status |
|
|
109
|
+
|
|
110
|
+
### Editing
|
|
111
|
+
| Command | Description |
|
|
112
|
+
|---------|-------------|
|
|
113
|
+
| `/draft <text>` | Start a draft message |
|
|
114
|
+
| `/edit <text>` | Replace draft content |
|
|
115
|
+
| `/append <text>` | Append to draft |
|
|
116
|
+
| `/send` | Send the draft |
|
|
117
|
+
| `/queue <prompt>` | Queue a prompt for later |
|
|
118
|
+
| `/queue-slash </command>` | Queue a slash command |
|
|
119
|
+
| `/queue-show` | Show queued items |
|
|
120
|
+
|
|
121
|
+
### Navigation
|
|
122
|
+
| Command | Description |
|
|
123
|
+
|---------|-------------|
|
|
124
|
+
| `/focus <transcript\|tasks\|detail>` | Focus a TUI pane |
|
|
125
|
+
| `/tasks-next` `/j` | Select next task |
|
|
126
|
+
| `/tasks-prev` `/k` | Select previous task |
|
|
127
|
+
| `/enter` | Open selected task |
|
|
128
|
+
| `/history-prev` `/history-next` | Navigate input history |
|
|
129
|
+
|
|
130
|
+
### Account
|
|
131
|
+
| Command | Description |
|
|
132
|
+
|---------|-------------|
|
|
133
|
+
| `/login <api-key>` | Store API key to `~/.nocode/credentials` |
|
|
134
|
+
| `/logout` | Remove stored credentials |
|
|
135
|
+
| `/doctor` | System diagnostics (provider, tools, connectivity) |
|
|
136
|
+
| `/plugin list` | List discovered plugins |
|
|
137
|
+
|
|
138
|
+
## TUI
|
|
139
|
+
|
|
140
|
+
4-pane fullscreen interface with Markdown rendering (pulldown-cmark + syntect syntax highlighting), RGB color support, and overlay system.
|
|
141
|
+
|
|
142
|
+
| Key | Action |
|
|
143
|
+
|-----|--------|
|
|
144
|
+
| `Alt-1..4` | Focus pane (transcript / task list / task detail / events) |
|
|
145
|
+
| `Tab` / `Shift-Tab` | Cycle pane focus |
|
|
146
|
+
| `Up` / `Down` | Scroll or navigate |
|
|
147
|
+
| `PgUp` / `PgDn` | Fast scroll |
|
|
148
|
+
| `Ctrl-P` / `Ctrl-N` | Input history |
|
|
149
|
+
| `Ctrl-U` | Clear input |
|
|
150
|
+
| `F1` / `?` | Help overlay |
|
|
151
|
+
| `F2` | Inspector overlay |
|
|
152
|
+
| `F3` | Permission overlay (`a` approve / `d` deny) |
|
|
153
|
+
| `Esc` | Close overlay or quit |
|
|
154
|
+
|
|
155
|
+
## Environment Variables
|
|
156
|
+
|
|
157
|
+
| Variable | Purpose |
|
|
158
|
+
|----------|---------|
|
|
159
|
+
| `NOCODE_MODEL_PROVIDER` | Force provider: `anthropic`, `openai`, `google`, `custom`, `mock` |
|
|
160
|
+
| `NOCODE_MODEL` | Override model name |
|
|
161
|
+
| `NOCODE_CUSTOM_BASE_URL` | Base URL for Custom provider |
|
|
162
|
+
| `NOCODE_CUSTOM_API_FORMAT` | API wire format: `anthropic` (Messages API), `openai` (Chat Completions / Responses), `google` (generateContent) |
|
|
163
|
+
| `NOCODE_SYSTEM_PROMPT` | Override system prompt |
|
|
164
|
+
| `NOCODE_MODEL_REASONING_EFFORT` | `low`, `medium`, `high` |
|
|
165
|
+
| `ANTHROPIC_API_KEY` / `OPENAI_API_KEY` / `GEMINI_API_KEY` | Provider API keys |
|
|
166
|
+
| `ANTHROPIC_MODEL` / `OPENAI_MODEL` / `GEMINI_MODEL` | Per-provider model override |
|
|
167
|
+
| `ANTHROPIC_BASE_URL` / `OPENAI_BASE_URL` | Per-provider base URL override |
|
|
168
|
+
| `NOCODE_BRIDGE_BASE_URL` | Remote bridge endpoint |
|
|
169
|
+
| `NOCODE_BRIDGE_AUTH_TOKEN` | Bearer token for remote bridge |
|
|
170
|
+
|
|
171
|
+
## Supported Platforms
|
|
172
|
+
|
|
173
|
+
| Platform | npm Package |
|
|
174
|
+
|----------|-------------|
|
|
175
|
+
| Linux x64 | `@telagod/nocode-linux-x64` |
|
|
176
|
+
| Linux ARM64 | `@telagod/nocode-linux-arm64` |
|
|
177
|
+
| macOS x64 | `@telagod/nocode-darwin-x64` |
|
|
178
|
+
| macOS ARM64 | `@telagod/nocode-darwin-arm64` |
|
|
179
|
+
| Windows x64 | `@telagod/nocode-win32-x64` |
|
|
180
|
+
|
|
181
|
+
## License
|
|
182
|
+
|
|
183
|
+
MIT
|
package/bin/nocode
CHANGED
|
@@ -8,8 +8,10 @@ const fs = require("fs");
|
|
|
8
8
|
|
|
9
9
|
const PLATFORM_PACKAGES = {
|
|
10
10
|
"linux-x64": "@telagod/nocode-linux-x64",
|
|
11
|
+
"linux-arm64": "@telagod/nocode-linux-arm64",
|
|
11
12
|
"darwin-x64": "@telagod/nocode-darwin-x64",
|
|
12
13
|
"darwin-arm64": "@telagod/nocode-darwin-arm64",
|
|
14
|
+
"win32-x64": "@telagod/nocode-win32-x64",
|
|
13
15
|
};
|
|
14
16
|
|
|
15
17
|
function getBinaryPath() {
|
|
@@ -38,7 +40,8 @@ function getBinaryPath() {
|
|
|
38
40
|
process.exit(1);
|
|
39
41
|
}
|
|
40
42
|
|
|
41
|
-
const
|
|
43
|
+
const binName = process.platform === "win32" ? "nocode.exe" : "nocode";
|
|
44
|
+
const bin = path.join(pkgDir, "bin", binName);
|
|
42
45
|
if (!fs.existsSync(bin)) {
|
|
43
46
|
console.error(`Binary not found at ${bin}`);
|
|
44
47
|
process.exit(1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telagod/nocode",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Terminal-native AI coding assistant built in Rust",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "telagod",
|
|
@@ -16,9 +16,11 @@
|
|
|
16
16
|
"postinstall": "node scripts/postinstall.js"
|
|
17
17
|
},
|
|
18
18
|
"optionalDependencies": {
|
|
19
|
-
"@telagod/nocode-linux-x64": "0.1.
|
|
20
|
-
"@telagod/nocode-
|
|
21
|
-
"@telagod/nocode-darwin-
|
|
19
|
+
"@telagod/nocode-linux-x64": "0.1.2",
|
|
20
|
+
"@telagod/nocode-linux-arm64": "0.1.2",
|
|
21
|
+
"@telagod/nocode-darwin-x64": "0.1.2",
|
|
22
|
+
"@telagod/nocode-darwin-arm64": "0.1.2",
|
|
23
|
+
"@telagod/nocode-win32-x64": "0.1.2"
|
|
22
24
|
},
|
|
23
25
|
"engines": {
|
|
24
26
|
"node": ">=16"
|
package/scripts/postinstall.js
CHANGED
|
@@ -9,8 +9,10 @@ const os = require("os");
|
|
|
9
9
|
|
|
10
10
|
const PLATFORMS = {
|
|
11
11
|
"linux-x64": "@telagod/nocode-linux-x64",
|
|
12
|
+
"linux-arm64": "@telagod/nocode-linux-arm64",
|
|
12
13
|
"darwin-x64": "@telagod/nocode-darwin-x64",
|
|
13
14
|
"darwin-arm64": "@telagod/nocode-darwin-arm64",
|
|
15
|
+
"win32-x64": "@telagod/nocode-win32-x64",
|
|
14
16
|
};
|
|
15
17
|
|
|
16
18
|
const key = `${os.platform()}-${os.arch()}`;
|