tokenjam 0.5.5 → 0.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +49 -22
  2. package/package.json +11 -3
package/README.md CHANGED
@@ -1,40 +1,67 @@
1
- # `tokenjam` — zero-install TokenJam launcher (command: `tj`)
1
+ # tokenjam
2
+
3
+ <div align="center">
4
+
5
+ <img src="https://raw.githubusercontent.com/Metabuilder-Labs/tokenjam/main/docs/brand/tokenjam-repo-header.png" alt="TokenJam: token efficiency for AI agents. Reads your agent's telemetry, finds the waste, runs 100% local." width="760">
6
+
7
+ [![npm](https://img.shields.io/npm/v/tokenjam?color=3d8eff&labelColor=0d1117)](https://www.npmjs.com/package/tokenjam)
8
+ [![npm downloads](https://img.shields.io/npm/dm/tokenjam?color=3d8eff&labelColor=0d1117&label=downloads)](https://www.npmjs.com/package/tokenjam)
9
+ [![PyPI](https://img.shields.io/pypi/v/tokenjam?color=3d8eff&labelColor=0d1117)](https://pypi.org/project/tokenjam/)
10
+ [![License: MIT](https://img.shields.io/badge/license-MIT-3d8eff?labelColor=0d1117)](https://github.com/Metabuilder-Labs/tokenjam/blob/main/LICENSE)
11
+
12
+ </div>
13
+
14
+ TokenJam ingests telemetry data about your agents from a multitude of sources and provides you a quick and easy way to visualize and optimize cost so that you get the most out of the tokens you pay for. This package is the zero-install launcher: one command, no pip environment, no config.
2
15
 
3
16
  ```bash
4
17
  npx tokenjam
5
18
  ```
6
19
 
7
- That one command reads your `~/.claude/projects/*.jsonl` session logs
8
- and shows you **where your
9
- Claude Code quota actually goes** — quota composition (re-reading context vs.
10
- net-new work) plus a session timeline. No pip env, no daemon, no onboarding.
20
+ ## What you get
11
21
 
12
- This npm package is a **thin launcher** for the real CLI, which is the Python
13
- package [`tokenjam`](https://pypi.org/project/tokenjam/) (command: `tj`). `npx tokenjam`
14
- shells out to the first available Python runner:
22
+ Bare `npx tokenjam` reads the session logs you already have (Claude Code today; more sources land in the full CLI) and prints a 15-second, read-only report: quota composition (what share of your tokens went to re-reading history and context vs. net-new work) plus a session timeline. Nothing is installed, nothing is kept.
15
23
 
16
- 1. `uvx --from tokenjam tj …`
17
- 2. `pipx run --spec tokenjam tj …`
18
- 3. an already-installed `tj` on your `PATH`
24
+ For the full setup, run `npx tokenjam onboard`: it wires up live capture, all six analyzers, the Lens dashboard, and the zero-token statusline in one command.
25
+
26
+ ## Commands
19
27
 
20
- All arguments pass straight through, so `npx tokenjam quickstart --since 7d`,
21
- `npx tokenjam context`, `npx tokenjam optimize`, etc. all work.
28
+ All arguments pass straight through to the Python CLI, so any `tj` subcommand and flag works here too.
29
+
30
+ | Command | What it does |
31
+ |---|---|
32
+ | `npx tokenjam` | Zero-install first run: quota composition and a session timeline from your existing session logs. |
33
+ | `npx tokenjam context` | Where your quota goes: re-read vs. net-new share, recurring inclusions, `/compact` candidates. |
34
+ | `npx tokenjam optimize` | Cost-saving candidates: model downsizing, cache opportunities, prompt trimming, workflow reuse, subagent right-sizing. |
35
+ | `npx tokenjam onboard` | Guided setup: writes a config, generates an ingest secret, and optionally installs the background daemon for live capture. |
22
36
 
23
37
  ## Go deeper
24
38
 
25
- `npx tokenjam` is the no-setup front door. When you want live capture, the local
26
- dashboard, and the MCP server for Claude Code, install the full CLI and onboard:
39
+ `npx tokenjam` is the no-setup front door. One command sets up live capture, the local Lens dashboard, and the zero-token statusline:
27
40
 
28
41
  ```bash
29
- pipx install tokenjam
30
- tj onboard
42
+ npx tokenjam onboard # or: pipx install tokenjam && tj onboard
31
43
  ```
32
44
 
33
- See the [TokenJam README](https://github.com/Metabuilder-Labs/tokenjam) for the
34
- full feature set.
45
+ `tj onboard` asks how you use AI agents (Claude Code, Codex, or your own SDK/API agents) and wires the right path. For Claude Code and Codex that means backfilling recent history plus a statusline and hooks; restart and you're live. From there:
46
+
47
+ ```bash
48
+ tj optimize # cost-saving candidates from your actual usage
49
+ tj serve # open the Lens dashboard at http://127.0.0.1:7391/
50
+ ```
51
+
52
+ - Full feature set, six analyzers, and Lens screenshots: [github.com/Metabuilder-Labs/tokenjam](https://github.com/Metabuilder-Labs/tokenjam)
53
+ - Product site and docs: [tokenjam.dev](https://tokenjam.dev)
54
+
55
+ ## How the launcher works
56
+
57
+ This npm package is a thin launcher, not the real CLI. `npx tokenjam` shells out to the first available Python runner:
58
+
59
+ 1. `uvx --from tokenjam tj …`
60
+ 2. `pipx run --spec tokenjam tj …`
61
+ 3. an already-installed `tj` on your `PATH`
62
+
63
+ The real CLI is the Python package [`tokenjam`](https://pypi.org/project/tokenjam/) (command: `tj`).
35
64
 
36
65
  ## Requirements
37
66
 
38
- A Python runner — [`uv`](https://docs.astral.sh/uv/) (recommended) or
39
- [`pipx`](https://pipx.pypa.io/). If neither is present, `npx tokenjam` prints install
40
- guidance.
67
+ A Python runner: [`uv`](https://docs.astral.sh/uv/) (recommended) or [`pipx`](https://pipx.pypa.io/). If neither is present, `npx tokenjam` prints install guidance instead of failing silently.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tokenjam",
3
- "version": "0.5.5",
4
- "description": "Zero-install launcher for TokenJam (tj) — `npx tokenjam` runs the Python CLI via uvx/pipx and prints where your Claude Code quota actually goes, no setup.",
3
+ "version": "0.5.7",
4
+ "description": "Zero-install launcher for TokenJam (tj): npx tokenjam runs the Python CLI via uvx/pipx and prints where your AI agent's token quota actually goes, no setup required.",
5
5
  "keywords": [
6
6
  "claude-code",
7
7
  "ccusage",
@@ -10,7 +10,15 @@
10
10
  "llm",
11
11
  "agents",
12
12
  "observability",
13
- "tokenjam"
13
+ "tokenjam",
14
+ "anthropic",
15
+ "claude",
16
+ "token-usage",
17
+ "cost-tracking",
18
+ "cli",
19
+ "statusline",
20
+ "opentelemetry",
21
+ "agent-observability"
14
22
  ],
15
23
  "homepage": "https://tokenjam.dev",
16
24
  "bugs": "https://github.com/Metabuilder-Labs/tokenjam/issues",