Commands

These are the commands inside pi. For the terminal app see CLI; for Claude Code see the guide.

Reports

/kankakuOpens the panel in pi's TUI for target, reports, sync, export, doctor, and about; in headless mode, prints today's totals instead.
/kankakuIn headless mode, shows today's totals (work, waiting, record count) by role, plus a union-based tasks segment, each with its estimated cost. Report lines include cache hit NN% when tokens were recorded; otherwise it is omitted.
/kankaku allSame totals as headless "/kankaku", but across every historical record instead of just today's.
/kankaku tasksOne line per task (time, union of work/waiting, cost, subagent count, truncated prompt) for the current pi session. Each report line includes cache hit NN% when tokens were recorded; otherwise it is omitted.
/kankaku tasks allSame as "tasks", but across every session instead of only the current one.
/kankaku sessionsOne line per session today (id, time range, union of work/waiting, cost, task count).
/kankaku sessions allSame as "sessions", but across every day instead of only today.
/kankaku clientsToday's totals (work, waiting, wall time, cost, task count) grouped by billing client. Tasks with no resolved client are grouped under "(none)". Each report line includes cache hit NN% when tokens were recorded; otherwise it is omitted.
/kankaku clients allSame as "clients", but summed across every day.
/kankaku projectsToday's totals by project, same shape as "clients" but grouped by project. Only available with a hub configured. Each report line includes cache hit NN% when tokens were recorded; otherwise it is omitted. Requires hub
/kankaku projects allSame as "projects", but summed across every day. Requires hub

Client & target

/kankaku clientShows the effective billing client for the current session and which source it came from (session, "KANKAKU_CLIENT", or the project's "config.json").
/kankaku client <name>Sets the billing client for the current session. With a hub configured, the name must match a catalog client's code or name (case-insensitive) and also sets the target with no project.
/kankaku client --clearClears the session-level client override, so resolution falls back to the next source in precedence.
/kankaku targetShows the effective hub target (client + project) and which source it came from: session, project "config.json", "repo_paths", or the picker. Hub-only. Requires hub
/kankaku target pickRe-runs the client/project picker even if one is already resolved. The new target applies to records settled after this command. Requires hub
/kankaku target clearClears the session-level target, so resolution falls back to "config.json", "repo_paths", or the picker. Requires hub
/kankaku taskLists open/doing tasks in the current hub project and links the selected task to this session's synced entries. Also accepts "/kankaku task pick". The link is session-only, never saved to "config.json", and is dropped by target pick/clear; subagents do not inherit it. Assignment is create-only, so later syncs do not undo reassignment in the hub. Requires hub
/kankaku task clearDrops the current session's hub task link without changing the client/project target. Requires hub

Hub

/kankaku catalog refreshForces a catalog (clients/projects) refresh from the hub instead of waiting for the 6-hour cache to expire, and reports how many clients/projects came back. Requires hub
/kankaku syncPushes pending tasks to the hub: new ones, plus anything inside the revisit window ("KANKAKU_SYNC_WINDOW_HOURS", 24h by default) that changed. Requires hub
/kankaku sync allA full re-evaluation: revisits every task, not just the recent window. The content hash keeps it cheap even when nothing changed. Requires hub
/kankaku sync statusShows the sync watermark ("syncedThrough"), a locally-computed pending count (no network call), and the last sync error, if any. Requires hub
/kankaku backfillRuns a full sync and reports the result grouped by the old free-text label ("legacy_client_label"): how many tasks went to "Sin determinar" and under which name. Requires hub

Export

/kankaku export [csv|json] [all]Writes one row per task (today's by default, or every task with "all") as CSV or JSON, under "KANKAKU_DIR/export/".