Universal, stack-agnostic CLI dev launcher for local development
Canto is an open-source command-line tool that centralizes and simplifies local development workflows. Inspired by monorepo dev scripts like dev.sh, Canto works with any project structureβwhether you're building a monorepo, microservices, or a single application.
- π― Stack Agnostic - Works with Node.js, Python, Go, Rust, or any technology
- π³ Docker Integration - Manage Docker Compose services seamlessly
- π¦ Workspace Support - Built-in support for monorepo workspaces (npm, pnpm, yarn, bun)
- π§ Custom Commands - Execute any shell command or script
- π Interactive Menu - Beautiful TUI with Ink + React
- π Dependency Management - Define module dependencies with
dependsOn - π Centralized Logs - All module logs in one place (
./tmp/*.log) - π Cross-Platform - Works on Linux, macOS, and Windows
- β‘ Auto Port Allocation - Automatically finds free ports when conflicts arise
- π‘οΈ Type-Safe Config - YAML/JSON configuration with Zod validation
# Global installation (recommended)
npm install -g canto
# Or with bun
bun install -g cantocd your-project
canto initThis creates a dev.config.yaml file in your project root.
cantoOr use direct commands:
canto start backend # Start specific module
canto stop all # Stop all modules
canto logs frontend # View module logs
canto health # Check service healthCreate a dev.config.yaml in your project root:
# Optional global settings
global:
logsDir: ./tmp
autoAllocatePorts: true
prerequisites:
docker: true
dockerCompose: true
# Define your modules
modules:
# Docker infrastructure
- name: infra
type: docker
composeFile: ./docker-compose.dev.yaml
services:
- postgres
- redis
- traefik
# Backend workspace
- name: backend
type: workspace
path: ./apps/backend
run:
dev: npm run dev
build: npm run build
test: npm test
dependsOn:
- infra
env:
NODE_ENV: development
PORT: "3000"
# Frontend workspace
- name: frontend
type: workspace
path: ./apps/frontend
run:
dev: npm run dev
build: npm run build
dependsOn:
- backend
packageManager: pnpm
# Custom script
- name: worker
type: custom
command: node scripts/worker.js
cwd: ./apps/backend
dependsOn:
- infraCanto supports multiple configuration formats:
- YAML (recommended):
dev.config.yamlordev.config.yml - JSON:
dev.config.json - TypeScript/JavaScript (advanced):
dev.config.tsordev.config.js
Executes commands in a workspace directory (e.g., npm/pnpm packages).
- name: backend
type: workspace
path: ./apps/backend
run:
dev: pnpm run dev
build: pnpm run build
test: pnpm test
packageManager: pnpm # auto | npm | yarn | pnpm | bunManages Docker Compose services.
- name: infra
type: docker
composeFile: ./docker-compose.yaml
services: # Optional: specific services
- postgres
- redis
profiles: # Optional: Docker Compose profiles
- devExecutes any shell command.
- name: custom-script
type: custom
command: ./scripts/my-script.sh
cwd: ./tools # Optional: working directory# Interactive menu (default)
canto
# Module management
canto start <module> # Start specific module
canto start all # Start all modules
canto stop <module> # Stop specific module
canto stop all # Stop all modules
canto restart <module> # Restart module
canto logs <module> # View module logs
# Utilities
canto list # List all modules
canto health # Health check for services
canto init # Initialize config file
canto --help # Show helpmodules:
- name: infra
type: docker
composeFile: ./infra/docker-compose.yaml
- name: backend
type: workspace
path: ./packages/backend
run:
dev: pnpm run dev
dependsOn: [infra]
- name: frontend
type: workspace
path: ./packages/frontend
run:
dev: pnpm run dev
dependsOn: [backend]modules:
- name: infra
type: docker
composeFile: ./docker-compose.yaml
- name: auth-service
type: workspace
path: ./services/auth
run:
dev: npm run dev
dependsOn: [infra]
- name: api-gateway
type: workspace
path: ./services/gateway
run:
dev: npm run dev
dependsOn: [auth-service]
- name: user-service
type: workspace
path: ./services/users
run:
dev: npm run dev
dependsOn: [infra]modules:
- name: postgres
type: docker
composeFile: ./docker-compose.yaml
services: [postgres]
- name: node-api
type: workspace
path: ./api
run:
dev: npm run dev
dependsOn: [postgres]
- name: python-worker
type: custom
command: python -m uvicorn main:app --reload
cwd: ./worker
dependsOn: [postgres]git clone https://github.com/Excelsi-Innovations/canto.git
cd canto
npm installnpm run dev # Run in watch mode
npm run build # Build for production
npm test # Run tests
npm run lint # Lint code
npm run format # Format code with Prettier
npm run type-check # TypeScript type checking
npm run validate # Run all checks (lint + format + type-check + test)# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Run tests with coverage
npm run test:coveragecanto/
βββ src/
β βββ cli/ # CLI interface & Ink menu
β βββ modules/ # Module implementations (docker, workspace, custom)
β βββ processes/ # Process management with Bun.spawn
β βββ config/ # Config parsing & validation
β βββ utils/ # Cross-platform utilities
β βββ init/ # Init command & templates
βββ tests/
β βββ unit/ # Unit tests
β βββ integration/ # Integration tests
β βββ fixtures/ # Test fixtures
βββ bin/ # Executable entry point
βββ reference/ # Reference implementations
Contributions are welcome! Please read our Contributing Guide first.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Canto is dual-licensed:
For personal, educational, and open-source projects, Canto is free under the MIT License.
Free for:
- β Personal projects and side projects
- β Educational purposes (students, teachers, schools)
- β Open-source projects (MIT-compatible licenses)
- β Non-profit organizations
- β Small teams (β€5 developers) using Canto internally
Commercial use requires a paid license from Excelsi.
Commercial use includes:
- π’ For-profit companies with >5 developers
- π° SaaS platforms and commercial products
- π¦ Redistributing Canto in commercial packages
- π·οΈ White-label or rebranded versions
Benefits:
- β Priority support with SLA
- β Custom features and integrations
- β Early security updates
- β Legal protection and indemnification
- β Remove attribution requirements
Pricing: Starting at $99/month
Contact: thiago.santos@excelsi.dev
Details: LICENSE-COMMERCIAL
Why dual licensing?
This model allows us to keep Canto free for the community while sustainably developing enterprise features and providing professional support.
For full licensing details, see:
- LICENSE - Dual license overview
- LICENSE-MIT - Open source terms
- LICENSE-COMMERCIAL - Commercial terms
Copyright (c) 2024 Thiago Santos / Excelsi
- Inspired by the
dev.shscript from the Doutor Vida monorepo - Built with Ink for beautiful CLI UIs
- Powered by Bun for blazing-fast performance
- Configuration validation with Zod
- Documentation (Coming soon)
- Issue Tracker
- Discussions
Made with β€οΈ by developers, for developers