CLI pairing
How HarnessTap Cloud and the CLI work together.
Cloud and CLI pairing
HarnessTap Cloud is the source of truth for shared published layer versions and org access. The HarnessTap CLI owns local resources, composition, environment cascade, and project apply. Engineers use Cloud for governed distribution and the CLI for day-to-day harness work.
Command split
| Concern | CLI command group |
|---|---|
| Authentication and org context | auth login, auth status, auth orgs, auth logout |
| Remote catalog search, install, publish | layer search, layer pull, layer publish |
| Apply to a project | project apply (resolves bare names and published selectors from the catalog) |
project apply fetches public catalog layers on demand when needed. Use layer pull to cache a bundle locally before working offline.
Authentication
The CLI uses a device-code flow for terminal authentication:
- Run
harnesstap auth login [profile] - Open the browser prompt and sign in with your Cloud account
- The CLI saves a named profile with your session and active organization
Check your identity with harnesstap auth status and switch orgs with harnesstap auth orgs --switch <slug>. Tokens refresh before remote calls; the CLI does not silently switch profiles during other commands.
Typical workflow
- Authenticate —
harnesstap auth login(required for private org catalogs; optional for public baselines) - Search — find layers your team maintains:
harnesstap layer search <query> - Apply or pull — materialize directly with
harnesstap project apply <layer> --project <path>, or cache first withharnesstap layer pull <org>/<catalog>/<layer>[@version] - Publish — export and upload a local layer:
harnesstap layer publish <layer> --catalog <slug>
Cloud stores version history and access rules. Published payloads use urn:harnesstap:layer:v1.
Learn more
- CLI getting started — install and first apply
- Connect to Cloud — authenticate and use the catalog
- Command reference — full CLI surface
- Scenario guides — workflow walkthroughs
- Published layers — version history and visibility in the web UI