CLI Reference
koco CLI
The Kodosumi CLI (koco
) provides various commands for managing and running Kodosumi services.
Overview
Commands
spool
Manages the Spooler service, which is responsible for processing flows.
Options:
--ray-server TEXT
- Ray Server URL--log-file TEXT
- Spooler log file path--log-file-level [DEBUG|INFO|WARNING|ERROR|CRITICAL]
- Spooler log file level--level [DEBUG|INFO|WARNING|ERROR|CRITICAL]
- Screen log level--exec-dir TEXT
- Execution directory--interval FLOAT
- Spooler polling interval (min: 0)--batch-size INTEGER
- Batch size for spooling (min: 1)--timeout FLOAT
- Batch retrieval timeout (min: 0)--start/--stop
- Start/stop spooler (default: start)--block
- Run spooler in foreground (blocking mode)--status
- Check if spooler is connected and running
Examples:
serve
Starts the Kodosumi panel API and application.
Options:
--address TEXT
- App server URL--log-file TEXT
- App server log file path--log-file-level [DEBUG|INFO|WARNING|ERROR|CRITICAL]
- App server log file level--level [DEBUG|INFO|WARNING|ERROR|CRITICAL]
- Screen log level--uvicorn-level [DEBUG|INFO|WARNING|ERROR|CRITICAL]
- Uvicorn log level--exec-dir TEXT
- Execution directory--reload
- Reload app server on file changes--register TEXT
- Register endpoints (can be used multiple times)
Examples:
start
Starts both the spooler and app server in a single execution.
Options:
--exec-dir TEXT
- Execution directory--register TEXT
- Register endpoints (can be used multiple times)
Examples:
deploy
Manages deployments of Kodosumi configurations.
Options:
-f, --file TEXT
- Configuration YAML file-r, --run
- Execute deployment-d, --dry-run
- Test deployment configuration-x, --shutdown, --stop
- Shutdown service-s, --status
- Show service status-j, --json
- Format output as JSON
Examples:
Configuration
The CLI commands use the same configuration options as the Kodosumi application. These can be set via environment variables or command line parameters.
Important environment variables:
RAY_SERVER
- Ray Server URLEXEC_DIR
- Execution directorySPOOLER_INTERVAL
- Spooler polling intervalSPOOLER_BATCH_SIZE
- Batch sizeAPP_SERVER
- App server addressAPP_RELOAD
- Enable reload mode
Logging
All commands support configurable logging levels:
DEBUG
- Detailed debug informationINFO
- General informationWARNING
- WarningsERROR
- ErrorsCRITICAL
- Critical errors
Logs can be output both to screen and to files.