checkpointer 0.2.0 → 0.3.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # checkpointer
2
2
 
3
- > Git-isolated checkpoints that humans and AI agents share — save working states, revert anytime, ship a range as one clean commit.
3
+ > Git-isolated checkpoints that humans and AI agents share — save working states, revert anytime, ship a range as one clean commit, and map your TypeScript/JavaScript or Java call graph in the browser.
4
4
 
5
5
  When you (or an AI agent) work through a long task, you want save points: a way to
6
6
  mark "this works", roll back when something breaks, and at the end turn all that
@@ -11,6 +11,7 @@ repo kept outside your project — so your real `git log` stays clean until you
11
11
  - **Isolated from your repo** — checkpoints live in `~/.checkpointer`, never in your project's `.git`. Nothing shows up in `git log` until you `ship`.
12
12
  - **Captures everything** — unlike editor undo, it snapshots the whole working tree, including files changed by scripts, formatters, and codemods.
13
13
  - **Ships to one commit** — bundle a range of checkpoints into a single commit on your branch, then push when you're ready.
14
+ - **Maps your code** — `checkpointer graph` opens an interactive, searchable function call-graph of your TypeScript/JavaScript or Java project in the browser, so you can see how functions reach each other before you change them. Polyglot repos render as one combined graph. Fully offline.
14
15
 
15
16
  ## Install
16
17
 
@@ -21,6 +22,43 @@ npx checkpointer <command> # or run without installing
21
22
 
22
23
  Requires Node 18+ and git. Also available as `ckpt`.
23
24
 
25
+ ### Without npm (git clone)
26
+
27
+ If you can't access the npm registry, clone the repo — `dist/cli.js` is committed and is a single self-contained bundle with no runtime dependencies:
28
+
29
+ ```bash
30
+ git clone https://git.soma.salesforce.com/v-akshay/checkpointer.git
31
+ cd checkpointer
32
+ node dist/cli.js --help
33
+ ```
34
+
35
+ To use it like a regular command (`ckpt`) without typing `node dist/cli.js` every time:
36
+
37
+ ```bash
38
+ # macOS / Linux — copy to somewhere on your PATH
39
+ sudo cp dist/cli.js /usr/local/bin/ckpt
40
+ sudo chmod +x /usr/local/bin/ckpt
41
+ ckpt --help
42
+
43
+ # or add the dist folder to your PATH in ~/.zshrc / ~/.bashrc
44
+ export PATH="$PATH:/path/to/checkpointer/dist"
45
+ alias ckpt="node /path/to/checkpointer/dist/cli.js"
46
+ ```
47
+
48
+ Then `cd` into any git project and start checkpointing:
49
+
50
+ ```bash
51
+ cd ~/my-project
52
+ node /path/to/checkpointer/dist/cli.js init # or just: ckpt init
53
+ ```
54
+
55
+ To rebuild from source (only needed if you edit the TypeScript):
56
+
57
+ ```bash
58
+ npm install # installs tsup + typescript — dev tooling only
59
+ npm run build
60
+ ```
61
+
24
62
  ## Quick start
25
63
 
26
64
  ```bash
@@ -134,9 +172,9 @@ checkpointer ship --force -m "..." # include broken checkpoi
134
172
  ## Visualizing your code (`graph`)
135
173
 
136
174
  Debugging an unfamiliar codebase is easier when you can *see* how functions call
137
- each other. `checkpointer graph` parses your TypeScript/JavaScript project with the
138
- TypeScript compiler (so calls resolve accurately — methods, `this.`, and imports,
139
- not just name matches) and opens an interactive map in your browser:
175
+ each other. `checkpointer graph` parses your TypeScript/JavaScript or Java project
176
+ (so calls resolve accurately — methods, `this.`, inheritance, and imports, not just
177
+ name matches) and opens an interactive map in your browser:
140
178
 
141
179
  ```bash
142
180
  checkpointer graph # analyze + serve on localhost + open the browser
@@ -154,17 +192,26 @@ In the viewer you can:
154
192
  - **Search** any function by name or file; jump straight to it.
155
193
  - **Focus a function** to see its **ancestors** (everyone who reaches it, up to the
156
194
  entrypoints) beside its **descendants** (everything it calls) — both expandable.
157
- - See each function's **JSDoc/comment description**, kind (function/method/constructor),
158
- async flag, parameters, and `file:line`, with recursion and cycles flagged inline.
195
+ - See each function's **full signature** with type-checker-resolved parameter and
196
+ return types so you learn what it takes and returns even when there's no comment —
197
+ alongside its description, a **per-parameter table** (name, type, optional, JSDoc
198
+ `@param` prose when present), kind (function/method/constructor), async flag, and
199
+ `file:line`, with recursion and cycles flagged inline.
200
+ - Hit **"view code"** on any function to read its source inline, embedded in the page —
201
+ nothing is fetched.
159
202
 
160
203
  The page is fully self-contained and offline — no CDN, no telemetry, the graph data is
161
204
  embedded inline. `--out` produces a single file you can commit or share. Analysis is
162
205
  read-only and never creates a checkpoint.
163
206
 
164
- Today `graph` analyzes **TypeScript/JavaScript** (`.ts`/`.tsx`/`.js`/`.jsx`/`.mjs`/`.cjs`),
165
- since the accurate call resolution comes from the TypeScript compiler; support for more
166
- languages is planned. In a project with no TS/JS sources it says so cleanly — the other
167
- commands (`save`/`restore`/`ship`) work in any repository regardless of language.
207
+ `graph` analyzes **TypeScript/JavaScript** (`.ts`/`.tsx`/`.js`/`.jsx`/`.mjs`/`.cjs`) and
208
+ **Java** (`.java`). TS/JS calls resolve through the TypeScript compiler; Java is parsed
209
+ with [`java-parser`](https://www.npmjs.com/package/java-parser) and resolved through a
210
+ symbol table (fields, locals, parameters, and the superclass chain) so `this.m()`,
211
+ `obj.m()`, `Type.staticM()`, inherited methods, and `new X()` all map to the right
212
+ declaration. A repo with both languages renders as **one combined graph**; support for
213
+ more languages is planned. In a project with no analyzable sources it says so cleanly —
214
+ the other commands (`save`/`restore`/`ship`) work in any repository regardless of language.
168
215
 
169
216
  ## Using it with AI agents
170
217