Skip to content

ltngt-ai/mind-swarm-cli-ui

Repository files navigation

MindSwarm CLI UI

A terminal-based command-line interface for the MindSwarm agent system. This CLI provides the same functionality as the web UI but optimized for terminal users.

Features

  • Agent Communication: Direct communication with MindSwarm agents via RFC2822 mail protocol
  • Project Management: Create, list, and manage projects from the terminal
  • Task Management: Monitor and interact with tasks across projects
  • Agent Monitoring: View agent status and communicate with individual agents
  • Interactive Chat: Real-time chat sessions with agents
  • WebSocket Integration: Real-time updates and notifications
  • Shared Templates: Uses the same mail templates as the web UI for consistency

Installation

npm install -g mind-swarm-cli-ui

Or run directly with npx:

npx mind-swarm-cli-ui

Usage

Basic Commands

# Start interactive mode
mind-swarm

# Quick commands
mind-swarm projects list
mind-swarm agents list
mind-swarm chat ui-agent
mind-swarm project create "My New Project"

Interactive Mode

The CLI provides an interactive mode with:

  • Project dashboard
  • Agent monitoring
  • Live chat interface
  • Real-time status updates

Configuration

Create a config file at ~/.mindswarm/config.json:

{
  "server": {
    "url": "ws://localhost:8000/ws",
    "apiUrl": "http://localhost:8000/api"
  },
  "ui": {
    "theme": "dark",
    "showTimestamps": true,
    "compactMode": false
  }
}

Architecture

The CLI is built with:

  • Commander.js: Command-line interface framework
  • WebSocket Client: Real-time communication with MindSwarm backend
  • Blessed: Terminal UI components for interactive mode
  • Shared Templates: Common mail templates with the web UI
  • TypeScript: Type-safe development

Development

# Clone and install
git clone [repo-url]
cd mind-swarm-cli-ui
npm install

# Development mode
npm run dev

# Build
npm run build

# Test
npm test

Commands

Projects

  • mind-swarm projects list - List all projects
  • mind-swarm projects create <name> - Create a new project

Chat

  • mind-swarm chat <email> - Start interactive chat with an agent by email address
  • mind-swarm chat <email> -s <subject> - Chat with custom subject line
  • mind-swarm chat <email> -d - Chat with debug logging enabled
  • mind-swarm projects show <id> - Show project details
  • mind-swarm projects delete <id> - Delete a project

Agents

  • mind-swarm agents list - List all agents
  • mind-swarm agents show <id> - Show agent details
  • mind-swarm agents chat <id> - Start chat with an agent

Tasks

  • mind-swarm tasks list [project-id] - List tasks (optionally for a project)
  • mind-swarm tasks show <id> - Show task details

Interactive

  • mind-swarm dashboard - Open interactive dashboard
  • mind-swarm chat [agent-id] - Start interactive chat

Shared Components

This CLI shares templates and types with the web UI:

  • Mail templates for consistent agent communication
  • Type definitions for projects, agents, and tasks
  • WebSocket protocol implementation

License

MIT

About

Command Line Interface for MindSwarm - TypeScript-based CLI for project and agent management

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors