moda harness register collects it, shows you exactly what it collected, and uploads it.
This is the runnable counterpart to moda registry, which describes your agents, prompts, and tools. Do both. A registration links to the registry harness version that was current when you registered.
Preview the bundle
- Included: file and byte counts by category (source, lockfiles, package manifests, deploy config, containers, migrations, tests, prompts, and so on).
- Excluded: every path left out, with the reason. The contents of these paths never leave your machine.
- Git-ignored but present: other ignored paths, by name only, in case a build needs them.
- Environment variables: every name found in code and example files, with a proposed classification. Values are never read.
- Runtimes, dependencies, and migrations: what the harness runs on, the services it calls with the adapter Moda proposes for each, and the migrations it would run.
- Gaps, and what Moda will still need from you.
What is collected
The bundle is the whole git repository the harness lives in, including uncommitted and untracked files. The policy is to take more than a build needs: Moda can shrink a bundle later, but it can’t recover files that were never sent.Declare how it runs
Tell Moda how the harness starts and which env vars route its model calls. Pass env var names, never values.--entry takes everything after -- as the command, so put it last. --entry="node dist/server.js" also works.
Register
Run the same command without--dry-run. The CLI uploads the bundle, manifest, and dependency map straight to Moda’s object storage on short-lived presigned URLs (your API key is not sent with them). Moda then checks each upload’s sha256 and size, analyzes it, and prints the registration id, status, and a dashboard link.
The checklist
Open the registration in the dashboard to work through what Moda still needs:- Env var classifications: confirm or correct each proposed classification (
secret,config,dependency_endpoint,model_endpoint,model_credential). Only names Moda could not classify block. - Dependency adapters: approve or reject the adapter proposed for each dependency (a real local engine, a provider emulator, a receipt-compiled simulator, a recorded fixture, or remote staging), or pick another.
- Migrations: approve running them against a disposable database.
- Entrypoint and model routing: when they were not declared and could not be detected.
- Gaps: things the detector knows it could not resolve, and, after a smoke boot, files, env vars, or network calls the harness needed but did not have.
Declare harnesses in .moda/registration.json
Commit .moda/registration.json to tell Moda how each harness in the repository runs, without passing flags. The Moda GitHub App reads it on every registration. Each entry takes the same values as the CLI flags, and env var names only, never values.
.moda/registration.json
A file with a single harness can put its keys at the top level instead of under
harnesses. Unknown keys are errors, so a typo is reported instead of ignored. Without the file, the App registers one harness at the repository root, and the checklist’s entrypoint and model-routing items ask for what was not declared (detected entrypoints are proposed).
Register from the GitHub App
When the Moda GitHub App is connected, Moda registers the repository the same waymoda harness register does: the same bundle format, detector, checklist, and dashboard. The App downloads the commit’s files from GitHub (only committed files, so local secrets such as .env or .dev.vars never exist there), collects them as committed content, and records the commit, branch, and remote from GitHub. Secret scanning and in-place redaction run exactly as in the CLI. On a clean clone of the same commit, the CLI and the App produce the same files and dependency map.
It registers:
- once when the App is installed, for each repository;
- on every push to the default branch that changes files, for every harness: each registration bundles the whole repository, so a change anywhere (including code one harness imports from another’s directory) can change any of them. A commit already registered with the same bundle bytes (a redelivered event, or an install and a push of the same head) is not registered twice;
- when you choose Re-register from GitHub on the registrations page;
- from GitHub Actions: exchange the workflow’s OIDC token at
POST https://moda-github.modas.workers.dev/gha/exchange(asmoda harness analyze --github-actionsdoes), then callPOST /gha/registerwith the returned token from a default-branch push orworkflow_dispatch.
.moda/registration.json is invalid, a root does not exist, the bundle is over the size limit) appears as failed with the reason. Each installation can start a limited number of registrations per hour.
Have your coding agent do it
moda registry prompt prints the brief for your coding agent. Its last part runs moda harness register --dry-run, reviews the exclusions and gaps with you, declares the entrypoint and model routing, and registers once you approve.