Skip to main content

Command Reference

Authentication

login

Authenticate with AgentLogs using device authorization.
agentlogs login
Opens a browser for authentication. After authorizing, your token is stored locally.

logout

Remove stored authentication credentials.
agentlogs logout

status

Show current authentication status and account info.
agentlogs status
Output:
Logged in as: user@example.com
Environment: production
Synced transcripts: 42

Claude Code

claudecode sync

Sync all local Claude Code transcripts to AgentLogs.
agentlogs claudecode sync [claudeDir]
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:
# Sync all transcripts
agentlogs claudecode sync

# Only sync transcripts from a specific project
agentlogs claudecode sync --cwd /path/to/my-project

claudecode upload

Upload a specific transcript file.
agentlogs claudecode upload <transcript>
Arguments:
  • transcript - Path to the JSONL transcript file

claudecode hook

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

Codex (Experimental)

codex upload

Upload a Codex transcript file.
agentlogs codex upload <transcript>
Arguments:
  • transcript - Path to the JSONL transcript file
Example:
agentlogs codex upload ~/.codex/sessions/2025/01/25/session-abc123.jsonl

mcp

Run as an MCP server for Codex integration.
agentlogs mcp
This command is meant to be called by Codex’s MCP server system, not manually. It:
  • Ensures the background service is running
  • Connects to the service to keep it alive
  • Exposes no tools or prompts (lifecycle management only)

service start

Start the background service.
agentlogs service start
The service watches ~/.codex/sessions for transcript changes and uploads them automatically.

service stop

Stop the background service.
agentlogs service stop

service status

Show background service status.
agentlogs service status
Output:
Service: running (PID: 12345)
Connections: 1
Watching: true
Uptime: 3600s
Last event: turn_complete (5s ago)

service logs

Tail the watcher event logs.
agentlogs service logs
Shows recent file system events and turn completions. Press Ctrl+C to stop.

OpenCode

opencode upload

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

opencode hook

Hook entry point for OpenCode plugin integration. Called automatically by the OpenCode plugin.
agentlogs opencode hook
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.

Settings

settings

View or modify repository settings.
agentlogs settings [options]
Options:
  • --mode <mode> - Set capture mode: denylist or allowlist
  • --json - Output settings as JSON
Example:
# View current settings
agentlogs settings

# Switch to allowlist mode
agentlogs settings --mode allowlist

allow

Allow a repository to be captured.
agentlogs allow <path> [options]
Arguments:
  • path - Path to the repository
Options:
  • --visibility <level> - Set visibility: private, team, or public
Example:
# Allow a repo with default visibility
agentlogs allow /path/to/repo

# Allow with explicit visibility
agentlogs allow /path/to/repo --visibility private

deny

Deny a repository from being captured.
agentlogs deny <path>
Arguments:
  • path - Path to the repository
Example:
agentlogs deny /path/to/secret-repo

Global Options

These options work with any command:
OptionDescription
--helpShow help for a command
--versionShow CLI version
--env <env>Use environment: production or development
Example:
# Get help for a specific command
agentlogs claudecode sync --help

# Use development environment
agentlogs --env development claudecode sync