Skip to main content

Command Reference

Authentication

login

Authenticate with AgentLogs using device authorization.
Examples:
The hostname is required. The CLI opens a browser for authentication and stores your token locally for that host.

logout

Remove stored authentication credentials.
  • With a hostname, logs out only from that host.
  • Without a hostname, logs out from all configured hosts.

status

Show current authentication status and account info.
Output (example):

Upload

upload

Interactively browse and upload transcripts from any agent (Claude Code, Codex, OpenCode, Pi).
Arguments:
  • directory - Optional. Filter to transcripts from this directory
Options:
  • -s, --source <source> - Filter by source: claude-code, codex, opencode, or pi
  • -l, --latest - Upload the most recent transcript without showing picker
Behavior:
  • Discovers transcripts from all installed agents
  • Shows an interactive picker to select a transcript
  • Displays time, source, directory, and preview for each transcript
  • Uploads the selected transcript
Examples:

Claude Code

claudecode sync

Sync all local Claude Code transcripts to AgentLogs.
Arguments:
  • claudeDir - Optional. Path to Claude data directory. Defaults to ~/.claude
Options:
  • --cwd <path> - Only upload transcripts from sessions in a specific working directory
Behavior:
  • Scans for transcript files in the Claude directory
  • Skips already-uploaded transcripts (deduplication via SHA256)
  • Respects your allow/deny settings
Example:

claudecode upload

Upload a specific transcript file.
Arguments:
  • transcript - Path to the JSONL transcript file

claudecode hook

Hook entry point for Claude Code integration. Called automatically by Claude Code hooks.
Reads hook data from stdin. This command is meant to be called from Claude Code’s hook system, not manually.

Codex

codex upload

Upload a Codex transcript file.
Arguments:
  • transcript - Path to the JSONL transcript file
Example:

codex hook

Hook entry point for Codex integration. Called automatically by Codex hooks.
Reads hook data from stdin. This command is meant to be called from Codex’s hook system, not manually.

codex install

Install the AgentLogs Codex hook integration into ~/.codex.
This command:
  • Enables codex_hooks in ~/.codex/config.toml
  • Writes AgentLogs hook entries to ~/.codex/hooks.json
  • Prefers AGENTLOGS_CLI_PATH when set, otherwise runs npx -y agentlogs@latest codex hook
  • Captures transcripts only; git commit tracking hooks are not installed by default

OpenCode

opencode upload

Upload an OpenCode session.
Arguments:
  • sessionId - The OpenCode session ID to upload
Sessions are read from ~/.local/share/opencode/storage/. Example:

opencode hook

Hook entry point for OpenCode plugin integration. Called automatically by the OpenCode plugin.
Reads hook data from stdin and outputs JSON response. This command handles:
  • tool.execute.before - Intercepts git commits to add transcript links
  • tool.execute.after - Tracks commit metadata (SHA, branch, title)
  • session.idle - Uploads the complete transcript
This command is meant to be called from the OpenCode plugin, not manually.

Pi

pi upload

Upload a Pi session transcript.
Arguments:
  • sessionIdOrPath - Optional. Session ID or path to session file
Behavior:
  • With no argument: lists recent Pi sessions
  • With session ID: finds and uploads that session
  • With file path: uploads the specified JSONL file
Sessions are read from ~/.pi/agent/sessions/. Examples:

pi hook

Hook entry point for Pi extension integration. Called automatically by the Pi extension.
Reads hook data from stdin and outputs JSON response. This command handles:
  • tool_call - Intercepts git commits to add transcript links
  • tool_result - Tracks commit metadata (SHA, branch, title)
  • agent_end - Uploads the transcript after each agent turn completes
  • session_shutdown - Uploads the complete transcript
This command is meant to be called from the Pi extension, not manually.

Settings

settings

View or modify repository settings.
Options:
  • --mode <mode> - Set capture mode: denylist or allowlist
  • --json - Output settings as JSON
Example:

allow

Allow a repository to be captured.
Arguments:
  • path - Path to the repository
Options:
  • --visibility <level> - Set visibility: private, team, or public
Example:

deny

Deny a repository from being captured.
Arguments:
  • path - Path to the repository
Example:

Global Options

These options work with any command: Example: