+170
| # Dimcode CLI | ||
| > A powerful AI agent CLI built on GoatChain with an interactive terminal UI (TUI) | ||
| [](https://badge.fury.io/js/dimcode) | ||
| [](https://opensource.org/licenses/MIT) | ||
| Dimcode is a command-line interface for AI-powered coding assistance, featuring: | ||
| - 🎨 **Beautiful TUI** - Modern terminal interface built with Vue 3 | ||
| - 💬 **Multi-session Management** - Manage multiple AI conversations | ||
| - 🔧 **Built-in Tools** - File operations, web search, code analysis | ||
| - ⚡ **Streaming Responses** - Real-time AI response streaming | ||
| - 🎯 **Tool Approvals** - Fine-grained control over tool execution | ||
| - 🌈 **Themes** - Customizable color schemes | ||
| ## 📦 Installation | ||
| ### Global Installation (Recommended) | ||
| ```bash | ||
| npm install -g dimcode | ||
| ``` | ||
| Or using other package managers: | ||
| ```bash | ||
| # Using pnpm | ||
| pnpm add -g dimcode | ||
| # Using yarn | ||
| yarn global add dimcode | ||
| # Using bun | ||
| bun add -g dimcode | ||
| ``` | ||
| ### Using npx (No Installation) | ||
| Run directly without installation: | ||
| ```bash | ||
| npx dimcode | ||
| ``` | ||
| ## 🚀 Quick Start | ||
| After installation, simply run: | ||
| ```bash | ||
| dim | ||
| ``` | ||
| This will launch the interactive terminal UI. | ||
| ## 🎮 Usage | ||
| ### Command Palette | ||
| Press `Ctrl+P` to open the command palette, which provides quick access to: | ||
| - **Sessions** - View and switch between conversations | ||
| - **New Session** - Start a fresh conversation | ||
| - **Settings** - Configure API keys and model settings | ||
| - **Tool Approvals** - Manage tool execution permissions | ||
| - **Theme** - Customize the UI appearance (in Chat view) | ||
| ### Slash Commands | ||
| Type slash commands directly in the input field: | ||
| | Command | Description | | ||
| |---------|-------------| | ||
| | `/settings` | Open settings dialog | | ||
| | `/approvals` | Manage tool approvals | | ||
| | `/sessions` | List all sessions | | ||
| | `/new` | Create a new session | | ||
| | `/redo` | Redo last interaction (Chat view only) | | ||
| ### Keyboard Shortcuts | ||
| | Shortcut | Action | | ||
| |----------|--------| | ||
| | `Ctrl+P` | Open command palette | | ||
| | `Ctrl+C` | Exit the application | | ||
| | `Enter` | Send message | | ||
| | `Shift+Enter` | New line in input | | ||
| ## ⚙️ Configuration | ||
| ### Environment Variables | ||
| Create a `.env` file in your working directory or set environment variables: | ||
| ```bash | ||
| # OpenAI Configuration | ||
| OPENAI_API_KEY=your_api_key_here | ||
| OPENAI_BASE_URL=https://api.openai.com/v1 # Optional | ||
| MODEL_ID=gpt-4o # Default model | ||
| # Serper API for web search (optional) | ||
| SERPER_API_KEY=your_serper_key_here | ||
| ``` | ||
| ### First-time Setup | ||
| On first launch, Dimcode will guide you through: | ||
| 1. **API Key Setup** - Enter your OpenAI API key | ||
| 2. **Model Selection** - Choose your preferred AI model | ||
| 3. **Tool Approvals** - Configure which tools can run automatically | ||
| Settings are stored in `~/.goatchain/goatchain/` directory by default (can be customized via `GOATCHAIN_HOME` environment variable). | ||
| ## 🔧 Built-in Tools | ||
| Dimcode comes with powerful built-in tools: | ||
| ### File Operations | ||
| - **Read** - Read file contents | ||
| - **Write** - Create or overwrite files | ||
| - **Edit** - Make precise edits to existing files | ||
| ### Code Analysis | ||
| - **Grep** - Search content using patterns | ||
| - **Glob** - Find files by pattern | ||
| - **AstGrepSearch** - AST-based code search | ||
| - **AstGrepReplace** - AST-based code refactoring | ||
| ### Web & Research | ||
| - **WebSearch** - Search the web using Serper API | ||
| - **WebFetch** - Fetch web page content | ||
| ### Task Management | ||
| - **TodoWrite** - Create and manage TODO lists | ||
| - **Task** - Execute complex multi-step tasks | ||
| - **Skill** - Store and reuse common workflows | ||
| ### System | ||
| - **Bash** - Execute shell commands (requires approval) | ||
| - **AskUser** - Request input from user | ||
| ## 📚 Examples | ||
| ### Basic Coding Assistant | ||
| ```bash | ||
| dim | ||
| # Then type: "Create a React component for a todo list" | ||
| ``` | ||
| ### Multi-file Refactoring | ||
| ```bash | ||
| dim | ||
| # Then type: "Rename all instances of 'oldName' to 'newName' across the project" | ||
| ``` | ||
| ### Web Research | ||
| ```bash | ||
| dim | ||
| # Then type: "Search for the latest best practices in TypeScript 5.3" | ||
| ``` | ||
| ## 🔐 Security & Privacy | ||
| - **Tool Approvals**: By default, sensitive operations (file writes, shell commands) require user approval | ||
| - **Local Storage**: All session data is stored locally in `~/.goatchain/goatchain/` (customizable via `GOATCHAIN_HOME`) | ||
+5
-5
| { | ||
| "name": "dimcode", | ||
| "type": "module", | ||
| "version": "0.0.4-beta.38", | ||
| "description": "Dim Code built on @simon_he/vue-tui", | ||
| "version": "0.0.5-beta.13", | ||
| "description": "Dim Code CLI built on dreams", | ||
| "exports": { | ||
@@ -19,3 +19,3 @@ ".": { | ||
| "bin": { | ||
| "goatchain": "./cli.mjs" | ||
| "dim": "./cli.mjs" | ||
| }, | ||
@@ -47,3 +47,3 @@ "files": [ | ||
| "dependencies": { | ||
| "goatchain": "^0.0.8", | ||
| "open": "^10.1.2", | ||
| "semver": "^7.7.3", | ||
@@ -60,2 +60,2 @@ "shiki": "^3.20.0", | ||
| } | ||
| } | ||
| } |
Sorry, the diff of this file is too big to display
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
1535663
35.85%4
33.33%6613
36.86%0
-100%171
Infinity%1
Infinity%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed