CLI Reference

August 27, 2026 ยท View on GitHub

Complete reference for all gryph commands, flags, and options.

Global Flags

These flags are available on all commands:

FlagShortDescription
--config-cPath to config file
--verbose-vIncrease output verbosity
--quiet-qSuppress non-essential output
--no-colorDisable colored output

Color output can also be disabled via the NO_COLOR or GRYPH_NO_COLOR environment variables.

Commands

install

Install hooks for AI coding agents. Discovers all supported agents on the system and installs hooks to enable audit logging.

gryph install
gryph install --agent claude-code
gryph install --dry-run
gryph install --force
FlagTypeDefaultDescription
--agentstring (repeatable)allInstall for specific agent only
--dry-runboolfalseShow what would be installed
--forceboolfalseOverwrite existing hooks without prompting
--no-backupboolfalseSkip backup of existing hooks

uninstall

Remove hooks from AI coding agents.

gryph uninstall
gryph uninstall --agent claude-code
gryph uninstall --purge
gryph uninstall --restore-backup
FlagTypeDefaultDescription
--agentstring (repeatable)allUninstall from specific agent only
--purgeboolfalseAlso remove database and configuration
--dry-runboolfalseShow what would be removed
--restore-backupboolfalseRestore backed-up hooks if available

status

Show installation status and health. Displays tool version, installed agents, hook status, database info, and configuration.

gryph status

No additional flags.

doctor

Diagnose issues with installation. Checks database health, config validity, hook installation, and schema version.

gryph doctor

No additional flags.

logs

Display recent agent activity, grouped by session.

gryph logs
gryph logs --follow
gryph logs --since "1h"
gryph logs --today
gryph logs --agent claude-code
gryph logs --format json
FlagShortTypeDefaultDescription
--follow-fboolfalseStream new events
--liveboolfalseInteractive full-screen TUI monitor
--intervalduration2sPoll interval for follow mode
--sincestringShow events since (e.g., 1h, 2d, 2025-01-15)
--untilstringShow events until
--todayboolfalseShorthand for since midnight
--limitint50Maximum events
--sessionstringFilter by session ID
--agentstringFilter by agent
--formatstringtableOutput format: table, json, jsonl
--sortstringdescSort order: asc, desc

query

Query audit logs with filters.

gryph query --file "src/**/*.ts"
gryph query --since "1w" --agent claude-code
gryph query --action file_write --today
gryph query --command "npm *"
gryph query --action file_write --today --count
gryph query --interactive
FlagShortTypeDefaultDescription
--sincestringStart time
--untilstringEnd time
--todayboolfalseFilter to today
--yesterdayboolfalseFilter to yesterday
--agentstring (repeatable)Filter by agent
--sessionstringFilter by session ID (prefix match)
--actionstring (repeatable)Filter by action type
--filestringFilter by file path (glob)
--commandstringFilter by command (glob)
--statusstringFilter by result status
--sensitiveboolfalseFilter to events with sensitive file access
--interactive-iboolfalseLaunch interactive TUI browser
--formatstringtableOutput format: table, json, jsonl, csv
--limitint100Maximum results
--offsetint0Skip first n results
--countboolfalseShow count only
--sortstringascSort order: asc, desc

sessions

List recorded sessions with summary statistics.

gryph sessions
gryph sessions --agent claude-code
gryph sessions --since "1w"
FlagTypeDefaultDescription
--agentstringFilter by agent
--sincestringFilter by start time
--limitint20Maximum sessions
--formatstringtableOutput format: table, json

session

Show detailed view of a specific session. Displays all actions in chronological order.

gryph session <id>
gryph session abc123 --show-diff

The <id> argument supports full UUID or prefix match.

FlagTypeDefaultDescription
--formatstringtableOutput format: table, json
--show-diffboolfalseInclude diff content for file_write events

diff

View unified diff for a specific file_write event.

gryph diff <event-id>
gryph diff a1b2c3d4 --format json

The <event-id> argument supports full UUID or prefix match.

FlagTypeDefaultDescription
--formatstringunifiedOutput format: unified, json

cat

Show the full detail of one or more events: payload, diff, raw event, and conversation context, subject to the configured logging level.

gryph cat <event-id>
gryph cat a1b2c3d4 e5f6a7b8 --format json

Each <event-id> argument supports full UUID or prefix match.

FlagTypeDefaultDescription
--formatstringtableOutput format: table, json, jsonl, csv

export

Export raw events as JSON Lines for external analysis. Each line is one complete event object with a $schema field. The summary line goes to stderr, so stdout stays clean for pipes. Sensitive events are excluded by default.

gryph export
gryph export --since "1w" -o audit.jsonl
gryph export --agent claude-code --sensitive
FlagShortTypeDefaultDescription
--sincestring1hExport events since
--untilstringExport events until
--agentstringFilter by agent
--sessionstringFilter by session ID (prefix match)
--sensitiveboolfalseInclude sensitive events
--output-ostringstdoutWrite to file

cost

Show per-session token usage and estimated cost across models and agents. See docs/cost.md for how cost data is collected.

gryph cost
gryph cost --since 7d --by model
gryph cost --agent claude-code --sync
FlagTypeDefaultDescription
--sincestringShow costs since (e.g., 1h, 2d)
--untilstringShow costs until
--todayboolfalseShorthand for since midnight
--yesterdayboolfalseFilter to yesterday
--agentstringFilter by agent
--modelstringFilter by model name
--sessionstringFilter by session ID (prefix match)
--bystringsessionGroup by: session, model, agent, day
--syncboolfalseCollect or refresh cost data before display
--forceboolfalseWith --sync: recompute even if computed
--limitint100Maximum sessions
--formatstringtableOutput format: table, json

stats

Open an interactive full-screen statistics dashboard.

gryph stats
gryph stats --since 7d
gryph stats --since 30d --agent claude-code
FlagTypeDefaultDescription
--sincestringtodayTime range: today, 7d, 30d, all, or a duration
--untilstringEnd of time window (same syntax as --since)
--agentstringFilter by agent name

config

View or modify configuration. Changes are logged to the self-audit trail.

config show

Display current configuration.

gryph config show
gryph config show --format json
FlagTypeDefaultDescription
--formatstringtableOutput format: table, json

config get

Get a specific configuration value.

gryph config get logging.level
gryph config get retention_days

config set

Set a configuration value.

gryph config set logging.level full
gryph config set retention_days 90

config reset

Reset all configuration to defaults.

gryph config reset

retention

Manage data retention policy.

retention status

Show retention policy and statistics about events that would be affected by cleanup.

gryph retention status

retention cleanup

Delete events older than the configured retention period. Self-audit entries are preserved.

gryph retention cleanup
gryph retention cleanup --dry-run
FlagTypeDefaultDescription
--dry-runboolfalseShow what would be deleted without deleting

self-log

View gryph's own audit trail: installations, uninstallations, configuration changes, and retention cleanups.

gryph self-log
gryph self-log --limit 10
gryph self-log --since "1w"
FlagTypeDefaultDescription
--sincestringFilter by time
--limitint50Maximum entries
--formatstringtableOutput format: table, json

Time Filters

Commands accepting --since and --until flags support:

FormatExampleDescription
Minutes30mLast 30 minutes
Hours1hLast hour
Days2dLast 2 days
Weeks1wLast 7 days
ISO date2025-01-31Specific date
ISO datetime2025-01-31T15:04:05ZSpecific datetime

Action Types

Values for the --action filter:

ActionDisplay NameDescription
file_readreadFile read
file_writewriteFile write
file_deletedeleteFile deletion
command_execexecCommand execution
network_requesthttpNetwork request
tool_usetoolTool usage
session_startsession_startSession started
session_endsession_endSession ended
notificationnotificationNotification