Getting started
From first login to CLI setup, plus tips for
Claude Code integration.
Basic setup
On first login, an inbox DB and API token are created automatically. Copy the token right away — it's only shown once.
gem install adlog-cli
Requires Ruby 3.0+. No external gem dependencies.
# 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
# Send to inbox (default) adlog ./memo.txt # Send to a specific database adlog --db @you/notes ./memo.md
cat build.log | adlog --title "build #42" dmesg | adlog --db @you/logs --title "dmesg"
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.
Create a new DB from the dashboard and set Default Type to claude_code.
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.
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).