Credentials. The workspace API key grants upload access, so store it in a secrets manager and never paste it into logs or prompts.
Who it is forA platform or IT operator who provisions developer machines with a managed installer.
The problemInteractive setup does not scale across many machines.
The outcomeA scripted setup that routes a project and backfills history without terminal prompts.
What you need first
- macOS (Apple silicon or Intel) or Linux (Arm64 or x64); Windows is not currently supported
- Codex or Claude Code sessions to capture
- Terminal access and permission to install a local background service and provider hooks
- Optional: a Habitat Cloud workspace or a self-hosted Habitat-compatible endpoint, only if you want team sharing
Steps
- Make sure your managed installer has the workspace API key in an environment variable such as HABITAT_API_KEY.
- Run
ht preflight --jsonto inspect the environment read-only before changing anything. - Run
printf '%s' "$HABITAT_API_KEY" | ht setup --api-key-stdin --project /path/to/project --backfill 30d --non-interactive --json. (inferred, check the README) - Check the JSON output for the workspace and project routing result.
Prompt for your agent
In the habitat-cli repo, run `ht preflight --json`, then ask the operator to approve before running `ht setup` with `--api-key-stdin`, `--project <PROJECT_PATH>`, `--backfill 30d`, `--non-interactive`, and `--json`. Expected output: JSON describing the setup result. Verify that the key was passed on stdin and not written to the command line.
Caveat. The README says a real Codex hook must still be reviewed and trusted by the user, so scripted setup does not remove that manual step.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for wusterbuilds/habitat-cli and "Script HT setup for managed machines"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer