MCPcopy Index your code
hub / github.com/BalianWang/busytok

github.com/BalianWang/busytok @v0.0.9

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.0.9 ↗ · + Follow
6,785 symbols 23,413 edges 499 files 1,171 documented · 17%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Busytok

CI Release License: Apache--2.0

Busytok Dashboard

Busytok is a local-first agent token usage audit dashboard. It reads local AI coding agent logs (Claude Code, Codex), normalizes low-sensitive token metadata, stores it in local SQLite, and serves GUI/CLI views through a local service.

Busytok does not proxy traffic, route models, inspect protocol payloads, install certificates, hook TLS, or handle OAuth/API keys/session tokens.

Install (macOS)

Download the latest universal DMG from Releases and drag Busytok.app to /Applications.

Apple Silicon and Intel are both supported by the universal binary.

Stability contract

Busytok is 0.x: real and usable, but minors may break. Auto-update is on for macOS (you'll get fixes without manual reinstall); on Windows, auto-update is not supported — reinstall manually from Releases. Promote to 1.0 once the schema/migration story is stable and auto-update has run cleanly across at least three releases.

What it does

  • Reads local agent logs (Claude Code, Codex)
  • Persists metadata-only token usage to local SQLite (no prompt/response bodies)
  • Serves a desktop GUI (Dashboard, Agents, Settings pages) and a CLI (busytok)
  • Bundles a background service (busytok-service) running as a launchd LaunchAgent

Prompt Palette

Press Cmd+Option+K anywhere to open the prompt palette — a floating search window for saved prompts.

  • Save & reuse prompts — write prompt templates with tags (alias, content, pin, tags) in the palette or Settings page. Use counts and last-used tracking help you find your most-used prompts.
  • One-key execution — select a prompt and press Enter to execute your default action (configurable in Settings).
  • Three action modesOnlyCopy (clipboard only), OnlyPaste (paste without modifying your clipboard), Copy & Paste (write clipboard + paste). Choose your default in Settings → Prompt Palette.
  • Quick actions⌘K opens per-prompt actions (Copy, Paste, Edit, Delete, Toggle pin) from the palette.

Prompt Palette

Workspace

  • apps/gui: React + Tauri desktop application
  • apps/gui/src-tauri: Tauri Rust host crate and bundle configuration
  • apps/service: Rust background service
  • apps/cli: Rust administrative CLI
  • crates/busytok-*: Rust workspace crates

Verification

  • Local acceptance gate: ./scripts/verify_acceptance.sh
  • Release rehearsal: DEVELOPER_ID_APPLICATION="Developer ID Application: ..." ./scripts/verify_release.sh
  • Naming check: bash scripts/check-busytok-naming.sh

Contributing

See CONTRIBUTING.md.

Security

See SECURITY.md. Report vulnerabilities via GitHub Private Vulnerability Reporting.

License

Apache-2.0

Extension points exported contracts — how you extend this code

MainThreadExecutor (Interface)
Executor abstraction that lets callers route ServiceManagement calls onto the main thread without this module depending [7 …
apps/gui/src-tauri/src/service_lifecycle/smappservice_bridge.rs
TaskExecutor (Interface)
(no doc) [10 implementers]
crates/busytok-subagent/src/mock_executor.rs
RuntimeControl (Interface)
(no doc) [15 implementers]
crates/busytok-control/src/dispatch.rs
AgentLogAdapter (Interface)
Trait for parsing agent-specific log lines into normalized events. Implementations must not read prompt/response conten [3 …
crates/busytok-adapters/src/adapter.rs
FakeConfig (Interface)
* Real-SDK-path tests for turn_auto. The real `createAgentSession` is NOT * called here; instead we inject a fake `Sess
apps/pi-sidecar/tests/real_sdk.test.ts
QuitContext (Interface)
Abstraction over the "exit the app process" side effect. Production uses Tauri's `AppHandle::exit`; tests use a recordin [5 …
apps/gui/src-tauri/src/lifecycle_coordinator.rs
ControlTransport (Interface)
(no doc) [3 implementers]
crates/busytok-control/src/transport/mod.rs
SdkSession (Interface)
(no doc)
apps/pi-sidecar/src/pi_session.ts

Core symbols most depended-on inside this repo

get
called by 1129
apps/pi-sidecar/src/session_pool.ts
conn
called by 970
crates/busytok-store/src/db.rs
now_ms
called by 270
crates/busytok-domain/src/time.rs
write
called by 198
crates/busytok-config/src/service_marker.rs
send
called by 141
crates/busytok-runtime/src/writer.rs
shutdown_writer
called by 108
crates/busytok-runtime/src/supervisor.rs
as_str
called by 98
apps/gui/src-tauri/src/lifecycle_coordinator.rs
ok
called by 95
crates/busytok-protocol/src/dto.rs

Shape

Function 4,566
Method 1,436
Class 529
Interface 145
Enum 109

Languages

Rust89%
TypeScript11%

Modules by API surface

crates/busytok-protocol/src/dto.rs213 symbols
crates/busytok-runtime/src/supervisor.rs197 symbols
crates/busytok-runtime/tests/supervisor_control.rs170 symbols
apps/gui/src-tauri/src/service_lifecycle/smappservice.rs167 symbols
apps/cli/src/commands/mod.rs140 symbols
apps/cli/src/commands_subagent.rs136 symbols
crates/busytok-store/src/db.rs115 symbols
apps/gui/src-tauri/src/lifecycle_coordinator.rs109 symbols
crates/busytok-runtime/src/scan.rs108 symbols
apps/cli/tests/coverage_gaps.rs107 symbols
crates/busytok-pricing/src/lib.rs106 symbols
crates/busytok-control/tests/coverage_gaps.rs98 symbols

For agents

$ claude mcp add busytok \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact