Skip to main content

Command Reference

All examples use npx agentlogs. If you have the package installed globally, replace npx agentlogs with agentlogs.

Authentication

login

Authenticate with an AgentLogs server.
Arguments:
  • hostname - Required. AgentLogs server hostname, for example agentlogs.ai or localhost:3000
Options:
  • --token <token> - OAuth access token for direct authentication. This skips the browser-based device flow.
Examples:
Without --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.
Arguments:
  • 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.
Output (example):

Upload

upload

Interactively browse and upload transcripts from supported agents.
Arguments:
  • directory - Optional. Filter discovered transcripts to sessions from this directory.
Options:
  • -s, --source <source> - Filter by source. Valid values are claude-code, cline, codex, opencode, and pi.
  • -l, --latest - Upload the most recent matching transcript without showing the picker.
Examples:

Claude Code

claudecode sync

Upload local Claude Code transcripts that are missing or outdated on the server.
Arguments:
  • claudeDir - Optional. Claude data directory. Defaults to ~/.claude.
Options:
  • -r, --repo <repoId> - Only sync transcripts for the provided repository identifier.
Examples:

claudecode upload

Upload a specific Claude Code transcript.
Arguments:
  • transcript - Required. Path or alias for a transcript JSONL file.

claudecode hook

Process Claude Code hook input from stdin.
This command is intended to be called by Claude Code hooks.

Codex

codex upload

Upload a Codex transcript.
Arguments:
  • transcript - Required. Path or alias for a Codex transcript JSONL file.
Example:

codex hook

Process Codex hook input from stdin.
This command is intended to be called by Codex hooks.

codex install

Install AgentLogs Codex hooks into ~/.codex.
This command enables Codex hooks and writes AgentLogs hook entries to ~/.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.
Arguments:
  • sessionId - Required. OpenCode session ID to upload.
Example:

opencode hook

Process OpenCode hook input from stdin.
This command is intended to be called by the OpenCode plugin.

Cline

cline upload

Upload a Cline task transcript.
Arguments:
  • taskIdOrPath - Optional. Cline task ID or path to a task directory/file. When omitted, the CLI lists recent tasks.
Examples:

cline hook

Process Cline hook input from stdin.
This command is intended to be called by Cline hooks.

cline install

Install AgentLogs hooks into Cline’s global hooks directory.

Pi

pi upload

Upload a Pi session transcript.
Arguments:
  • sessionIdOrPath - Optional. Pi session ID or path to a session file. When omitted, the CLI lists recent sessions.
Examples:

pi hook

Process Pi hook input from stdin.
Reads hook data from stdin and outputs a JSON response. This command handles:
  • 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.
This command is intended to be called by the Pi extension, not manually.

Settings

settings

View or modify AgentLogs settings.
Options:
  • --allowMode <mode> - Set capture mode. Valid values are allowlist and denylist.
Examples:

allow

Allow capture for the current repository.
The repository is detected from the current working directory. Run this command from a git repository with a remote origin configured. Options:
  • --visibility <visibility> - Set visibility. Valid values are public, team, and private.
  • --public - Set visibility to public.
  • --team - Set visibility to team.
  • --private - Set visibility to private.
Examples:

deny

Deny capture for the current repository.
The repository is detected from the current working directory. Run this command from a git repository with a remote origin configured.

Help

Use --help or -h with any command to show its CLI help.