Command reference
Canonical HarnessTap CLI commands, aliases, and important flags.
This page mirrors the grouped CLI surface exposed by harnesstap --help. Use it as the canonical reference for command names, aliases, and the most important flags. For workflow examples, see the scenario guides.
Global options
Available on harnesstap / ht:
-V, --harnesstap-version— print the HarnessTap CLI version-v, --verbose— show verbose error output--no-color— disable ANSI colors--no-interactive— disable interactive prompts-h, --help— show help
Noun shorthand aliases
| Full noun | Alias |
|---|---|
layer | l |
resource | r |
harness | h |
environment | e |
profile | p |
auth | a |
migrate | m |
help
Core HarnessTap concepts and a numbered scenario index. Scenario playbooks live in docs/scenarios/details/.
ht help
ht help --format json
ht help scenario 11
ht help scenario 7 --format jsoncompletion
Generate shell completion scripts for bash, zsh, or fish. After installation, Tab completes:
- subcommands and flags for every
htcommand - dynamic values such as local layer, profile layer, and resource names
- harness slugs, cloud accounts, and catalog layers (when authenticated) for supported commands
Install by appending or saving the script for your shell:
ht completion bash >> ~/.bashrc
ht completion zsh >> ~/.zshrc
ht completion fish > ~/.config/fish/completions/ht.fishRestart your shell or source the file, then try ht layer show <Tab> to list local layers.
Both ht and harnesstap invocations are supported.
init
Initialize local HarnessTap state.
ht init
ht init --main claude-code --aliases cursor,codex
ht init --format jsonKey options:
--main <slug>— set the default main harness--aliases <slugs>— comma-separated alias harnesses--no-default-profile— skip seeding thedefaultprofile layer andactive-profile.jsonpointer--interactive— prompt for harness selection instead of relying on explicit flags--format <mode>—humanorjson
init seeds a local default profile layer (tagged profile) and writes active-profile.json unless --no-default-profile is passed. Global apply does not run automatically — run ht profile use default to materialize home harness files.
add
Install skills from a remote GitHub repo, Git URL, or local skill-package directory. Discovers skills recursively under skills/ or .agents/skills/, imports the full package into the HarnessTap library, and installs a selected subset to disk.
ht add mattpocock/skills
ht add mattpocock/skills --list
ht add mattpocock/skills --skill caveman,grill-me --global --yes
ht add mattpocock/skills --create-layer mattpocock-skills --global -y
ht add ./local/skills-repo --project .| Flag | Purpose |
|---|---|
--skill <names> | Install subset (comma-separated) |
--all | Install all discovered skills |
--harness <slugs> | Target harnesses (default: main + alias harnesses from preferences) |
--global | Install to user home paths |
--project [path] | Install to project directory (default . when flag present without value) |
--method symlink|copy | Installation method (default symlink) |
--layer <name> | Attach installed skills to an existing layer |
--create-layer <name> | Create a layer and attach installed skills |
--list | Discover skills only; no import or install |
--dry-run | Show plan without writing |
-y, --yes | Skip interactive prompts |
--format human|json | Output mode |
Scope rule: exactly one of --global or --project must be resolved before install (the wizard asks if neither is set). Import to the library always runs on a successful add except with --list or --dry-run.
Project-local verbs
Git-style commands for working in a project directory. Each defaults to the current directory when [path] is omitted.
Commands
scan [path]— import resources from a project tree (hash-aware upsert; prompts on content drift when interactive)mirror [path]— mirror alias harness outputs from the main harness statestatus [path]— show project status with drift summaryhistory [path]— list snapshots for a tracked projectrevert [snapshot-id]— restore files from a previous snapshot
Apply layers with layer apply (not under this group).
Important options
scan --harness <slug>— scan only one harnessscan --dry-run— preview imports without writing to the DBscan --overwrite— replace library rows when scan content differsscan --skip-existing— keep existing rows when scan content differsscan --namespace <name>— namespace for imported project resourcesscan --global— install imported plugin sources into global harness locationsscan --harness <slugs>— harness targets for--globalplugin installsmirror --dry-run— preview alias mirror writesmirror --force-shift-reference <slug>— set the project main harness before mirroringmirror --reference <strategy>— reference source: main, plugin, agents, or automirror --format jsonstatus --check— exit1when drift exists since the last snapshot (CI)status --format json— includes adriftobject when git-backedhistory --format jsonhistory --show-id— show full snapshot IDs in human tables
Preconditions and side effects
history,status --check,harness project set, andharness project statusrequire a git repository with a configuredoriginremote.layer applycan write files in non-git directories, but snapshots are only stored when the project has a gitorigin.revertrequires a snapshot ID fromhistory.layer applyresolves environment values through the cascade: home environment ◂ configured-layer default (last wins).
layer (l)
Manage design plugins (resource bundles), composition attachments, portable bundle export/import, and HarnessTap Cloud catalog workflows.
Remote library discovery, install, and publish live on layer, not auth. Use auth only for authentication and org context.
Commands
layer create <name>layer list— local layers plus streamed remote catalog layers (default); use--local-onlyfor local layers onlylayer show <name>layer edit [name]— interactively add/remove attachments, set default environment, or script changes with--add/--remove/--apply/--environment/--clear-environmentlayer delete [name]layer apply [layer...]— apply layer selectors, export paths, or URLs to a project (l apply)layer pull <selector>— download a remote layer bundle and import itlayer catalog list— show default catalog, connected orgs/libraries, registered publish catalogs, and cloud base URLlayer catalog— interactive publish-binding wizard (layer picker → catalog checkboxes)layer catalog bindings [layer]— show effective publish targets (non-TTY) or edit bindings (--add,--remove,--clear;--addreplaces the full allow list)layer catalog register org/catalog— register a publish destinationlayer catalog unregister org/catalog— remove a publish destination from the registrylayer catalog registered— list registered publish catalogslayer catalog connect org <slug>— opt into another org's public librarieslayer catalog disconnect org <slug>layer catalog connect layer <org>/<slug>or<org>/<catalog>/<slug>— opt into a single public librarylayer catalog disconnect layer <org>/<slug>or<org>/<catalog>/<slug>layer publish <layer>— export bundle and upload to all effective publish targets (registered catalogs, or per-layer allow list)layer publish plan <layer>— dry-run: list effective targets and planned versionslayer diff <left> <right>layer doctor [name]— validate a layer without writing to disklayer from-project [name] --project <path>
Important options
layer create -d, --description <text>— layer descriptionlayer create --tags <tags>— comma-separated tagslayer create --version <semver>— layer version (default1.0.0)layer create --from <source>— import a skill package (owner/repo, git URL, or local path) and attach selected skillslayer create --skill <names>— comma-separated skills to attach when using--fromlayer create --all— attach all discovered skills when using--fromlayer create --exclude-category <names>— exclude skill categories (repeatable or comma-separated)layer create --on-conflict <policy>— when the layer exists:cancel(default),merge, oroverwritelayer create --install— opt-in hub install; requires--globalor--projectlayer create --dry-run— preview configuration without writinglayer list --format jsonlayer list --show-idlayer list -s, --search <query>— filter local and remote layers by name, description, or tagslayer list --local-only— list only local layerslayer list --remote-only— skip local section; remote-only JSON emits a top-level arraylayer list --tag <tag>— filter remote catalog layers by taglayer list --account <name>/--base-url <url>— cloud account and base URL for remote listinglayer list --no-interactive— disable TTY browse wizard (streaming print-only)
See Interactive list keyboard reference for TTY browse/search shortcuts.
layer show --format jsonlayer edit --type <type>— restrict tables to one attachment typelayer edit --search <query>— pre-fill the interactive search filterlayer edit --show-idlayer edit --all— show every resource per type (default caps at 10)layer edit --dry-run— preview membership changes without writinglayer edit --format json --no-interactive— read-only membership snapshotlayer edit --add <selector>— add attachment (repeatable; use--typewhen selector omits prefix)layer edit --remove <selector>— remove attachment (repeatable)layer edit --apply <file.json>— apply membership from JSON speclayer edit --version <constraint>— plugin or layer references only (scripting adds)layer edit --sync— sync a plugin resource immediately after add (default: lazy)layer edit --embed— mark plugin pin as embed-on-export when addinglayer edit --environment <name>— bind a default environment to the configured layer thatlayer applyresolveslayer edit --clear-environment— clear the configured layer default environmentlayer apply --project <path>— target project directory (default.)layer apply --harness <slugs>— comma-separated harness slugslayer apply --dry-run— show planned file writes onlylayer apply --strict-plugin-versions/--ignore-plugin-versions/--sync-pluginslayer diff --format jsonlayer doctor --check <name>— run one check (repeatable)layer doctor --list-checks— list available checkslayer doctor --format json— exits1when the layer is invalidlayer from-project -d, --description <text>layer from-project --harness <slug>layer pull --as <name>layer pull --org <slug>layer pull --catalog <slug>— catalog slug when selector omits catalog (defaultdefault)layer pull --version <constraint>layer pull --account <name>layer pull --base-url <url>layer publish org/catalog— one-off publish to a single catalog (does not change bindings)layer publish --org <slug> --catalog <slug>— one-off override (same as positionalorg/catalog)layer publish --account <name>layer catalog bindings --add org/catalog— replace per-layer allow list (repeatable; auto-registers missing catalogs)layer catalog bindings --remove org/catalog— remove one target from the allow listlayer catalog bindings --clear— revert layer to all registered catalogslayer catalog register --account <name>— optional account for a registered catalog
layer pull and layer list remote discovery query catalog scope plus registered publish catalogs (layer catalog register). Use layer catalog connect to add other public orgs or libraries explicitly. Register publish destinations with layer catalog register before layer publish when no bindings exist. layer pull fails on local name conflict instead of overwriting. layer apply resolves bare catalog names at apply time; use layer pull to install layers for offline reuse.
auth (a)
Manage HarnessTap Cloud authentication and cloud account state.
Commands
auth login [account]auth statusauth orgsauth logout
Important options
auth login --base-url <url>auth status --account <name> --format jsonauth orgs --switch <slug>auth logout --account <name>
Token refresh runs before remote calls. The CLI does not silently switch accounts or organizations during other commands.
Token refresh runs before remote calls. The CLI does not silently switch accounts or organizations during other commands. There is no --profile flag — use --account.
profile (p)
Manage profile layers (layers tagged profile) and global profile switching. Profiles apply to machine home harness paths; use layer apply for projects.
Root shorthand: when the first argument is not a known command and matches a local profile layer name, ht <name> runs profile use <name> (e.g. ht work).
Commands
profile list/profile ls— list local profile layers, then stream remote catalog layers withtag=profile; marks active profileprofile show <name>— same detail view aslayer show, plus active profile markerprofile status— active profile and whether global harness files are in syncprofile use <name>— merge profile stack, apply globally, set active pointerprofile create <name>— create profile layer, promote an existing layer, or import from--fromprofile delete <name>— demote a profile layer and optionally delete the underlying layerprofile pull <selector>— install from catalog (layer pullalias; warns if not profile-tagged)profile publish <name>— publish with profile validation warnings (layer publishalias)
Important options
profile list --format jsonprofile list -s, --search <query>— filter local and remote profile layersprofile list --local-only— list only local profile layersprofile list --remote-only— skip local sectionprofile list --account <name>/--base-url <url>/--no-interactiveprofile show --format jsonprofile show --show-idprofile status --check— exit 1 when global state is out of syncprofile status --harness <slugs>/--format jsonprofile create -d, --description <text>profile create --from <source>— same skill-package options aslayer create --fromprofile create --use— apply globally and set active after create/promoteprofile create --use --dry-run— preview global applyprofile create -y, --yes— skip the interactive enable promptprofile delete --layer— also delete the underlying layer without promptingprofile delete -y, --yes— skip the interactive layer delete promptprofile use --dry-run— preview global file writesprofile use --harness <slugs>— comma-separated harness slugs (default: global harness preference)profile use --on-conflict <replace|skip|prompt>profile use --account <name>— cloud account for auto-pull of missing published dependenciesprofile use --base-url <url>profile use --no-pull— fail when composition refs are missing locallyprofile use --format jsonprofile pull— same flags aslayer pull(--as,--org,--catalog,--version,--account,--base-url)profile publish --org <slug>/--catalog <slug>/--account <name>/--format json
profile use auto-pulls missing published layer composition refs by default. If the profile layer defines default_environment_id, the home active environment pointer is updated on switch.
resource (r)
Manage individual imported resources such as instructions, skills, rules, or agents.
Commands
resource listresource show <selector>—name,type:name,type:name@namespace, or ULIDresource sync [selector]— refreshmarketplace_linkdefinitions and sync plugin resources from install rootsresource delete [resource]
Important options
resource list --type <type>resource list --search <query>
See Interactive list keyboard reference for TTY browse/search shortcuts.
resource list --show-idresource show --format jsonresource show --show-idresource show --all-fieldsresource sync --overwriteresource sync --on-conflict <overwrite|ignore|fail>— defaultfailresource sync --forceresource sync --dry-runresource sync --prune— remove orphaned child resources after syncresource listshows material resources pluspluginresources;layercomposition refs are hidden by defaultresource list --all— show every resource per type (default caps at 10 per type)layer editselectors accepttype:name@namespacefor compose-safe resolution- There is no top-level
plugincommand group; useresource sync,layer show,layer doctor, andlayer apply --strict-plugin-versionsfor plugin workflows
environment (e)
Manage named environment bundles (env vars, model config, permissions, and secret references) and global or per-terminal active-environment pointers.
Environment values are the runtime how configuration that plugins satisfy through needs[] contracts and MCP env keys. They are distinct from toolkit configuration (harness_preferences, config.jsonc).
Commands
environment create <name>— blank (default), from project (--from-project), or from configured layer requirements (--from-layer); interactive wizard on TTY when no mode flags are setenvironment edit [name]— interactively edit values, or use scripting flags for non-interactive updatesenvironment listenvironment show <name>— values, secret refs, reverse references;--layeranalyzes requirement gaps for a configured layerenvironment delete [name]environment use <name>— set the global active environment;--localapplies only to this terminal sessionenvironment status— show active environment and terminal env var drift
Important options
environment create --blank— create an empty environment (default when no mode flag is set)environment create --from-project <path>— import scoped project values required by the layer stackenvironment create --from-layer <selector>— seed from configured layerneeds[], MCP env keys, and model metadata (repeatable or comma-separated)environment create --refresh— update an existing environment (--from-projectonly)environment create --bind— bind the new environment as the configured layer default (--from-layeronly)environment create --layers <selectors>— configured layer scope for--from-project(default: project's last-applied layers)environment create --strict— exit non-zero when required keys are missingenvironment create --include-permissions— include scanned permission resources (--from-projectonly)environment create --description <text>environment create --dry-run— preview without persistingenvironment create --interactive/-y, --yesenvironment create --format jsonenvironment edit --var KEY=VALUE/--unset-var KEY— scripting mode env var updatesenvironment edit --model <name>/--model-provider <provider>/--unset-modelenvironment edit --permission action:pattern/--unset-permission <selector>environment edit --secret KEY:provider:ref/--unset-secret KEYenvironment edit --format json— read-only edit snapshot (non-TTY)environment edit --interactive/-y, --yesenvironment list --format jsonenvironment show --layer <selector>— compare environment values against a configured layer's requirementsenvironment show --format json— includesrequirement_gapswhen--layeris setenvironment delete --force— delete even when referencedenvironment delete --interactive/-y, --yesenvironment use --local— session-scoped active environment without changing global pointerenvironment status --layers <selectors>— include configured layer default environments in expected valuesenvironment status --check— exit non-zero when terminal env vars drift from expected valuesenvironment status --format json
harness (h)
Manage global harness preferences and git-backed project overrides.
Commands
harness listharness setharness statusharness project setharness project status
Important options
harness list --supported— only harnesses HarnessTap can serialize nativelyharness list --format jsonharness set --main <slug> --aliases <slugs>harness project set --project <path>harness project set --materialization-strategy <symlink-preferred|copy>harness project status --format json
migrate (m)
Offline sharing for workspace archives, individual layers, or single resources — without publishing to the cloud catalog.
Use migrate when:
- setting up a new laptop from an existing HarnessTap install (full workspace)
- sharing a curated layer or resource with a teammate offline
- backing up your local workspace before a reinstall
For multiplayer distribution, use layer publish / layer pull via HarnessTap Cloud.
Commands
migrate export [file]— export workspace, layer, environment, or resource (interactive when[file]omitted on a TTY)migrate import [file]— import from archive or TOML (auto-detects scope from file format)
Important options
migrate export --workspace— full workspace archive (.tar.gzor.json)migrate export --layer <name>— layer bundle TOML (urn:harnesstap:layer:v1); comma-separated for multi-layermigrate export --resource <selector>— single resource TOML (urn:harnesstap:resource:v1)migrate export --environment <name>— single environment TOMLmigrate export -o, --file <path>— output path (overrides positional)migrate export --include-plugins/--embed-plugins— embed plugin trees (workspace and layer scope)migrate import --workspace/--layer/--resource/--environment— force import scopemigrate export --format json/migrate import --format json— machine-readable summary
Workspace archives include layer bundles, named environments (secret refs only), harness preferences, config, and active-profile.json when present. They do not include tracked project records, project snapshots, or cloud accounts.
See Scenario 28 and Scenario 17.