CLI Reference
The Miren CLI (miren) provides commands for managing applications and deployments.
Core Commands
Deployment
miren deploy- Deploy the current projectmiren deploy --analyze- Analyze the project without deploying (dry-run)miren init- Initialize a new application
Deploy Options
| Flag | Description |
|---|---|
-e KEY=VALUE | Set environment variable for this deployment. Can be repeated. Use KEY=@file to read from file, or KEY alone to prompt interactively. |
-s KEY=VALUE | Set sensitive environment variable (masked in output). Same syntax as -e. |
--analyze | Analyze the app without building or deploying. Shows detected stack, services, and configuration. |
--force | Force deployment even if no changes detected |
--wait | Wait 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 systemdmiren server uninstall- Run as root, remove the global server installmiren server docker install- Setup a server in the local dockermiren server docker uninstall- Remove the server running within docker
Application Management
miren app- Get information and metrics about an application (details)miren app list(ormiren apps) - List all applicationsmiren app delete- Delete an application and all its resourcesmiren app history- Show deployment history for an applicationmiren app status- Show current status of an applicationmiren 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 routesmiren route oidc enable- Enable OIDC authentication on a routemiren route oidc disable- Disable OIDC authentication on a routemiren route oidc show- Show OIDC configuration for a route
Environment & Configuration
miren env- Environment variable management commandsmiren config- Configuration file management
Cluster & Authentication
miren cluster- List configured clustersmiren cluster list- List all configured clustersmiren cluster add- Add a new cluster configurationmiren cluster remove- Remove a cluster from the configurationmiren cluster switch- Switch to a different clustermiren login- Authenticate with miren.cloudmiren server register- Register this cluster with miren.cloudmiren 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 sandboxmiren sandbox delete- Delete a dead sandboxmiren sandbox metrics- Get metrics from a sandboxmiren debug entity list- List entitiesmiren debug entity get- Get an entitymiren debug entity delete- Delete an entitymiren debug entity put- Put an entity
Disk Commands
miren debug disk list- List all disk entitiesmiren debug disk status- Show status of a disk entitymiren debug disk create- Create a disk entitymiren debug disk delete- Delete a disk entitymiren debug disk lease-list- List all disk leasesmiren debug disk lease-status- Show status of a disk leasemiren debug disk lease-release- Release a disk leasemiren 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 versionmiren upgrade- Upgrade miren CLI to latest versionmiren server- Start the miren server
Route OIDC Authentication
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
- Getting Started - Learn by deploying
- App Commands - Manage your applications
- Sandbox Commands - Work with sandboxes directly
- Logs Command - View application logs
- Disk Commands - Manage persistent storage
- Disks Overview - Learn about persistent storage