Skip to content
hokan
On this page

CLI reference

Commands and flags for Hokan sessions, installation, configuration, history, command specifications, and updates.

Run hokan --help or append --help to a subcommand for the complete current argument list.

Session and installation

CommandPurpose
hokanStart a session with the shell selected from $SHELL
hokan --shell zshSelect zsh, bash, or fish explicitly
hokan --loginStart the child as a login shell
hokan --version / hokan -VPrint the installed version
hokan installInstall or update shell integration
hokan install --on-demandInstall the hk command without automatic startup
hokan install --rc-file <path>Select an explicit rc file
hokan setupCompatibility alias for install
hokan init zshPrint shell integration code
hokan doctor --jsonInspect the environment as stable JSON

--shell and --login are global flags. For common workflows, see installation and shell integration.

Configuration and AI

CommandPurpose
hokan config pathShow the config path
hokan config initCreate the default config without overwriting an existing file
hokan config showShow configuration
hokan config validateValidate the config
hokan config aiInspect AI configuration
hokan config ai --disableDisable AI
hokan ai setupRun the interactive provider wizard

See explicit AI actions for endpoint, model, environment-variable, and stdin credential options.

History

CommandPurpose
hokan history import --shell zshImport a supported shell's history
hokan history import --path <path> --shell bashImport a specific history file
hokan history stats --jsonReport statistics
hokan history prune --keep 10000Retain a bounded number of entries
hokan history repairRepair an incomplete final record
hokan history compactMerge duplicate events into an atomic snapshot
hokan history clear --yesClear Hokan's own history store

Clearing Hokan history does not clear the source shell's history file.

Command specifications

Bash
hokan spec listhokan spec show lshokan spec validate

Specs live in the configured specs directory. For the schema and examples, see the built-in command specifications.

Upgrades

Bash
hokan upgrade --checkhokan upgradehokan upgrade --channel beta

--check only reports availability. --channel persists a stable or beta selection. --force reinstalls the current release, and --yes skips the upgrade confirmation. See updates and maintenance.

Uninstall

Remove installer-managed integrations, executable, man page, and updater backup:

Bash
hokan uninstall

Configuration, credentials, custom specs, history, and diagnostics are preserved. Keep the executable and remove only shell integration:

Bash
hokan uninstall --integration-only

Package-manager installations remain owned by their package manager. For Cargo:

Bash
hokan uninstallcargo uninstall hokan