Habitat is a companion plant system for AI coding assistants. It gives you a living plant that evolves as you code.
- Adds a
/habitatcommand that renders your plant in chat. - Stores plant state locally at
~/.habitat/plant.json. - Uses hooks to react to coding assistant events and update stats over time.
- Loads all species behavior from
species/*.json(data-driven, no hardcoded species logic).
- No remote sync.
- No web dashboard.
- No permanent death state (plants become dormant and can recover).
bashjq
claude plugin add eshraw/habitatThen initialize:
/hbt:init
codex plugin add eshraw/habitatThen initialize:
/hbt:init
If plugin install is unavailable, use the install script with an explicit target:
# Claude fallback
./install.sh --target claude
# Codex harness fallback
./install.sh --target codex-harnessRunning ./install.sh without a --target flag auto-detects the runtime:
- Uses
codex-harnessif~/.codex/exists, otherwise defaults toclaude.
Installer behavior (both targets):
- Creates required directories and
~/.habitatif needed. - Copies hooks, commands, and species data into runtime-recognized locations.
- Is idempotent: re-running updates files without duplicate setup.
- Fails fast with remediation guidance if
jqis missing. - Cleans up partial installs on unexpected failure.
After installing for Codex harness, confirm setup is correct:
./scripts/verify_codex_install.shFor Claude, the install script prints a readiness summary on completion.
PostToolUse+bash_tool: increases hydration, and curiosity for new command patterns.PostToolUse+str_replace/create_file: increases growth and rootedness.PostToolUse+web_search: increases curiosity.Notificationsuccess: increases health (bounded to max).Stop: applies decay, increments sessions, and updates milestones.
Run scripts after changes:
./scripts/validate_species.sh
./scripts/verify_hooks.sh
./scripts/verify_plugin_flow.sh
./scripts/verify_migration.sh
./scripts/verify_claude_regression.sh
./scripts/smoke_test.shWhat they verify:
- Species schema shape and required fields.
- State initialization, event mutations, and stop-session behavior.
- Hooks remain silent on stdout (non-interactive behavior).
- Plugin metadata and
/hbt:initidempotency. - Migration fallback behavior for users coming from script-based setup.
- Claude install regression (assets unchanged, idempotent after adding Codex support).
- Smoke tests for Claude and Codex harness install flows and reinstall idempotency.
