CLI Reference
mushak init
Initializes a new application on the remote server.
mushak init USER@HOSTArguments:
USER@HOST: SSH connection string (e.g.,[email protected])
Mushak will interactively prompt you for:
- Domain: The domain name for your app
- App name: Defaults to current directory name
Examples:
# Interactive mode
mushak init [email protected]
# With flags
mushak init [email protected] --domain myapp.com --app my-appFlags:
--host: The Server hostname or IP (overrides HOST from argument)--user: The SSH username (overrides USER from argument)--domain: The domain name for this app (skips prompt if provided)--app: The internal name for the app (skips prompt if provided)--branch: The git branch to track. Defaults tomain.--key: Path to private SSH key. Defaults to~/.ssh/id_rsa.--port: SSH port. Defaults to22.
mushak deploy
Deploys the current project state to the server.
mushak deploy [flags]Flags:
--force,-f: Force push to the git remote. Useful if history diverged.--no-cache: Force a rebuild of the application without using usage of Docker cache.--branch: Deploy a specific local branch instead of the current one.
mushak env
Manage environment variables for your application.
mushak env set
Sets environment variables on the remote server and restarts the application. This command securely updates the environment file on the server and triggers a redeployment to ensure the new variables are applied.
Environment file priority:
- Mushak will first look for
.env.prodon the server - If
.env.proddoesn't exist, it will look for.env - If neither exists, it will create
.env.prodby default - During deployment, the environment file is copied to each release directory
mushak env set [KEY=VALUE]...Example:
mushak env set DB_HOST=db.example.com API_KEY=secret123 DATABASE_PASSWORD=mysecretmushak env push
Uploads your local environment file to the server. Auto-detects .env.prod, .env.production, or .env in that order, or you can specify a file explicitly.
mushak env push [file]Examples:
# Auto-detect and upload
mushak env push
# Upload specific file
mushak env push .env.productionmushak env pull
Downloads the environment file from the server to your local .env.prod file. Useful for syncing environment variables across team members.
mushak env pullExample:
mushak env pullmushak env diff
Compares your local and server environment files, showing which variables exist only locally, only on the server, or have different values.
mushak env diffExample:
mushak env diff
# Output:
# + NEW_VAR (only in local)
# - OLD_VAR (only on server)
# ≠ API_KEY (values differ)mushak domain
Update the domain name for the deployed application. This command updates the local configuration, the running Caddy configuration on the server (immediate effect), and the deployment hook for future deployments.
The command will prompt for confirmation that you have updated your DNS records. You can skip this prompt with the --force flag.
mushak domain [NEW_DOMAIN] [flags]Example:
mushak domain new-app.example.comFlags:
--force,-f: Skip DNS confirmation prompt.
mushak destroy
Completely removes an application from the server. Destructive action.
mushak destroy [flags]Flags:
--app: Name of the app to destroy.--force: Skip confirmation prompt.
mushak logs
View real-time logs from your deployed application.
mushak logs [flags]Flags:
--tail,-n: Number of lines to show (default "100").--follow,-f: Follow log output (default true).--key: Path to SSH key (default~/.ssh/id_rsa).
mushak shell
Opens an interactive bash/shell session directly inside the running application container. This is useful for debugging issues, inspecting files, or checking environment variables in the production environment.
mushak shell [flags]Example:
# Open a shell to the current app's container
mushak shell
# Verify environment variables inside the container
[email protected]:/app# env | grep PORT
PORT=8080Flags:
--key: Path to SSH key (default~/.ssh/id_rsa).
mushak update
Update mushak to the latest version. Checks for the latest release on GitHub and updates the binary if a newer version is available.
mushak update [flags]Flags:
--check: Check for updates without installing
mushak version
Print the version number of the installed mushak CLI.
mushak versionmushak completion
Generate the autocompletion script for the specified shell.
mushak completion [bash|zsh|fish|powershell]Bash
source <(mushak completion bash)Zsh
source <(mushak completion zsh)Fish
mushak completion fish | source