checkpointer 0.2.1 → 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, and map your code's call graph in the browser.
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,7 +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 project in the browser, so you can see how functions reach each other before you change them. Fully offline.
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.
15
15
 
16
16
  ## Install
17
17
 
@@ -22,6 +22,43 @@ npx checkpointer <command> # or run without installing
22
22
 
23
23
  Requires Node 18+ and git. Also available as `ckpt`.
24
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
+
25
62
  ## Quick start
26
63
 
27
64
  ```bash
@@ -135,9 +172,9 @@ checkpointer ship --force -m "..." # include broken checkpoi
135
172
  ## Visualizing your code (`graph`)
136
173
 
137
174
  Debugging an unfamiliar codebase is easier when you can *see* how functions call
138
- each other. `checkpointer graph` parses your TypeScript/JavaScript project with the
139
- TypeScript compiler (so calls resolve accurately — methods, `this.`, and imports,
140
- 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:
141
178
 
142
179
  ```bash
143
180
  checkpointer graph # analyze + serve on localhost + open the browser
@@ -167,10 +204,14 @@ The page is fully self-contained and offline — no CDN, no telemetry, the graph
167
204
  embedded inline. `--out` produces a single file you can commit or share. Analysis is
168
205
  read-only and never creates a checkpoint.
169
206
 
170
- Today `graph` analyzes **TypeScript/JavaScript** (`.ts`/`.tsx`/`.js`/`.jsx`/`.mjs`/`.cjs`),
171
- since the accurate call resolution comes from the TypeScript compiler; support for more
172
- languages is planned. In a project with no TS/JS sources it says so cleanly — the other
173
- 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.
174
215
 
175
216
  ## Using it with AI agents
176
217