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.

Try safely: this page gets you to one controlled run. Use adoption guide to choose the right evaluation lane, security and governance for ownership and guardrails, and documentation map for source-of-truth docs.

Before You Start

RequirementWhy it mattersHow to check
macOS or LinuxMARS ships local binaries and shell setup for Unix-like developer machines.uname -s
Git checkoutThe repo is the system of record. Target projects must be git repositories.git status --short --branch
Go 1.25.13 or newer for source installsThe 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 setupSetup may download llama.cpp and multi-GB model artifacts.mars setup --dry-run after install.
Disk for modelsGGUF models live under ~/.mars/models/.df -h ~
GPU recommendedAutonomous 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

  1. 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.

  2. Install from the checkout

    make install
    mars version

    make install installs the command into the Go bin directory and refreshes supported shell PATH setup.

  3. 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

PathPurposeCommit?
~/.mars/config.yamlMachine-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

  1. 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.

  2. Initialize the deployed harness

    mars init --repo /path/to/target-repo

    init writes the repo-owned harness, operating docs, release files, and starter guidance.

  3. 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

FlagWhereUse it when
--repoMost repo-scoped commandsYou want to operate on a target repo from any current directory.
--dry-runrun, setup/update/release commandsYou want preview output without the mutating path.
--no-initrunNever initialize a missing harness; pair with --dry-run for the explicit observer-safe preview.
--execution-profilerun, start, serve, tools run, mcp serveSelect observer (default), host, or unavailable isolated.
--acknowledge-host-executionThe same five entry pointsRequired for host mode; acknowledges current-user authority and no containment without upgrading trust.
--debugrun, startYou want verbose trace and logs inline.
--model-endpointrun, startYou need to point at a specific OpenAI-compatible endpoint.
--max-turnsrunYou want to bound LLM round trips for a manual job.
--budgetrunYou 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.

Next Steps

First-Run Troubleshooting

SymptomLikely causeNext command
mars is not foundCurrent 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 binaryThe shell command cache points at an older path.hash -r, then which mars.
Setup cannot download modelsNetwork, disk, or model-artifact availability problem.mars setup --dry-run and mars doctor.
Model preflight failsThe 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 unexpectedlyA command ran with acknowledged host authority.Use git status; keep the default observer profile for future inspection and initialize deliberately.
Dashboard port is unavailableAnother 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 unavailableThe 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.