CLI Reference¶
Complete reference for the Orchestry command-line interface.
Installation¶
The CLI is automatically installed when you install Orchestry:
Or install from source
Options¶
Commands Overview¶
| Command | Description |
|---|---|
config |
Configure the controller endpoint (interactive) |
register |
Register an application from YAML/JSON spec |
up |
Start an application |
down |
Stop an application |
delete |
Delete an application completely (stops & removes) |
status |
Show application status |
scale |
Scale an application to specific replica count |
list |
List all applications |
metrics |
Get system or app metrics |
info |
Show orchestry system information and status |
spec |
Get app specification (supports --raw flag) |
logs |
View application logs |
cluster |
Get cluster information (status, leader, health) |
events |
Get recent events |
Application Management¶
config¶
Interactively configure the controller endpoint used by all commands.
This command: - Prompts you for Host and Port - Verifies the controller is reachable at http://HOST:PORT/health - Saves the configuration to your OS config directory
Examples:
register¶
Register an application from a specification file.
Arguments:
- CONFIG_FILE: Path to YAML or JSON application specification
Examples:
# Register from YAML file
orchestry register my-app.yml
# Register from JSON file
orchestry register my-app.json
up¶
Start a registered application.
Arguments:
- APP_NAME: Name of the application to start
Examples:
down¶
Stop a running application.
Arguments:
- APP_NAME: Name of the application to stop
Examples:
delete¶
Delete an application completely (stops containers and removes registration).
Arguments:
- APP_NAME: Name of the application to delete
Options:
- --force, -f: Skip confirmation prompt
Examples:
# Delete application (with confirmation)
orchestry delete my-app
# Delete application (skip confirmation)
orchestry delete my-app --force
orchestry delete my-app -f
What happens: - All running containers are stopped and removed - Health checks are unregistered - Nginx configuration is removed - Application is removed from the database - Deletion event is logged for audit trail
Warning: This action cannot be undone. You will need to re-register the application if you want to use it again.
scale¶
Scale an application to a specific number of replicas.
Arguments:
- APP_NAME: Name of the application to scale
- REPLICAS: Target number of replicas
Examples:
Note: If the app is in auto mode, autoscaling may override the manual scaling. To prevent this, set mode: manual in the scaling section of your YAML spec.
Information Commands¶
status¶
Show application status and health.
Arguments:
- APP_NAME: Application name
Examples:
list¶
List all registered applications.
Examples:
info¶
Show orchestry system information and status.
Examples:
This displays: - Orchestry Controller status - API endpoint - Number of registered apps - Docker services status
spec¶
Get app specification.
Arguments:
- APP_NAME: Name of the application
Options:
- --raw: Show the original submitted spec (default: false)
Examples:
# Get parsed specification
orchestry spec my-app
# Get raw specification as originally submitted
orchestry spec my-app --raw
Monitoring Commands¶
logs¶
View application container logs.
Arguments:
- APP_NAME: Name of the application
Options:
- --lines, -n INTEGER: Number of log lines to retrieve (default: 100)
- --follow, -f: Follow log output (not yet implemented)
Examples:
# Show recent logs (last 100 lines)
orchestry logs my-app
# Show last 50 lines
orchestry logs my-app --lines 50
# Show last 200 lines
orchestry logs my-app -n 200
Note: The --follow option is recognized but not yet implemented. Logs are displayed sorted by timestamp across all containers.
events¶
Get recent events.
Examples:
metrics¶
Get system or app metrics.
Arguments:
- APP_NAME: Name of the application (optional)
Examples:
Cluster Commands¶
cluster¶
Get cluster information (status, leader, health).
Arguments:
- OPTS: Options like status, leader, or health
Examples:
# Show cluster status
orchestry cluster status
# Show cluster leader
orchestry cluster leader
# Show cluster health
orchestry cluster health
Output Format¶
All commands return JSON-formatted output that can be piped to other tools like jq for parsing:
# Pretty-print with jq
orchestry list | jq .
# Get specific field
orchestry status my-app | jq '.status'
Error Handling¶
The CLI provides clear error messages:
# Service not running
$ orchestry status my-app
orchestry controller is not running, run 'orchestry config' to configure
# Application not found
$ orchestry status nonexistent
App 'nonexistent' not found
# Registration failed
$ orchestry register invalid.yml
Registration failed: {...}
Tips and Best Practices¶
- Configure first: Always run
orchestry configbefore using other commands - Use descriptive app names: Choose clear, meaningful names for your applications
- Monitor scaling: For apps in auto mode, remember that manual scaling may be overridden
- Keep specs in version control: Store your YAML/JSON specs in git
- Check info regularly: Use
orchestry infoto monitor system health
Next Steps: Learn about Application Specifications to define your applications.