Skip to content

CLI Reference

Complete CLI command reference

Manage the thoughts system.

Initialize thoughts for the current repository.

Terminal window
hyprlayer thoughts init [OPTIONS]
OptionDescription
--forceForce reconfiguration even if already set up
--directory <NAME>Specify the repository directory name (skips prompt)
--profile <NAME>Use a specific thoughts profile
--backend <KIND>Storage backend: git (default), obsidian, notion, anytype. See Storage Backends
--vault-path <PATH>Obsidian vault path (required with --backend obsidian --yes)
--vault-subpath <NAME>Subfolder within the Obsidian vault (default: hyprlayer)
--parent-page-id <ID>Notion parent page ID (required with --backend notion --yes)
--database-id <ID>Existing Notion database ID to reuse (skips lazy creation)
--space-id <ID>Anytype space ID (required with --backend anytype --yes)
--type-id <ID>Existing Anytype type ID to reuse (skips lazy creation)
--api-token-env <NAME>Env var holding the Anytype API token (default: ANYTYPE_API_KEY). Ignored for notion — hyprlayer uses the agent’s Notion connector
-y, --yesRun without interactive prompts
--config-file <PATH>Path to config file

Remove thoughts setup from the current repository.

Terminal window
hyprlayer thoughts uninit [OPTIONS]
OptionDescription
--forceForce removal even if not in configuration
--config-file <PATH>Path to config file

Manually sync thoughts to the thoughts repository.

Terminal window
hyprlayer thoughts sync [OPTIONS]
OptionDescription
-m, --message <MSG>Commit message for sync
--config-file <PATH>Path to config file

Show status of the thoughts repository.

Terminal window
hyprlayer thoughts status [OPTIONS]
OptionDescription
--config-file <PATH>Path to config file

View or edit thoughts configuration.

Terminal window
hyprlayer thoughts config [OPTIONS]
OptionDescription
--editOpen configuration in editor
--jsonOutput configuration as JSON
--config-file <PATH>Path to config file

Create a new thoughts profile.

Terminal window
hyprlayer thoughts profile create <NAME> [OPTIONS]
OptionDescription
--repo <PATH>Thoughts repository path
--repos-dir <NAME>Repos directory name
--global-dir <NAME>Global directory name
--config-file <PATH>Path to config file

List all thoughts profiles.

Terminal window
hyprlayer thoughts profile list [OPTIONS]
OptionDescription
--jsonOutput as JSON
--config-file <PATH>Path to config file

Show details of a specific profile.

Terminal window
hyprlayer thoughts profile show <NAME> [OPTIONS]
OptionDescription
--jsonOutput as JSON
--config-file <PATH>Path to config file

Delete a thoughts profile.

Terminal window
hyprlayer thoughts profile delete <NAME> [OPTIONS]
OptionDescription
--forceForce deletion even if in use
--config-file <PATH>Path to config file

Manage AI tool configuration.

Configure AI tool and install agent files.

Terminal window
hyprlayer ai configure [OPTIONS]
OptionDescription
--forceForce reconfiguration even if already set up
--config-file <PATH>Path to config file

Show current AI tool configuration: agent tool, install location, (for OpenCode) provider and Sonnet/Opus model IDs, and — once an auto-reinstall has run — the cached short bundle SHA and a humanized last-check timestamp (“4 hours ago”). Pass --json for a machine-readable payload that includes the full agentsInstalledSha and the raw lastAgentCheck Unix timestamp.

Terminal window
hyprlayer ai status [OPTIONS]
OptionDescription
--jsonOutput as JSON
--config-file <PATH>Path to config file

Reinstall AI agent files.

Terminal window
hyprlayer ai reinstall [OPTIONS]
OptionDescription
--config-file <PATH>Path to config file

Query and update the active thoughts storage backend. These subcommands are primarily called by slash-command dispatch preambles, but are usable interactively for debugging.

Show the resolved backend, settings, and the unified schema contract for the current repository.

Terminal window
hyprlayer storage info [OPTIONS]
OptionDescription
--jsonEmit a structured JSON payload slash commands parse
--config-file <PATH>Path to config file

The JSON payload includes backend, settings (backend-specific), mappedName, projectPath, and the full schema array documenting the 10 metadata fields every thought carries. See Storage Backends.

Persist the Notion database ID after a slash command lazily creates it via MCP. Errors if the active backend is not notion.

Terminal window
hyprlayer storage set-database-id <ID>

Persist the Anytype type ID after a slash command lazily creates it via MCP. Errors if the active backend is not anytype.

Terminal window
hyprlayer storage set-type-id <ID>

Utility subcommands for working with the OpenAI Codex CLI. Used internally by /code_review but available for ad-hoc piping.

Read Codex CLI --json (JSONL) output on stdin and write readable lines to stdout. Pure pipe transformer — no config, no network, no auth.

Terminal window
codex exec "<prompt>" --json | hyprlayer codex stream [OPTIONS]
OptionDescription
--no-thinkingSuppress [codex thinking] lines (reasoning events)
--no-tool-callsSuppress [codex ran] lines (command execution events)

Output:

  • SESSION_ID:<thread_id> — emitted once when codex opens a thread
  • [codex thinking] <text> — reasoning events (suppress with --no-thinking)
  • [codex ran] <command> — tool calls (suppress with --no-tool-calls)
  • Agent messages — printed verbatim
  • tokens: <total> — input + output token total at end of turn

A turn.failed event prints [codex turn.failed] <error> to stderr. If the stream ends without a turn.completed or turn.failed event, a [warning] no turn.completed event — possible mid-stream disconnect is emitted on stderr. Broken-pipe on stdout (e.g. piping into head) is treated as a clean exit.

The parser is permissive about schema drift: missing fields, malformed JSON lines, and unknown event types are silently skipped rather than fatal.


Manage anonymized usage analytics. Telemetry is on by default in anonymous mode and is recorded to a local spool, then flushed in the background to PostHog. No source code, prompts, model output, file paths, or environment variables are recorded — only stable event names, durations, outcomes, and a per-installation UUID. See Telemetry for the full data contract and the privacy model.

Show the current mode, endpoint, installation ID, and pending spool depth.

Terminal window
hyprlayer telemetry status [--json]
OptionDescription
--jsonEmit a structured JSON payload (mode, installation_id, org_id, endpoint, spool depth)
--config-file <PATH>Path to config file

Disable telemetry. The local installation_id is preserved so re-enabling later doesn’t double-count this machine.

Terminal window
hyprlayer telemetry off

On installations enrolled in a corporate org (via --org-id at init time or a HYPRLAYER_ORG_ID GitHub variable), this command is locked and returns a non-zero exit with the locked-mode error message; corporate mode requires telemetry to stay on.

Re-enable telemetry in anonymous mode. Idempotent — safe to run when already enabled.

Terminal window
hyprlayer telemetry on

Enable telemetry on a fresh installation. Auto-run on first launch; you only need this if you previously purged config or want to tag a corporate enrollment.

Terminal window
hyprlayer telemetry init [OPTIONS]
OptionDescription
--mode <anonymous|identified>anonymous (default) emits only the per-installation UUID. identified attaches a stable user handle and is auto-elevated for profile-mapped corporate users
--api-key <KEY>Override the bundled PostHog public API key
--org-id <ID>Tag events with an organization identifier and lock the install in corporate mode
--config-file <PATH>Path to config file

Drain the local event spool and POST events to PostHog in the foreground. Useful for CI runners and for verifying connectivity.

Terminal window
hyprlayer telemetry flush

Delete the local event spool without sending. Does not change the on/off mode.

Terminal window
hyprlayer telemetry purge

Inspect or override the resolved telemetry config — useful for self-hosted PostHog endpoints or pulling per-org keys from the thoughts repo’s GitHub variables.

Terminal window
hyprlayer telemetry config [OPTIONS]
OptionDescription
--showPrint the effective resolved config
--api-key <KEY>Set a sticky PostHog API key override
--org-id <ID>Set a sticky organization identifier
--resetClear manual overrides; fall back to default / GitHub-variable resolution
--refreshForce re-pull of HYPRLAYER_TELEMETRY_KEY / HYPRLAYER_ORG_ID from the thoughts repo’s GitHub variables
--config-file <PATH>Path to config file

Manage the Claude Code Stop-hook that records per-skill token totals.

Terminal window
hyprlayer telemetry hook <install|uninstall|status> [OPTIONS]
SubcommandDescription
installInstall (or refresh) the hyprlayer Stop hook in ~/.claude/settings.json. Other hooks are preserved
uninstallRemove just the hyprlayer Stop hook entry
statusPrint whether the hook is installed and the resolved settings.json path (--json for machine-readable)

The OpenCode plugin equivalent (telemetry-plugin.js) is installed automatically by hyprlayer ai configure and re-installed on agent-bundle updates — no separate command needed.

Low-level token pair used by skills to record one skill_run event with a duration. Normally invoked by skill scaffolding; you don’t need to call these by hand.

Terminal window
TOKEN=$(hyprlayer telemetry skill-start --skill create_plan)
# ... skill runs ...
hyprlayer telemetry skill-end --skill create_plan --session "$TOKEN" --outcome success

--outcome accepts success, failure, or aborted. --error-class attaches a stable error category (no message text) on failure paths.