hatcheck 0.2.0__tar.gz → 0.4.0__tar.gz

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 (46) hide show
  1. {hatcheck-0.2.0 → hatcheck-0.4.0}/Cargo.lock +116 -68
  2. {hatcheck-0.2.0 → hatcheck-0.4.0}/Cargo.toml +1 -1
  3. hatcheck-0.4.0/PKG-INFO +299 -0
  4. hatcheck-0.4.0/README.md +276 -0
  5. {hatcheck-0.2.0 → hatcheck-0.4.0}/crates/hatcheck/Cargo.toml +16 -1
  6. hatcheck-0.4.0/crates/hatcheck/LICENSE +21 -0
  7. hatcheck-0.4.0/crates/hatcheck/README.md +58 -0
  8. hatcheck-0.4.0/crates/hatcheck/src/agent.rs +118 -0
  9. hatcheck-0.4.0/crates/hatcheck/src/agy.rs +749 -0
  10. {hatcheck-0.2.0 → hatcheck-0.4.0}/crates/hatcheck/src/args.rs +22 -0
  11. hatcheck-0.4.0/crates/hatcheck/src/best.rs +544 -0
  12. {hatcheck-0.2.0 → hatcheck-0.4.0}/crates/hatcheck/src/bind.rs +362 -117
  13. {hatcheck-0.2.0 → hatcheck-0.4.0}/crates/hatcheck/src/cli.rs +104 -21
  14. {hatcheck-0.2.0 → hatcheck-0.4.0}/crates/hatcheck/src/conv.rs +4 -3
  15. hatcheck-0.4.0/crates/hatcheck/src/doctor.rs +859 -0
  16. {hatcheck-0.2.0 → hatcheck-0.4.0}/crates/hatcheck/src/facts.rs +9 -8
  17. {hatcheck-0.2.0 → hatcheck-0.4.0}/crates/hatcheck/src/find.rs +84 -33
  18. {hatcheck-0.2.0 → hatcheck-0.4.0}/crates/hatcheck/src/launch.rs +5 -4
  19. {hatcheck-0.2.0 → hatcheck-0.4.0}/crates/hatcheck/src/lib.rs +9 -1
  20. {hatcheck-0.2.0 → hatcheck-0.4.0}/crates/hatcheck/src/move_cmd.rs +682 -376
  21. {hatcheck-0.2.0 → hatcheck-0.4.0}/crates/hatcheck/src/open_cmd.rs +35 -16
  22. {hatcheck-0.2.0 → hatcheck-0.4.0}/crates/hatcheck/src/ospath.rs +67 -31
  23. {hatcheck-0.2.0 → hatcheck-0.4.0}/crates/hatcheck/src/paths.rs +139 -19
  24. {hatcheck-0.2.0 → hatcheck-0.4.0}/crates/hatcheck/src/provider.rs +1 -1
  25. hatcheck-0.4.0/crates/hatcheck/src/relocate.rs +839 -0
  26. {hatcheck-0.2.0 → hatcheck-0.4.0}/crates/hatcheck/src/sessions.rs +194 -31
  27. {hatcheck-0.2.0 → hatcheck-0.4.0}/crates/hatcheck/src/show.rs +8 -11
  28. {hatcheck-0.2.0 → hatcheck-0.4.0}/crates/hatcheck/src/usage.rs +411 -154
  29. {hatcheck-0.2.0 → hatcheck-0.4.0}/crates/hatcheck/src/where_cmd.rs +19 -3
  30. hatcheck-0.2.0/PKG-INFO +0 -841
  31. hatcheck-0.2.0/README.md +0 -818
  32. hatcheck-0.2.0/crates/hatcheck/src/best.rs +0 -325
  33. {hatcheck-0.2.0 → hatcheck-0.4.0}/LICENSE +0 -0
  34. {hatcheck-0.2.0 → hatcheck-0.4.0}/crates/hatcheck/src/bin/cl.rs +0 -0
  35. {hatcheck-0.2.0 → hatcheck-0.4.0}/crates/hatcheck/src/bin/claude-k.rs +0 -0
  36. {hatcheck-0.2.0 → hatcheck-0.4.0}/crates/hatcheck/src/bin/claude-z.rs +0 -0
  37. {hatcheck-0.2.0 → hatcheck-0.4.0}/crates/hatcheck/src/bin/cx.rs +0 -0
  38. {hatcheck-0.2.0 → hatcheck-0.4.0}/crates/hatcheck/src/bin/hat.rs +0 -0
  39. {hatcheck-0.2.0 → hatcheck-0.4.0}/crates/hatcheck/src/desktop.rs +0 -0
  40. {hatcheck-0.2.0 → hatcheck-0.4.0}/crates/hatcheck/src/main.rs +0 -0
  41. {hatcheck-0.2.0 → hatcheck-0.4.0}/crates/hatcheck/src/out.rs +0 -0
  42. {hatcheck-0.2.0 → hatcheck-0.4.0}/crates/hatcheck/src/py.rs +0 -0
  43. {hatcheck-0.2.0 → hatcheck-0.4.0}/crates/hatcheck/src/serve.rs +0 -0
  44. {hatcheck-0.2.0 → hatcheck-0.4.0}/crates/hatcheck/src/times.rs +0 -0
  45. {hatcheck-0.2.0 → hatcheck-0.4.0}/crates/hatcheck/src/widths.rs +0 -0
  46. {hatcheck-0.2.0 → hatcheck-0.4.0}/pyproject.toml +0 -0
@@ -41,15 +41,6 @@ version = "2.13.2"
41
41
  source = "registry+https://github.com/rust-lang/crates.io-index"
42
42
  checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06"
43
43
 
44
- [[package]]
45
- name = "block-buffer"
46
- version = "0.10.4"
47
- source = "registry+https://github.com/rust-lang/crates.io-index"
48
- checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
49
- dependencies = [
50
- "generic-array",
51
- ]
52
-
53
44
  [[package]]
54
45
  name = "bumpalo"
55
46
  version = "3.20.3"
@@ -124,15 +115,6 @@ version = "0.8.7"
124
115
  source = "registry+https://github.com/rust-lang/crates.io-index"
125
116
  checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
126
117
 
127
- [[package]]
128
- name = "cpufeatures"
129
- version = "0.2.17"
130
- source = "registry+https://github.com/rust-lang/crates.io-index"
131
- checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
132
- dependencies = [
133
- "libc",
134
- ]
135
-
136
118
  [[package]]
137
119
  name = "crc32fast"
138
120
  version = "1.5.2"
@@ -142,32 +124,12 @@ dependencies = [
142
124
  "cfg-if",
143
125
  ]
144
126
 
145
- [[package]]
146
- name = "crypto-common"
147
- version = "0.1.7"
148
- source = "registry+https://github.com/rust-lang/crates.io-index"
149
- checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"
150
- dependencies = [
151
- "generic-array",
152
- "typenum",
153
- ]
154
-
155
127
  [[package]]
156
128
  name = "deranged"
157
129
  version = "0.5.9"
158
130
  source = "registry+https://github.com/rust-lang/crates.io-index"
159
131
  checksum = "9e9de72ce2ad1f90dc62fa25f0f430ef85eb4b0d8fa0be4f30373bc40a21d28e"
160
132
 
161
- [[package]]
162
- name = "digest"
163
- version = "0.10.7"
164
- source = "registry+https://github.com/rust-lang/crates.io-index"
165
- checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
166
- dependencies = [
167
- "block-buffer",
168
- "crypto-common",
169
- ]
170
-
171
133
  [[package]]
172
134
  name = "displaydoc"
173
135
  version = "0.2.7"
@@ -204,6 +166,18 @@ dependencies = [
204
166
  "windows-sys 0.61.2",
205
167
  ]
206
168
 
169
+ [[package]]
170
+ name = "fallible-iterator"
171
+ version = "0.3.0"
172
+ source = "registry+https://github.com/rust-lang/crates.io-index"
173
+ checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649"
174
+
175
+ [[package]]
176
+ name = "fallible-streaming-iterator"
177
+ version = "0.1.9"
178
+ source = "registry+https://github.com/rust-lang/crates.io-index"
179
+ checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a"
180
+
207
181
  [[package]]
208
182
  name = "fdeflate"
209
183
  version = "0.3.7"
@@ -269,16 +243,6 @@ dependencies = [
269
243
  "slab",
270
244
  ]
271
245
 
272
- [[package]]
273
- name = "generic-array"
274
- version = "0.14.7"
275
- source = "registry+https://github.com/rust-lang/crates.io-index"
276
- checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
277
- dependencies = [
278
- "typenum",
279
- "version_check",
280
- ]
281
-
282
246
  [[package]]
283
247
  name = "getrandom"
284
248
  version = "0.2.17"
@@ -302,15 +266,36 @@ dependencies = [
302
266
  "wasip2",
303
267
  ]
304
268
 
269
+ [[package]]
270
+ name = "hashbrown"
271
+ version = "0.16.1"
272
+ source = "registry+https://github.com/rust-lang/crates.io-index"
273
+ checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
274
+ dependencies = [
275
+ "foldhash",
276
+ ]
277
+
305
278
  [[package]]
306
279
  name = "hashbrown"
307
280
  version = "0.17.1"
308
281
  source = "registry+https://github.com/rust-lang/crates.io-index"
309
282
  checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
283
+ dependencies = [
284
+ "foldhash",
285
+ ]
286
+
287
+ [[package]]
288
+ name = "hashlink"
289
+ version = "0.12.2"
290
+ source = "registry+https://github.com/rust-lang/crates.io-index"
291
+ checksum = "a596f1b20ed2cc5ecac41a164aaebc7258057060f06c0cf7a2ba3991ee7990fb"
292
+ dependencies = [
293
+ "hashbrown 0.17.1",
294
+ ]
310
295
 
311
296
  [[package]]
312
297
  name = "hatcheck"
313
- version = "0.2.0"
298
+ version = "0.4.0"
314
299
  dependencies = [
315
300
  "base64 0.22.1",
316
301
  "chrono",
@@ -320,9 +305,9 @@ dependencies = [
320
305
  "memmap2",
321
306
  "plist",
322
307
  "png",
308
+ "rusqlite",
323
309
  "serde",
324
310
  "serde_json",
325
- "sha2",
326
311
  "terminal_size",
327
312
  "ureq",
328
313
  "windows-sys 0.59.0",
@@ -479,7 +464,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
479
464
  checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855"
480
465
  dependencies = [
481
466
  "equivalent",
482
- "hashbrown",
467
+ "hashbrown 0.17.1",
483
468
  ]
484
469
 
485
470
  [[package]]
@@ -505,6 +490,17 @@ version = "0.2.191"
505
490
  source = "registry+https://github.com/rust-lang/crates.io-index"
506
491
  checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a"
507
492
 
493
+ [[package]]
494
+ name = "libsqlite3-sys"
495
+ version = "0.38.2"
496
+ source = "registry+https://github.com/rust-lang/crates.io-index"
497
+ checksum = "f1d20bef17f513b9b3004532233187769cd072d790971f4e4da0e346eb6401e8"
498
+ dependencies = [
499
+ "cc",
500
+ "pkg-config",
501
+ "vcpkg",
502
+ ]
503
+
508
504
  [[package]]
509
505
  name = "linux-raw-sys"
510
506
  version = "0.12.1"
@@ -597,6 +593,12 @@ version = "0.2.17"
597
593
  source = "registry+https://github.com/rust-lang/crates.io-index"
598
594
  checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
599
595
 
596
+ [[package]]
597
+ name = "pkg-config"
598
+ version = "0.3.34"
599
+ source = "registry+https://github.com/rust-lang/crates.io-index"
600
+ checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548"
601
+
600
602
  [[package]]
601
603
  name = "plist"
602
604
  version = "1.10.1"
@@ -685,6 +687,31 @@ dependencies = [
685
687
  "windows-sys 0.52.0",
686
688
  ]
687
689
 
690
+ [[package]]
691
+ name = "rsqlite-vfs"
692
+ version = "0.1.1"
693
+ source = "registry+https://github.com/rust-lang/crates.io-index"
694
+ checksum = "c51c9ae4df8a7fba42103df5c621fa3c37eccf3a3c650879e90fc48b11cc192c"
695
+ dependencies = [
696
+ "hashbrown 0.16.1",
697
+ "thiserror",
698
+ ]
699
+
700
+ [[package]]
701
+ name = "rusqlite"
702
+ version = "0.40.2"
703
+ source = "registry+https://github.com/rust-lang/crates.io-index"
704
+ checksum = "23f2a97da3e3873c73cb2a2e71b35c40ff95e0b1eefa8d72d8499a6928c3b5b3"
705
+ dependencies = [
706
+ "bitflags",
707
+ "fallible-iterator",
708
+ "fallible-streaming-iterator",
709
+ "hashlink",
710
+ "libsqlite3-sys",
711
+ "smallvec",
712
+ "sqlite-wasm-rs",
713
+ ]
714
+
688
715
  [[package]]
689
716
  name = "rustix"
690
717
  version = "1.1.5"
@@ -784,17 +811,6 @@ dependencies = [
784
811
  "zmij",
785
812
  ]
786
813
 
787
- [[package]]
788
- name = "sha2"
789
- version = "0.10.9"
790
- source = "registry+https://github.com/rust-lang/crates.io-index"
791
- checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
792
- dependencies = [
793
- "cfg-if",
794
- "cpufeatures",
795
- "digest",
796
- ]
797
-
798
814
  [[package]]
799
815
  name = "shlex"
800
816
  version = "2.0.1"
@@ -819,6 +835,18 @@ version = "1.16.3"
819
835
  source = "registry+https://github.com/rust-lang/crates.io-index"
820
836
  checksum = "5b3dc8af474f516a851ff4bd12db780f948b9250ad37211e4eec0bccea54e01b"
821
837
 
838
+ [[package]]
839
+ name = "sqlite-wasm-rs"
840
+ version = "0.5.5"
841
+ source = "registry+https://github.com/rust-lang/crates.io-index"
842
+ checksum = "dc3efc0da82635d7e1ced0053bbbfa8c7ab9645d0bf36ceb4f7127bb85315d75"
843
+ dependencies = [
844
+ "cc",
845
+ "js-sys",
846
+ "rsqlite-vfs",
847
+ "wasm-bindgen",
848
+ ]
849
+
822
850
  [[package]]
823
851
  name = "stable_deref_trait"
824
852
  version = "1.2.1"
@@ -874,6 +902,26 @@ dependencies = [
874
902
  "windows-sys 0.61.2",
875
903
  ]
876
904
 
905
+ [[package]]
906
+ name = "thiserror"
907
+ version = "2.0.21"
908
+ source = "registry+https://github.com/rust-lang/crates.io-index"
909
+ checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e"
910
+ dependencies = [
911
+ "thiserror-impl",
912
+ ]
913
+
914
+ [[package]]
915
+ name = "thiserror-impl"
916
+ version = "2.0.21"
917
+ source = "registry+https://github.com/rust-lang/crates.io-index"
918
+ checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524"
919
+ dependencies = [
920
+ "proc-macro2",
921
+ "quote",
922
+ "syn 3.0.9",
923
+ ]
924
+
877
925
  [[package]]
878
926
  name = "time"
879
927
  version = "0.3.55"
@@ -914,12 +962,6 @@ dependencies = [
914
962
  "zerovec",
915
963
  ]
916
964
 
917
- [[package]]
918
- name = "typenum"
919
- version = "1.20.1"
920
- source = "registry+https://github.com/rust-lang/crates.io-index"
921
- checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20"
922
-
923
965
  [[package]]
924
966
  name = "unicode-ident"
925
967
  version = "1.0.27"
@@ -988,6 +1030,12 @@ version = "1.0.4"
988
1030
  source = "registry+https://github.com/rust-lang/crates.io-index"
989
1031
  checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
990
1032
 
1033
+ [[package]]
1034
+ name = "vcpkg"
1035
+ version = "0.2.15"
1036
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1037
+ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
1038
+
991
1039
  [[package]]
992
1040
  name = "version_check"
993
1041
  version = "0.9.5"
@@ -6,7 +6,7 @@ exclude = ["desktop/src-tauri"]
6
6
  resolver = "2"
7
7
 
8
8
  [workspace.package]
9
- version = "0.2.0"
9
+ version = "0.4.0"
10
10
  edition = "2021"
11
11
  license = "MIT"
12
12
  rust-version = "1.90"
@@ -0,0 +1,299 @@
1
+ Metadata-Version: 2.4
2
+ Name: hatcheck
3
+ Version: 0.4.0
4
+ Classifier: Development Status :: 4 - Beta
5
+ Classifier: Environment :: Console
6
+ Classifier: Intended Audience :: Developers
7
+ Classifier: Operating System :: MacOS
8
+ Classifier: Operating System :: Microsoft :: Windows
9
+ Classifier: Operating System :: POSIX :: Linux
10
+ Classifier: Programming Language :: Rust
11
+ Classifier: Topic :: Software Development
12
+ Classifier: Topic :: Utilities
13
+ License-File: LICENSE
14
+ Summary: Claude Code and Codex accounts on one computer, each kept apart: recent sessions, plan usage, resume commands and moves across all of them.
15
+ Keywords: claude,claude-code,codex,cli,profiles,sessions
16
+ Home-Page: https://hatcheck.dev
17
+ Author: Yi Wang
18
+ License-Expression: MIT
19
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
20
+ Project-URL: Homepage, https://github.com/hatcheck/hatcheck
21
+ Project-URL: Issues, https://github.com/hatcheck/hatcheck/issues
22
+
23
+ <p align="center">
24
+ <picture>
25
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/hatcheck/hatcheck/main/site/logo-wordmark-dark.svg">
26
+ <img src="https://raw.githubusercontent.com/hatcheck/hatcheck/main/site/logo-wordmark.svg" alt="Hatcheck" width="360">
27
+ </picture>
28
+ </p>
29
+
30
+ # Hatcheck
31
+
32
+ Several Claude accounts on one computer, each kept apart: isolated Claude Desktop instances on
33
+ macOS, and Claude Code CLI profiles, with recent sessions, plan usage and resume commands across all
34
+ of them. OpenAI's Codex CLI gets the same treatment, Google's Antigravity CLI (`agy`) is read
35
+ beside them, and sessions can be carried between the three.
36
+
37
+ *Unofficial: not made by, affiliated with or endorsed by Anthropic, OpenAI or Google. Claude, Claude
38
+ Code and Claude Desktop are trademarks of Anthropic; Codex and ChatGPT are trademarks of OpenAI;
39
+ Antigravity and Gemini are trademarks of Google LLC.*
40
+
41
+ On macOS, `hatcheck desktop` runs **one Claude Desktop per account, side by side**, a personal one
42
+ and a work one, say: each with its own data folder and login, and a launcher in a colour you pick,
43
+ which brings the running one forward rather than opening it twice.
44
+
45
+ Running Claude Desktop with its own `--user-data-dir` is
46
+ [Philipp Stracker's approach](https://gist.github.com/stracker-phil/9f84927a556632c7f9cc06663b534f14)
47
+ ([write-up](https://philippstracker.com/multiple-claude-instances/)); hatcheck adds the colours and
48
+ the launchers.
49
+
50
+ It also has **command-line tools for Claude Code, [Codex](https://github.com/openai/codex) and
51
+ [Antigravity CLI](https://antigravity.google/docs/cli/)**, for keeping one profile per account:
52
+ `cl` and `cx` run Claude Code and Codex with a profile, and `hatcheck` lists the recent sessions
53
+ in all of them, with the command that resumes each one and what's left of each plan. The rest
54
+ of the commands find, show, carry and convert sessions between the accounts and the agents, tie
55
+ folders to accounts, and check how everything is installed: see
56
+ [the tour](#claude-code-codex-and-antigravity-cli) below, and
57
+ [docs/commands.md](docs/commands.md) for each command as it is.
58
+
59
+ **Not a gateway.** Hatcheck is never between an agent and its model. It rewrites no agent's
60
+ config, holds no login, and runs nothing in the background. Tools such as
61
+ [magpie](https://github.com/yetone/magpie) put a local gateway in that path so any agent can use
62
+ any model and accounts can take over from each other when a quota runs out. If that is what you
63
+ want, use one of those. Hatcheck is for the opposite case: keeping a work account and a personal
64
+ account apart, and knowing which one each session ran on. See [Rules it keeps](#rules-it-keeps).
65
+
66
+ | | macOS | Linux | Windows |
67
+ |---------------------------------|:-----:|:-----:|:-------:|
68
+ | Claude Desktop instances | yes | no official Desktop app | [planned](#roadmap) |
69
+ | Claude Code, Codex and Antigravity CLI tools | yes | yes | yes |
70
+
71
+ ---
72
+
73
+ ## Claude Desktop instances (macOS)
74
+
75
+ `hatcheck desktop` makes them: each instance gets its own data folder, `~/.claude-instances/<name>`,
76
+ and a launcher in `/Applications` with Claude's icon in a colour you pick. The launcher brings a
77
+ running instance's window forward instead of starting a second one on the same folder.
78
+
79
+ ```bash
80
+ hatcheck desktop new work Work --hue 190 # Claude Work.app, blue
81
+ hatcheck desktop new personal Personal --hue -10 # Claude Personal.app, red-orange
82
+ hatcheck desktop open work # or open it from Launchpad or the Dock
83
+ hatcheck desktop # the instances, and which are running
84
+ hatcheck desktop remove work # its launcher; --data deletes its data folder too
85
+ ```
86
+
87
+ Sign each one in to its account the first time it opens. The first time a launcher brings a window
88
+ forward, macOS asks whether it may control System Events; allow it, once per launcher. `--hue`
89
+ turns the icon's colours by that many degrees (about 110 is green, 190 blue, 240 purple) and
90
+ `--saturation` scales them. hatcheck recolours the icon itself, with macOS's `iconutil`, and a
91
+ launcher it can't recolour keeps Claude's own icon. The name `default` makes a launcher for
92
+ Claude's built-in data folder, which is only safe while nothing else runs on that folder, the stock
93
+ Claude icon included. [docs/desktop-instances.md](docs/desktop-instances.md) has the rest: what
94
+ the launcher does, and how to copy a login you already have into an instance.
95
+
96
+ ---
97
+
98
+ ## Claude Code, Codex and Antigravity CLI
99
+
100
+ Claude Code (the `claude` CLI) keeps its settings, history and session transcripts in `~/.claude`
101
+ (plus `~/.claude.json`), and its login in the macOS Keychain, or on Linux and Windows in
102
+ `~/.claude/.credentials.json`. Point `CLAUDE_CONFIG_DIR` at another folder and you get a separate
103
+ profile with its own login, so you can keep one per account:
104
+ `~/.claude-work`, `~/.claude-personal`, and so on. These are separate from the Desktop instances
105
+ above, though sessions from Desktop's Code tab can be filed in them too (the session list
106
+ hides those unless you pass `--all`). Codex works the same way with `CODEX_HOME`: see
107
+ [`cx`](docs/agents.md#cx-run-codex-with-a-home-per-account). Antigravity CLI keeps everything under
108
+ `~/.gemini/antigravity-cli`, which only `HOME` moves, so hatcheck reads that one folder: see
109
+ [Antigravity CLI](docs/agents.md#antigravity-cli-agy).
110
+
111
+ ### Install
112
+
113
+ One binary per platform, with no Python needed. Each of these installs `hatcheck`, `hat`, `cl`,
114
+ `cx`, `claude-z` and `claude-k`:
115
+
116
+ ```bash
117
+ curl -LsSf https://github.com/hatcheck/hatcheck/releases/latest/download/hatcheck-installer.sh | sh
118
+ brew install hatcheck/tap/hatcheck # Homebrew, on macOS and Linux
119
+ uv tool install hatcheck # or: pipx install hatcheck
120
+ ```
121
+
122
+ On Windows, in PowerShell:
123
+
124
+ ```powershell
125
+ powershell -ExecutionPolicy Bypass -c "irm https://github.com/hatcheck/hatcheck/releases/latest/download/hatcheck-installer.ps1 | iex"
126
+ ```
127
+
128
+ The installer scripts put the commands in `~/.local/bin` and add that folder to your `PATH`; set
129
+ `HATCHECK_NO_MODIFY_PATH=1` first to keep your shell's startup files as they are. Each release, made
130
+ from a tag such as `v0.2.0`, has them and the binaries for each platform, and PyPI gets the same
131
+ binaries as wheels. The release builds start after 0.1.0, which is the Python version.
132
+
133
+ From a clone, on Windows, switching between installs or removing one, and `hatcheck doctor`,
134
+ which lists every copy on your `PATH`: [docs/install.md](docs/install.md).
135
+
136
+ ### The commands
137
+
138
+ Each is documented as it is, with its options and what it prints, in
139
+ [docs/commands.md](docs/commands.md); the launchers and the agents' folders in
140
+ [docs/agents.md](docs/agents.md).
141
+
142
+ | Command | What it does |
143
+ |---|---|
144
+ | [`cl work --resume <id>`](docs/agents.md#cl-run-claude-code-with-a-profile) | Claude Code with `~/.claude-work`; `cl -z` and `cl -k` run it on Z.ai or Kimi there |
145
+ | [`cx work resume <id>`](docs/agents.md#cx-run-codex-with-a-home-per-account) | Codex with `~/.codex-work` |
146
+ | [`hatcheck`](docs/commands.md#hatcheck-what-to-resume) | the sessions active in the last day, in every profile, home and folder, each with its resume command and what's left of its plan |
147
+ | [`hatcheck usage`](docs/commands.md#hatcheck-usage-plan-usage-for-every-profile) | what's left of every plan limit, sorted by Fable |
148
+ | [`hatcheck best`](docs/commands.md#hatcheck-best-which-account-to-use-now) | which account to use now, or to carry a session to; `--wait` sleeps until one has room |
149
+ | [`hatcheck where SESSION`](docs/commands.md#hatcheck-where-find-a-session) | where a session's files are |
150
+ | [`hatcheck open SESSION`](docs/commands.md#hatcheck-open-resume-a-session-in-a-new-terminal) | resume it in a new terminal, in its folder |
151
+ | `hatcheck show SESSION` | its conversation, read-only |
152
+ | [`hatcheck move SESSION PROFILE`](docs/commands.md#hatcheck-move-carry-on-a-session-with-another-profile) | carry it to another profile, or convert it for another agent |
153
+ | [`hatcheck fork SESSION PROFILE`](docs/commands.md#hatcheck-fork-a-session-as-a-new-one-in-another-profile) | bring it in there as a new session, keeping the original |
154
+ | [`hatcheck relocate OLD NEW`](docs/commands.md#hatcheck-relocate-a-project-folder-that-moved) | a moved project folder's sessions, brought along |
155
+ | [`hatcheck bind PROFILE`](docs/commands.md#hatcheck-bind-tie-a-folder-to-a-profile) | tie a folder to a profile, so `cl` and `cx` pick it there and the list flags strays |
156
+ | [`hatcheck doctor`](docs/install.md#hatcheck-doctor-every-copy-of-hatcheck-and-the-agents) | every copy of hatcheck and the agents on your `PATH`, which runs, how to remove the rest |
157
+ | [`hatcheck desktop`](#claude-desktop-instances-macos) | Claude Desktop instances on macOS |
158
+ | [`--json`](docs/commands.md#--json-for-scripts-status-bars-and-apps) | the sessions, plans and results as data, for scripts, status bars and the desktop app |
159
+
160
+ `hat` is the short name, and a subcommand can be cut to its first letters: `hat m` is `hat move`.
161
+ [Antigravity CLI](docs/agents.md#antigravity-cli-agy) sessions are listed, shown and converted
162
+ from its one folder, with what its `/usage` reports; [`claude-z` and `claude-k`](docs/agents.md#claude-z-claude-k-claude-code-on-zai-or-kimi)
163
+ run Claude Code on Z.ai's or Kimi's models in any profile.
164
+
165
+
166
+ ## Rules it keeps
167
+
168
+ Each rule names the code that keeps it, so it can be checked rather than taken on trust.
169
+
170
+ - **Not in the path.** Nothing of Hatcheck sits between an agent and its model. `cl` and `cx`
171
+ set `CLAUDE_CONFIG_DIR` or `CODEX_HOME` (and, for `cl -z` and `cl -k`, the provider variables
172
+ you set up) and run the agent in their place; nothing stays running
173
+ ([`launch.rs`](crates/hatcheck/src/launch.rs), `run`).
174
+ - **No agent's config is rewritten**, except when you ask: `hatcheck bind --hook` adds one
175
+ session-start hook to each profile's `settings.json`, each Codex home's `hooks.json` and
176
+ Antigravity CLI's `~/.gemini/config/hooks.json`, or points the one it added at the `hatcheck` it
177
+ finds now, and `unbind --hook` removes only what it added ([`bind.rs`](crates/hatcheck/src/bind.rs),
178
+ `add_hooks` and `remove_hooks`).
179
+ - **No credentials.** It never asks for, stores, refreshes or moves a login. For Claude it
180
+ never reads one: Claude Code's own `/usage` is run in the profile and the snapshot it saves is
181
+ read ([`usage.rs`](crates/hatcheck/src/usage.rs), `run_claude_usage` and `claude_live`). For
182
+ Codex, the home's `auth.json` token is sent only to ChatGPT's usage endpoint, as it is, and
183
+ never refreshed (`read_codex_login` and `fetch_codex_usage` there). For agy it never reads one
184
+ either: agy's own `/usage` is run, after `agy models` has said agy is signed in, since asked
185
+ without a sign-in agy would start one ([`agy.rs`](crates/hatcheck/src/agy.rs), `run_usage` and
186
+ `signed_in`).
187
+ - **Nothing leaves your computer** except those usage requests: Claude Code's to Anthropic, one
188
+ to ChatGPT per Codex account, and agy's own `/usage` to Google, with the model list agy fetches
189
+ first to say it's signed in. `CODEX_USAGE_URL` in `usage.rs` is the one address the
190
+ binary itself calls; `--cached` and `--no-usage` make none. The Z.ai and Kimi endpoints in
191
+ [`provider.rs`](crates/hatcheck/src/provider.rs) are handed to Claude Code, which calls them
192
+ only when you run `cl -z` or `cl -k`.
193
+ - **No automatic switching** between accounts. `hatcheck best` ranks and prints commands, and
194
+ nothing in the binary starts, moves or switches a session on its own
195
+ ([`best.rs`](crates/hatcheck/src/best.rs): advice only, `--wait` sleeps and then prints).
196
+ - **Nothing runs in the background.** There's no daemon. `hatcheck serve` is the desktop app's
197
+ engine and lives only while the app does, one command per line
198
+ ([`serve.rs`](crates/hatcheck/src/serve.rs)).
199
+ - **Sessions are only ever moved, copied or rewritten in ways you can undo.** `move` deletes the
200
+ original only once every copied file is checked against it, never puts an older copy over a
201
+ newer one, and is undone by moving the session back; `fork` keeps the original; `relocate`
202
+ prints the command that undoes it; and all three have `--dry-run`, which runs every check and
203
+ writes nothing ([`move_cmd.rs`](crates/hatcheck/src/move_cmd.rs),
204
+ [`relocate.rs`](crates/hatcheck/src/relocate.rs)).
205
+
206
+ Function names rather than line numbers, since lines move; `git grep` finds them.
207
+
208
+ ## The desktop app
209
+
210
+ A menu-bar app (system tray on Windows and Linux) built on the CLI. It shows what's left of every
211
+ plan, sorted by Fable, with bars and reset times, and the last day's sessions with **Resume**,
212
+ which opens a terminal in the session's folder, and **Copy**. It also has buttons for the Claude
213
+ Desktop instances and notifies you when a limit runs low or resets.
214
+
215
+ Its main window browses every session, with search, filters and a read-only preview of the
216
+ conversation. From there you can resume a session, copy its command, or move or fork it to
217
+ another profile after a dry run. The window also lists profiles and homes, signs in to a new one
218
+ in a terminal, and makes Desktop instances.
219
+
220
+ It ships the CLI inside itself, so it needs no Python. It never handles a login, and live usage is
221
+ off until you turn it on. See [desktop/README.md](desktop/README.md) to build and test it, with
222
+ `npm run demo` running it against a demo home rather than your profiles; releases come from
223
+ `.github/workflows/desktop.yml` for macOS, Windows and Linux. The plan behind it is
224
+ [the proposal](docs/proposals/desktop-app.md).
225
+
226
+ ## Files in this repo
227
+
228
+ - **`crates/hatcheck/`**: hatcheck in Rust, the commands and the launchers. Its `src/` has a file per
229
+ subcommand (`sessions.rs`, `usage.rs`, `move_cmd.rs`, `open_cmd.rs`, `desktop.rs` and the rest),
230
+ `launch.rs` for `cl`, `cx`, `claude-z` and `claude-k`, `agy.rs` for what it reads of Antigravity
231
+ CLI, `doctor.rs` for `hatcheck doctor`, and `src/bin/` for those binaries and `hat`.
232
+ Its own README is the crate's page on crates.io. It was ported from a Python version with the
233
+ same output; see [docs/rust-port.md](docs/rust-port.md).
234
+ - **`CHANGELOG.md`**: what changed in each release of the CLI; a release's notes on GitHub are its
235
+ section there.
236
+ - **`install.sh`** / **`install.ps1`**: build the commands from a clone and put them on your `PATH`
237
+ (`~/.local/bin` by default).
238
+ - **`pyproject.toml`**: the PyPI package, the binaries as wheels built with maturin.
239
+ **`dist-workspace.toml`**: the release builds, installers and Homebrew formula, made by cargo-dist.
240
+ **`packaging/`**: the app's Homebrew cask, and the winget manifests for the app and the CLI.
241
+ - **`desktop/`**: the desktop app: Tauri, with the CLI inside it ([its README](desktop/README.md)).
242
+ - **`site/`**: the landing page, one self-contained file, served at [hatcheck.dev](https://hatcheck.dev)
243
+ from Cloudflare as static assets; `site/deploy.sh` ships it. The logo lives there too:
244
+ `logo.svg` and `logo-dark.svg` (the mark), `logo-wordmark.svg` and `logo-wordmark-dark.svg`, `favicon.svg`.
245
+ - **`docs/proposals/`**: the plans these came from: [the CLI features](docs/proposals/cli-features.md)
246
+ and [the desktop app](docs/proposals/desktop-app.md).
247
+ - **`docs/`**: [commands.md](docs/commands.md), [agents.md](docs/agents.md) and
248
+ [install.md](docs/install.md), each command, agent and way of installing as it is;
249
+ [desktop-instances.md](docs/desktop-instances.md) for the Desktop instances;
250
+ [rust-port.md](docs/rust-port.md) on the port from Python.
251
+ - **`AGENTS.md`** and **`docs/lessons.md`**: notes for coding agents (`CLAUDE.md` imports them): how
252
+ to build and check, the rules the code keeps, and what earlier work got wrong, with the rule that
253
+ would have caught it.
254
+ - **`tests/`**: the command tests, which run the binary against throwaway home folders:
255
+ `python3 -m unittest discover -s tests`, which builds it with cargo first, and the crate's own
256
+ tests with `cargo test -p hatcheck`. They never read your real profiles, Keychain or the network.
257
+ GitHub Actions runs both on macOS, Linux and Windows (`.github/workflows/tests.yml`).
258
+
259
+ ## Roadmap
260
+
261
+ - **Claude Desktop instances on Windows.** Claude Desktop is an Electron app there too, so a
262
+ separate `--user-data-dir` per account should work. A Windows version would create a shortcut per
263
+ instance with its own icon, and a launcher that brings a running instance forward instead of
264
+ opening a duplicate. It needs testing on a Windows machine first.
265
+ - **Linux.** There's no official Claude Desktop for Linux, so only the CLI tools apply there.
266
+ - **Antigravity CLI profiles.** agy keeps one login per home folder, so a second account needs a
267
+ home folder of its own (`HOME=~/.agy-work agy`), which every command the agent runs would see
268
+ too. Whether hatcheck should make such folders, and a launcher for them, is still open; until
269
+ then it reads `~/.gemini/antigravity-cli` only. The Antigravity app has the same one login,
270
+ in the system keyring, shared with agy, so an instance of it with its own data folder would
271
+ still be the same account; nothing for hatcheck to make until Google separates logins.
272
+ - **Releases:** the CLI is on GitHub, the Homebrew tap, PyPI and crates.io from 0.2.0
273
+ ([CHANGELOG.md](CHANGELOG.md)). Next are winget, then the app's installers, once its release
274
+ workflow has its signing and updater secrets (`desktop.yml` lists them).
275
+ - **Signing:** a Developer ID for the macOS app, and a certificate for the Windows one.
276
+
277
+ ## Credits
278
+
279
+ - **Claude Desktop instances:** this repo started as a fork of
280
+ [Aaron Oxborrow](https://github.com/aoxborrow)'s
281
+ [gist](https://gist.github.com/aoxborrow/5a3a0ac0aa37819cc19439b70a552221), whose scripts made
282
+ colour-coded launchers for isolated instances. On 16 October 2026 his scripts and his sections of
283
+ this README were replaced by a rewrite, `hatcheck desktop`, so none of his code or text remains.
284
+ The idea both implement, running Claude Desktop with `--user-data-dir`, is from
285
+ [Philipp Stracker's gist](https://gist.github.com/stracker-phil/9f84927a556632c7f9cc06663b534f14)
286
+ ([write-up](https://philippstracker.com/multiple-claude-instances/)), itself a cleaned-up version
287
+ of [weidwonder/claude-desktop-multi-instance](https://github.com/weidwonder/claude-desktop-multi-instance).
288
+ - **Claude Code and Codex CLI tools:** `hatcheck`, `cl`, `cx`, the installers and the tests are by
289
+ [Yi Wang](https://github.com/yiwang).
290
+ - **Z.ai and Kimi:** the provider settings in `crates/hatcheck/src/provider.rs` (endpoints, model slots, context
291
+ windows and the config files) come from [claude-z](https://github.com/sam-fakhreddine/claude-z) by
292
+ Kerim ([lettt325](https://github.com/lettt325)), MIT-licensed, and Yi Wang's
293
+ [fork](https://github.com/yiwang/claude-z) of it, which added Kimi.
294
+
295
+ ## License
296
+
297
+ MIT, see [LICENSE](LICENSE). It covers everything in this repo: the CLI, the desktop app, the site
298
+ and the docs.
299
+