TomasPalsson/worklog/tree/main/mods/worklog
この mod について
worklog
タイマーが嫌いな開発者向けの個人タイムトラッカーです。Claude Code、GitHub、Google Calendar、Jira からアクティビティを取り込み、1つのローカル SQLite ファイルにまとめます。ブロックにクラスタリングし、claude -p で各ブロックのチケットを選んで説明を書き、ローカル Web UI で確認した後に結果を Tempo Cloud へ同期します。
すべてはあなたのマシン上で動きます。Tempo の同期を push するまで何も外へ出ません。その前にすべてのブロックを確認できます。
インストール
curl -fsSL https://raw.githubusercontent.com/TomasPalsson/worklog/main/install.sh | bash
スクリプトは GitHub Releases からプラットフォーム向けの署名済みリリース バイナリ(macOS arm64 または linux x86_64)をダウンロードして検証し、~/.local/bin/worklog に配置します。その後:
worklog setup # 一度だけのオンボーディング:db + secrets + Claude hook
worklog day # 一日の終わり:collect → infer → estimate → review UI
アップグレードは1つのコマンドで行え、署名を必ず検証します。
worklog upgrade # リリース パイプライン経由の署名付きセルフアップデート
以前の
uv tool installから移行しますか?docs/MIGRATION.mdを参照してください。1ステップです。
アーキテクチャ
┌──────────────────────────── あなたの Mac ──────────────────────────┐
│ │
│ ~/.local/share/worklog/worklog.db (唯一の正しい情報源、 │
│ WAL モード。並行書き込み中も │
│ RO 読み取りは安全) │
│ ▲ ▲ │
│ │ │ │
│ 書き込み(unix socket │ 直接読み取り │
│ または TCP 127.0.0.1:9323) │ bun:sqlite 経由 │
│ │ │ │
│ ┌────────┴────────┐ ┌───┴───────────────────┐ │
│ │ worklog(Rust) │ │ Docker: worklog-web │ │
│ │ · CLI │ │ · Bun + Next.js 15 │ │
│ │ · コレクター │ │ · Server Components │ │
│ │ · 推定器 │───────▶│ · Server Actions → │ │
│ │ · axum daemon │ TCP │ host.docker │ │
│ │ · web オーケストレータ│ │ .internal:9323 │ │
│ └────────┬────────┘ └───────────────────────┘ │
│ │ 生成/管理 │
│ ▼ │
└─────────────────────────────────────────────────────────────────────┘
イベントは AI 推定器が Jira チケットに分類します。対応しないイベントは Web UI に「unassigned」と表示され、手動で再割り当てします。Web コンテナは SQLite を直接読み取ります(WAL モードなので並行読み取りは安全です)。書き込みは Next.js Server Actions → Rust daemon の TCP 経由です(Docker Desktop は macOS VM を通して live な unix socket をプロキシできないため、コンテナとホスト間に TCP を使います)。
DB に書き込むのは Rust daemon だけです。Server Actions は変更を転送して revalidatePath を呼ぶ薄い shim です。
クイックスタート
worklog setup # preflight + interactive secrets + db migrate
worklog hook install # Claude Code hook を登録
worklog day # 完全な日次パイプライン(collect → infer → estimate → UI)
UI を起動せずすべて取得するには:
worklog day --no-serve
コマンド
| コマンド | 目的 |
|---|---|
| worklog version | 埋め込みバージョンを表示 |
| worklog setup | preflight + secrets の取得 + db migrate |
| worklog doctor | 環境、DB、secrets の健全性レポート |
| worklog day [--day] [--no-serve] [--model] | 完全な日次パイプライン:collect → infer → estimate → web UI |
| worklog collect [all\|jira\|github\|gcal] [--days] | リモート アクティビティを取得 |
| worklog infer [--day] | イベントを gap-timeout でブロックにクラスタリング |
| worklog estimate [--day] [--model] | claude -p が jira + description + minutes を埋める |
| worklog sync [--day] [--dry-run] | 確認済みブロックを Tempo Cloud へ POST |
| worklog web up [--port] | docker 化された Next.js UI を起動 |
| worklog web down / status / logs / build | コンテナのライフサイクル |
| worklog daemon [--socket] [--tcp] | Axum API サーバー(unix + TCP) |
| worklog hook [install\|uninstall\|status] | Claude Code hook の配線 |
| worklog schedule [install\|uninstall\|status] | スケジュール収集(launchd / systemd --user) |
| worklog secret [set\|get\|rm\|list] | OS キーチェーンの資格情報 |
| worklog db [migrate\|info\|path] | DB 操作 |
| worklog upgrade | 署名付きセルフアップデート |
| worklog self-update [--check\|--dry-run\|--force] | upgrade の低レベル別名 |
| worklog dev [keygen\|sign\|make-patch\|apply-patch] | メンテナー ツール |
すべてのサブコマンドは構造化出力用に --json を受け付けます。
ストレージ
- DB:
~/.local/share/worklog/worklog.db(SQLite、WAL モード)。 - 設定:
~/.config/worklog/(.env、google_credentials.json、google_token.json)。 - シークレット: サービス名
worklogで OS キーチェーンに保存(macOS Keychain、Linux secret-service、Windows Credential Manager)。.envファイルも使えます。worklog secret set …で設定するかworklog setupを再実行すると、シークレットは遅延して移行されます。 - バイナリとリリース:
~/.local/share/worklog/{bin,releases}/。
$WORKLOG_HOME=<dir> で全体を上書きできます。db、socket、設定、bin、ログ、リリースを1つのルートにまとめます。主にテストとパワーユーザー向けです。
推定器プロバイダーの切り替え
推定器には交換可能なバックエンドが2つあります。
claude_subprocess(デフォルト)—claude -pをシェル経由で実行します。設定は不要ですが、PATHに Claude Code CLI が必要です。litellm— OpenAI 互換プロキシへ POST します。LiteLLM がリファレンス実装です。worklog を変更せず、Anthropic、OpenAI、ローカル Ollama、Bedrock などへルーティングできます。
worklog setup(対話式)で選ぶか、環境変数を設定します。
export WORKLOG_ESTIMATOR_PROVIDER=litellm
worklog secret set litellm_base_url http://localhost:4000
worklog secret set litellm_api_key <your-proxy-key> # 認証なしのローカルでは空で OK
worklog secret set litellm_model anthropic/claude-haiku-4-5
worklog doctor はアクティブなプロバイダーと到達性プローブを報告します。WORKLOG_ESTIMATOR_PROVIDER を unset し(worklog secret rm worklog_estimator_provider も実行して)、subprocess パスに戻します。
開発
cargo test --manifest-path rust/Cargo.toml
cargo clippy --manifest-path rust/Cargo.toml --all-targets --all-features -- -D warnings
cargo fmt --manifest-path rust/Cargo.toml --all
cd web && bun test && bun run typecheck && bun run build
ローカル リリースのスモーク(ネットワークなし、タグの push なし):
bash scripts/release-smoke.sh
bash tests/install/smoke.sh
CI:.github/workflows/rust.yml はすべての push / PR で Linux と macOS に fmt + clippy + tests を実行します。.github/workflows/release.yml は v* タグごとにビルド、署名、公開します。
重要なファイル
rust/crates/worklog-core/— データ層:paths、db、repo、secrets、collectors、infer、estimator、署名付きアップデーターrust/crates/worklog-cli/—worklogバイナリ:CLI + セットアップ ウィザードrust/crates/worklog-core/sql/schema.sql— 正式な SQL schemaweb/— Next.js + Bun のレビュー UI(docker 化)install.sh— curl パイプのインストーラーscripts/release-smoke.sh— リリース パイプラインのホスト側 dry-run
インストール
まず作者の README で marketplace とプラグイン名を確認してください。コマンドはリポジトリの構成によって変わる場合があります。
claude plugin marketplace add TomasPalsson/worklog claude plugin install worklog
原文 / README
worklog
Personal time-tracker for the developer who hates timers. Pulls
activity from Claude Code, GitHub, Google Calendar, and Jira into one
local SQLite file, clusters it into blocks, uses claude -p to pick a
ticket and write a description for each block, and syncs the result to
Tempo Cloud after you review it in a local web UI.
Everything runs on your machine. Nothing leaves until you push a Tempo sync — and you review every block before that happens.
Install
curl -fsSL https://raw.githubusercontent.com/TomasPalsson/worklog/main/install.sh | bash
The script downloads a signed release binary for your platform
(macOS arm64 or linux x86_64) from GitHub Releases, verifies it, and
drops it at ~/.local/bin/worklog. After that:
worklog setup # one-shot onboarding: db + secrets + Claude hook
worklog day # end-of-day: collect → infer → estimate → review UI
Upgrading is a single command and always verifies the signature:
worklog upgrade # signed self-update via the release pipeline
Migrating from the old
uv tool install? Seedocs/MIGRATION.md— one step.
Architecture
┌──────────────────────────── your Mac ─────────────────────────────┐
│ │
│ ~/.local/share/worklog/worklog.db (single source of truth, │
│ WAL mode — safe RO readers │
│ during concurrent writes) │
│ ▲ ▲ │
│ │ │ │
│ writes (unix socket │ reads direct │
│ OR TCP 127.0.0.1:9323) │ via bun:sqlite │
│ │ │ │
│ ┌────────┴────────┐ ┌───┴───────────────────┐ │
│ │ worklog (Rust) │ │ Docker: worklog-web │ │
│ │ · CLI │ │ · Bun + Next.js 15 │ │
│ │ · Collectors │ │ · Server Components │ │
│ │ · Estimator │───────▶│ · Server Actions → │ │
│ │ · axum daemon │ TCP │ host.docker │ │
│ │ · web orch. │ │ .internal:9323 │ │
│ └────────┬────────┘ └───────────────────────┘ │
│ │ spawns/manages │
│ ▼ │
└─────────────────────────────────────────────────────────────────────┘
Events are classified to a Jira ticket by the AI estimator; unmatched ones appear as "unassigned" in the web UI and are reassigned by hand. The web container reads SQLite directly (WAL mode = concurrent reads are safe), and writes flow through Next.js Server Actions → the Rust daemon over TCP (Docker Desktop can't proxy live unix sockets through its macOS VM, hence TCP between the container and host).
Only the Rust daemon writes to the DB — Server Actions are a thin
shim that forwards the mutation and calls revalidatePath.
Quickstart
worklog setup # preflight + interactive secrets + db migrate
worklog hook install # register the Claude Code hook
worklog day # full daily pipeline (collect → infer → estimate → UI)
To pull everything without running the UI:
worklog day --no-serve
Commands
| Command | Purpose |
|---|---|
| worklog version | Print the embedded version |
| worklog setup | Preflight + secrets capture + db migrate |
| worklog doctor | Environment, DB, secrets sanity report |
| worklog day [--day] [--no-serve] [--model] | Full daily pipeline: collect → infer → estimate → web UI |
| worklog collect [all\|jira\|github\|gcal] [--days] | Pull remote activity |
| worklog infer [--day] | Gap-timeout clustering of events into blocks |
| worklog estimate [--day] [--model] | claude -p fills jira + description + minutes |
| worklog sync [--day] [--dry-run] | POST reviewed blocks to Tempo Cloud |
| worklog web up [--port] | Bring up the dockerised Next.js UI |
| worklog web down / status / logs / build | Container lifecycle |
| worklog daemon [--socket] [--tcp] | Axum API server (unix + TCP) |
| worklog hook [install\|uninstall\|status] | Claude Code hook wiring |
| worklog schedule [install\|uninstall\|status] | Scheduled collection (launchd / systemd --user) |
| worklog secret [set\|get\|rm\|list] | Credentials in the OS keychain |
| worklog db [migrate\|info\|path] | DB operations |
| worklog upgrade | Signed self-update |
| worklog self-update [--check\|--dry-run\|--force] | Lower-level alias for upgrade |
| worklog dev [keygen\|sign\|make-patch\|apply-patch] | Maintainer tooling |
Every subcommand accepts --json for structured output.
Storage
- DB:
~/.local/share/worklog/worklog.db(SQLite, WAL mode). - Config:
~/.config/worklog/(.env,google_credentials.json,google_token.json). - Secrets: OS keychain under service name
worklog(macOS Keychain, Linux secret-service, Windows Credential Manager). The.envfile still works — secrets migrate lazily as you set them viaworklog secret set …or re-runworklog setup. - Binaries + releases:
~/.local/share/worklog/{bin,releases}/.
Override everything with $WORKLOG_HOME=<dir> — collapses db, socket,
config, bin, logs, releases into one root. Primarily for tests and
power users.
Switching estimator provider
The estimator has two interchangeable backends:
claude_subprocess(default) — shells out toclaude -p. Zero configuration. Requires the Claude Code CLI onPATH.litellm— POSTs to any OpenAI-compatible proxy (LiteLLM is the reference implementation). Lets you route to Anthropic, OpenAI, local Ollama, Bedrock, etc. without changing worklog.
Select via worklog setup (interactive) or set the env var:
export WORKLOG_ESTIMATOR_PROVIDER=litellm
worklog secret set litellm_base_url http://localhost:4000
worklog secret set litellm_api_key <your-proxy-key> # empty OK for unauthed local
worklog secret set litellm_model anthropic/claude-haiku-4-5
worklog doctor reports the active provider and a reachability probe.
Unset WORKLOG_ESTIMATOR_PROVIDER (and run worklog secret rm worklog_estimator_provider) to fall back to the subprocess path.
Dev
cargo test --manifest-path rust/Cargo.toml
cargo clippy --manifest-path rust/Cargo.toml --all-targets --all-features -- -D warnings
cargo fmt --manifest-path rust/Cargo.toml --all
cd web && bun test && bun run typecheck && bun run build
Local release smoke (no network, no tag push):
bash scripts/release-smoke.sh
bash tests/install/smoke.sh
CI: .github/workflows/rust.yml runs
fmt + clippy + tests on Linux and macOS on every push / PR;
.github/workflows/release.yml builds,
signs, and publishes on every v* tag.
Files of interest
rust/crates/worklog-core/— data layer: paths, db, repo, secrets, collectors, infer, estimator, signed updaterrust/crates/worklog-cli/— theworklogbinary: CLI + setup wizardrust/crates/worklog-core/sql/schema.sql— canonical SQL schemaweb/— the Next.js + Bun review UI (dockerised)install.sh— curl-piped installerscripts/release-smoke.sh— host-side dry-run of the release pipeline

