@tricknowtech/context 0.1.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 +52 -3
- package/dist/{chunk-BWATZKYM.js → chunk-BLEGQVXA.js} +312 -102
- package/dist/cli.cjs +513 -160
- package/dist/cli.js +174 -17
- package/dist/index.cjs +384 -133
- package/dist/index.d.cts +85 -8
- package/dist/index.d.ts +85 -8
- package/dist/index.js +11 -1
- package/package.json +11 -3
package/README.md
CHANGED
|
@@ -10,7 +10,31 @@ npx @tricknowtech/context init
|
|
|
10
10
|
|
|
11
11
|
## The problem
|
|
12
12
|
|
|
13
|
-
Open the same project on a second machine and
|
|
13
|
+
Open the same project on a second machine and your assistant knows nothing. Instruction files travel with the repo, but the parts that actually accumulate — per-project memory, custom skills and prompts, and the thread of what you were doing — live in your home directory and never leave the machine that built them.
|
|
14
|
+
|
|
15
|
+
## Works with the tool you actually use
|
|
16
|
+
|
|
17
|
+
Assistants are detected automatically, from what's installed and what the repo already contains:
|
|
18
|
+
|
|
19
|
+
| Tool | Project files | User-global |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| Claude Code | `CLAUDE.md`, `.claude/**` | memory, skills, agents, plans |
|
|
22
|
+
| OpenAI Codex | `AGENTS.md`, `.codex/**` | `AGENTS.md`, `config.toml`, prompts |
|
|
23
|
+
| Cursor | `.cursorrules`, `.cursor/rules/**` | global rules |
|
|
24
|
+
| GitHub Copilot | `.github/copilot-instructions.md`, instructions, prompts | — |
|
|
25
|
+
| Gemini CLI | `GEMINI.md`, `.gemini/**` | `GEMINI.md`, settings, commands |
|
|
26
|
+
| Windsurf | `.windsurfrules`, `.windsurf/**` | — |
|
|
27
|
+
| Cline | `.clinerules` | — |
|
|
28
|
+
| Aider | `CONVENTIONS.md`, `.aider.conf.yml` | — |
|
|
29
|
+
| Continue | `.continue/**` | — |
|
|
30
|
+
|
|
31
|
+
Each tool's home-directory config is namespaced in the store (`assistants/codex/…`) and restored to the right place on the other machine — `~/.codex`, `~/.gemini`, `~/.claude` — even when that machine's home and project paths are completely different.
|
|
32
|
+
|
|
33
|
+
This also works across a *team* on different tools: a Cursor user's rules sync for a Claude user, because detection keys off what's in the repo, not just what's installed locally. Pin it explicitly if you'd rather:
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{ "assistants": ["claude", "codex"] }
|
|
37
|
+
```
|
|
14
38
|
|
|
15
39
|
## What it does
|
|
16
40
|
|
|
@@ -18,10 +42,17 @@ Open the same project on a second machine and the assistant knows nothing. Your
|
|
|
18
42
|
|
|
19
43
|
```bash
|
|
20
44
|
ctx push # collect context into the store
|
|
21
|
-
ctx pull # restore it
|
|
45
|
+
ctx pull # restore it, and print where you left off
|
|
22
46
|
ctx status # what changed since the last push
|
|
47
|
+
ctx handoff # show or write the session handoff
|
|
48
|
+
ctx doctor # check the setup is actually wired correctly
|
|
23
49
|
```
|
|
24
50
|
|
|
51
|
+
Start with `ctx doctor` if anything seems off — it verifies the pieces that
|
|
52
|
+
fail silently, including whether your store is accidentally gitignored (in
|
|
53
|
+
which case it never reaches the other machine) and whether restored memory
|
|
54
|
+
lands where Claude Code actually reads it.
|
|
55
|
+
|
|
25
56
|
Commit `.contextsync/` and your teammates — and your other laptop — get the same context on clone.
|
|
26
57
|
|
|
27
58
|
### It skips what git already carries
|
|
@@ -46,7 +77,25 @@ Claude Code names its per-project directories after the absolute project path
|
|
|
46
77
|
|
|
47
78
|
`/context push` asks the model to write `.contextsync/handoff.json` first — goal, decisions made, open threads, files touched, next step. Only the model has the conversation; only the CLI has the disk, so the slash command is the one place both are available.
|
|
48
79
|
|
|
49
|
-
On the other machine, `/context pull` restores everything and reads the handoff back, so the new session starts oriented instead of blank
|
|
80
|
+
On the other machine, `/context pull` restores everything and reads the handoff back, so the new session starts oriented instead of blank:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
Where you left off (2h ago)
|
|
84
|
+
|
|
85
|
+
Goal Build the context-sync tool and publish it
|
|
86
|
+
Next step Start the cloud remote, leading with the token-scoping fix
|
|
87
|
+
|
|
88
|
+
Decided:
|
|
89
|
+
· Local-first: store is committed to the repo, cloud is an optional remote
|
|
90
|
+
Still open:
|
|
91
|
+
· mcp:* token abilities are granted but never checked
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
The handoff is validated on write and on read — a model-authored file that's
|
|
95
|
+
malformed is reported rather than silently ignored, since a handoff that looks
|
|
96
|
+
present but says nothing is worse than an obviously absent one. `ctx push`
|
|
97
|
+
tells you when no handoff was written, so you never discover it only after
|
|
98
|
+
arriving on the other machine.
|
|
50
99
|
|
|
51
100
|
## Safety
|
|
52
101
|
|