@zoink-dev/zoink-cli
v0.1.2
Published
AI Agent Swarm Orchestration CLI
Maintainers
Readme
Zoink CLI
AI Agent Swarm Orchestration Made Simple
Zoink is an open-source CLI tool for orchestrating swarms of OpenClaw AI agents in isolated Docker containers. Define your AI team in a simple YAML file, launch it with one command, and watch your agents collaborate through a built-in terminal dashboard.
zoink up # Bring your AI swarm to lifeFeatures
- Declarative Configuration - Define your agent team in
swarm.yamlwith roles, models, and workspaces - One-Command Orchestration -
zoink uphandles Docker networking, container lifecycle, and agent coordination - Built-in Kanban Board - Shared
kanban.mdfile for task coordination across agents - Terminal Dashboard - Real-time TUI showing swarm health, logs, and activity
- PM-Driven Delegation - Send high-level goals to a PM agent that decomposes and assigns work
- Isolated Containers - Each agent runs in its own Docker container with secure networking
- Idempotent Operations - Run
zoink upmultiple times safely without duplicating resources
Prerequisites
- Docker - Docker Desktop or Docker Engine
- Node.js 20+ - For running the CLI tool
- API Keys - Anthropic/OpenAI API key for your agents (set as environment variables)
Installation
npm install -g @zoink-dev/zoink-cli
# Or use directly from source
git clone https://github.com/zoink-dev/zoink-cli.git
cd zoink-cli
npm install
npm linkQuick Start
1. Initialize a Swarm
mkdir my-project
cd my-project
zoink config initThis creates a swarm.yaml template:
name: my-swarm
workspace: ./workspace
agents:
- name: pm-bot
role: pm
model: claude-3-5-sonnet-20241022
apiKeyEnv: ANTHROPIC_API_KEY
- name: coder-1
role: coder
model: claude-3-5-sonnet-20241022
apiKeyEnv: ANTHROPIC_API_KEY
- name: researcher-1
role: researcher
model: claude-3-5-sonnet-20241022
apiKeyEnv: ANTHROPIC_API_KEY2. Launch Your Swarm
# Set your API key
export ANTHROPIC_API_KEY="sk-ant-..."
# Start the swarm
zoink upZoink will:
- Pull the OpenClaw Docker image if needed
- Create a dedicated network (
zoink-my-swarm-net) - Start each agent in its own container
- Create a
workspace/kanban.mdboard for task coordination
3. Check Swarm Status
zoink psOutput:
NAME ROLE STATUS CONTAINER ID
pm-bot pm running a1b2c3d4e5f6
coder-1 coder running b2c3d4e5f6a1
researcher-1 researcher running c3d4e5f6a1b24. Delegate a Task
zoink run task "Research the best state management library for React and create a proof-of-concept"The PM agent will:
- Decompose the high-level goal into subtasks
- Create cards on the Kanban board
- Assign work to appropriate agents
- Coordinate execution
5. Monitor with the Dashboard
zoink dashboardOpens a full-screen TUI showing:
- Swarm health and agent status
- Live activity feed
- Kanban board visualization
- Aggregated logs
- Command input bar
6. View Agent Logs
# Stream logs from a specific agent
zoink agent logs pm-bot --follow
# View Kanban board
zoink kanban show7. Teardown
zoink downCleanly stops and removes all containers, networks, and resources.
Commands
Swarm Lifecycle
zoink up [--dir <path>] # Launch swarm from swarm.yaml
zoink down [--dir <path>] # Teardown running swarm
zoink ps [--dir <path>] # List running agents
zoink dashboard [--dir <path>] # Open terminal dashboardConfiguration
zoink config init # Generate swarm.yaml templateKanban Board
zoink kanban show # Display Kanban boardTask Orchestration
zoink run task "<description>" # Delegate task to PM agentAgent Management
zoink agent logs <name> # Stream agent logs
zoink agent logs <name> --follow # Follow logs in real-timeConfiguration
swarm.yaml Structure
name: my-swarm # Unique identifier for this swarm
workspace: ./workspace # Shared workspace directory
agents:
- name: pm-bot # Unique agent name
role: pm # Agent role (pm, coder, researcher, devops)
model: claude-3-5-sonnet-20241022 # LLM model to use
apiKeyEnv: ANTHROPIC_API_KEY # Environment variable containing API keySupported Roles
- pm - Project manager; decomposes high-level goals and assigns work
- coder - Writes code, implements features, fixes bugs
- researcher - Gathers information, evaluates libraries, reads documentation
- devops - Manages infrastructure, deployment, CI/CD
API Key Configuration
API keys are passed securely via environment variables:
# Anthropic (Claude)
export ANTHROPIC_API_KEY="sk-ant-..."
# OpenAI (GPT)
export OPENAI_API_KEY="sk-..."Then reference them in swarm.yaml:
agents:
- name: agent-1
model: claude-3-5-sonnet-20241022
apiKeyEnv: ANTHROPIC_API_KEY # References $ANTHROPIC_API_KEYArchitecture
Zoink follows a clean hexagonal architecture:
- Domain Layer - Core business logic (entities, services)
- Ports - Interfaces for external systems (Docker, config, Kanban)
- Adapters - Concrete implementations (Dockerode, file I/O, HTTP)
- CLI Layer - Command definitions and user interface
Key components:
SwarmLifecycleService- Manages swarm launch/teardown/statusTaskOrchestrationService- Delegates tasks to PM agentKanbanService- Handles Kanban board operationsDockerContainerAdapter- Interfaces with Docker via dockerode
See CLAUDE.md for detailed architecture documentation.
Development
Setup
git clone https://github.com/zoink-dev/zoink-cli.git
cd zoink-cli
npm installTesting
# Unit tests (fast, no Docker required)
npm test
# Watch mode
npm test:watch
# Coverage report
npm test:coverage
# E2E tests (requires Docker daemon)
npm run e2e:full
# Run specific test file
npx vitest run src/domain/services/SwarmLifecycleService.spec.tsProject Structure
src/
├── adapters/ # Concrete implementations of ports
├── cli/ # Command definitions
│ └── commands/ # Individual command handlers
├── domain/ # Core business logic
│ ├── entities/ # Domain objects (Swarm, Agent, KanbanBoard)
│ └── services/ # Business logic services
├── ports/ # Interface definitions for external systems
└── types/ # TypeScript type definitionsContributing
Contributions are welcome! Please read our contributing guidelines and submit pull requests to our repository.
Development Workflow
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Make changes and add tests
- Run tests:
npm test && npm run e2e:full - Commit with descriptive messages
- Push and open a pull request
Roadmap
See PRD.md for the full product roadmap. Upcoming features:
- Dynamic agent management (
zoink agent spawn,agent rm,agent pause) - Enhanced Kanban commands (
kanban add,kanban assign,kanban watch) - Full-featured dashboard with interactive tabs (Kanban, Logs, Agents)
- Human-in-the-loop approval workflows
- Resource limits and custom Docker configurations
- Multi-swarm support
License
MIT License - see LICENSE for details.
Acknowledgments
Built on top of OpenClaw - an open-source autonomous AI coding agent.
Made with ❤️ by the Zoink community
