Getting started

From first login to CLI setup, plus tips for
Claude Code integration.

Basic setup

1
Login with GitHub

On first login, an inbox DB and API token are created automatically. Copy the token right away — it's only shown once.

2
Install the CLI
gem install adlog-cli

Requires Ruby 3.0+. No external gem dependencies.

3
Set your token
# Add to ~/.bashrc or ~/.zshrc

# Single DB — just set ADLOG_TOKEN
export ADLOG_TOKEN=<your-token>

# Multiple DBs — use ADLOG_TOKENS to manage them all
export ADLOG_TOKENS="@you/notes:token1,@you/logs:token2"

With ADLOG_TOKENS, the right token is auto-selected based on --db.

Basic usage

~
Upload files
# Send to inbox (default)
adlog ./memo.txt

# Send to a specific database
adlog --db @you/notes ./memo.md
|
Pipe from stdin
cat build.log | adlog --title "build #42"
dmesg | adlog --db @you/logs --title "dmesg"
+
Add tags
adlog --tag project:myapp --tag env:prod ./error.log

Auto-record Claude Code sessions

Use Claude Code's hook system to save every session transcript to adlog in real time.

1
Create a database for Claude Code

Create a new DB from the dashboard and set Default Type to claude_code.

2
Configure the hook

Add the following to ~/.claude/settings.json:

{
  "hooks": {
    "SessionStart": [
      {
        "matcher": "startup|clear|resume",
        "hooks": [
          {
            "type": "command",
            "command": "adlog-claude-code-watch --db @you/claude"
          }
        ]
      }
    ]
  }
}

Replace @you/claude with your actual database name. Make sure ADLOG_TOKEN (or ADLOG_TOKENS) is set in your shell environment.

Including resume in the matcher ensures that sessions resumed with --continue are also recorded.

3
That's it

Every time you start Claude Code, logs are sent in the background. They stop automatically when the session ends. If you resume with --continue, recording picks up where it left off.

Linux only (uses inotify and pidfd syscalls).

← Back to About