Skip to main content

CLI Reference

The Miren CLI (miren) provides commands for managing applications and deployments.

Core Commands

Deployment

  • miren deploy - Deploy the current project
  • miren deploy --analyze - Analyze the project without deploying (dry-run)
  • miren init - Initialize a new application

Deploy Options

FlagDescription
-e KEY=VALUESet environment variable for this deployment. Can be repeated. Use KEY=@file to read from file, or KEY alone to prompt interactively.
-s KEY=VALUESet sensitive environment variable (masked in output). Same syntax as -e.
--analyzeAnalyze the app without building or deploying. Shows detected stack, services, and configuration.
--forceForce deployment even if no changes detected
--waitWait for deployment to complete

Cancel a Deployment

miren deploy cancel <deployment-id>

Cancel a stuck in-progress deployment. Get the deployment ID from miren app history.

Server Install

  • miren server install - Usually run via sudo, setup the server with systemd
  • miren server uninstall - Run as root, remove the global server install
  • miren server docker install - Setup a server in the local docker
  • miren server docker uninstall - Remove the server running within docker

Application Management

  • miren app - Get information and metrics about an application (details)
  • miren app list (or miren apps) - List all applications
  • miren app delete - Delete an application and all its resources
  • miren app history - Show deployment history for an application
  • miren app status - Show current status of an application
  • miren app run - Open interactive shell in a new ephemeral sandbox (details)

Logs & Monitoring

  • miren logs - Get logs for an application (details)
  • miren route - List all HTTP routes
  • miren route oidc enable - Enable OIDC authentication on a route
  • miren route oidc disable - Disable OIDC authentication on a route
  • miren route oidc show - Show OIDC configuration for a route

Environment & Configuration

  • miren env - Environment variable management commands
  • miren config - Configuration file management

Cluster & Authentication

  • miren cluster - List configured clusters
  • miren cluster list - List all configured clusters
  • miren cluster add - Add a new cluster configuration
  • miren cluster remove - Remove a cluster from the configuration
  • miren cluster switch - Switch to a different cluster
  • miren login - Authenticate with miren.cloud
  • miren server register - Register this cluster with miren.cloud
  • miren whoami - Display information about the current authenticated user

Advanced Commands

  • miren sandbox list - List all sandboxes (details)
  • miren sandbox exec - Execute a command in an existing sandbox (details)
  • miren sandbox stop - Stop a sandbox
  • miren sandbox delete - Delete a dead sandbox
  • miren sandbox metrics - Get metrics from a sandbox
  • miren debug entity list - List entities
  • miren debug entity get - Get an entity
  • miren debug entity delete - Delete an entity
  • miren debug entity put - Put an entity

Disk Commands

  • miren debug disk list - List all disk entities
  • miren debug disk status - Show status of a disk entity
  • miren debug disk create - Create a disk entity
  • miren debug disk delete - Delete a disk entity
  • miren debug disk lease-list - List all disk leases
  • miren debug disk lease-status - Show status of a disk lease
  • miren debug disk lease-release - Release a disk lease
  • miren debug disk mounts - List mounted disks

Diagnostics

  • miren debug bundle - Collect system info, logs, and container state into a tar.gz archive for troubleshooting (details)
  • miren doctor - Run diagnostic checks on your Miren setup

Utility Commands

  • miren version - Print the version
  • miren upgrade - Upgrade miren CLI to latest version
  • miren server - Start the miren server

Route OIDC Authentication

Labs Feature

Route OIDC authentication is a labs feature and is disabled by default. Enable it with --labs routeoidc or MIREN_LABS=routeoidc when starting the server.

Enable OAuth2/OIDC authentication on HTTP routes to protect your applications with single sign-on. See the Route OIDC Authentication guide for a conceptual overview and example provider setups.

Enable OIDC on a Route

# Create new OIDC provider inline
miren route oidc enable myapp.example.com \
--provider-url https://accounts.google.com \
--client-id YOUR_CLIENT_ID \
--client-secret YOUR_CLIENT_SECRET \
--scope openid email profile \
--claim-header email:X-User-Email \
--claim-header sub:X-User-ID

# Use existing OIDC provider
miren route oidc enable myapp.example.com \
--provider google-oauth \
--claim-header email:X-User-Email

When OIDC is enabled, unauthenticated requests are redirected to the OIDC provider for login. After successful authentication, JWT claims are extracted and injected as HTTP headers before proxying to your application.

Options:

  • --provider NAME - Use an existing OIDC provider by name
  • --provider-url URL - OIDC provider URL (creates new provider if --provider not specified)
  • --client-id ID - OAuth2 client ID (required for new provider)
  • --client-secret SECRET - OAuth2 client secret (required for new provider)
  • --scope SCOPE - OAuth2 scopes (default: "openid", can be repeated)
  • --claim-header CLAIM:HEADER - Map JWT claim to HTTP header (can be repeated)

Show OIDC Configuration

miren route oidc show myapp.example.com

Displays the OIDC provider configuration and claim-to-header mappings for a route.

Disable OIDC on a Route

miren route oidc disable myapp.example.com

Removes OIDC authentication from a route. The OIDC provider entity is not deleted and can be reused.

Global Flags

These flags are available for most commands:

  • -v, --verbose - Enable verbose output
  • --server-address - Server address to connect to
  • --config - Path to the config file
  • -C, --cluster - Cluster name
  • -a, --app - Application name
  • -d, --dir - Directory to run from

Configuration

The CLI reads configuration from ~/.config/miren/clientconfig.yaml:

server: http://localhost:8080
auth:
token: <your-auth-token>

Authentication

Login to Miren Cloud

miren login

Install a Server on Linux

sudo miren server install -n my-cluster

Install a Server inside Docker

miren server docker install -n my-cluster

Output Formats

Many commands support different output formats:

# Table format (default)
miren app list

# JSON format
miren app list --format json

Next Steps