Skip to content

CLI Reference

The meshploy CLI manages your Meshploy installation from the terminal — nodes, services, deployments, stacks, volumes, secrets, integrations, and more.


Terminal window
sudo bash -c "$(curl -fsSL https://meshploy.com/get.sh)"

To install or update the CLI only (skips node setup):

Terminal window
sudo bash -c "$(curl -fsSL https://meshploy.com/get.sh)" _ --cli-only

The binary is installed to /usr/local/bin/meshploy.


Terminal window
meshploy auth login --api-url https://app.your-domain.com

Prompts for email and password, saves credentials to ~/.meshploy/config.json. The org ID is resolved automatically — no --org flag needed on subsequent commands.


Commands that operate on a project accept -p <id|slug>. To avoid passing it every time, link your working directory once:

Terminal window
cd ~/myapp
meshploy link myproject # writes .meshploy in the current directory

After that, all commands in that directory pick up the project automatically. Use meshploy link --unlink to remove it.


Terminal window
meshploy version
# meshploy 0.2.6 ← stable build
# meshploy 0.2.6+abc1234 (edge) ← edge build

CommandDescription
auth login --api-url <url>Log in and save credentials
auth logoutRemove saved credentials
auth whoamiPrint the saved API URL and token preview

If your account has 2FA enabled, auth login prompts for a 6-digit TOTP code after the password step. Use a recovery code instead if you’ve lost access to your authenticator app.


CommandDescription
node listList all nodes in the cluster
node statusShow this machine’s node identity (/etc/meshploy/node.conf)
node delete <id>Remove a node from Headscale, k3s, and the DB
node remove <host>Cleanly uninstall a remote node over SSH
node init <host>Prepare a remote machine over SSH (installs prerequisites)
node add <host>Bootstrap a remote machine as a worker node over SSH
node installRun install.sh on this machine — requires root
node uninstallRun uninstall.sh on this machine — requires root
node token getPrint the current node registration token
node token rotateGenerate a new registration token (invalidates the old one)

SSH commands (remove, init, add) accept --identity-file and --port.


CommandDescription
project listList all projects in the org
project create <name>Create a new project
project delete <name|id>Delete a project

All service commands accept -p <project> or use the linked project from .meshploy.

Lifecycle

CommandDescription
service listList services in the project
service createInteractive wizard — generates a meshploy.toml manifest
service deploy <name|id>Trigger a new deployment
service start <name|id>Start a stopped service
service stop <name|id>Stop a running service
service logs <name|id>Stream live container logs
service delete <name|id>Delete a service

service logs flags: --tail <n>, --since <1h\|6h\|24h\|7d>, --follow (default true).

Deployments

CommandDescription
service deployments <name|id>List deployment history
service rollback <name|id>Roll back to the previous successful deployment
service rollback <name|id> --to <deploy-id>Roll back to a specific deployment
service cancel <name|id>Cancel the active deployment
service retry <name|id>Retry the latest failed deployment
service retry <name|id> <deploy-id>Retry a specific deployment

CommandDescription
stack listList stacks in the project
stack get <name|id>Show stack details and spec
stack services <name|id>List services managed by a stack
stack apply <name|id>Apply the stack spec — create or update services
stack delete <name|id>Delete a stack

CommandDescription
job listList jobs in the project
job get <name|id>Show job details
job create --image <img>Create a job (--command, --schedule, --concurrency, --history-limit)
job update <name|id>Update job settings
job run <name|id>Trigger a job run immediately
job delete <name|id>Delete a job
job runs list <name|id>List run history
job runs delete <job> <run-id>Delete a specific run record

CommandDescription
secret listList secret names in the project
secret set <key> <value>Create or update a secret
secret set <key>Create or update — reads value from stdin
secret delete <key>Delete a secret

CommandDescription
volume listList volumes in the project
volume get <name|id>Show volume details
volume create <name> --size <gb>Create a persistent volume
volume attach <vol> --service <svc> --mount <path>Attach to a service
volume detach <vol> --mount <mount-id>Detach from its service
volume delete <name|id>Delete a volume — must be unattached

CommandDescription
route listList HTTP routes in the project
route create --hostname <host> --service <svc>Map a hostname to a service
route delete <route-id>Remove a route

Git

CommandDescription
integration git listList git integrations
integration git addInteractive wizard (GitHub App, GitLab, Gitea)
integration git delete <name|id>Remove a git integration

Registry

CommandDescription
integration registry listList registry integrations
integration registry addInteractive wizard (GHCR, DockerHub, ECR, GCR, custom)
integration registry delete <name|id>Remove a registry integration

Storage

CommandDescription
integration storage listList storage integrations
integration storage addInteractive wizard (S3, Cloudflare R2, MinIO, Backblaze B2)
integration storage delete <name|id>Remove a storage integration

CommandDescription
install node-exporterInstall Prometheus node_exporter as a systemd service

Terminal window
meshploy link <project-id|slug> # link current directory to a project
meshploy link --unlink # remove the .meshploy file

Terminal window
meshploy update # latest stable binary
meshploy update --edge # edge build from main

Downloads the latest CLI binary from GitHub and replaces the running binary in-place. Defaults to the latest stable release. Pass --token <pat> or set GITHUB_PAT if the repo is private.


Terminal window
sudo meshploy server-upgrade # stable — latest release configs + images
sudo meshploy server-upgrade --edge # edge — main branch configs + images

Syncs the deploy/ configuration directory from GitHub and pulls the latest container images, then restarts all services. Equivalent to what the CI deploy job does for your own server.

Must be run as root on the gateway server.

Protected files are never overwritten: .env, coredns/Corefile, DNS zone files, and Headscale config retain their runtime-rendered values.

FlagDescription
--edgeSync from the main branch and pull edge images instead of the latest stable release
--token <pat>GitHub personal access token (or set GITHUB_PAT) — required if the repo is private

CommandDescription
alias installCreate a shell alias symlink for the meshploy binary
alias removeRemove alias symlinks

Terminal window
meshploy mcp

Starts an MCP (Model Context Protocol) server over stdio, exposing all Meshploy operations as structured tools for Claude Code or any MCP-compatible AI agent. Reads credentials from ~/.meshploy/config.json — no extra setup beyond meshploy auth login.

Claude Code setup — add to .claude/settings.json:

{
"mcpServers": {
"meshploy": {
"command": "meshploy",
"args": ["mcp"]
}
}
}

Credentials are stored at ~/.meshploy/config.json (mode 0600):

{
"api_url": "https://app.your-domain.com",
"token": "<jwt>",
"org_id": "<uuid>"
}

Run meshploy auth logout or delete the file to clear credentials. The --api-url flag on any command overrides the saved value without modifying the file.


Terminal window
cd apps/cli
go build -o meshploy .

No runtime dependencies (CGO_ENABLED=0). Locally built binaries report meshploy dev — CI injects the version at build time via -ldflags.