|
1 | | -# Codebolt CLI Tool |
| 1 | +# Codebolt CLI |
2 | 2 |
|
3 | | -## Description |
4 | | -Codebolt is a CLI tool created using Node.js. It allows users to check the application version and upload folders to a specified server. |
| 3 | +A powerful command-line interface for creating, managing, and deploying Codebolt agents and tools. The CLI enables developers to build intelligent AI assistants that can handle software development lifecycle (SDLC) tasks and provide specialized functionality. |
5 | 4 |
|
6 | | -## Installation |
7 | | -To install Codebolt CLI tool locally, ensure you have Node.js and npm installed, then run: |
| 5 | +## 🚀 Quick Start |
8 | 6 |
|
| 7 | +```bash |
| 8 | +# Install globally |
9 | 9 | npm install -g codebolt-cli |
10 | 10 |
|
11 | | -## Usage |
| 11 | +# Verify installation |
| 12 | +codebolt-cli version |
12 | 13 |
|
13 | | -### Check Version |
14 | | -To check the application version, run: |
15 | | -codebolt version |
| 14 | +# Login to your account |
| 15 | +codebolt-cli login |
16 | 16 |
|
17 | | -### Upload Folder |
18 | | -To upload a folder to the server, run: |
19 | | -codebolt upload <folderPath> |
| 17 | +# Create your first agent |
| 18 | +codebolt-cli createagent --name "My First Agent" |
20 | 19 |
|
21 | | -Replace `<folderPath>` with the path to the folder you want to upload. |
| 20 | +# Create a tool |
| 21 | +codebolt-cli createtool --name "File Helper" --id "file-helper" |
| 22 | +``` |
22 | 23 |
|
23 | | -## Author |
24 | | -Your Name |
| 24 | +## 📋 Features |
25 | 25 |
|
26 | | -## License |
27 | | -ISC |
| 26 | +### Agent Management |
| 27 | +- **Create Agents**: Interactive wizard for agent creation |
| 28 | +- **Publish Agents**: Deploy agents to the Codebolt platform |
| 29 | +- **Clone Agents**: Copy and customize existing agents |
| 30 | +- **Start Agents**: Run agents locally for development |
| 31 | +- **Sync Agents**: Pull latest configurations from the platform |
| 32 | + |
| 33 | +### Tool Development |
| 34 | +- **Create Tools**: Build MCP-compatible tools |
| 35 | +- **Test Tools**: Run and debug tools locally |
| 36 | +- **Inspect Tools**: Interactive debugging with MCP inspector |
| 37 | +- **Parameter Configuration**: Flexible tool parameterization |
| 38 | + |
| 39 | +### Authentication & Management |
| 40 | +- **Secure Login**: OAuth-based authentication |
| 41 | +- **Session Management**: Persistent login sessions |
| 42 | +- **Project Organization**: Structured directory management |
| 43 | +- **Team Collaboration**: Share and collaborate on agents |
| 44 | + |
| 45 | +## 🛠️ Installation |
| 46 | + |
| 47 | +### Prerequisites |
| 48 | +- Node.js 14.0 or higher |
| 49 | +- npm 6.0 or higher |
| 50 | + |
| 51 | +### Global Installation (Recommended) |
| 52 | +```bash |
| 53 | +npm install -g codebolt-cli |
| 54 | +``` |
| 55 | + |
| 56 | +### Local Installation |
| 57 | +```bash |
| 58 | +npm install codebolt-cli |
| 59 | +npx codebolt-cli version |
| 60 | +``` |
| 61 | + |
| 62 | +### Development Installation |
| 63 | +```bash |
| 64 | +git clone https://github.com/codeboltai/cli.git |
| 65 | +cd cli |
| 66 | +npm install |
| 67 | +npm link |
| 68 | +``` |
| 69 | + |
| 70 | +## 📖 Documentation |
| 71 | + |
| 72 | +Comprehensive documentation is available at [docs.codebolt.ai](https://docs.codebolt.ai/developer/cli/): |
| 73 | + |
| 74 | +- **[Overview](https://docs.codebolt.ai/developer/cli/overview)** - Introduction and architecture |
| 75 | +- **[Installation](https://docs.codebolt.ai/developer/cli/installation)** - Detailed setup guide |
| 76 | +- **[Authentication](https://docs.codebolt.ai/developer/cli/authentication)** - Login and session management |
| 77 | +- **[Agent Development](https://docs.codebolt.ai/developer/cli/agents)** - Creating and managing agents |
| 78 | +- **[Tool Development](https://docs.codebolt.ai/developer/cli/tools)** - Building custom tools |
| 79 | +- **[Command Reference](https://docs.codebolt.ai/developer/cli/commands)** - Complete command documentation |
| 80 | +- **[Examples](https://docs.codebolt.ai/developer/cli/examples)** - Practical usage examples |
| 81 | + |
| 82 | +## 🎯 Common Commands |
| 83 | + |
| 84 | +### Authentication |
| 85 | +```bash |
| 86 | +codebolt-cli login # Login to your account |
| 87 | +codebolt-cli logout # End current session |
| 88 | +``` |
| 89 | + |
| 90 | +### Agent Commands |
| 91 | +```bash |
| 92 | +codebolt-cli createagent # Create new agent (interactive) |
| 93 | +codebolt-cli createagent --name "My Agent" # Create with name |
| 94 | +codebolt-cli publishagent [path] # Publish agent to platform |
| 95 | +codebolt-cli listagents # List your agents |
| 96 | +codebolt-cli startagent [path] # Start agent locally |
| 97 | +codebolt-cli pullagent [path] # Sync with platform |
| 98 | +codebolt-cli cloneagent <id> [path] # Clone existing agent |
| 99 | +``` |
| 100 | + |
| 101 | +### Tool Commands |
| 102 | +```bash |
| 103 | +codebolt-cli createtool # Create new tool (interactive) |
| 104 | +codebolt-cli createtool --name "Tool" # Create with options |
| 105 | +codebolt-cli runtool <command> <file> # Run tool command |
| 106 | +codebolt-cli inspecttool <file> # Debug tool with MCP inspector |
| 107 | +``` |
| 108 | + |
| 109 | +### Utility Commands |
| 110 | +```bash |
| 111 | +codebolt-cli version # Show CLI version |
| 112 | +codebolt-cli --help # Show help information |
| 113 | +``` |
| 114 | + |
| 115 | +## 📁 Project Structure |
| 116 | + |
| 117 | +The CLI organizes projects using the `.codeboltAgents` directory: |
| 118 | + |
| 119 | +``` |
| 120 | +your-project/ |
| 121 | +├── .codeboltAgents/ |
| 122 | +│ ├── agents/ |
| 123 | +│ │ ├── my-agent/ |
| 124 | +│ │ │ ├── codeboltagent.yaml |
| 125 | +│ │ │ ├── package.json |
| 126 | +│ │ │ ├── index.js |
| 127 | +│ │ │ └── src/ |
| 128 | +│ │ └── another-agent/ |
| 129 | +│ └── tools/ |
| 130 | +│ ├── my-tool/ |
| 131 | +│ │ ├── codebolttool.yaml |
| 132 | +│ │ ├── package.json |
| 133 | +│ │ └── index.js |
| 134 | +│ └── another-tool/ |
| 135 | +└── your-project-files... |
| 136 | +``` |
| 137 | + |
| 138 | +## 🔧 Configuration |
| 139 | + |
| 140 | +### Agent Configuration (`codeboltagent.yaml`) |
| 141 | +```yaml |
| 142 | +title: "My Agent" |
| 143 | +description: "Agent description" |
| 144 | +unique_id: "my-agent-id" |
| 145 | +tags: ["tag1", "tag2"] |
| 146 | + |
| 147 | +metadata: |
| 148 | + agent_routing: |
| 149 | + worksonblankcode: true |
| 150 | + worksonexistingcode: true |
| 151 | + supportedlanguages: ["javascript", "typescript"] |
| 152 | + supportedframeworks: ["react", "express"] |
| 153 | + |
| 154 | + sdlc_steps_managed: |
| 155 | + - name: "Code Generation" |
| 156 | + example_instructions: |
| 157 | + - "Generate React component" |
| 158 | + |
| 159 | +actions: |
| 160 | + - name: "component" |
| 161 | + description: "Generate component" |
| 162 | + actionPrompt: "Create a new component" |
| 163 | +``` |
| 164 | +
|
| 165 | +### Tool Configuration (`codebolttool.yaml`) |
| 166 | +```yaml |
| 167 | +name: "My Tool" |
| 168 | +description: "Tool description" |
| 169 | +version: "1.0.0" |
| 170 | +uniqueName: "my-tool-id" |
| 171 | +
|
| 172 | +parameters: |
| 173 | + rootPath: |
| 174 | + type: "string" |
| 175 | + description: "Root directory" |
| 176 | + default: "./" |
| 177 | +``` |
| 178 | + |
| 179 | +## 🤝 Contributing |
| 180 | + |
| 181 | +We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details. |
| 182 | + |
| 183 | +### Development Setup |
| 184 | +```bash |
| 185 | +git clone https://github.com/codeboltai/cli.git |
| 186 | +cd cli |
| 187 | +npm install |
| 188 | +npm link |
| 189 | +``` |
| 190 | + |
| 191 | +### Running Tests |
| 192 | +```bash |
| 193 | +npm test |
| 194 | +npm run test:watch |
| 195 | +``` |
| 196 | + |
| 197 | +### Code Style |
| 198 | +```bash |
| 199 | +npm run lint |
| 200 | +npm run format |
| 201 | +``` |
| 202 | + |
| 203 | +## 📝 Examples |
| 204 | + |
| 205 | +### Create a React Component Generator |
| 206 | +```bash |
| 207 | +# Create agent |
| 208 | +codebolt-cli createagent --name "React Generator" |
| 209 | +
|
| 210 | +# Configure during interactive setup: |
| 211 | +# - Languages: javascript, typescript |
| 212 | +# - Frameworks: react, next.js |
| 213 | +# - SDLC Steps: Code Generation |
| 214 | +# - Actions: component, hook |
| 215 | +
|
| 216 | +# Test locally |
| 217 | +codebolt-cli startagent ./.codeboltAgents/agents/react-generator |
| 218 | +
|
| 219 | +# Publish when ready |
| 220 | +codebolt-cli publishagent ./.codeboltAgents/agents/react-generator |
| 221 | +``` |
| 222 | + |
| 223 | +### Create a File Management Tool |
| 224 | +```bash |
| 225 | +# Create tool with parameters |
| 226 | +codebolt-cli createtool \ |
| 227 | + --name "File Manager" \ |
| 228 | + --id "file-manager" \ |
| 229 | + --description "Manages file operations" \ |
| 230 | + --parameters '{"rootPath": "./", "extensions": [".js", ".ts"]}' |
| 231 | +
|
| 232 | +# Test tool |
| 233 | +codebolt-cli runtool list_files ./.codeboltAgents/tools/file-manager/index.js |
| 234 | +
|
| 235 | +# Debug if needed |
| 236 | +codebolt-cli inspecttool ./.codeboltAgents/tools/file-manager/index.js |
| 237 | +``` |
| 238 | + |
| 239 | +## 🐛 Troubleshooting |
| 240 | + |
| 241 | +### Common Issues |
| 242 | + |
| 243 | +**Authentication Error** |
| 244 | +```bash |
| 245 | +Error: Not authenticated |
| 246 | +``` |
| 247 | +Solution: Run `codebolt-cli login` |
| 248 | + |
| 249 | +**Agent Not Found** |
| 250 | +```bash |
| 251 | +Error: Agent configuration not found |
| 252 | +``` |
| 253 | +Solution: Ensure you're in the correct directory or specify the path |
| 254 | + |
| 255 | +**Tool Validation Error** |
| 256 | +```bash |
| 257 | +Error: Invalid tool configuration |
| 258 | +``` |
| 259 | +Solution: Check `codebolttool.yaml` syntax and required fields |
| 260 | + |
| 261 | +### Debug Mode |
| 262 | +Enable verbose logging: |
| 263 | +```bash |
| 264 | +DEBUG=codebolt:* codebolt-cli <command> |
| 265 | +``` |
| 266 | + |
| 267 | +## 📄 License |
| 268 | + |
| 269 | +This project is licensed under the ISC License - see the [LICENSE](LICENSE) file for details. |
| 270 | + |
| 271 | +## 🔗 Links |
| 272 | + |
| 273 | +- **Documentation**: [docs.codebolt.ai](https://docs.codebolt.ai) |
| 274 | +- **Platform**: [codebolt.ai](https://codebolt.ai) |
| 275 | +- **GitHub**: [github.com/codeboltai/cli](https://github.com/codeboltai/cli) |
| 276 | +- **Discord**: [discord.gg/codebolt](https://discord.gg/codebolt) |
| 277 | + |
| 278 | + |
| 279 | +## 🏷️ Version |
| 280 | + |
| 281 | +Current version: 1.1.35 |
| 282 | + |
| 283 | +For version history and changelog, see [CHANGELOG.md](CHANGELOG.md). |
0 commit comments