Apito CLI provides a comprehensive plugin management system that allows you to create, deploy, update, and manage HashiCorp-based plugins with hot reload capabilities.
config - Manage CLI ConfigurationConfigure accounts, server URLs, cloud sync keys, 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 defaultsConfiguration 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 operationsAccount Configuration:
url - Apito server URL for the accountkey - Cloud sync key for the accountExamples:
# 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 reset
account - Manage Multiple AccountsManage 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 configurationExamples:
# 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 staging
plugin - Manage HashiCorp PluginsCreate, deploy, update, and manage HashiCorp-based plugins with hot reload capabilities.
⚠️ Confirmation Required: Sensitive operations (deploy, update, delete, stop, restart) require confirmation and will display detailed information about the operation.
Usage:
apito plugin <command> [options]
Commands:
create - 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 informationOptions:
--account, -a - Specify account to use for plugin operations (optional, uses default if not specified)--dir, -d - Plugin directory (for deploy/update commands)Features:
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-plugin
Plugin Build System:
The build system automatically detects the plugin language from config.yml and provides appropriate build options:
Go Plugins:
# Build Go plugin with interactive options
apito plugin build
# Options:
# - System vs Docker build
# - Debug (with debug symbols)
# - Development (basic build, GOOS=linux)
# - Production (static binary, CGO_ENABLED=0)
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)
Plugin 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:
Supported Languages: