dimcode 0.0.5 → 0.0.6-beta.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 +72 -35
- package/dist/cli.mjs +1647 -481
- package/package.json +12 -6
- package/scripts/postinstall.mjs +64 -0
package/README.md
CHANGED
|
@@ -1,18 +1,46 @@
|
|
|
1
|
+
<img src="https://storage-static.fazhiplus.com/zmchat-avatar/0752d736887697a3284138d013052e53+MjI1ZWM1YTAtNmE4Zi00ZWRkLWI0NjktZjNlNzM4N2U0M2M3LjBkZDI2ODc1LWYxMGYtNDBhNC05NWQ1LWJiZGY2ZmEwM2M0OXgxNzY5NzQ4MDM4MTcyNDEwNzYw" alt="Brand Logo" height="100">
|
|
2
|
+
|
|
1
3
|
# Dimcode CLI
|
|
2
4
|
|
|
3
|
-
> A powerful AI agent CLI
|
|
5
|
+
> A powerful AI agent CLI with a beautiful interactive terminal UI (TUI)
|
|
4
6
|
|
|
5
7
|
[](https://badge.fury.io/js/dimcode)
|
|
6
|
-
[](https://opensource.org/licenses/MIT)
|
|
7
8
|
|
|
8
|
-
Dimcode is a command-line interface for AI-powered coding assistance
|
|
9
|
+
Dimcode is a command-line interface for AI-powered coding assistance. It helps you move fast with:
|
|
9
10
|
|
|
10
11
|
- 🎨 **Beautiful TUI** - Modern terminal interface built with Vue 3
|
|
11
|
-
- 💬 **Multi-session Management** -
|
|
12
|
-
- 🔧 **Built-in Tools** - File
|
|
13
|
-
- ⚡ **Streaming Responses** -
|
|
14
|
-
- 🎯 **Tool Approvals** -
|
|
15
|
-
- 🌈 **Themes** -
|
|
12
|
+
- 💬 **Multi-session Management** - Organize multiple AI conversations
|
|
13
|
+
- 🔧 **Built-in Tools** - File ops, web search, code analysis, and more
|
|
14
|
+
- ⚡ **Streaming Responses** - See AI outputs in real time
|
|
15
|
+
- 🎯 **Tool Approvals** - Granular control over tool execution
|
|
16
|
+
- 🌈 **Themes** - Flexible, customizable color schemes
|
|
17
|
+
|
|
18
|
+
## 📈 Download Stats
|
|
19
|
+
|
|
20
|
+
| Metric | Live Badge |
|
|
21
|
+
| ---------------- | -------------------------------------------------------------------------------------------------------- |
|
|
22
|
+
| Weekly downloads | [](https://www.npmjs.com/package/dimcode) |
|
|
23
|
+
| Total downloads | [](https://www.npmjs.com/package/dimcode) |
|
|
24
|
+
|
|
25
|
+
## ⚡ Get Started in 30 Seconds
|
|
26
|
+
|
|
27
|
+
1. Install the CLI
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm install -g dimcode
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
2. Run it
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
dim
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
3. Ask for help
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
Create a React component for a todo list
|
|
43
|
+
```
|
|
16
44
|
|
|
17
45
|
## 📦 Installation
|
|
18
46
|
|
|
@@ -43,16 +71,6 @@ Run directly without installation:
|
|
|
43
71
|
npx dimcode
|
|
44
72
|
```
|
|
45
73
|
|
|
46
|
-
## 🚀 Quick Start
|
|
47
|
-
|
|
48
|
-
After installation, simply run:
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
dim
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
This will launch the interactive terminal UI.
|
|
55
|
-
|
|
56
74
|
## 🎮 Usage
|
|
57
75
|
|
|
58
76
|
### Command Palette
|
|
@@ -69,22 +87,37 @@ Press `Ctrl+P` to open the command palette, which provides quick access to:
|
|
|
69
87
|
|
|
70
88
|
Type slash commands directly in the input field:
|
|
71
89
|
|
|
72
|
-
| Command
|
|
73
|
-
|
|
74
|
-
| `/settings`
|
|
75
|
-
| `/
|
|
76
|
-
| `/
|
|
77
|
-
| `/
|
|
78
|
-
| `/
|
|
90
|
+
| Command | Description |
|
|
91
|
+
| ----------------- | --------------------------------------- |
|
|
92
|
+
| `/settings` | Open settings dialog (custom providers) |
|
|
93
|
+
| `/config` | Alternative for `/settings` |
|
|
94
|
+
| `/approvals` | Manage tool approvals (auto/all) |
|
|
95
|
+
| `/approval` | Alternative for `/approvals` |
|
|
96
|
+
| `/connect` | Connect a provider |
|
|
97
|
+
| `/models` | Select a model |
|
|
98
|
+
| `/sessions` | List all sessions |
|
|
99
|
+
| `/new` | Create a new session |
|
|
100
|
+
| `/redo` | Redo last interaction |
|
|
101
|
+
| `/rename <title>` | Rename current session |
|
|
102
|
+
| `/timeline` | Jump to a user message |
|
|
103
|
+
| `/tl` | Alternative for `/timeline` |
|
|
104
|
+
| `/review` | Review code changes |
|
|
105
|
+
| `/debug` | Open debug dialog (node mode only) |
|
|
79
106
|
|
|
80
107
|
### Keyboard Shortcuts
|
|
81
108
|
|
|
82
|
-
| Shortcut
|
|
83
|
-
|
|
84
|
-
| `Ctrl+P`
|
|
85
|
-
| `Ctrl+C`
|
|
86
|
-
| `Enter`
|
|
87
|
-
| `Shift+Enter` | New line in input
|
|
109
|
+
| Shortcut | Action |
|
|
110
|
+
| ------------- | ------------------------------------------ |
|
|
111
|
+
| `Ctrl+P` | Open command palette |
|
|
112
|
+
| `Ctrl+C` | Clear input (if non-empty); otherwise exit |
|
|
113
|
+
| `Enter` | Send message |
|
|
114
|
+
| `Shift+Enter` | New line in input |
|
|
115
|
+
|
|
116
|
+
### Input Tips
|
|
117
|
+
|
|
118
|
+
- Drag to select text, then release to auto-copy (when enabled)
|
|
119
|
+
- In the input area, use `Shift+Option` for rectangular selection
|
|
120
|
+
- Triple-click in the input area to select all
|
|
88
121
|
|
|
89
122
|
## ⚙️ Configuration
|
|
90
123
|
|
|
@@ -96,7 +129,7 @@ Create a `.env` file in your working directory or set environment variables:
|
|
|
96
129
|
# OpenAI Configuration
|
|
97
130
|
OPENAI_API_KEY=your_api_key_here
|
|
98
131
|
OPENAI_BASE_URL=https://api.openai.com/v1 # Optional
|
|
99
|
-
|
|
132
|
+
DIMCODE_MODEL=deepseek-v3.1 # Default model
|
|
100
133
|
|
|
101
134
|
# Serper API for web search (optional)
|
|
102
135
|
SERPER_API_KEY=your_serper_key_here
|
|
@@ -110,33 +143,38 @@ On first launch, Dimcode will guide you through:
|
|
|
110
143
|
2. **Model Selection** - Choose your preferred AI model
|
|
111
144
|
3. **Tool Approvals** - Configure which tools can run automatically
|
|
112
145
|
|
|
113
|
-
Settings are stored in `~/.
|
|
146
|
+
Settings are stored in `~/.dimcode/dimcode/` directory by default (can be customized via `DIMCODE_HOME` environment variable).
|
|
114
147
|
|
|
115
148
|
## 🔧 Built-in Tools
|
|
116
149
|
|
|
117
150
|
Dimcode comes with powerful built-in tools:
|
|
118
151
|
|
|
119
152
|
### File Operations
|
|
153
|
+
|
|
120
154
|
- **Read** - Read file contents
|
|
121
155
|
- **Write** - Create or overwrite files
|
|
122
156
|
- **Edit** - Make precise edits to existing files
|
|
123
157
|
|
|
124
158
|
### Code Analysis
|
|
159
|
+
|
|
125
160
|
- **Grep** - Search content using patterns
|
|
126
161
|
- **Glob** - Find files by pattern
|
|
127
162
|
- **AstGrepSearch** - AST-based code search
|
|
128
163
|
- **AstGrepReplace** - AST-based code refactoring
|
|
129
164
|
|
|
130
165
|
### Web & Research
|
|
166
|
+
|
|
131
167
|
- **WebSearch** - Search the web using Serper API
|
|
132
168
|
- **WebFetch** - Fetch web page content
|
|
133
169
|
|
|
134
170
|
### Task Management
|
|
171
|
+
|
|
135
172
|
- **TodoWrite** - Create and manage TODO lists
|
|
136
173
|
- **Task** - Execute complex multi-step tasks
|
|
137
174
|
- **Skill** - Store and reuse common workflows
|
|
138
175
|
|
|
139
176
|
### System
|
|
177
|
+
|
|
140
178
|
- **Bash** - Execute shell commands (requires approval)
|
|
141
179
|
- **AskUser** - Request input from user
|
|
142
180
|
|
|
@@ -166,5 +204,4 @@ dim
|
|
|
166
204
|
## 🔐 Security & Privacy
|
|
167
205
|
|
|
168
206
|
- **Tool Approvals**: By default, sensitive operations (file writes, shell commands) require user approval
|
|
169
|
-
- **Local Storage**: All session data is stored locally in `~/.
|
|
170
|
-
|
|
207
|
+
- **Local Storage**: All session data is stored locally in `~/.dimcode/dimcode/` (customizable via `DIMCODE_HOME`)
|