modelstat 0.0.6

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.
package/README.md ADDED
@@ -0,0 +1,59 @@
1
+ # @modelstat/agent
2
+
3
+ > Local companion for [modelstat](https://github.com/0xflair/modelstat). Reads
4
+ > your AI coding tools' JSONL/SQLite logs (Claude Code, Codex, Cursor,
5
+ > Gemini, Aider, …), tokenises events on-device, and uploads them to the
6
+ > modelstat backend.
7
+
8
+ **Your prompts never leave your machine.** The agent only uploads
9
+ tokenised metadata (token counts, model ids, git remote, tool call
10
+ counts, redacted summaries). See the
11
+ [source](https://github.com/0xflair/modelstat/tree/main/apps/agent-dev)
12
+ — discovery and redaction live in
13
+ [`@modelstat/parsers`](https://github.com/0xflair/modelstat/tree/main/packages/parsers).
14
+
15
+ ## Install
16
+
17
+ ```bash
18
+ # npm
19
+ npm install -g @modelstat/agent
20
+
21
+ # pnpm
22
+ pnpm add -g @modelstat/agent
23
+
24
+ # bun
25
+ bun install -g @modelstat/agent
26
+ ```
27
+
28
+ Requires Node 20+.
29
+
30
+ ## Connect
31
+
32
+ ```bash
33
+ # 1. Pair with your modelstat account (OAuth device-code)
34
+ modelstat connect
35
+
36
+ # It prints a 6-char code; enter it at the URL it opens in your browser.
37
+
38
+ # 2. Report detected tool installs + identities
39
+ modelstat discover
40
+
41
+ # 3. One-shot backfill of all local JSONL
42
+ modelstat scan
43
+
44
+ # 4. Continuous watcher (chokidar + periodic backstop)
45
+ modelstat watch
46
+ ```
47
+
48
+ ## Self-host
49
+
50
+ If you're pointing at your own modelstat API (not the hosted SaaS):
51
+
52
+ ```bash
53
+ export AGENT_API_URL=https://your-modelstat-api.example.com
54
+ modelstat connect
55
+ ```
56
+
57
+ ## License
58
+
59
+ Apache-2.0 — the code that reads files on your machine must be auditable.