Command Reference
All examples usenpx agentlogs. If you have the package installed globally, replace npx agentlogs with
agentlogs.
Authentication
login
Authenticate with an AgentLogs server.hostname- Required. AgentLogs server hostname, for exampleagentlogs.aiorlocalhost:3000
--token <token>- OAuth access token for direct authentication. This skips the browser-based device flow.
--token, the CLI starts a device authorization flow, prints a verification URL and user code, and stores the
access token locally for the selected host.
logout
Remove stored authentication credentials.hostname- Optional. Hostname to log out from. When omitted, logs out from all configured hosts.
status
Show current authentication status and account info for configured hosts.Upload
upload
Interactively browse and upload transcripts from supported agents.directory- Optional. Filter discovered transcripts to sessions from this directory.
-s, --source <source>- Filter by source. Valid values areclaude-code,cline,codex,opencode, andpi.-l, --latest- Upload the most recent matching transcript without showing the picker.
Claude Code
claudecode sync
Upload local Claude Code transcripts that are missing or outdated on the server.claudeDir- Optional. Claude data directory. Defaults to~/.claude.
-r, --repo <repoId>- Only sync transcripts for the provided repository identifier.
claudecode upload
Upload a specific Claude Code transcript.transcript- Required. Path or alias for a transcript JSONL file.
claudecode hook
Process Claude Code hook input from stdin.Codex
codex upload
Upload a Codex transcript.transcript- Required. Path or alias for a Codex transcript JSONL file.
codex hook
Process Codex hook input from stdin.codex install
Install AgentLogs Codex hooks into~/.codex.
~/.codex/hooks.json. Installed hooks prefer
AGENTLOGS_CLI_PATH when set and otherwise run npx -y agentlogs@latest codex hook.
OpenCode
opencode upload
Upload an OpenCode session.sessionId- Required. OpenCode session ID to upload.
opencode hook
Process OpenCode hook input from stdin.Cline
cline upload
Upload a Cline task transcript.taskIdOrPath- Optional. Cline task ID or path to a task directory/file. When omitted, the CLI lists recent tasks.
cline hook
Process Cline hook input from stdin.cline install
Install AgentLogs hooks into Cline’s global hooks directory.Pi
pi upload
Upload a Pi session transcript.sessionIdOrPath- Optional. Pi session ID or path to a session file. When omitted, the CLI lists recent sessions.
pi hook
Process Pi hook input from stdin.- tool_call - Intercepts git commits to add transcript links.
- tool_result - Tracks commit metadata, including SHA, branch, and title.
- agent_end - Uploads the transcript after each agent turn completes.
- session_shutdown - Uploads the complete transcript when the session ends.
Settings
settings
View or modify AgentLogs settings.--allowMode <mode>- Set capture mode. Valid values areallowlistanddenylist.
allow
Allow capture for the current repository.--visibility <visibility>- Set visibility. Valid values arepublic,team, andprivate.--public- Set visibility topublic.--team- Set visibility toteam.--private- Set visibility toprivate.
deny
Deny capture for the current repository.Help
Use--help or -h with any command to show its CLI help.