First successful run
Install MARS, prepare local inference, and run one target repo.
You will install the mars command, run setup, check
the machine is ready, initialise one target repo, and open the
dashboard. Start here when you want one safe run before changing
guardrails, roles, model settings, or release policy.
Before You Start
| Requirement | Why it matters | How to check |
| macOS or Linux | MARS ships local binaries and shell setup for Unix-like developer machines. | uname -s |
| Git checkout | The repo is the system of record. Target projects must be git repositories. | git status --short --branch |
| Go 1.25.13 or newer for source installs | The source install builds the mars command from this checkout. Packaged MARS operation does not require an externally installed Go toolchain. | go version |
| Network for first setup | Setup may download llama.cpp and multi-GB model artifacts. | mars setup --dry-run after install. |
| Disk for models | GGUF models live under ~/.mars/models/. | df -h ~ |
| GPU recommended | Autonomous operation is designed for local model throughput. CPU fallback is best for dry runs and light tests. | mars doctor |
Target repo rule:
use a separate application checkout for the first run. MARS source
maintenance has extra foundation rules; ordinary agents should
operate on target projects.
Install The Command
-
Clone MARS
git clone https://github.com/greaveselliott/MARS.git
cd MARS
This repository is the software factory source. The installed command can manage other target repositories from any working directory.
-
Install from the checkout
make install
mars version
make install installs the command into the Go bin directory and refreshes supported shell PATH setup.
-
Open a fresh terminal if needed
hash -r
mars path setup
Use hash -r when your current shell cached an older binary. Use mars path setup to repair profile snippets directly. For shell-specific reload and completion recipes, open the Shell Integration Reference.
Avoid stale local binaries:
do not use go build ./cmd/mars; ./mars .... If the
build fails, the shell can still run an old source-root binary.
Use make install for daily work or
go build -o build/mars ./cmd/mars for a one-off binary.
Prepare Local Inference
Ordinary setup
mars setup
mars doctor
Official release access is anonymous-first, so ordinary setup does not require GitHub credentials. When local artifacts are missing, setup prints one exact bundle/artifact/size/license/terms plan and asks once before downloading.
Optional private-fork or rate-limit auth
gh auth login
mars auth github setup
mars auth github check
Use optional credentials only when a private fork or GitHub rate limit requires them.
Dry setup path
mars setup --dry-run
mars setup --skip-download
mars setup --inference defer
Use dry run to preview setup. Use --skip-download only when compatible artifacts already exist. Test, cloud, and deferred paths download nothing and require no acknowledgement.
Download acknowledgement:
automation and JSON must use mars setup --download --yes.
JSON emits a complete preflight plan on stderr before requests and
includes the same plan in the final stdout result. Decline or
missing acknowledgement writes no download artifacts, and no legal
attestation is persisted. Automatic llama.cpp acquisition remains
disabled on Linux; use deferred/cloud inference or install a
compatible llama-server independently.
What setup creates
| Path | Purpose | Commit? |
~/.mars/config.yaml | Machine-local defaults such as performance profile and llama settings. | No. |
~/.mars/bin/ | Managed helper binaries such as llama-server. | No. |
~/.mars/models/ | Downloaded GGUF model files. | No. |
~/.mars/db/ | Per-repo and shared SQLite runtime state. | No. |
~/.mars/traces/ | Local execution traces and logs. | No, unless copied into a validation report deliberately. |
For a deeper model and hardware explanation, open the
Models And Inference Guide. For
complete ownership rules, open the
Files And State Reference.
For every setup flag and auth path, open the
Install And Setup Reference.
Bootstrap A Target Repository
-
Choose your application repo
cd /path/to/target-repo
git status --short --branch
The target repo is the product MARS will help build, test, document, and release.
-
Initialize the deployed harness
mars init --repo /path/to/target-repo
init writes the repo-owned harness, operating docs, release files, and starter guidance.
-
Review generated files
git -C /path/to/target-repo status --short
git -C /path/to/target-repo diff --stat
Generated prompts, manifest, guardrails, tickets, goals, and docs are user-owned after init.
Automatic init:
mars register and mars scan scaffold a
missing target harness. mars start and
mars run may do so only with acknowledged host
execution; observer mode rejects a missing harness before writes,
apart from the explicit run --dry-run --no-init preview.
Inspect Before Agents Mutate
Preview an initialized role
mars run engineer --repo /path/to/target-repo --dry-run
Dry-run prints assembled context and exits before calling the model.
Inspect a legacy repo safely
mars run engineer --repo /path/to/legacy-repo --dry-run --no-init
--no-init prevents MARS from scaffolding .harness/ during inspection.
Check role and tool surfaces
mars tools list --json
mars mcp serve --repo /path/to/target-repo --trust observer
Observer trust exposes non-mutating tool use for external MCP-compatible clients.
Run Agents
Run one role
mars run engineer --repo /path/to/target-repo \
--execution-profile host --acknowledge-host-execution
mars run qa --repo /path/to/target-repo --debug \
--execution-profile host --acknowledge-host-execution
Use run when you want one bounded job with a named role.
Start the single-repo loop
mars start --repo /path/to/target-repo \
--execution-profile host --acknowledge-host-execution
Acknowledged-host start initializes when needed, registers the repo, reconciles state, serves the dashboard, and runs the autonomous loop.
Run a persistent daemon
mars register --repo /path/to/target-repo --remote owner/repo
mars serve --addr 127.0.0.1:9091 --concurrency 2 \
--execution-profile host --acknowledge-host-execution
Use serve when you want a long-running orchestrator for registered repos.
Execution profile:
These five agent entry points default to observer, which
independently caps role trust and blocks shell_exec plus
all mutating tools. Host mode has the current OS user's filesystem,
network, process, keychain, and credential authority and is not
containment. isolated is unavailable until an enforceable
adapter exists.
Useful first-run flags
| Flag | Where | Use it when |
--repo | Most repo-scoped commands | You want to operate on a target repo from any current directory. |
--dry-run | run, setup/update/release commands | You want preview output without the mutating path. |
--no-init | run | Never initialize a missing harness; pair with --dry-run for the explicit observer-safe preview. |
--execution-profile | run, start, serve, tools run, mcp serve | Select observer (default), host, or unavailable isolated. |
--acknowledge-host-execution | The same five entry points | Required for host mode; acknowledges current-user authority and no containment without upgrading trust. |
--debug | run, start | You want verbose trace and logs inline. |
--model-endpoint | run, start | You need to point at a specific OpenAI-compatible endpoint. |
--max-turns | run | You want to bound LLM round trips for a manual job. |
--budget | run | You want a token budget for a manual role run. |
Open The Dashboard
mars start and mars serve expose local
dashboard and control surfaces. The dashboard shows repositories,
queue state, active jobs, traces, controls, and health information.
Observation is available on loopback, but every browser mutation
requires a configured MARS_DASHBOARD_CONTROL_SECRET and
authenticated session with exact Host/Origin and CSRF.
Two local URLs:
use the dashboard URL, usually http://localhost:9090,
for pages and /api/* controls. Use the webhook/control
URL, usually http://localhost:9091, for
/healthz and external webhook traffic.
Default local UI
open http://localhost:9090
The exact address can vary when you pass --addr or when a port is already occupied.
Health check
curl http://localhost:9091/healthz
Use this for scripts or lightweight daemon checks.
Pause or resume
Set the environment-only control secret before startup, log
in through the embedded dashboard, then use Pause or Resume.
Anonymous curl mutations are rejected.
What Changed In The Target Repo
The first init/start creates a deployed harness and durable
operating record inside the target repo. Review these files before
allowing broad autonomous work.
.
|-- AGENTS.md
|-- VERSION
|-- CHANGELOG.md
|-- .harness/
| |-- manifest.yaml
| |-- roles/
| |-- guardrails/
| |-- knowledge/
| +-- skills/
+-- docs/
|-- goals/
|-- exec-plans/
|-- features/
|-- tickets/
|-- design-docs/
|-- references/
+-- QUALITY_SCORE.md
mars upgrade --repo /path/to/target-repo fills missing
defaults after a MARS upgrade while preserving user-owned prompts,
manifests, tickets, plans, and docs. mars eject
previews removal before deleting the deployed harness and per-repo
database. See the Files And
State Reference for the full preservation and cleanup contract.
Update Later
Update from source checkout
cd /path/to/MARS
make update-tool
mars version
make update-tool fast-forwards a clean checkout from origin/main, installs, refreshes PATH setup, and prints the installed version.
Check installed and target drift
mars update check --repo /path/to/target-repo --json
Use JSON output when another agent or script needs to choose between tool and harness updates.
Update deployed harness defaults
mars update harness --repo /path/to/target-repo
Harness update fills missing defaults. It does not overwrite tuned role prompts or local product doctrine.
First-Run Troubleshooting
| Symptom | Likely cause | Next command |
mars is not found | Current shell has not loaded the Go bin PATH. | Rerun make install or run mars path setup from a shell that can find the binary, then open a new terminal. See the Shell Integration Reference. |
mars version shows an old binary | The shell command cache points at an older path. | hash -r, then which mars. |
| Setup cannot download models | Network, disk, or model-artifact availability problem. | mars setup --dry-run and mars doctor. |
| Model preflight fails | The active profile requires a missing local model file. | Run mars setup, or bypass local inference with mars start --repo ~/my-project --model-endpoint http://127.0.0.1:8080/v1 or mars run engineer --repo ~/my-project --model-endpoint http://127.0.0.1:8080/v1. |
| A target repo changed unexpectedly | A command ran with acknowledged host authority. | Use git status; keep the default observer profile for future inspection and initialize deliberately. |
| Dashboard port is unavailable | Another process owns the default port. | Run with an explicit literal-loopback address such as --addr 127.0.0.1:9091 or stop the other process. |
| Release access is unavailable | The anonymous official metadata request failed, or optional credentials were not accepted after an exact access denial. | Run mars auth github check --json; configure credentials only for a private fork or rate-limit fallback. |
For the full symptom matrix, open the
Troubleshooting Guide.