Skip to main content
The following are details and examples for the Agent Harness Security CLI commands.

General Scheme

hl <command> [<subcommand>] [flags ...]

Tree

Informational Commands

Help

Description
  • Displays usage text.
Input Flags
  • None
Exit Codes
  • 0 - Always
Example

Status

Description
  • Shows configured values for:
    • Client ID: *** if populated, <empty> if empty.
    • Client secret: *** if populated, <empty> if empty.
    • Project ID
    • Requester ID
    • HiddenLayer Platform URL
Input Flags
  • --verbose: Add additional details around how we resolve multiple configuration sources into final values.
Exit Codes
  • 0 - Always
Examples Default Behavior
Verbose

Version

Description
  • Display the plug-in version.
Input Flags
  • None
Exit Codes
  • 0 - Always
Example

Functional Commands

Config

Description
  • Displays usage text for the config command and groups its subcommands.
  • Run hl config with no subcommand to print help.
Input Flags
  • None
Exit Codes
  • 0 - Always (prints usage)
Example

Config Get

Description
  • Prints the effective value of a configuration field.
Input Flags
  • None
Exit Codes
  • 0 - The field has a value (printed to stdout; secrets shown as ***).
  • 1 - Any other error (e.g. an unknown field name — reported on stderr).
  • 2 - The field is unset (nothing printed).
Example

Config Set

Description
  • Writes a value for the configuration field.
Input Flags
  • --global: Write to the machine-scoped global config file instead of the per-user file. Ignored by the secret fields.
Exit Codes
  • 0 - Value stored.
  • 1 - Failure: unknown field; a secret field on a platform with no secret store; config-file path unresolvable; or a write/permission error.
Example
  • Replace my-client-id with the API key.
  • Replace my-client-secret with the API secret.
  • For platform_url, use https://api.eu.hiddenlayer.ai for the EU region.

Config Unset

Description
  • Removes a configuration field value.
Input Flags
  • --global: Remove from the machine-scoped global config file instead of the per-user file. Ignored for secret fields.
Exit Codes
  • 0 - Value removed (or already absent).
  • 1 - Failure (same modes as set).
Example

Runtime

Description
  • Displays usage text for the runtime command.
Input Flags
  • None
Exit Codes
  • 0 - Always
Example

Runtime Auth

Description
  • Connectivity check.
Input Flags
  • None
Exit Codes
  • 0 - If JWT retrieval was successful.
  • 1 - Otherwise.
Examples Success
Failure

Runtime Setup

Description
  • Installs or repairs the HiddenLayer agent hooks for supported harnesses.
  • Accepts an optional positional [harness] argument, naming a single harness to target (like claude-code). When omitted, all registered harnesses are targeted.
  • Absent harnesses are detected automatically and skipped, so they will not cause a failure.
  • Safe to run at any time. If the hook already current, reports back already up to date. If the hook has drifted from the expected configuration, the hook is repaired and repaired hooks (config has drifted) message displays.
Input Flags
  • [harness]: Optional positional argument; one of the registered harness names (like claude-code). When omitted, all registered harnesses are evaluated.
Exit Codes
  • 0 - All targeted harnesses were processed successfully (outcome may be: installed, repaired, already up to date, or not installed and skipped).
  • 1 - Any harness failed during setup, or an unknown harness name was provided as the positional argument.
Examples Fresh install (harness present on device, hooks not yet configured)
Repair (hooks exist, but config has drifted)
Already up to date
Harness not installed on device (skipped, not an error)
Target a specific harness by name
Unknown harness name

Runtime Unsetup

Description
  • Removes HiddenLayer agent hooks from supported harnesses.
  • Accepts an optional positional [harness] argument; behaviour is identical to runtime setup — omit to target all registered harnesses, or name one specifically.
  • Absence of hooks is treated as success; safe to re-run.
Input Flags
  • [harness]: Optional positional argument; one of the registered harness names (like claude-code). When omitted, all registered harnesses are evaluated.
Exit Codes
  • 0 - Hooks removed (or already absent) for all targeted harnesses.
  • 1 - Failure to remove hooks, or unknown harness name provided.
Examples Successful removal
Harness not installed on device (skipped, not an error)
Target a specific harness by name

Runtime Agent

Description
  • Takes a hook payload from stdin.
  • Sends the payload to the HL Platform.
  • Returns the response to the host on stdout.
Input Flags
  • --harness: Exactly one of claude-code, cursor, codex, or github-copilot.
  • --hook: The name of the hook.
Exit Codes
  • 0 - On successful hook execution that results in a non-BLOCK outcome.
  • 1 - On failure to execute the hook.
  • 2 - On successful hook execution that results in a BLOCK outcome.
Examples Benign
Block