Install the pks CLI, verify it runs, then get three real results locally — Claude Code cost analysis, a searchable session brain, and a writing lint pass.
dotnet tool install -g pks-cli && pks claude usageGet pks installed and producing real output in under ten minutes: install the binary, confirm the version, then run three self-contained commands that need no cloud account and no API key. Each scenario below reads data already on your machine and writes its results locally.
Pick one install route. The routes differ only in what they require up front — the pks command is identical afterwards.
net10.0 and is packaged with PackAsTool.~/.claude/projects/**/*.jsonl. Without at least one past Claude Code session there is nothing to analyse..pks/ folder.dotnet tool install -g pks-cli
npm install -g @pks-cli/cli
The npm package resolves a platform-specific binary through optionalDependencies, so the same command works on Linux, macOS, and Windows (x64 and arm64).
pks --version
You should see the installed version printed, for example 6.20.1. If the shell reports that pks is not found, open a new terminal so the tool directory is picked up by PATH.
pks prints an ASCII banner before most commands. Suppress it with --no-logo, and add --debug to any command for verbose output.
pks --no-logo --version
This is the fastest genuine result pks gives you, and it never leaves your machine. It parses your Claude Code session transcripts, deduplicates billed requests, prices them, and charts the outcome.
pks claude usage
You get an hourly cost chart for the last 24 hours, a daily cost chart, and a cost summary with the five most expensive models. Parsed files are cached in ~/.pks-cli/usage-cache/manifest.json, so a second run is much faster.
For the performance view instead of the cost view:
pks claude stats
That renders an activity heatmap, session streaks, total token counts, and a response-time-per-output-token chart split into a recent window versus the prior period — the honest way to check whether Claude Code has slowed down.
Note. Both commands are read-only and offline. Neither sends your transcripts anywhere.
The brain turns the same transcripts into a queryable knowledge base. Ingest is deterministic and free — no model is called, so nothing is billed.
cd /path/to/your/repo
pks brain init
pks brain ingest
init creates the global root at ~/.pks-cli/brain/ and, inside a git repository, a .pks/brain/ folder that it also appends to the nearest .gitignore. ingest walks every Claude session file and writes four append-only firehose files: prompts, tool calls, file operations, and errors. Repeat runs only reprocess sessions whose file changed.
Now search everything you have ever asked:
pks brain search "keycloak"
pks brain status
search prints a table of source, timestamp, session, and matching snippet. status reports what the brain knows: projects, sessions, prompts, tool calls, file operations, and the last ingest time.
The later phases — pks brain extract, synth, wiki, adr — call an LLM and cost money. Each one plans first and shows an estimate before spending anything.
The writing toolchain runs a deterministic, no-LLM terminology pass. Initialize it once, then lint anything.
pks writing init
pks writing lint README.md
init seeds ~/.pks-cli/writing/ with a profile template. Skipping it makes lint fail with an empty-anglicism-list error. lint writes a WRITING-REPORT.json and .md sidecar next to each file with findings, deletes stale sidecars for files that are now clean, and always exits 0 — it never breaks a build.
Check what the linter is drawing from:
pks writing profile show
That prints the resolved profile plus counts and paths for anglicisms, allowlist terms, the active channel, and reference samples.
Two directories matter, and they are different things.
| Setting | Value |
|---|---|
| Global config and state | ~/.pks-cli/ |
| Per-project state | <repo>/.pks/ |
Global settings live in ~/.pks-cli/settings.json. Credentials for each integration are stored per feature in the same directory. On Windows the root is %USERPROFILE%\.pks-cli, not %APPDATA%.