@devness/useai 0.6.6 → 0.6.8

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 (3) hide show
  1. package/README.md +210 -0
  2. package/dist/index.js +8 -8
  3. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,210 @@
1
+ # UseAI
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@devness/useai.svg)](https://www.npmjs.com/package/@devness/useai)
4
+ [![npm downloads](https://img.shields.io/npm/dm/@devness/useai.svg)](https://www.npmjs.com/package/@devness/useai)
5
+ [![license](https://img.shields.io/npm/l/@devness/useai.svg)](https://github.com/devness-com/useai/blob/main/LICENSE)
6
+ [![GitHub stars](https://img.shields.io/github/stars/devness-com/useai)](https://github.com/devness-com/useai)
7
+
8
+ **Track your AI coding sessions with privacy-first analytics.**
9
+
10
+ UseAI is a local-first [MCP server](https://modelcontextprotocol.io/) that records how you use AI coding tools -- session duration, languages, task types, and streaks -- without ever seeing your code. Think of it as Wakatime for AI coding.
11
+
12
+ ## Features
13
+
14
+ - **Session tracking** -- automatically records when you start and stop using AI tools
15
+ - **Streak tracking** -- daily coding streaks with global leaderboard
16
+ - **Evaluation metrics** -- sessions scored using the [SPACE framework](https://queue.acm.org/detail.cfm?id=3454124) for prompt quality, context, independence, and scope
17
+ - **Local dashboard** -- built-in web UI served from the daemon (`useai serve`)
18
+ - **Public profile & leaderboard** -- opt-in shareable profile at useai.dev with global AI proficiency rankings
19
+ - **Privacy-first** -- everything stays in `~/.useai/` on your machine, zero network calls from the MCP server
20
+ - **Ed25519 signed chain** -- every session record is cryptographically signed for tamper evidence
21
+ - **30+ AI tools supported** -- Claude Code, Cursor, Windsurf, VS Code, Codex, Gemini CLI, GitHub Copilot, Aider, Cline, Zed, Amazon Q, JetBrains/Junie, Goose, Roo Code, and [many more](https://useai.dev/explore)
22
+
23
+ ## Quick Start
24
+
25
+ ```bash
26
+ npx @devness/useai setup
27
+ ```
28
+
29
+ This installs the MCP server and configures it for your AI tools automatically.
30
+
31
+ ### Manual Setup
32
+
33
+ <details>
34
+ <summary>Claude Code</summary>
35
+
36
+ ```bash
37
+ claude mcp add useai -- npx -y @devness/useai
38
+ ```
39
+ </details>
40
+
41
+ <details>
42
+ <summary>Cursor</summary>
43
+
44
+ Add to `.cursor/mcp.json`:
45
+
46
+ ```json
47
+ {
48
+ "mcpServers": {
49
+ "useai": {
50
+ "command": "npx",
51
+ "args": ["-y", "@devness/useai"]
52
+ }
53
+ }
54
+ }
55
+ ```
56
+ </details>
57
+
58
+ <details>
59
+ <summary>VS Code</summary>
60
+
61
+ Add to your VS Code MCP settings:
62
+
63
+ ```json
64
+ {
65
+ "mcp": {
66
+ "servers": {
67
+ "useai": {
68
+ "command": "npx",
69
+ "args": ["-y", "@devness/useai"]
70
+ }
71
+ }
72
+ }
73
+ }
74
+ ```
75
+ </details>
76
+
77
+ <details>
78
+ <summary>Windsurf</summary>
79
+
80
+ Add to your Windsurf MCP config:
81
+
82
+ ```json
83
+ {
84
+ "mcpServers": {
85
+ "useai": {
86
+ "command": "npx",
87
+ "args": ["-y", "@devness/useai"]
88
+ }
89
+ }
90
+ }
91
+ ```
92
+ </details>
93
+
94
+ > No API key needed. The MCP server runs 100% locally.
95
+
96
+ ## How It Works
97
+
98
+ UseAI runs as an MCP (Model Context Protocol) server. When your AI tool starts a conversation, it calls `useai_start`. During the session, periodic `useai_heartbeat` calls keep the timer alive. When the conversation ends, `useai_end` seals the session with a cryptographic signature.
99
+
100
+ All data is written to `~/.useai/` as JSONL files. The MCP server makes zero network calls.
101
+
102
+ | MCP Tool | What it does |
103
+ |----------|--------------|
104
+ | `useai_start` | Begin tracking a session |
105
+ | `useai_heartbeat` | Keep-alive during long sessions |
106
+ | `useai_end` | End session, record milestones and evaluation |
107
+
108
+ ### Daemon Mode
109
+
110
+ For tools that support HTTP-based MCP (StreamableHTTP), UseAI can run as a background daemon on `127.0.0.1:19200`. This allows multiple AI tool sessions to connect concurrently to the same tracking instance:
111
+
112
+ ```bash
113
+ useai serve # Start daemon + local dashboard
114
+ ```
115
+
116
+ The setup wizard auto-configures the right mode (stdio or daemon) for each tool.
117
+
118
+ ## Evaluation Frameworks
119
+
120
+ UseAI uses configurable **evaluation frameworks** to score each AI coding session. The framework controls what rubric the AI model uses when self-assessing session quality, producing a 0-100 session score.
121
+
122
+ | Framework | Description |
123
+ |-----------|-------------|
124
+ | **SPACE** (default) | Based on the [SPACE developer productivity framework](https://queue.acm.org/detail.cfm?id=3454124) by GitHub/Microsoft Research. Weighted rubrics across Communication (prompt quality, context), Efficiency (independence), and Performance (scope). |
125
+ | **Basic** | Simple equal-weight average across all dimensions. No detailed rubric guidance. |
126
+
127
+ Session scores feed into the **AI Proficiency Score (APS)** -- a 0-1000 composite score across five dimensions: Output, Efficiency, Prompt Quality, Consistency, and Breadth.
128
+
129
+ Change your framework:
130
+
131
+ ```bash
132
+ useai config --framework space # recommended
133
+ useai config --framework raw # basic/no rubric
134
+ ```
135
+
136
+ The setup wizard (`npx @devness/useai`) also lets you pick a framework during installation.
137
+
138
+ ## What Gets Tracked
139
+
140
+ - Which AI tool you're using (Cursor, Claude Code, etc.)
141
+ - Session duration and task type (coding, debugging, testing, etc.)
142
+ - Programming languages used
143
+ - File count (number only, never file names)
144
+ - Generic milestone descriptions (privacy-filtered by design)
145
+ - Self-evaluation metrics (prompt quality, task outcome, independence)
146
+
147
+ **Never tracked:** your code, prompts, AI responses, file names, file paths, or directory structure.
148
+
149
+ ### What Gets Synced
150
+
151
+ When you run `useai sync`, full session records (not just aggregates) are sent to the server. This includes all fields above plus `private_title` and `project` name. See [PRIVACY.md](PRIVACY.md) for the exact payload and what's publicly visible vs. private.
152
+
153
+ ## CLI
154
+
155
+ ```bash
156
+ useai stats # View local stats: streaks, hours, tools, languages
157
+ useai status # See everything stored on your machine
158
+ useai sync # Sync sessions to useai.dev
159
+ useai serve # Start local analytics dashboard
160
+ useai config # Manage settings
161
+ ```
162
+
163
+ Install globally:
164
+
165
+ ```bash
166
+ npm install -g @devness/useai-cli
167
+ ```
168
+
169
+ ## Architecture
170
+
171
+ UseAI is a monorepo with the following open source packages:
172
+
173
+ ```
174
+ packages/
175
+ shared/ Core types, constants, Ed25519 crypto chain
176
+ mcp/ MCP server + HTTP daemon (published as @devness/useai)
177
+ cli/ CLI tool (published as @devness/useai-cli)
178
+ ui/ Shared React component library
179
+ dashboard/ Local analytics web UI
180
+ web/ Public website (useai.dev)
181
+ ```
182
+
183
+ **Tech stack:** TypeScript, pnpm workspaces, Turborepo, Vitest, React 19, Tailwind v4.
184
+
185
+ ## Privacy
186
+
187
+ UseAI is designed with privacy as architecture, not just policy:
188
+
189
+ - **Local-first** -- MCP server writes to disk, never to the network
190
+ - **Open source** -- audit exactly what gets recorded
191
+ - **Cryptographic chain** -- Ed25519 signed hash chain for tamper evidence
192
+ - **Opt-in sync** -- data only leaves your machine when you choose
193
+ - **You own your data** -- export or delete at any time
194
+
195
+ For a complete list of every field captured, what happens when you sync, and what's visible on your public profile, see [PRIVACY.md](PRIVACY.md). For details on the cryptographic chain, see [SECURITY.md](SECURITY.md).
196
+
197
+ ## Contributing
198
+
199
+ We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for setup instructions and guidelines.
200
+
201
+ ## Links
202
+
203
+ - Website: [useai.dev](https://useai.dev)
204
+ - GitHub: [devness-com/useai](https://github.com/devness-com/useai)
205
+ - npm: [@devness/useai](https://www.npmjs.com/package/@devness/useai)
206
+ - Explore supported tools: [useai.dev/explore](https://useai.dev/explore)
207
+
208
+ ## License
209
+
210
+ [MIT](LICENSE)