Setup Wizard

Configure a project for muster deployment. Generates muster.json and hook scripts in .muster/hooks/.

Quick Start

bash
muster setup                          # interactive TUI wizard
muster setup --scan                   # non-interactive: auto-detect everything
muster setup --services api,redis     # non-interactive: explicit services
muster setup --force --scan           # overwrite existing config

Interactive Mode

Running muster setup without flags launches a full-screen TUI wizard (requires TTY).

1

Machine role

Local deploy, deploy to others (fleet control), receive deploys, or both.

2

Environment

Production (30s health, session creds), Staging (15s health, session creds), or Development (5s health, off creds).

3

Components

Web app, workers, database, cache, proxy, or other.

4

Scan project

Auto-detects stack, services, health probes, git info, and secrets.

5

Confirm scan results

Review and accept or adjust detected configuration.

6

Deploy order

Drag/reorder services (infra services are auto-sorted first).

7

Per-service config

Health checks, credentials, remote deploy, and git pull settings.

Tip
The wizard remembers your choices. Re-running muster setup will detect the existing muster.json and ask whether to overwrite or merge. Use --force to skip the prompt.

Non-Interactive Mode Flags

NameDescription
--path, -p
stringProject directory. Default: .
--scan
booleanAuto-detect stack and services.
--stack, -s
stringStack type: k8s, compose, docker, bare, dev.
--services
stringComma-separated service names.
--order
stringComma-separated deploy order.
--health
stringPer-service health spec (repeatable). See Health Spec Format.
--creds
stringPer-service credential mode (repeatable). See Credential Modes.
--remote
stringPer-service remote config (repeatable). See Remote Spec.
--git-pull
stringPer-service git pull config (repeatable). See Git Pull Spec.
--namespace
stringKubernetes namespace. Default: default
--name, -n
stringProject name.
--force, -f
booleanOverwrite existing config.

Health Spec Format

--health <service>=<type>[:<args>]

Types

NameDescription
http
healthHTTP health check. Format: http:<endpoint>:<port>
tcp
healthTCP port check. Format: tcp:<port>
command
healthRun a command. Format: command:<cmd>
none
healthDisabled — skip health checks for this service.
bash
muster setup --health api=http:/health:3000 --health redis=tcp:6379
muster setup --health worker=command:"pgrep -f worker" --health cache=none

Credential Modes

--creds <service>=<mode>

Modes

NameDescription
off
modeNo credentials required.
save
modeStore credentials in the system keychain.
session
modeKeep credentials in memory for the session only.
always
modePrompt for credentials every time.
bash
muster setup --creds api=session --creds db=save

Remote Spec

--remote <service>=<user>@<host>[:<port>][:<path>]

bash
muster setup --remote [email protected]:22:/opt/api
muster setup --remote [email protected]

Git Pull Spec

--git-pull <service>[=<remote>:<branch>] — defaults to origin:main.

bash
muster setup --git-pull api
muster setup --git-pull api=upstream:release

Stack Auto-Detection

When --scan is used (or during the interactive wizard), muster inspects your project files to determine the stack type.

Detection Rules

NameDescription
k8s
stackFound k8s/, deploy/, or *-deployment.yaml files.
compose
stackFound docker-compose.yml or compose.yaml.
docker
stackFound a Dockerfile.
bare
stackFound systemd/ or .service files.
dev
stackDevelopment environment (no deployment files found).

K8s Live Introspection

When the detected stack is k8s, muster queries the live cluster via kubectl get deployments to auto-detect deployment names, container ports, and liveness/readiness probes. This step is silently skipped if kubectl is unavailable or the cluster is unreachable.

Note
Ensure your kubeconfig is pointed at the correct cluster and namespace before running setup. Use --namespace <ns> to target a specific namespace.

Infrastructure Service Detection

Known infrastructure services are automatically identified and sorted before application services in the deploy order. They receive pull-only hook templates by default.

Recognized infra services: redis, postgres, mysql, mongo, rabbitmq, kafka, elasticsearch, memcached, nginx, caddy, traefik, haproxy.

Generated Files

After setup completes, the following files and directories are created in your project:

    • muster.json
    • .gitignore (updated)
          • deploy.sh
          • health.sh
          • rollback.sh
          • logs.sh
          • cleanup.sh
        • hooks.manifest
        • hooks.manifest.sig
Tip
Only .muster/logs/ and .muster/pids/ are added to your .gitignore. Commit both muster.json and .muster/hooks/ to version control so your team shares the same deployment configuration and hook scripts.