dimcode 0.0.4-beta.38 → 0.0.5

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.
Files changed (3) hide show
  1. package/README.md +170 -0
  2. package/dist/cli.mjs +284 -284
  3. package/package.json +4 -4
package/README.md ADDED
@@ -0,0 +1,170 @@
1
+ # Dimcode CLI
2
+
3
+ > A powerful AI agent CLI built on GoatChain with an interactive terminal UI (TUI)
4
+
5
+ [![npm version](https://badge.fury.io/js/dimcode.svg)](https://badge.fury.io/js/dimcode)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+
8
+ Dimcode is a command-line interface for AI-powered coding assistance, featuring:
9
+
10
+ - 🎨 **Beautiful TUI** - Modern terminal interface built with Vue 3
11
+ - 💬 **Multi-session Management** - Manage multiple AI conversations
12
+ - 🔧 **Built-in Tools** - File operations, web search, code analysis
13
+ - ⚡ **Streaming Responses** - Real-time AI response streaming
14
+ - 🎯 **Tool Approvals** - Fine-grained control over tool execution
15
+ - 🌈 **Themes** - Customizable color schemes
16
+
17
+ ## 📦 Installation
18
+
19
+ ### Global Installation (Recommended)
20
+
21
+ ```bash
22
+ npm install -g dimcode
23
+ ```
24
+
25
+ Or using other package managers:
26
+
27
+ ```bash
28
+ # Using pnpm
29
+ pnpm add -g dimcode
30
+
31
+ # Using yarn
32
+ yarn global add dimcode
33
+
34
+ # Using bun
35
+ bun add -g dimcode
36
+ ```
37
+
38
+ ### Using npx (No Installation)
39
+
40
+ Run directly without installation:
41
+
42
+ ```bash
43
+ npx dimcode
44
+ ```
45
+
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
+ ## 🎮 Usage
57
+
58
+ ### Command Palette
59
+
60
+ Press `Ctrl+P` to open the command palette, which provides quick access to:
61
+
62
+ - **Sessions** - View and switch between conversations
63
+ - **New Session** - Start a fresh conversation
64
+ - **Settings** - Configure API keys and model settings
65
+ - **Tool Approvals** - Manage tool execution permissions
66
+ - **Theme** - Customize the UI appearance (in Chat view)
67
+
68
+ ### Slash Commands
69
+
70
+ Type slash commands directly in the input field:
71
+
72
+ | Command | Description |
73
+ |---------|-------------|
74
+ | `/settings` | Open settings dialog |
75
+ | `/approvals` | Manage tool approvals |
76
+ | `/sessions` | List all sessions |
77
+ | `/new` | Create a new session |
78
+ | `/redo` | Redo last interaction (Chat view only) |
79
+
80
+ ### Keyboard Shortcuts
81
+
82
+ | Shortcut | Action |
83
+ |----------|--------|
84
+ | `Ctrl+P` | Open command palette |
85
+ | `Ctrl+C` | Exit the application |
86
+ | `Enter` | Send message |
87
+ | `Shift+Enter` | New line in input |
88
+
89
+ ## ⚙️ Configuration
90
+
91
+ ### Environment Variables
92
+
93
+ Create a `.env` file in your working directory or set environment variables:
94
+
95
+ ```bash
96
+ # OpenAI Configuration
97
+ OPENAI_API_KEY=your_api_key_here
98
+ OPENAI_BASE_URL=https://api.openai.com/v1 # Optional
99
+ MODEL_ID=gpt-4o # Default model
100
+
101
+ # Serper API for web search (optional)
102
+ SERPER_API_KEY=your_serper_key_here
103
+ ```
104
+
105
+ ### First-time Setup
106
+
107
+ On first launch, Dimcode will guide you through:
108
+
109
+ 1. **API Key Setup** - Enter your OpenAI API key
110
+ 2. **Model Selection** - Choose your preferred AI model
111
+ 3. **Tool Approvals** - Configure which tools can run automatically
112
+
113
+ Settings are stored in `~/.goatchain/goatchain/` directory by default (can be customized via `GOATCHAIN_HOME` environment variable).
114
+
115
+ ## 🔧 Built-in Tools
116
+
117
+ Dimcode comes with powerful built-in tools:
118
+
119
+ ### File Operations
120
+ - **Read** - Read file contents
121
+ - **Write** - Create or overwrite files
122
+ - **Edit** - Make precise edits to existing files
123
+
124
+ ### Code Analysis
125
+ - **Grep** - Search content using patterns
126
+ - **Glob** - Find files by pattern
127
+ - **AstGrepSearch** - AST-based code search
128
+ - **AstGrepReplace** - AST-based code refactoring
129
+
130
+ ### Web & Research
131
+ - **WebSearch** - Search the web using Serper API
132
+ - **WebFetch** - Fetch web page content
133
+
134
+ ### Task Management
135
+ - **TodoWrite** - Create and manage TODO lists
136
+ - **Task** - Execute complex multi-step tasks
137
+ - **Skill** - Store and reuse common workflows
138
+
139
+ ### System
140
+ - **Bash** - Execute shell commands (requires approval)
141
+ - **AskUser** - Request input from user
142
+
143
+ ## 📚 Examples
144
+
145
+ ### Basic Coding Assistant
146
+
147
+ ```bash
148
+ dim
149
+ # Then type: "Create a React component for a todo list"
150
+ ```
151
+
152
+ ### Multi-file Refactoring
153
+
154
+ ```bash
155
+ dim
156
+ # Then type: "Rename all instances of 'oldName' to 'newName' across the project"
157
+ ```
158
+
159
+ ### Web Research
160
+
161
+ ```bash
162
+ dim
163
+ # Then type: "Search for the latest best practices in TypeScript 5.3"
164
+ ```
165
+
166
+ ## 🔐 Security & Privacy
167
+
168
+ - **Tool Approvals**: By default, sensitive operations (file writes, shell commands) require user approval
169
+ - **Local Storage**: All session data is stored locally in `~/.goatchain/goatchain/` (customizable via `GOATCHAIN_HOME`)
170
+