Skip to content

codeboltai/cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Codebolt CLI

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.

πŸš€ Quick Start

# Install globally
npm install -g codebolt-cli

Authentication

Before using most features, you'll need to authenticate:

codebolt-cli login

To logout:

codebolt-cli logout

Commands

Version

Check the application version:

codebolt-cli version

Agent Management

Create Agent

Create a new Codebolt Agent:

codebolt-cli createagent
codebolt-cli createagent -n "MyAgent" --quick

Publish Agent

Publish an agent to the registry:

codebolt-cli publishagent [folderPath]

List Agents

List all agents created and uploaded by you:

codebolt-cli listagents

Start Agent

Start an agent in the specified working directory:

codebolt-cli startagent [workingDir]

Pull Agent

Pull the latest agent configuration from server:

codebolt-cli pullagent [workingDir]

Clone Agent

Clone an agent using its unique_id:

codebolt-cli cloneagent <unique_id> [targetDir]

MCP Tool Management

Create Tool

Create a new MCP (Model Context Protocol) tool:

codebolt-cli createtool
codebolt-cli createtool -n "MyTool" -i "my-tool-id" -d "Tool description"

Options:

  • -n, --name <name>: Name of the tool
  • -i, --id <unique-id>: Unique identifier (no spaces)
  • -d, --description <description>: Description of the tool
  • -p, --parameters <json>: Tool parameters in JSON format

Publish Tool

Publish an MCP tool to the registry:

codebolt-cli publishtool [folderPath]

This command will:

  • Read the codebolttool.yaml configuration file
  • Package and upload the tool's source code
  • Register the tool in the MCP registry
  • Handle both new tool creation and updates

Requirements for publishing:

  • A codebolttool.yaml file must be present in the tool directory
  • Required fields in codebolttool.yaml: name, uniqueName, description

Interactive prompts for new tools:

  • GitHub repository URL (optional)
  • Category selection
  • Tags (comma-separated)
  • API key requirement

List Tools

List all MCP tools published by you:

codebolt-cli listtools

Pull Tools

Pull the latest MCP tool configuration from server:

codebolt-cli pulltools [workingDir]

This command will:

  • Read your local codebolttool.yaml file
  • Fetch the latest configuration from the server
  • Compare versions and prompt for confirmation if needed
  • Update your local configuration file

Run Tool

Run a specified tool with a file:

codebolt-cli runtool <command> <file>

Inspect Tool

Inspect a server file using the MCP inspector:

codebolt-cli inspecttool <file>

MCP Tool Configuration

When creating or publishing MCP tools, ensure your codebolttool.yaml file contains:

name: "My MCP Tool"
uniqueName: "my-mcp-tool"
description: "Description of what this tool does"
version: "1.0.0"
parameters:
  param1: "value1"
  param2: "value2"

File Structure

For Agents

Agents should contain a codeboltagent.yaml configuration file.

For MCP Tools

MCP tools should contain a codebolttool.yaml configuration file and follow the MCP protocol standards.

Examples

Publishing a new MCP tool:

cd my-mcp-tool-directory
codebolt-cli publishtool

Updating an existing MCP tool:

cd my-existing-tool
codebolt-cli publishtool

The CLI will automatically detect if it's an update based on the uniqueName in your configuration.

Error Handling

The CLI provides detailed error messages and colored output for better user experience. Make sure you're authenticated and have the required configuration files before running publish commands.

Author

Codebolt Team

Agent Management

  • Create Agents: Interactive wizard for agent creation
  • Publish Agents: Deploy agents to the Codebolt platform
  • Clone Agents: Copy and customize existing agents
  • Start Agents: Run agents locally for development
  • Sync Agents: Pull latest configurations from the platform

Tool Development

  • Create Tools: Build MCP-compatible tools
  • Test Tools: Run and debug tools locally
  • Inspect Tools: Interactive debugging with MCP inspector
  • Parameter Configuration: Flexible tool parameterization

Authentication & Management

  • Secure Login: OAuth-based authentication
  • Session Management: Persistent login sessions
  • Project Organization: Structured directory management
  • Team Collaboration: Share and collaborate on agents

πŸ› οΈ Installation

Prerequisites

  • Node.js 14.0 or higher
  • npm 6.0 or higher

Global Installation (Recommended)

npm install -g codebolt-cli

Local Installation

npm install codebolt-cli
npx codebolt-cli version

Development Installation

git clone https://github.com/codeboltai/cli.git
cd cli
npm install
npm link

πŸ“– Documentation

Comprehensive documentation is available at docs.codebolt.ai:

🎯 Common Commands

Authentication

codebolt-cli login          # Login to your account
codebolt-cli logout         # End current session

Agent Commands

codebolt-cli createagent                    # Create new agent (interactive)
codebolt-cli createagent --name "My Agent" # Create with name
codebolt-cli publishagent [path]           # Publish agent to platform
codebolt-cli listagents                     # List your agents
codebolt-cli startagent [path]             # Start agent locally
codebolt-cli pullagent [path]              # Sync with platform
codebolt-cli cloneagent <id> [path]        # Clone existing agent

Tool Commands

codebolt-cli createtool                     # Create new tool (interactive)
codebolt-cli createtool --name "Tool"      # Create with options
codebolt-cli runtool <command> <file>      # Run tool command
codebolt-cli inspecttool <file>            # Debug tool with MCP inspector

Utility Commands

codebolt-cli version        # Show CLI version
codebolt-cli --help         # Show help information

πŸ“ Project Structure

The CLI organizes projects using the .codeboltAgents directory:

your-project/
β”œβ”€β”€ .codeboltAgents/
β”‚   β”œβ”€β”€ agents/
β”‚   β”‚   β”œβ”€β”€ my-agent/
β”‚   β”‚   β”‚   β”œβ”€β”€ codeboltagent.yaml
β”‚   β”‚   β”‚   β”œβ”€β”€ package.json
β”‚   β”‚   β”‚   β”œβ”€β”€ index.js
β”‚   β”‚   β”‚   └── src/
β”‚   β”‚   └── another-agent/
β”‚   └── tools/
β”‚       β”œβ”€β”€ my-tool/
β”‚       β”‚   β”œβ”€β”€ codebolttool.yaml
β”‚       β”‚   β”œβ”€β”€ package.json
β”‚       β”‚   └── index.js
β”‚       └── another-tool/
└── your-project-files...

πŸ”§ Configuration

Agent Configuration (codeboltagent.yaml)

title: "My Agent"
description: "Agent description"
unique_id: "my-agent-id"
tags: ["tag1", "tag2"]

metadata:
  agent_routing:
    worksonblankcode: true
    worksonexistingcode: true
    supportedlanguages: ["javascript", "typescript"]
    supportedframeworks: ["react", "express"]
  
  sdlc_steps_managed:
    - name: "Code Generation"
      example_instructions:
        - "Generate React component"

actions:
  - name: "component"
    description: "Generate component"
    actionPrompt: "Create a new component"

Tool Configuration (codebolttool.yaml)

name: "My Tool"
description: "Tool description"
version: "1.0.0"
uniqueName: "my-tool-id"

parameters:
  rootPath:
    type: "string"
    description: "Root directory"
    default: "./"

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Setup

git clone https://github.com/codeboltai/cli.git
cd cli
npm install
npm link

Running Tests

npm test
npm run test:watch

Code Style

npm run lint
npm run format

πŸ“ Examples

Create a React Component Generator

# Create agent
codebolt-cli createagent --name "React Generator"

# Configure during interactive setup:
# - Languages: javascript, typescript
# - Frameworks: react, next.js
# - SDLC Steps: Code Generation
# - Actions: component, hook

# Test locally
codebolt-cli startagent ./.codeboltAgents/agents/react-generator

# Publish when ready
codebolt-cli publishagent ./.codeboltAgents/agents/react-generator

Create a File Management Tool

# Create tool with parameters
codebolt-cli createtool \
  --name "File Manager" \
  --id "file-manager" \
  --description "Manages file operations" \
  --parameters '{"rootPath": "./", "extensions": [".js", ".ts"]}'

# Test tool
codebolt-cli runtool list_files ./.codeboltAgents/tools/file-manager/index.js

# Debug if needed
codebolt-cli inspecttool ./.codeboltAgents/tools/file-manager/index.js

πŸ› Troubleshooting

Common Issues

Authentication Error

Error: Not authenticated

Solution: Run codebolt-cli login

Agent Not Found

Error: Agent configuration not found

Solution: Ensure you're in the correct directory or specify the path

Tool Validation Error

Error: Invalid tool configuration

Solution: Check codebolttool.yaml syntax and required fields

Debug Mode

Enable verbose logging:

DEBUG=codebolt:* codebolt-cli <command>

πŸ“„ License

This project is licensed under the ISC License - see the LICENSE file for details.

πŸ”— Links

🏷️ Version

Current version: 1.1.35

For version history and changelog, see CHANGELOG.md.

About

Codebolt CLI Tool

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •