currentlybuilding 0.1.0
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 +153 -0
- package/dist/currentlybuilding.mjs +2050 -0
- package/package.json +27 -0
package/README.md
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# currentlybuilding
|
|
2
|
+
|
|
3
|
+
Turn your real AI-coding sessions into verified proof-of-work.
|
|
4
|
+
|
|
5
|
+
A commit shows what changed. Your session shows how you got there: the problem you
|
|
6
|
+
started with, the approach you took, the calls you made, and what shipped. This small
|
|
7
|
+
tool reads those sessions on your machine, redacts them, grounds them to real git
|
|
8
|
+
commits, and keeps that story with your work.
|
|
9
|
+
|
|
10
|
+
It is a single self-contained JavaScript file. `npm install -g currentlybuilding` puts a
|
|
11
|
+
`currentlybuilding` command on your path that runs on any Node 18+ with no build step,
|
|
12
|
+
no `tsx`, and no runtime TypeScript loading.
|
|
13
|
+
|
|
14
|
+
## Privacy first (the trust story)
|
|
15
|
+
|
|
16
|
+
- **Everything runs locally.** Sessions are read from each tool's local store on your
|
|
17
|
+
machine (for Claude Code, `~/.claude/projects`). Parsing, redaction, and grounding all
|
|
18
|
+
happen on-device.
|
|
19
|
+
- **Secrets and personal data are stripped before anything leaves.** API keys, tokens,
|
|
20
|
+
passwords, `.env` values, emails, and the username in home paths are redacted. The
|
|
21
|
+
preview shows how many values were removed so you can see it working.
|
|
22
|
+
- **A session only counts if it grounds to real commits.** If the work is not backed by
|
|
23
|
+
at least one git commit in the session's time window, the session is dropped. You
|
|
24
|
+
cannot manufacture proof-of-work by talking.
|
|
25
|
+
- **Nothing raw is sent.** `sync` only sends the redacted, grounded event, and the app
|
|
26
|
+
turns it into a draft. Drafts are never published without your approval.
|
|
27
|
+
|
|
28
|
+
## Install
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
npm install -g currentlybuilding
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
That puts a `currentlybuilding` command on your path.
|
|
35
|
+
|
|
36
|
+
## Connect (once)
|
|
37
|
+
|
|
38
|
+
1. Open your Currently dashboard, go to **Sources**, and find the **Connect your editor**
|
|
39
|
+
card.
|
|
40
|
+
2. Click **Generate token** and copy it.
|
|
41
|
+
3. Save it on this machine:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
currentlybuilding connect cur_your_token_here
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The token is stored in `~/.currently/config.json` (readable only by you). The server
|
|
48
|
+
derives who you are from the token, so the CLI never sends a user id. `login` is an alias
|
|
49
|
+
for `connect` if you prefer it.
|
|
50
|
+
|
|
51
|
+
You can also point the CLI at your app while connecting:
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
currentlybuilding connect cur_your_token_here --url https://your-app.example.com
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Everyday use
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
currentlybuilding sources list the AI tools detected on this machine
|
|
61
|
+
currentlybuilding scan list the sessions found across all tools
|
|
62
|
+
currentlybuilding preview parse + redact + ground the latest session(s) and print
|
|
63
|
+
the proof-of-work. Read-only. Nothing is sent.
|
|
64
|
+
currentlybuilding sync do the same for new sessions, then send the grounded events
|
|
65
|
+
to your app so they become drafts you can approve
|
|
66
|
+
currentlybuilding watch run sync on a loop, so it works as a background agent
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
`preview` is the default, so plain `currentlybuilding` is always safe to run.
|
|
70
|
+
|
|
71
|
+
`sync` is incremental: it only processes sessions newer than the last successful sync
|
|
72
|
+
(the cursor lives in `~/.currently/state.json`). The server also dedupes on a stable
|
|
73
|
+
event id, so a re-run never creates duplicates. Use `--all` to reprocess everything.
|
|
74
|
+
|
|
75
|
+
## Supported tools
|
|
76
|
+
|
|
77
|
+
| Tool | Status | Notes |
|
|
78
|
+
| -------------- | ------------ | ------------------------------------------------- |
|
|
79
|
+
| Claude Code | ready | reads `~/.claude/projects` JSONL |
|
|
80
|
+
| Codex | ready | reads local session JSONL |
|
|
81
|
+
| GitHub Copilot | ready | reads local chat JSON |
|
|
82
|
+
| Aider | ready | reads local history |
|
|
83
|
+
| Continue | ready | reads local session JSON |
|
|
84
|
+
| Cursor | needs SQLite | reads `state.vscdb`; see the SQLite note below |
|
|
85
|
+
| Windsurf | experimental | SQLite-backed; detected, capture is best-effort |
|
|
86
|
+
| Zed | experimental | detected, capture is best-effort |
|
|
87
|
+
|
|
88
|
+
Add `--tool <id>` (`claude-code`, `codex`, `cursor`, `copilot`, `aider`, `continue`, ...)
|
|
89
|
+
to any command to restrict it to one tool.
|
|
90
|
+
|
|
91
|
+
### Enabling SQLite-backed tools (Cursor, Windsurf, Zed)
|
|
92
|
+
|
|
93
|
+
Cursor, Windsurf, and Zed keep their chat history in a SQLite database. The CLI reads it
|
|
94
|
+
with whatever is already on your machine, in this order:
|
|
95
|
+
|
|
96
|
+
1. `node:sqlite`, built in on Node 22.5+ (nothing to install)
|
|
97
|
+
2. `better-sqlite3`, an optional dependency, used only if it is installed
|
|
98
|
+
3. the `sqlite3` CLI, if it is on your `PATH`
|
|
99
|
+
|
|
100
|
+
If none is available, the tool is still detected and the CLI prints a one-line hint and
|
|
101
|
+
skips it. To enable capture on older Node without the `sqlite3` CLI, install the optional
|
|
102
|
+
native reader:
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
npm i -g better-sqlite3
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Options
|
|
109
|
+
|
|
110
|
+
- `--limit N` how many sessions to process (preview and sync)
|
|
111
|
+
- `--url <app-url>` where to send events (or set `CURRENTLY_URL`, or save it with `connect`)
|
|
112
|
+
- `--token <token>` auth token for `sync` (or set `CURRENTLY_TOKEN`, or save it with `connect`)
|
|
113
|
+
- `--tool <id>` restrict any command to a single tool
|
|
114
|
+
- `--interval N` minutes between passes in `watch` mode (default 5)
|
|
115
|
+
- `--all` ignore the incremental cursor and reprocess every session
|
|
116
|
+
- `--refine` tighten the wording with Groq when `GROQ_API_KEY` is set. Optional;
|
|
117
|
+
the plain heuristic reads well on its own and needs no key.
|
|
118
|
+
|
|
119
|
+
Resolution order for both the token and the url is: flag, then environment variable, then
|
|
120
|
+
the saved `~/.currently/config.json`.
|
|
121
|
+
|
|
122
|
+
## The whole flow
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
npm install -g currentlybuilding
|
|
126
|
+
currentlybuilding connect cur_... # once, token from the dashboard
|
|
127
|
+
currentlybuilding preview --limit 3 # see what would be sent, read-only
|
|
128
|
+
currentlybuilding sync --url https://your-app.example.com # send new grounded sessions
|
|
129
|
+
currentlybuilding watch --interval 10 # keep it current in the background
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Build (maintainers)
|
|
133
|
+
|
|
134
|
+
The published package ships one bundled file, `dist/currentlybuilding.mjs`, produced by
|
|
135
|
+
esbuild from `currently.mjs` (which statically imports the shared TypeScript session
|
|
136
|
+
logic in `../lib/sessions`):
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
npm install
|
|
140
|
+
npm run build
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
The build command is:
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
esbuild currently.mjs --bundle --platform=node --format=esm --target=node18 \
|
|
147
|
+
--outfile=dist/currentlybuilding.mjs \
|
|
148
|
+
--banner:js='#!/usr/bin/env node' --external:better-sqlite3
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
`better-sqlite3` is kept external so it is required only when a user has installed the
|
|
152
|
+
optional native reader. `prepublishOnly` runs the build, so `npm publish` always ships a
|
|
153
|
+
fresh bundle. Only `dist/` and `README.md` are included in the tarball.
|