π Apito CLI is a powerful command-line tool for managing projects, plugins, functions, and deployments on the Apito platform. It provides a seamless development experience from local development to cloud deployment with enhanced database management, plugin hot-reload system, and Docker integration.
Website Β· Documentation Β· Discord
- π What's New
- π¦ Installation
- π― Getting Started
- π Command Reference
- ποΈ Project Structure
- βοΈ Configuration
- π¨ Troubleshooting
- π Useful Links
- π€ Contributing
- π License
- Smart Version Tracking: Automatically fetches and stores latest engine and console versions
- Update Detection: Checks for new versions every time you run
apito start - Interactive Updates: Choose which components to update with a simple prompt
- Version Pinning: Uses specific version tags instead of
:latestfor consistent deployments - Zero-Downtime Updates: Pull new images and regenerate docker-compose.yml seamlessly
- GitHub Integration: Fetches versions directly from GitHub releases and container registry
- Add from Registry: Install plugins with
apito plugin add <name>from the official registry or any GitHub URL - Hot Reload Plugins: Deploy and update HashiCorp plugins without server restarts
- Multi-language Support: Create plugins in Go, JavaScript, or Python
- Secure Deployment: Unified
apt_access token authentication for plugin operations - Plugin Lifecycle Management: Create, deploy, update, start, stop, restart, and delete plugins
- Template Scaffolding: Generate plugin scaffolds with best practices built-in
- Real-time Status Monitoring: Live plugin status and health checks
- Interactive Database Setup: Choose between default credentials or custom configuration
- Multiple Database Support: PostgreSQL, MySQL, MariaDB, MongoDB, Redis, SQL Server
- Persistent Data Volumes: Named Docker volumes for data persistence
- Configuration Overwrite Protection: Confirmation prompts before overwriting existing settings
- Comprehensive Docker Checks: Installation, Docker Compose, and daemon status verification
- Consistent Container Naming:
apito-system-{engine}andapito-project-{engine}patterns - Volume Management: Automatic volume creation with matching container names
- OS-Specific Guidance: Helpful instructions for Docker installation across platforms
- Centralized .env Management: New
env.gowith comprehensive environment variable operations - Configuration Persistence: Database settings saved to
~/.apito/bin/.env - Smart Configuration Loading: Automatic detection of system vs. project database settings
- Backup and Validation: Environment file backup and required variable validation
- Database-Specific Commands:
--db systemand--db projectflags for granular control - Separated Concerns: Database setup moved from
initto dedicatedstart --dbcommands - Consistent Command Patterns: Unified
--dbflag across start, stop, and restart commands - Enhanced Status Monitoring: Database status display in
apito statuscommand - Comprehensive Logging: New
apito logscommand for service and database logs - Admin Password Reset:
apito admin password reset [email]with engine URL (defaulthttp://localhost:5050) and reset-token prompt - Silent configuration: if
~/.apito/config.ymlor~/.apito/bin/.envis missing, the CLI writes the defaults and prints one warning
brew tap apito-io/tap
brew install apito-clicurl -fsSL https://get.apito.io/install.sh | bash# Download the installer
wget -O install.sh https://get.apito.io/install.sh
# Make it executable
chmod +x install.sh
# Run the installer
./install.shapito --versionThe first command that needs ~/.apito writes config.yml, bin/.env.engine, and bin/.env.console when they are missing, then prints one warning and continues. There is no setup prompt. .env.engine holds the engine settings, including a generated BRANKA_KEY and signing-key paths. .env.console holds the console URLs. apito start mounts both files into Studio and mounts ~/.apito/db at /data.
Pin a Studio image with studio_version in ~/.apito/config.yml. Leave it empty to use the latest published ghcr.io/apito-io/studio tag.
apito account create local
apito createapito create creates a project on a connected account through the system API. One account is selected automatically. Several accounts use the same picker as apito sync. Zero accounts asks you to connect one first. The account can be local Studio or cloud. Plugin scaffolds stay on apito plugin create.
apito startThis prepares ~/.apito when the files are missing, pulls ghcr.io/apito-io/studio, and runs the apito-studio container. The console is at http://localhost:5055. The database stays in ~/.apito/db. apito stop, apito restart, apito status, and apito logs talk to that container.
~/.apito/config.yml, ~/.apito/bin/.env.engine, and ~/.apito/bin/.env.console are created with defaults the first time a command needs them. The CLI prints one warning and continues. .env.engine is also copied to ~/.apito/bin/.env. Set studio_version to pin ghcr.io/apito-io/studio; leave it empty to track the latest published tag.
Copies one project's physical database, or one SaaS tenant database, from a source account onto a destination account. The destination project must already exist. If the schema hashes differ, the command stops and tells you to run apito sync --type schema first. This is not a schema migration and it is not apito sync.
Usage:
apito migrateA remote destination needs --allow-push and a second confirmation.
**Default Configuration:**
The first run writes `~/.apito/bin/.env.engine` and `~/.apito/bin/.env.console`. The engine file points the database at `/data` inside the container, which is the `~/.apito/db` volume. `BRANKA_KEY` is a generated 32-character key. An existing key is kept. The engine listens on port `5051` inside the container. The console file points the UI at `http://localhost:5055`. The first start prints `oss@apito.io` and a random admin password. Later starts keep that password.
**BRANKA_KEY Behavior:**
- If BRANKA_KEY is not set, a secure 32-character random key is automatically generated
- If BRANKA_KEY is already set, the existing value is preserved
- The generated key includes uppercase, lowercase, numbers, and special characters
### π€ **Admin**
#### `admin password reset` - Reset User Password by Email
Resets the password for a system user by email. The engine must be running. You provide the engine/API URL (or accept the default), paste the reset token (admin secret), and set a new password.
**Usage:**
```bash
apito admin password reset [email]
apito admin password reset -u <engine-url> [email]
Options:
--url, -u- Engine/API base URL. If omitted, you are prompted; default ishttp://localhost:5050.
Flow:
- Engine URL β From
-u/--url, or prompt (defaulthttp://localhost:5050). - Email β From argument or prompt.
- Reset token β Prompt: paste the admin reset secret (same value as
APITO_ADMIN_RESET_SECRETin the engineβs.env). - Confirm β Confirm reset for the given email.
- New password β Enter and confirm new password.
Examples:
# Interactive: URL prompt (default localhost:5050), then email, token, password
apito admin password reset
# With email on the command line
apito admin password reset admin@example.com
# Specify engine URL (no URL prompt)
apito admin password reset -u https://api.myhost.com admin@example.comNote: The reset token is not read from your local env; you paste it when prompted (it must match the engineβs APITO_ADMIN_RESET_SECRET).
Shows whether services are running and displays database status when available.
Usage:
apito status [engine|console]Features:
- Service Status: Shows running status for engine and console services
- Database Status: Automatically displays database container status when
db-compose.ymlexists - Real-time Information: Shows current running/stopped status for all containers
- Docker Integration: Works seamlessly with Docker and local service modes
- Automatic Detection: Automatically detects and shows database status without additional flags
Examples:
# Show all services and database status
apito status
# Show specific service status
apito status engine
apito status consoleOutput Example:
[INFO] Database Status:
[SUCCESS] apito-system-postgres: Running
[SUCCESS] apito-project-postgres: Running
[WARNING] engine (docker) is not running
[WARNING] console (docker) is not runningView logs for Apito services (engine/console) and databases with real-time following and tail control.
Usage:
apito logs [engine|console] [--db system|project] [--follow] [--tail N]Options:
--db system|project- Show logs for specific database type--follow, -f- Follow log output in real-time--tail N, -n N- Show last N lines (default: 100)
Features:
- Service Logs: View logs for engine and console services
- Database Logs: View logs for system and project databases
- Real-time Following: Follow logs as they happen with
--followflag - Tail Control: Control how many log lines to show with
--tailflag - Docker & Local Support: Works seamlessly in both Docker and local service modes
- Automatic Container Detection: Automatically finds the correct container for database logs
Examples:
# Database logs
apito logs --db system --tail 10
apito logs --db project --follow
apito logs --db system -f -n 5
# Service logs
apito logs engine --tail 50
apito logs console --follow
apito logs engine -f -n 100
# Default behavior (engine logs, last 100 lines)
apito logsOutput Examples:
# Database logs
[INFO] Showing logs for system database (apito-system-postgres):
2025-08-14 05:48:09.188 UTC [1] LOG: database system is ready to accept connections
# Service logs (when services are running)
[INFO] Showing logs for engine service:
# Log output from the engine containerStart system or project databases with interactive configuration and Docker integration.
Usage:
apito start --db system # Start system database
apito start --db project # Start project databaseFeatures:
- Interactive Database Selection: Choose from PostgreSQL, MySQL, MariaDB, MongoDB, Redis, SQL Server
- Credential Options: Use default credentials or enter custom configuration
- Smart Configuration: Automatic detection of existing database settings
- Overwrite Protection: Confirmation prompts before overwriting existing configuration
- Persistent Volumes: Named Docker volumes for data persistence
- Consistent Naming: Container names follow
apito-{dbType}-{engine}pattern
Database Engines Supported:
- PostgreSQL (port 5432) - Professional-grade relational database
- MySQL (port 3306) - Popular open-source database
- MariaDB (port 3307) - MySQL fork with enhanced features
- MongoDB (port 27017) - Document-based NoSQL database
- Redis (port 6379) - In-memory key-value store
- SQL Server (port 1433) - Microsoft's enterprise database
Configuration Options:
- Default Credentials: Automatic setup with
apitouser, generated password, andapitodatabase - Custom Configuration: Full control over host, port, username, password, and database name
- Engine-Specific Fields: Special configuration options for databases like MongoDB
Examples:
# Start system database with interactive setup
apito start --db system
# Start project database with interactive setup
apito start --db project
# Start services without database (default behavior)
apito startVolume Naming Convention:
- System Database:
apito-system-{engine}_data(e.g.,apito-system-postgres_data) - Project Database:
apito-project-{engine}_data(e.g.,apito-project-mysql_data)
Stop specific database services while keeping other services running.
Usage:
apito stop --db system # Stop system database
apito stop --db project # Stop project databaseExamples:
# Stop only the system database
apito stop --db system
# Stop only the project database
apito stop --db project
# Stop all services (default behavior)
apito stopRestart specific database services while keeping other services running.
Usage:
apito restart --db system # Restart system database
apito restart --db project # Restart project databaseExamples:
# Restart only the system database
apito restart --db system
# Restart only the project database
apito restart --db project
# Restart all services (default behavior)
apito restartApito CLI provides a comprehensive plugin management system that allows you to create, deploy, update, and manage HashiCorp-based plugins with hot reload capabilities.
Configure accounts, server URLs, access tokens (apt_...), and other CLI settings for plugin management.
Usage:
apito config <command> [options]Commands:
set <key> <value>- Set a configuration valueset <url|key> <value>- Set account-specific configuration with interactive selectionset -a <account> <url|key> <value>- Set account-specific configuration with account flagset account <account-name> <url|key> <value>- Set account-specific configurationget [key]- Get configuration value(s)init- Initialize configuration interactivelyreset- Reset configuration to defaults
Configuration Keys:
timeout- Request timeout in seconds (default: 30)default_plugin- Default plugin for operationsmode- CLI run mode (docker or manual)default_account- Default account for plugin operations
Account Configuration:
url- Apito server URL for the accountkey- Apito access token (apt_...) for the account, generated in Console β Access Token. Legacycli-/sdk-/mcp-prefixed keys are retired and rejected withTOKEN_FORMAT_RETIRED.
Interactive Account Selection:
When setting url or key without specifying an account, the CLI will show an interactive menu to choose from configured accounts:
# Interactive account selection (shows list of accounts)
apito config set key AQAAAABo3Wov1s_uv6RndWxE...
# Output:
# π Select Account
# 1. local (default)
# 2. staging
# 3. production
# ? Choose account: [Use arrows to select]
# Direct account specification with flag
apito config set -a production key abc123...
apito config set --account staging url https://staging-api.apito.io
# Auto-selects if only one account exists
# Shows error if no accounts configuredExamples:
# Interactive configuration setup (creates accounts)
apito config init
# Interactive account selection for setting values
apito config set key abc123... # Shows account selection menu
apito config set url https://api.apito.io # Shows account selection menu
# Set account-specific values with -a flag (recommended)
apito config set -a production key abc123...
apito config set -a staging url https://staging-api.apito.io
# Set account-specific values (existing patterns still work)
apito config set account production url https://api.apito.io
apito config set production key abc123...
# Set default account
apito config set default_account production
# View all configuration including accounts
apito config get
# View specific setting
apito config get default_account
# View all accounts
apito config get account
# Reset all configuration
apito config resetManage multiple Apito accounts for different environments (production, staging, local, etc.).
Usage:
apito account <command> [options]Commands:
create <account-name>- Create a new account with interactive setuplist- List all configured accountsselect <account-name>- Set default account for plugin operationstest <account-name>- Test account connection and credentialsdelete <account-name>- Delete an account configuration
Examples:
# Create a new account
apito account create production
# List all accounts
apito account list
# Test account connection
apito account test production
# Set default account
apito account select production
# Delete an account
apito account delete stagingAccount Workflow:
# 1. Create accounts for different environments
apito account create production
apito account create staging
apito account create local
# 2. Configure each account (multiple ways)
# Method A: Using -a flag (recommended)
apito config set -a production url https://api.apito.io
apito config set -a production key prod-key-123
apito config set -a staging url https://staging-api.apito.io
apito config set -a staging key staging-key-456
apito config set -a local url http://localhost:5050
apito config set -a local key local-key-789
# Method B: Interactive selection (shows menu)
apito config set url https://api.apito.io # Select from account list
apito config set key prod-key-123 # Select from account list
# Method C: Traditional syntax (still works)
apito config set account production url https://api.apito.io
apito config set production key prod-key-123
# 3. Test account connections
apito account test production
apito account test staging
apito account test local
# 4. Set default account
apito account select production
# 5. Use plugin commands (will use default account)
apito plugin deploy
apito plugin listCreate, deploy, update, and manage HashiCorp-based plugins with hot reload capabilities.
deploy, update, delete, stop, restart) require confirmation and will display detailed information about the operation, including:
- Action being performed
- Plugin ID and version
- Target account and server URL
- Additional plugin details (language, type)
Usage:
apito plugin <command> [options]Commands:
add <plugin-name-or-github-url>- Add a plugin from the official registry or a GitHub repository (downloads latest release and deploys)β οΈ Requires confirmationcreate- Create a new plugin scaffoldbuild [directory]- Build plugin based on language configurationdeploy [directory]- Deploy plugin to serverβ οΈ Requires confirmationupdate <plugin-id> [directory]- Update existing pluginβ οΈ Requires confirmationlist- List all plugins on serverstatus <plugin-id>- Get plugin statusdelete <plugin-id>- Delete plugin from serverβ οΈ Requires confirmationrestart <plugin-id>- Restart pluginβ οΈ Requires confirmationstop <plugin-id>- Stop pluginβ οΈ Requires confirmationstart <plugin-id>- Start pluginenv- Show build environment information
Options:
--account, -a- Specify account to use for plugin operations (optional, uses default if not specified)--replace- Delete existing plugin before deployment (foraddanddeploycommands)--dir, -d- Plugin directory (for deploy/update/build commands)--build, -b- Build method:systemordocker(forbuildcommand, skips interactive prompt)--platform, -p- Target OS:linux,darwin, orwindows(forbuildcommand, skips interactive prompt)--arch- Target architecture:amd64orarm64(forbuildcommand, skips interactive prompt)--type, -t- Go build type:debug,develop, orproduction(forbuildcommand, skips interactive prompt)
Features:
- Hot Reload: Deploy and update plugins without server restarts
- Process Isolation: HashiCorp go-plugin framework for fault tolerance
- Multi-language Support: Go, JavaScript, Python plugin development
- Secure Deployment: Unified
apt_access token authentication - Real-time Status: Live plugin status monitoring and health checks
- Template Generation: Scaffold creation with best practices
- Confirmation System: Sensitive operations require explicit confirmation with detailed operation information
Add Plugin from Registry or GitHub:
# Add official plugin by name (from registry)
apito plugin add hc-auth-plugin
# Add plugin from GitHub URL
apito plugin add https://github.com/udhvabon/hc-prottoy-plugin
apito plugin add https://github.com/udhvabon/hc-prottoy-plugin.git
# Add with account and replace existing deployment
apito plugin add hc-auth-plugin --account production --replaceThe add command fetches the latest release from GitHub, downloads the platform-specific binary (darwin/linux/windows, amd64/arm64), and deploys it. Use official plugin IDs from the registry or any GitHub repository URL that follows the plugin deployment docs.
Plugin Creation Workflow:
# 1. Configure CLI for plugin management
apito config init
# This creates your first account interactively
# 2. Create additional accounts for different environments (optional)
apito account create staging
apito config set account staging url https://staging-api.apito.io
apito config set account staging key staging-key-456
# 3. Set default account
apito account select production
# 4. Create new plugin scaffold
apito plugin create
# Follow prompts to select:
# - Plugin name (e.g., hc-my-awesome-plugin)
# - Language (Go, JavaScript, Python)
# - Plugin type (System, Project, Custom)
# 5. Develop your plugin
cd hc-my-awesome-plugin
# Edit main.go or main.js based on your language choice
# Modify config.yml with plugin metadata
# 6. Build plugin
apito plugin build
# 7. Deploy plugin to server (uses default account)
apito plugin deploy
# 8. Check plugin status
apito plugin status hc-my-awesome-pluginPlugin Development:
# Add plugin from registry or GitHub (quickest way to get a plugin)
apito plugin add hc-auth-plugin
apito plugin add https://github.com/owner/hc-my-plugin
# Create plugin scaffold (for custom development)
apito plugin create
# > Enter plugin name: hc-file-processor
# > Select language: Go
# > Select type: System
# Build plugin (automatically detects language)
apito plugin build
# > Choose build method: System Go / Docker
# > (For Go) Choose build type: Debug / Development / Production
# Build plugin non-interactively (for automation/CI)
apito plugin build --build system --platform linux --arch amd64 --type production
apito plugin build -b docker -p linux --arch arm64 -t debug
# Deploy from current directory (requires confirmation)
apito plugin deploy
# Deploy from specific directory
apito plugin deploy ./path/to/plugin
# Deploy to specific account
apito plugin deploy --account staging
apito plugin deploy -a production
# Force deploy (delete existing before deploy)
apito plugin deploy -a udbhabon --force
apito plugin deploy -a udbhabon -f
apito plugin deploy -a udbhabon --replace
# Update existing plugin (requires confirmation)
apito plugin update hc-file-processor
# List plugins from specific account
apito plugin list --account staging
apito plugin list -a production
# Check plugin status from specific account
apito plugin status hc-file-processor --account stagingPlugin Build System:
The build system automatically detects the plugin language from config.yml and provides appropriate build options. It supports both interactive and non-interactive modes, similar to the --account flag pattern.
Build Modes:
- Interactive Mode (default): When no flags are provided, the CLI shows interactive prompts for build options
- Non-Interactive Mode: When flags are provided, the CLI skips prompts and uses flag values directly
Go Plugins:
# Build Go plugin with interactive options
apito plugin build
# Options:
# - System vs Docker build
# - Target platform (Linux AMD64, Linux ARM64, macOS, Windows, Host OS)
# - Build type: Debug / Development / Production
# Build Go plugin non-interactively (for automation/CI/CD)
apito plugin build --build system --platform linux --arch amd64 --type production
apito plugin build -b docker -p linux --arch arm64 -t debug
apito plugin build --build system -p darwin --arch arm64 --type develop
# Partially interactive (only build method specified)
apito plugin build --build docker
# Will still prompt for platform and build type
# Examples of actual build commands used:
# Debug: go build -gcflags="all=-N -l" -o hc-plugin-name .
# Development: GOOS=linux GOARCH=amd64 go build -o hc-plugin-name .
# Production: CGO_ENABLED=0 go build -ldflags "-s" -a -o hc-plugin-name .Build Flags:
-
--build, -b: Build method (systemordocker)- If not specified, prompts interactively
- If
systemis specified but runtime not available, falls back to Docker with warning
-
--platform, -p: Target operating system (linux,darwin,windows)- If not specified, prompts interactively
- Must be used with
--archfor non-interactive mode
-
--arch: Target architecture (amd64,arm64)- If not specified with
--platform, uses host architecture - Validates platform/arch combinations
- If not specified with
-
--type, -t: Go build type (debug,develop,production)- If not specified, prompts interactively
- Only applies to Go plugins
- Accepts:
debug,develop/development,production
JavaScript Plugins:
# Build JavaScript plugin
apito plugin build
# Automatically runs:
# - npm install (install dependencies)
# - node --check index.js (syntax validation)Python Plugins:
# Build Python plugin
apito plugin build
# Automatically runs:
# - pip3 install -r requirements.txt (if exists)
# - python3 -m py_compile main.py (syntax validation)Build Environment:
# Check available build tools
apito plugin env
# Shows status of:
# - Go runtime
# - Node.js runtime
# - Python runtime
# - Docker availability
# - System architecturePlugin Management:
# List all plugins
apito plugin list
# Get detailed plugin status
apito plugin status hc-file-processor
# Control plugin lifecycle (requires confirmation)
apito plugin restart hc-file-processor
apito plugin stop hc-file-processor
apito plugin start hc-file-processor
# Remove plugin (requires confirmation)
apito plugin delete hc-file-processorPlugin Configuration (config.yml):
plugin:
id: "hc-your-plugin-name"
language: "go" # go, js, python
title: "Your Plugin Title"
icon: "π"
description: "Plugin description"
type: "system" # system, project, custom
role: "custom"
exported_variable: "NormalPlugin"
enable: true
debug: false
version: "1.0.0"
author: "Your Name"
repository_url: "https://github.com/your/repo"
branch: "main"
binary_path: "hc-your-plugin-name"
handshake_config:
protocol_version: 1
magic_cookie_key: "APITO_PLUGIN"
magic_cookie_value: "apito_plugin_magic_cookie_v1"
env_vars:
- key: "PLUGIN_DEBUG_MODE"
value: "false"Plugin Types:
- System Plugins: Core functionality, authentication, storage drivers
- Project Plugins: Project-specific business logic and workflows
- Custom Plugins: User-defined functionality and integrations
Supported Languages:
- Go: Native HashiCorp go-plugin support with maximum performance
- JavaScript: Node.js-based plugins with npm ecosystem access
- Python: Python plugins with pip package management
The CLI now provides comprehensive visibility into your Apito infrastructure:
- Service Status: Monitor engine and console service health
- Database Status: Real-time database container status monitoring
- Automatic Detection: Database status automatically displayed when available
- Docker Integration: Seamless integration with Docker container management
Access logs for all components with powerful filtering and real-time capabilities:
- Service Logs: Engine and console application logs
- Database Logs: Database container logs with engine-specific formatting
- Real-time Following: Follow logs as they happen for live debugging
- Tail Control: View specific numbers of log lines for focused analysis
- Multi-mode Support: Works in both Docker and local service modes
# Check overall system health
apito status
# Monitor specific services
apito status engine
apito status console
# View real-time logs
apito logs --db system --follow
apito logs engine --follow
# Analyze recent activity
apito logs --db project --tail 100
apito logs console --tail 50- Development Debugging: Follow logs in real-time during development
- Production Monitoring: Check service health and database status
- Troubleshooting: Analyze recent logs for error investigation
- Performance Analysis: Monitor database and service performance
- Deployment Verification: Confirm services are running correctly after deployment
Creates new projects, functions, or models via API calls to the Apito server.
Usage:
apito create <resource> [options]Resources:
project- Create a new Apito project via APIfunction- Create a new function (coming soon)model- Create a new data model (coming soon)
Options:
--name, -n- Name of the resource--project, -p- Project name (alternative to --name)
Features:
- Interactive project creation with prompts
- Database type selection with visual icons
- Automatic SYNC_TOKEN management
- HTTP API integration with authentication
- Real-time project creation on Apito server
Database Options:
- Embed & SQL (mdi:database) - Default embedded database
- MySQL (logos:mysql) - MySQL database
- MariaDB (logos:mariadb) - MariaDB database
- PostgreSQL (logos:postgresql) - PostgreSQL database
- Couchbase (logos:couchbase) - Couchbase database
- Oracle (logos:oracle) - Oracle database
- Firestore (logos:firebase) - Firebase Firestore
- MongoDB (logos:mongodb) - MongoDB database
- DynamoDB (logos:aws-dynamodb) - AWS DynamoDB
Examples:
# Create a new project with prompts
apito create project
# Create a project with name flag
apito create project -p my-ecommerce-app
# Create a project with name flag (alternative)
apito create project -n my-ecommerce-appStarts the Apito engine and console with automatic setup and downloads.
Usage:
apito start [--db system|project]Options:
--db system- Start system database with interactive setup--db project- Start project database with interactive setup
Features:
- Run Modes: Docker (default) or Manual, stored in
~/.apito/config.yml - Docker Mode: Uses compose with persistent volumes and
.envmounted inside the engine container - Manual Mode: Downloads binaries, installs Caddy, and manages processes with PID/log files
- Port Management: Checks 5050/4000 (Manual mode only)
- Graceful Shutdown: Stops all services on Ctrl+C
- Database Integration: Optional database startup with
--dbflag
What it does:
- Loads run mode from
~/.apito/config.yml(defaults to Docker) - Database Setup (if
--dbflag specified):- Interactive database engine selection
- Credential configuration (default or custom)
- Docker container creation with persistent volumes
- Configuration saved to
~/.apito/bin/.env
- Service Startup:
- Docker mode: Compose up engine and console with required volumes
- Manual mode: Port check, download components, start services
- Waits for interrupt to stop services
Examples:
# Start Apito with automatic setup
apito start
# Start with system database
apito start --db system
# Start with project database
apito start --db projectAccess URLs:
- Engine API: http://localhost:5050
- Console UI: http://localhost:4000
System Requirements:
- Internet connection for downloading components
- Write permissions to
~/.apito/directory - Port 5050 and 4000 available
- Docker and Docker Compose (for database features)
Stops one or more Apito services.
Usage:
apito stop [engine|console|all] [--db system|project]Options:
--db system- Stop only the system database--db project- Stop only the project database
Examples:
# Stop everything
apito stop
# Stop only engine
apito stop engine
# Stop only console
apito stop console
# Stop only system database
apito stop --db system
# Stop only project database
apito stop --db projectRestarts one or more Apito services.
Usage:
apito restart [engine|console|all] [--db system|project]Options:
--db system- Restart only the system database--db project- Restart only the project database
Examples:
# Restart everything
apito restart
# Restart only engine
apito restart engine
# Restart only console
apito restart console
# Restart only system database
apito restart --db system
# Restart only project database
apito restart --db projectUpdate Apito engine, console, or the CLI itself.
Usage:
apito update <engine|console|self> [-v <version>]Examples:
# Update engine to latest version
apito update engine
# Update console to a specific version
apito update console -v v1.2.3
# Update the CLI itself to the latest version
apito update selfApito CLI sets up the following structure:
~/.apito/
βββ bin/
β βββ engine # Engine binary (Manual mode)
β βββ caddy # Caddy binary (Manual mode)
β βββ .env # System configuration mounted into engine container
βββ db/ # Persistent engine data volume (Docker mode)
βββ docker-compose.yml # Engine + Console compose (Docker mode)
βββ db-compose.yml # Database compose (generated when --db flag used)
βββ console/ # Console static files (Manual mode)
βββ Caddyfile # Console server config (Manual mode)
βββ logs/ # Service log files (Manual mode)
β βββ engine.log # Engine service logs
β βββ console.log # Console service logs
βββ run/ # Process PID files (Manual mode)
β βββ engine.pid
β βββ console.pid
βββ config.yml # CLI config (mode, plugin server URL, access token)
Logging & Monitoring:
- Service Logs: Local service logs stored in
~/.apito/logs/(Manual mode) - Container Logs: Docker container logs accessible via
apito logscommand - Database Logs: Database container logs with real-time following capability
- Status Monitoring: Real-time service and database status via
apito status
The CLI manages two types of configuration:
mode- CLI run mode (docker or manual)default_account- Default account for plugin operationstimeout- Request timeout in seconds (default: 30)default_plugin- Default plugin for operationsengine_version- Current engine Docker image version (auto-managed)console_version- Current console Docker image version (auto-managed)accounts- Account configurations map (supports multiple accounts)account_name- Account configurationserver_url- Apito server URL for the accountcloud_sync_key- Apito access token (apt_...) for the account
Setting Account Configuration:
You can configure accounts using three methods:
-
Interactive Selection (recommended for beginners):
apito config set key <value> # Shows account selection menu apito config set url <value> # Shows account selection menu
-
Using -a Flag (recommended for scripts):
apito config set -a production key <value> apito config set -a staging url <value>
-
Traditional Syntax (still supported):
apito config set account production url <value> apito config set production key <value>
The CLI manages engine configuration in ~/.apito/bin/.env:
ENVIRONMENT- local/development/staging/productionCOOKIE_DOMAIN- e.g., localhostCORS_ORIGIN- e.g., http://localhost:4000BRANKA_KEY- Generated secret keyAPITO_ADMIN_RESET_SECRET- Secret for admin password reset (used when runningapito admin password reset; paste this when prompted for "reset token")APITO_SYSTEM_DB_ENGINE- embed, postgres, mysql, mariadb, mongodb, redis, sqlserverSYSTEM_DB_HOST- System database hostSYSTEM_DB_PORT- System database portSYSTEM_DB_NAME- System database nameSYSTEM_DB_USER- System database usernameSYSTEM_DB_PASSWORD- System database passwordSYSTEM_DATABASE_URL- Complete system database connection string
APITO_PROJECT_DB_ENGINE- postgres, mysql, mariadb, mongodb, redis, sqlserverPROJECT_DB_HOST- Project database hostPROJECT_DB_PORT- Project database portPROJECT_DB_NAME- Project database namePROJECT_DB_USER- Project database usernamePROJECT_DB_PASSWORD- Project database passwordPROJECT_DATABASE_URL- Complete project database connection string
SERVE_PORT- Engine port (default 5050)CACHE_*,KV_ENGINE,AUTH_SERVICE_PROVIDER,TOKEN_TTLCADDY_PATH- Absolute path to caddy (managed by CLI)
- Embedded: boltDB (default)
- External: PostgreSQL, MySQL, MariaDB, MongoDB, Redis, SQL Server
- External: PostgreSQL, MySQL, MariaDB, MongoDB, Redis, SQL Server
- Cloud: Firestore (alpha), DynamoDB (alpha)
- System Database:
apito-system-{engine}(e.g.,apito-system-postgres) - Project Database:
apito-project-{engine}(e.g.,apito-project-mysql)
- System Database:
apito-system-{engine}_data(e.g.,apito-system-postgres_data) - Project Database:
apito-project-{engine}_data(e.g.,apito-project-mysql_data)
- Docker Engine 20.10+
- Docker Compose v2 (recommended) or v1
- Docker daemon running
The CLI automatically manages engine and console versions with smart update detection:
-
When configuration is first written:
- Automatically fetches latest versions from GitHub releases
- Stores versions in
~/.apito/config.yml - Generates
docker-compose.ymlwith specific version tags
-
During
apito start(Docker mode):- Checks for newer versions available on GitHub
- Prompts user if updates are found
- Allows selective updates (engine only, console only, or both)
- Automatically pulls new Docker images
- Regenerates
docker-compose.ymlwith updated versions
Versions are stored in ~/.apito/config.yml:
mode: docker
engine_version: v1.3.1
console_version: v2.5.0# Start will check for updates
$ apito start
# If updates are available, you'll see:
π Updates Available
Engine: v1.3.0 β v1.3.1
Console: v2.4.0 β v2.5.0
? Choose update action:
βΈ Update Engine (v1.3.0 β v1.3.1)
Update Console (v2.4.0 β v2.5.0)
Update Both
Skip Updates
# After selecting, the CLI will:
β Pulling Docker image: ghcr.io/apito-io/engine:v1.3.1
β Successfully pulled ghcr.io/apito-io/engine:v1.3.1
β Updated engine to v1.3.1
β docker-compose.yml updated- Consistent Deployments: Version pinning prevents unexpected breaking changes
- Easy Rollback: Simply edit
config.ymlto downgrade if needed - Transparent Updates: Always know what version you're running
- Offline-Friendly: Uses cached images if GitHub is unreachable
You can manually set versions in config.yml:
engine_version: v1.2.0 # Downgrade to specific version
console_version: latest # Use latest tagstudio_version in the same file pins ghcr.io/apito-io/studio. Leave it empty to use the latest published tag. The next apito start pulls that tag.
Permission Denied Error:
# The installer will automatically handle permissions
# If you encounter issues, run with sudo:
sudo ./install.shDocker Not Available:
# Check Docker installation
docker --version
# Check Docker Compose
docker compose version
# Check Docker daemon status
docker info
# Install Docker if needed:
# macOS: https://docs.docker.com/desktop/install/mac-install/
# Linux: https://docs.docker.com/engine/install/Database Connection Issues:
# Check database container status
docker ps | grep apito
# View database logs using the new logs command
apito logs --db system --tail 20
apito logs --db project --follow
# View database logs directly (alternative)
docker logs apito-system-postgres
# Check volume persistence
docker volume ls | grep apito
# Restart database service
apito restart --db systemProject Not Found:
# List all projects to see available ones
apito list
# Create a new project if needed
apito create project -n my-new-projectEngine or Console Won't Start:
# Check if services are running and view logs
apito status
# Stop services
apito stop
# Then try running again
apito startConfiguration Overwrite Issues:
# The CLI now asks for confirmation before overwriting
# If you need to reset configuration:
rm ~/.apito/bin/.env
apito statusLogs and Monitoring Issues:
# Check if database containers are running
apito status
# View real-time database logs
apito logs --db system --follow
apito logs --db project --follow
# View last N lines of logs
apito logs --db system --tail 50
apito logs --db project --tail 50
# Check service logs
apito logs engine --tail 100
apito logs console --follow
# If logs command fails, check container status
docker ps --filter "name=apito-"Volume Management:
# List all apito volumes
docker volume ls | grep apito
# Backup a specific database volume
docker run --rm -v apito-system-postgres_data:/data -v $(pwd):/backup alpine tar czf /backup/postgres_backup.tar.gz -C /data .
# Remove a specific database volume (after stopping container)
docker volume rm apito-system-postgres_dataPlugin Management Issues:
# Plugin configuration issues
apito config get # Check CLI configuration
apito account list # List all accounts
apito config init # Reconfigure CLI settings
# Plugin deployment failures
apito plugin list # Check server connectivity
apito plugin status <plugin-id> # Check specific plugin status
# Account-related issues
apito account create <name> # Create new account
apito account test <name> # Test account connection
apito account select <name> # Set default account
# Set account configuration (multiple methods)
apito config set -a <name> url <url> # Using -a flag (recommended)
apito config set -a <name> key <key> # Using -a flag (recommended)
apito config set url <url> # Interactive selection
apito config set key <key> # Interactive selection
apito config set account <name> url <url> # Traditional syntax
apito config set <name> key <key> # Traditional syntax
# Plugin server connection issues
curl -H "Authorization: Bearer <sync-key>" \
https://your-server.com/plugin/v2/health
# Check plugin configuration file
cat hc-your-plugin/config.yml # Validate YAML syntaxPlugin Development Issues:
# Plugin creation failures
apito plugin create # Try creating new scaffold
# Build environment issues
apito plugin env # Check available build tools
# Build issues (for Go plugins)
cd hc-your-plugin
apito plugin build # Use CLI build system (interactive)
# Non-interactive build for automation/CI:
apito plugin build --build system --platform linux --arch amd64 --type production
# Alternative manual build:
go mod tidy # Fix dependencies
go build -o hc-your-plugin . # Test local build
# Build issues (for JavaScript plugins)
cd hc-your-plugin-js
npm install # Install dependencies manually
node --check index.js # Check syntax
apito plugin build # Use CLI build system (interactive)
apito plugin build --build system # Non-interactive: use system Node.js
# Build issues (for Python plugins)
cd hc-your-plugin-py
pip3 install -r requirements.txt # Install dependencies manually
python3 -m py_compile main.py # Check syntax
apito plugin build # Use CLI build system (interactive)
apito plugin build --build docker # Non-interactive: force Docker build
# Docker build issues
docker --version # Check Docker availability
apito plugin build # Interactive: select system build if Docker fails
apito plugin build --build system # Non-interactive: force system build
# Plugin deployment authentication
apito config set cloud_sync_key <your-apt_-token> # Update access token
apito config set server_url <your-url> # Update server URLPlugin Runtime Issues:
# Plugin not starting
apito plugin restart <plugin-id> # Restart plugin
apito plugin status <plugin-id> # Check error messages
# Plugin performance issues
apito plugin stop <plugin-id> # Stop plugin
apito plugin start <plugin-id> # Start plugin fresh
# Account switching for different environments
apito account test staging # Test staging account first
apito plugin deploy --account staging # Deploy to staging (requires confirmation)
apito plugin deploy -a production # Deploy to production (requires confirmation)
# Or switch default account
apito account select staging # Switch to staging account
apito plugin deploy # Deploy to staging (uses default, requires confirmation)
apito account select production # Switch back to production
apito plugin deploy # Deploy to production (uses default, requires confirmation)
# Plugin logs (server-side)
# Check your Apito server logs for plugin-specific errors- Apito Platform: https://app.apito.io
- Documentation: https://docs.apito.io
- GitHub: https://github.com/apito-io/cli
- Support: https://github.com/apito-io/cli/issues
Both engines keep schema drafts until you publish. Cloud adds managed collaboration and production publish.
apito account create local
apito account create production
# apt_ tokens on both accounts
apito sync --from local --to production --dry-run
apito sync --from local --to production --yesThen open the Cloud console and publish the staged schema. Optional later steps copy content and functions. Docker is the default run mode and pulls ghcr.io/apito-io/engine and ghcr.io/apito-io/console. An experimental local binary is available from GitHub release zips.
We welcome contributions! Please see our Contributing Guide for details.
This project is licensed under the Apache License 2.0 β see the LICENSE file for details. The engine and console are Fair Source (FSL-1.1-ALv2) and convert to Apache 2.0 two years after each release. This CLI is Apache 2.0 now.
Happy coding with Apito! π
