CLI Reference

app & utilities

Application commands and utility functions.


app commands

Commands for interacting with running application containers.

app shell

Start an interactive shell in the web container.

odysseus app shell <server>

Example

odysseus app shell app.example.com

Opens a bash shell inside the running web container:

# Now inside the container
bundle exec rails console
env | grep DATABASE
ls -la
exit

app exec

Execute a command in the web container.

odysseus app exec <server> --command <cmd>

Examples

# Rails console
odysseus app exec app.example.com --command "rails console"

# Database migration
odysseus app exec app.example.com --command "rails db:migrate"

# Check environment
odysseus app exec app.example.com --command "env | sort"

# List files
odysseus app exec app.example.com --command "ls -la /app"

app console

Start your application's console.

odysseus app console <server> [--cmd <command>]

Default command: rails console

Examples

# Rails console (default)
odysseus app console app.example.com

# Django shell
odysseus app console app.example.com --cmd "python manage.py shell"

# Node.js REPL
odysseus app console app.example.com --cmd "node"

Utility commands

status

Show deployment status for a server.

odysseus status <server>

Example

odysseus status app.example.com

Output:

Server: app.example.com
Service: myapp

Web Containers:
  myapp-web-v1.2.0   running (healthy)   Up 2 days
  myapp-web-v1.1.0   stopped            Exited 2 days ago

Job Containers:
  myapp-jobs-v1.2.0  running (healthy)   Up 2 days

Accessories:
  db      postgres:16    running (healthy)
  redis   redis:7        running (healthy)

Caddy Routes:
  myapp.example.com -> myapp-web-v1.2.0:3000
  SSL: valid (expires in 60 days)

containers

List containers for the service.

odysseus containers <server>

Options

--service NAME

Filter by service name.

Example

odysseus containers app.example.com

Output:

Containers for 'myapp' on app.example.com:
  NAME                 STATUS    PORTS      CREATED
  myapp-web-v1.2.0     running   3000/tcp   2 days ago
  myapp-web-v1.1.0     stopped              2 days ago
  myapp-jobs-v1.2.0    running              2 days ago
  myapp-db             running   5432/tcp   5 days ago
  myapp-redis          running   6379/tcp   5 days ago

logs

View application logs.

odysseus logs <server> [options]

Options

--role ROLE

Role to show logs for. Default: web

-f, --follow

Follow log output in real-time.

-n, --lines N

Number of lines to show. Default: 100.

--since TIME

Show logs since timestamp or duration.

Examples

# Web logs (last 100 lines)
odysseus logs app.example.com

# Follow web logs
odysseus logs app.example.com -f

# Job worker logs
odysseus logs app.example.com --role jobs

# Last 500 lines
odysseus logs app.example.com -n 500

# Logs from last hour
odysseus logs app.example.com --since 1h

cleanup

Clean up old containers and images.

odysseus cleanup <server> [options]

Options

--prune-images

Also remove unused Docker images.

Example

odysseus cleanup app.example.com

Output:

Cleaning up old containers on app.example.com...
Removed: myapp-web-v1.0.0
Removed: myapp-web-v0.9.0
Kept: myapp-web-v1.2.0, myapp-web-v1.1.0

Containers removed: 2

With image pruning:

odysseus cleanup app.example.com --prune-images

Output:

Cleaning up old containers on app.example.com...
Removed: myapp-web-v1.0.0

Pruning unused images...
Disk usage before: 15.2 GB
Disk usage after: 8.4 GB
Freed: 6.8 GB

validate

Validate configuration file.

odysseus validate [--config FILE]

Example

odysseus validate

Output (success):

Configuration valid: deploy.yml

Output (error):

Configuration error: deploy.yml
  - Missing required field: service
  - Invalid server role: unknown_role

Common options

All commands support these options:

--config FILE

Path to configuration file. Default: deploy.yml

odysseus status app.example.com --config production.yml

--verbose, -v

Show detailed output.

odysseus status app.example.com --verbose

Exit codes

CodeMeaning
0Success
1General error
2Configuration error
3Connection error
4Command failed
Previous
accessory