Commands Reference
Reis commands follow a resource:action naming pattern. Every command that lists or shows resources supports --output table|json|yaml. Most commands that operate on resources accept --org to override the default organisation.
Reis commands follow a resource:action naming pattern. Every command that lists or shows resources supports --output table|json|yaml. Most commands that operate on resources accept --org to override the default organisation.
Authentication
reis auth:login
Authenticate with the Bahriya API using a personal access token.
reis auth:loginPrompts for API URL and token interactively. Token input is hidden.
reis auth:status
Show current authentication status and validate credentials.
reis auth:statusOrganisations
reis org:list
List all organisations you belong to.
reis org:list
reis org:list --output jsonYour default organisation is marked in the output.
reis org:switch [org-id]
Switch the active organisation context.
# Interactive — prompts with a list of your organisations
reis org:switch
# Explicit
reis org:switch 550e8400-e29b-41d4-a716-446655440000Projects
reis project:list
List all projects in the current organisation.
reis project:list
reis project:list --output jsonreis project:show <project-id>
Show details of a specific project.
reis project:show my-projectreis project:logs <project-id>
Tail logs for all containers in a project. Fetches logs from every container, interleaves them chronologically, and tags each line with the container handle.
# One-shot fetch (last 5 minutes, up to 100 entries per container)
reis project:logs my-project
# Follow mode — polls every 5 seconds
reis project:logs my-project -f
# Custom time range and limit
reis project:logs my-project -f --range 600 --limit 200| Flag | Description |
|---|---|
-f, --follow | Continuously poll every 5 seconds |
--range | Time window in seconds (default 300) |
--limit | Max entries per container per poll (default 100, API max 500) |
New containers deployed while tailing are picked up automatically on the next poll.
reis project:create
Create a new project.
# Interactive — prompts for name, handle, and regions
reis project:create
# Explicit
reis project:create --name "My Project" --handle my-project \
--regions falkenstein-1 --regions virginia-1| Flag | Description |
|---|---|
--name | Project display name |
--handle | Unique lowercase handle |
--regions (-r) | Active region — repeatable |
reis project:attach <project-id> <type> <handle>
Attach an existing org-level resource to a project so containers in the project can mount it. Works for registries, secrets, and every vault and config type.
# Attach a TLS bundle so containers can mount it at /etc/tls
reis project:attach 1e7e7c0a-... tls_bundles edge-cert
# Same with the friendlier singular alias
reis project:attach 1e7e7c0a-... tls_bundle edge-cert
# Registries and secrets work the same way
reis project:attach 1e7e7c0a-... registries ghcr-credentials
reis project:attach 1e7e7c0a-... secrets db-passwordSupported types (plural is canonical; singular is accepted as a convenience):
| Plural | Singular alias |
|---|---|
tls_bundles | tls_bundle |
x509_certs | x509_cert |
gpg_keypairs | gpg_keypair |
ssh_keypairs | ssh_keypair |
encryption_keys | encryption_key |
env_files | env_file |
yaml_configs | yaml_config |
json_configs | json_config |
plain_configs | plain_config |
registries | registry |
secrets | secret |
The API returns 409 Conflict if the item is already attached to that project.
reis project:detach <project-id> <type> <handle>
Remove an attachment. Mirrors project:attach.
reis project:detach 1e7e7c0a-... tls_bundles edge-certIf any active container in the project still references the item, detach fails with a clear error naming the blocking container(s). Tear those containers down (or remove the reference from them) and try again.
reis project:attachments <project-id>
List every attachment on a project, grouped by type.
reis project:attachments 1e7e7c0a-...
reis project:attachments 1e7e7c0a-... --output jsonEmpty types are omitted from the table output. JSON/YAML output always returns the full map (one key per supported type, possibly empty).
Containers
Containers come in three types, all managed by the same container:* commands:
| Type | Use for |
|---|---|
http | Long-running services that accept incoming HTTP traffic. Gets a hostname, TLS, autoscaling, rate limiting, IP allow/deny, and basic auth. |
worker | Long-running background processes with no public network exposure (queue consumers, in-app schedulers, etc.). |
cronjob | Scheduled containers that run to completion on a cron expression (nightly batch, periodic cleanup, etc.). |
The type is set at creation time with --type and is immutable afterwards.
reis container:list
List containers in an organisation. Filter by type to scope to one product family.
reis container:list
reis container:list --output jsonreis container:show <container-id>
Show container details.
reis container:show my-containerreis container:create
Create a new container. When required flags are omitted, Reis prompts interactively, including a type picker and type-specific follow-up questions (port + healthcheck for HTTP; schedule + timezone + concurrency policy for cronjobs).
# Interactive — walks through every option
reis container:create
# HTTP container (the default type)
reis container:create \
--type http \
--name "Web API" \
--handle web-api \
--image ghcr.io/myorg/api:v1.0.0 \
--port 8080 \
--healthcheck /healthz \
--cpu 500 \
--memory 512 \
--replicas 2 \
--max_replicas 8 \
-r falkenstein-1 -r virginia-1 \
-e NODE_ENV=production -e LOG_LEVEL=info
# Worker container — no port, optional ENTRYPOINT/CMD override
reis container:create \
--type worker \
--name "Queue Worker" \
--handle queue-worker \
--image ghcr.io/myorg/app:v1.0.0 \
--cpu 200 \
--memory 256 \
-r falkenstein-1 \
--command /usr/bin/php \
--args artisan --args queue:work --args --tries=3
# Cron job — runs to completion on a schedule
reis container:create \
--type cronjob \
--name "Nightly Reports" \
--handle nightly-reports \
--image ghcr.io/myorg/reports:v1.0.0 \
--schedule "0 2 * * *" \
--tz "Europe/London" \
--concurrency Forbid \
--cpu 100 \
--memory 256 \
-r falkenstein-1 \
--command /usr/bin/php \
--args artisan --args reports:nightlyFor walkthrough-style guides on each container type, see Deploy an HTTP container with flags, Deploy a worker with flags, and Deploy a cron job with flags.
Flags applicable to every type:
| Flag | Description |
|---|---|
--name | Display name (required) |
--handle | Unique lowercase handle (required) |
--image | Container image reference with tag (required) |
--type | http (default), worker, or cronjob |
--project | Project ID |
--registry | Registry ID for private images |
--cpu | Min CPU in millicores (default 350) |
--memory | Min memory in MB (default 150) |
--replicas | Min replicas (default 1) |
--max_replicas | Max replicas (enables autoscaling when set) |
-r, --regions | Active region — repeatable (required, at least one) |
-e, --env | Env var as KEY=value — repeatable |
-s, --secrets | Inject secret as ENV_NAME=secret-handle — repeatable |
HTTP-only:
| Flag | Description |
|---|---|
--port | Container port (default 8080) |
--healthcheck | Health check HTTP path (default /healthz) |
HTTP + worker (observability):
| Flag | Description |
|---|---|
--prometheus_port | Port inside the container that serves Prometheus metrics |
--prometheus_path | HTTP path to scrape (default /metrics) |
Worker + cronjob:
| Flag | Description |
|---|---|
--command | Override container ENTRYPOINT — one token per flag, repeatable |
--args | Override container CMD — one token per flag, repeatable |
Cronjob-only schedule + execution flags:
| Flag | Description |
|---|---|
--schedule | Cron expression, 5 fields (required for --type=cronjob) |
--tz | IANA timezone the schedule fires in (default UTC) |
--concurrency | Allow, Forbid (default), or Replace — behaviour when a previous run is still active |
--suspended / --no-suspended | Pause scheduling without deleting (default off) |
--backoff_limit | Max retry attempts per execution (default 3) |
--active_deadline | Hard wall-clock cap per execution in seconds |
--ttl_seconds | Garbage-collect finished run records after N seconds (default 3600) |
--starting_deadline | Skip a run if more than N seconds late |
--successful_history | How many successful runs to keep (default 3) |
--failed_history | How many failed runs to keep (default 3) |
reis container:update <container-id>
Update an existing container. Fetches the current state and applies only the flags you pass — unspecified fields are preserved.
# Bump the image
reis container:update my-container --image ghcr.io/myorg/api:v1.1.0
# Pause / resume a cron job
reis container:update my-cron --suspended
reis container:update my-cron --no-suspended
# Change a cron schedule
reis container:update my-cron --schedule "0 4 * * *"
# Update worker command
reis container:update my-worker --command /usr/bin/php --args artisan --args queue:workAccepts the same flags as container:create (except --type, which is immutable). --suspended / --no-suspended only touches the field when you explicitly set it, so other partial updates won't accidentally toggle a cron job's pause state.
reis container:delete <container-id>
Delete a container. Status transitions to TERMINATING, the deployment is torn down, and the row stays visible in the UI as TERMINATED for audit.
reis container:delete my-containerreis container:terminate <container-id>
Soft terminate — same effect as delete (transitions to TERMINATING, tears down the deployment) but the verb name makes it explicit you're stopping the workload rather than removing the resource. Useful in scripts where intent matters.
reis container:terminate my-containerreis container:restart <container-id>
Restart a running container with a rolling pod restart (zero downtime).
reis container:restart my-containerreis container:logs <container-id>
Tail logs for a container. Fetches recent log entries and displays them with colour-coded severity levels.
# One-shot fetch (last 5 minutes, up to 100 entries)
reis container:logs my-container
# Follow mode — polls every 5 seconds
reis container:logs my-container -f
# Custom time range and limit
reis container:logs my-container -f --range 3600 --limit 500| Flag | Description |
|---|---|
-f, --follow | Continuously poll every 5 seconds |
--range | Time window in seconds (default 300) |
--limit | Max entries per poll (default 100, API max 500) |
Entries are deduplicated across polls so you only see new lines. Log levels are colour-coded: green for info, yellow for warnings, red for errors.
Cron-job-only commands
The following commands apply only to containers with --type=cronjob.
reis container:run <container-id>
Trigger a manual, ad-hoc run of a cron job — fires a single execution outside the normal schedule. The cron job's regular schedule is unaffected.
reis container:run my-cronreis container:suspend <container-id>
Pause the cron job's schedule. No further runs fire until resumed. Equivalent to container:update <id> --suspended.
reis container:suspend my-cronreis container:resume <container-id>
Resume a suspended cron job. The next scheduled run fires on the next matching cron tick. Equivalent to container:update <id> --no-suspended.
reis container:resume my-cronreis container:runs <container-id>
List recent runs of a cron job, with status (Succeeded / Failed / Active), duration, region, and the underlying job name (used as the identifier for container:run-logs).
reis container:runs my-cron
reis container:runs my-cron --limit 50| Flag | Description |
|---|---|
--limit | Max runs to return (default 20, max 100) |
reis container:run-logs <container-id> <job-name>
Tail logs for a single cron job run. The <job-name> comes from container:runs output.
reis container:run-logs my-cron my-cron-1747234567
reis container:run-logs my-cron my-cron-1747234567 -f| Flag | Description |
|---|---|
-f, --follow | Continuously poll every 5 seconds |
--range | Time window in seconds (default 300) |
--limit | Max entries per poll (default 100) |
Memcached
reis memcached:list
List Memcached instances in a project.
reis memcached:list --project my-projectreis memcached:show <id>
Show Memcached instance details.
reis memcached:show my-cache --project my-projectreis memcached:create
Create a new Memcached instance.
# Interactive
reis memcached:create --project my-project
# Explicit
reis memcached:create \
--project my-project \
--name "Session Cache" \
--handle session-cache \
--memory 256 \
--nodes 2 \
--regions falkenstein-1| Flag | Description |
|---|---|
--project | Project handle (required) |
--name | Instance display name |
--handle | Unique lowercase handle |
--memory | Memory per node in MB (default 512) |
--max_connections | Concurrent connections per node (default 1024) |
--threads | Worker threads per node (default 4) |
--max_item_size_mb | Largest item the cache will accept, max 128 (default 1) |
--nodes | Number of nodes, 1–9 (default 1) |
--mode | standalone or cluster (default cluster) |
-r, --regions | Active region — repeatable (required, at least one) |
For a walkthrough-style guide, see Deploy Memcached with flags.
reis memcached:update <id>
Update a Memcached instance.
reis memcached:update session-cache --project my-project --nodes 3reis memcached:delete <id>
Delete a Memcached instance.
reis memcached:delete session-cache --project my-projectRegistries
reis registry:list
List registries in a project.
reis registry:list --project my-projectreis registry:show <id>
Show registry details.
reis registry:show my-registry --project my-projectreis registry:create
Create a new registry credential.
# Interactive — prompts for password with hidden input
reis registry:create --project my-project
# Explicit
reis registry:create \
--project my-project \
--name "GitHub Registry" \
--handle github-registry \
--server ghcr.io \
--username myuser \
--password <prompted>| Flag | Description |
|---|---|
--project | Project handle (required) |
--name | Registry display name |
--handle | Unique lowercase handle |
--server | Registry server URL |
--username | Registry username |
--password | Registry password (prompted with hidden input if omitted) |
reis registry:update <id>
Update a registry credential.
reis registry:delete <id>
Delete a registry credential.
Secrets
reis secret:list
List secrets in a project.
reis secret:list --project my-projectreis secret:show <id>
Show secret details (value is never displayed).
reis secret:show my-secret --project my-projectreis secret:create
Create a new secret.
# Interactive — prompts for value with hidden input
reis secret:create --project my-project
# Explicit
reis secret:create \
--project my-project \
--name "Database Password" \
--handle db-password \
--value <prompted>| Flag | Description |
|---|---|
--project | Project handle (required) |
--name | Secret display name |
--handle | Unique lowercase handle |
--value | Secret value (prompted with hidden input if omitted) |
reis secret:update <id>
Update a secret value.
reis secret:delete <id>
Delete a secret.
Infrastructure as Code
reis apply -f <file>
Apply resources defined in a YAML file.
# Apply a single file
reis apply -f container.yml
# Apply with a specific organisation
reis apply -f infrastructure.yml --org 550e8400-...
# Dry run — validates the file without making changes
reis apply -f infrastructure.yml --dry-run| Flag | Description |
|---|---|
-f, --file | Path to YAML file (required) |
--dry-run | Validate and show what would be applied without making changes |
--org | Organisation ID |
See the YAML File Mode guide for detailed YAML file format documentation.
reis export <kind> <id>
Export an existing resource to YAML.
# Export to stdout
reis export container my-container --project my-project
# Export to file
reis export container my-container --project my-project --file backup.yml| Flag | Description |
|---|---|
--project | Project handle (required for project-scoped resources) |
--file, -f | Write output to a file instead of stdout |
Supported kinds: container, memcached, registry, secret, project.
Utility
reis version
Show Reis version, embedded PHP version, OS, architecture, and config path.
reis version