Reference

Examples & Troubleshooting


Examples

Set Up Multiple Environments

1
# Create contexts for each environment
2
orcher config set-context local --server http://localhost:8080
3
orcher config set-context staging --server https://staging.orcher.example.com --namespace staging
4
orcher config set-context production --server https://orcher.example.com --namespace prod
5
6
# Authenticate to production
7
orcher config use-context production
8
orcher auth login --device --provider github
9
10
# Switch between contexts
11
orcher config use-context staging
12
orcher workflow list
13
14
orcher config use-context production
15
orcher workflow list

Start and Monitor a Workflow

1
# Run a workflow with parameters
2
orcher run process-order --param order_id=123 --param amount=99.99
3
4
# Check status
5
orcher workflow list --status running
6
7
# View execution journal
8
orcher workflow history wf-abc123
9
10
# Send an event
11
orcher workflow event wf-abc123 --name approval --payload '{"approved": true}'
12
13
# View logs
14
orcher logs wf-abc123 --follow

Monitor Queue Health

1
# Check queue depths
2
orcher queue depth --watch
3
4
# View queue statistics
5
orcher queue stats payment-tasks
6
7
# See active pollers
8
orcher queue pollers payment-tasks --verbose

Server Management

1
# Start server in foreground
2
orcher server start --foreground --log-level debug
3
4
# Check server health
5
orcher server status --verbose
6
7
# Restart gracefully
8
orcher server restart
9
10
# Force stop
11
orcher server stop --force

Troubleshooting

Connection Refused

The CLI tries gRPC first, then falls back to HTTP. If both fail:

1
# Check server status
2
orcher server status
3
4
# Test connection to a specific context
5
orcher config test-connection --context production

Authentication Issues

1
# Check auth status
2
orcher auth status
3
4
# Re-authenticate
5
orcher auth logout
6
orcher auth login --device --provider github
7
8
# Use token directly
9
export ORCHER_TOKEN="your-token"
10
orcher workflow list

Debug Mode

1
# Enable verbose output for any command
2
orcher -v workflow list
3
4
# Combine with quiet to see only errors
5
orcher -q server start

Getting Help

1
# Show help for any command
2
orcher --help
3
orcher workflow --help
4
orcher server start --help

Command Reference Summary

CommandAliasDescription
orcher newnCreate projects, workflows, tasks
orcher workflowwfManage workflow executions
orcher namespacensManage namespaces
orcher server—Manage server processes
orcher queueqView and manage task queues
orcher run—Run workflows locally or remotely
orcher describedescShow detailed resource info
orcher logs—View execution logs
orcher test—Test workflows locally
orcher status—Show resource status
orcher config—Manage CLI configuration
orcher auth—Manage authentication
orcher dev—Development mode