codexkit 1.0.3 → 1.0.5
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/.codex/.template-manifest.json +19 -18
- package/.codex/.version +1 -1
- package/.codex/agents/scout.toml +42 -1
- package/.codex/config.toml +24 -5
- package/.codex/mcp/README.md +28 -1
- package/.codex/mcp/context7.toml.example +22 -7
- package/.codex/mcp/exa.toml.example +33 -7
- package/.codex/memory/_templates/project.md +8 -0
- package/.codex/memory/_templates/session-context.md +8 -0
- package/.codex/memory/_templates/state.md +10 -0
- package/.codex/memory/_templates/tech-stack.md +9 -0
- package/.codex/memory/_templates/user.md +6 -0
- package/.codex/prompts/resume.md +6 -0
- package/.codex/prompts/search.md +78 -0
- package/.codex/scripts/audit_memory_hygiene.sh +65 -0
- package/.codex/scripts/build_startup_brief.sh +15 -0
- package/.codex/skills/compaction/SKILL.md +76 -125
- package/.codex/skills/context-management/SKILL.md +65 -55
- package/.codex/skills/session-management/SKILL.md +12 -5
- package/.template-manifest.json +19 -18
- package/CHANGELOG.md +26 -0
- package/README.md +2 -1
- package/bin/codexkit +3 -3
- package/bin/codexkit.js +87 -0
- package/install/install-global.sh +93 -52
- package/install/install-project.sh +211 -117
- package/install/validate.sh +1 -1
- package/package.json +2 -2
package/.template-manifest.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.0.
|
|
2
|
+
"version": "1.0.4",
|
|
3
3
|
"generator": "codexkit",
|
|
4
4
|
"files": {
|
|
5
5
|
"templates/global/AGENTS.override.md": "11039408f8776171820ce34165b5da6d52a703d26a938fb773e231a159eefe2c",
|
|
6
6
|
"templates/global/.codex-config-template.toml": "aa3490d544eded2ab1eff3eee89823884d1d0085c502eceb604d89408a94848d",
|
|
7
7
|
"templates/project/.codex-config-template.toml": "dc8ded8af4deaf39155d5fdddeabf0763af5293f24e3477ec871d59fd8530e80",
|
|
8
8
|
"templates/project/AGENTS.md.template": "acb5ea31fd561ddbbc79c6baf6de98b990bbac693ba6d836406d270a1f27a981",
|
|
9
|
-
".codex/config.toml": "
|
|
9
|
+
".codex/config.toml": "2079664ff35b0b5b05187c1fa5e6b4fdb0b8df24fff5e69ab9297956459d1b16",
|
|
10
10
|
".codex/.env.example": "1827612829279fad025404b763ea214412bd5cd53474ad315909a8c275f12b84",
|
|
11
|
-
".codex/.version": "
|
|
11
|
+
".codex/.version": "d1b77b88f4b9f675a900e4143ac768a21218623cfe1703ca43162388c3271bd6",
|
|
12
12
|
".codex/agents/builder.toml": "b4e887e5ad5202337b0fda9815588db0eec2deee8fdfbdb8dad6bf2df6bf3d30",
|
|
13
13
|
".codex/agents/debugger.toml": "e67fdaee1807c2d8c40b2752737d6e1f535a0c52d863cc76eb9c8059f292bc13",
|
|
14
14
|
".codex/agents/general.toml": "274489e5d726ee11fc5d9ec43d44c4b7bc1ac22b435ad536af8818c6d430d46c",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
".codex/agents/refactorer.toml": "0de4d73931352edbef9dcff4bfd6ad4fb61ff10ba5fcf330d724e5f4193fdd67",
|
|
18
18
|
".codex/agents/reviewer.toml": "8634aac733cbf2e9c8d5ad81fc22a17c239156c1d78edb15e94b6f63488c1177",
|
|
19
19
|
".codex/agents/runner.toml": "cb3baca8eb358ace7c4b63f39ec6de0833b6e46655ccf816b0a553ec25faa677",
|
|
20
|
-
".codex/agents/scout.toml": "
|
|
20
|
+
".codex/agents/scout.toml": "ff411e1a10f9ff99cdc92e345be92e5bfa674f6d9dd03ca03dab7d5b31895252",
|
|
21
21
|
".codex/agents/shipper.toml": "940c3ffd2c467e11def4c4d87bae4c5244deee42bc48009cabbf1a07009eac4b",
|
|
22
22
|
".codex/agents/vision.toml": "430a3b9ae1f8d2322791b2683ea7cf1ca5dad353f00f2b6c2c09fd8bfe9acbe4",
|
|
23
23
|
".codex/prompts/compound.md": "2f3f713031c6a2591cf257a47f8909874ff0f94cf7a6663eeb8fe30fc1ae2a2e",
|
|
@@ -31,8 +31,9 @@
|
|
|
31
31
|
".codex/prompts/plan.md": "f47aeb00d01167d5fee372115043fbfcac86216d59987ec16f67e7058aad6c42",
|
|
32
32
|
".codex/prompts/pr.md": "0866ed92ac74447ce01c955f49b00f055c5a244f80bd12a5f679f3860b776212",
|
|
33
33
|
".codex/prompts/research.md": "0ab8c8652d789ffc62a13ef6f7d533f63db77d8292dfaba4888a13a8eddb9d23",
|
|
34
|
-
".codex/prompts/resume.md": "
|
|
34
|
+
".codex/prompts/resume.md": "02b286294fcd2c58a2e3c0a77995eefc9c76319dbbc54e35fc1208f06c7fca99",
|
|
35
35
|
".codex/prompts/review-codebase.md": "07f6ea450c02f820871edb2c5432d364dfa8e87bd662f13ba305ccb2cc25a5de",
|
|
36
|
+
".codex/prompts/search.md": "f648fbfa84e16654981e262fb233a1e23b2525790f0698da5bc2bbc8aea60ad0",
|
|
36
37
|
".codex/prompts/ship.md": "bf0eee8272c2ffab78574aef940be07e7dcf4129b7aa9d1368d850be16cde099",
|
|
37
38
|
".codex/prompts/start.md": "4abc1166ae6657070ec3162610504e8e4ba19df595e4552fe30bae70561999e3",
|
|
38
39
|
".codex/prompts/status.md": "c742f0b64b08f59fceb3eb90e1693a81de421c2311eb553f85793faed19e1bca",
|
|
@@ -323,12 +324,12 @@
|
|
|
323
324
|
".codex/skills/cloudflare/references/zaraz/README.md": "c1fd43e131dd57576c84b10c4bc12b92d17ce8a837d042c0ed0e9ec5ab2fd256",
|
|
324
325
|
".codex/skills/code-navigation/SKILL.md": "bd35077d9afd8becb5f0813e9ced5c214daf6e5aad3926270091cb731fe58e28",
|
|
325
326
|
".codex/skills/code-review/SKILL.md": "3f7d6b61adbe4eb68bc6907721d1ad7d74c474a6eb0a6784ea0163945d272cad",
|
|
326
|
-
".codex/skills/compaction/SKILL.md": "
|
|
327
|
+
".codex/skills/compaction/SKILL.md": "d85f33180d26148d500ef6501e421513bec349f9078d4a5a47f70341088a2a01",
|
|
327
328
|
".codex/skills/condition-based-waiting/SKILL.md": "cf3c747488745c6e51e62bbf1e84b3cb868aac05ff3f8c245e65aa9ab4a0c5a8",
|
|
328
329
|
".codex/skills/condition-based-waiting/example.ts": "e35f816255c50db93421c8b5f165a6efbc3baa0856ce66a44edc7b34c0bd3608",
|
|
329
330
|
".codex/skills/context-engineering/SKILL.md": "1dcd750d778aebbf11f5ac09ace26b5ebd69f4d7e68994f53c22464a74e430b5",
|
|
330
331
|
".codex/skills/context-initialization/SKILL.md": "5fbf8502303789fffba37f62fa274f9e7fece31935859d5c9f0be3bfd3b14764",
|
|
331
|
-
".codex/skills/context-management/SKILL.md": "
|
|
332
|
+
".codex/skills/context-management/SKILL.md": "e6e39288a95776860126c1b65a8b4143046858455960b9b1b19f055de6d24fb8",
|
|
332
333
|
".codex/skills/core-data-expert/SKILL.md": "f8db3769edd501b86795d3ea43dd32060060dd1ab9f905055fea9301f07009a6",
|
|
333
334
|
".codex/skills/core-data-expert/references/batch-operations.md": "96ab160c97b15b661de854bd24a2e5e3a9b8ec05a51009f5fe98ad887e52e0e7",
|
|
334
335
|
".codex/skills/core-data-expert/references/cloudkit-integration.md": "550039d328a43519a2fb50ce3d8d8572a2ab8253991aa919ec33b849b60b56a8",
|
|
@@ -455,7 +456,7 @@
|
|
|
455
456
|
".codex/skills/root-cause-tracing/SKILL.md": "ff1002204c1ec1b1de54a77886edb0cd7c7d1d97a2b571a861818b2a466bba85",
|
|
456
457
|
".codex/skills/root-cause-tracing/find-polluter.sh": "6462747eae9b175ac145b78bcfaeab755654a75e32637f08eb633f065a9e1d7c",
|
|
457
458
|
".codex/skills/safe-implementation/SKILL.md": "fd92709e320b3ccbaa76fe5259424439ab769a67e8d72830f780fde8210ce2da",
|
|
458
|
-
".codex/skills/session-management/SKILL.md": "
|
|
459
|
+
".codex/skills/session-management/SKILL.md": "53532fa06e003a7dfd62afa0b8b7d4f1c8ac0967b35f1d5bd8734668417d276b",
|
|
459
460
|
".codex/skills/sharing-skills/SKILL.md": "c662da5bd3907b987121854efddd90a266db902d1662e62b4e6054e3f03d07dd",
|
|
460
461
|
".codex/skills/skill-creator/SKILL.md": "c574e634e616905287338f6cad0359ef471a6f241cd888cabcebfa1710d2a71d",
|
|
461
462
|
".codex/skills/source-code-research/SKILL.md": "0ec5a37e92c81505de40e37c190f1d64c870e8c5e75636ea76901f1d05fc265f",
|
|
@@ -585,10 +586,10 @@
|
|
|
585
586
|
".codex/hooks/stop.sh": "7008c4a7a6fba302b0f589c65370b0bf8444a2c7b2114117521b9ea09041cfc3",
|
|
586
587
|
".codex/scripts/append_worklog.sh": "44b7d6f00f4be6aec77081c7c74d9891cb12b6096f29204903ae544991172591",
|
|
587
588
|
".codex/scripts/apply_worklog_archive.sh": "416958f91d760a09183235c2d7a67faa0a006351652bf743da7045273129c49c",
|
|
588
|
-
".codex/scripts/audit_memory_hygiene.sh": "
|
|
589
|
+
".codex/scripts/audit_memory_hygiene.sh": "9739a42d176db2002d81f0626c3458eda2004a4fdeeefe2c0b2797d10cb240b1",
|
|
589
590
|
".codex/scripts/build_memory_index.sh": "247ecaed52d305dcf6651f137c8e762e7b4661781af16df8a296b3da19ad96b8",
|
|
590
591
|
".codex/scripts/build_prior_related_work.sh": "08d226f318eb4859529f774b9e03daaee4c70d17e814422cddb6f1c1efd52313",
|
|
591
|
-
".codex/scripts/build_startup_brief.sh": "
|
|
592
|
+
".codex/scripts/build_startup_brief.sh": "7130ae1c5a56c79f66c6450a558f3f6b9642ed34df8696b2fde82d1d287caddf",
|
|
592
593
|
".codex/scripts/close_bead.sh": "90944f59945a440280b958924858e1bb515e60bbc36805e26387da77ef657022",
|
|
593
594
|
".codex/scripts/detect_changed_files.sh": "10633eda525c32ac0a1410239117f8ede5d23ae7faba4108b3f3e9096ffed366",
|
|
594
595
|
".codex/scripts/ensure_beads.sh": "9f69036f7fdb332f2089b4a58afdc55d982612cc004d98628bfd0b311f74e078",
|
|
@@ -599,10 +600,10 @@
|
|
|
599
600
|
".codex/scripts/sync_bead_context.sh": "6b8d6908cffbbf8fdbf5bf548e09788d504daddce092bd7112eee695882a64a7",
|
|
600
601
|
".codex/scripts/validate_memory_docs.sh": "a0a2b184db21dae92c88a0ea837be8bcaf7a47150392034d3110842f266c4afc",
|
|
601
602
|
".codex/scripts/verify_bead.sh": "16571365aa54f300ec2554573f13bd74c37b22bfc54e1c09d5b55553855a0add",
|
|
602
|
-
".codex/mcp/README.md": "
|
|
603
|
+
".codex/mcp/README.md": "e03cb3c5cd228692c5f573b1ead8e2b0f2effda361ec43721617029d561f3083",
|
|
603
604
|
".codex/mcp/basic-memory.toml.example": "b40ef19861a8f29d3d78d7b166474cc4d44e79362bf5fc81942754609ff4ee3c",
|
|
604
|
-
".codex/mcp/context7.toml.example": "
|
|
605
|
-
".codex/mcp/exa.toml.example": "
|
|
605
|
+
".codex/mcp/context7.toml.example": "658967017443c6c9d6b181694767c3f97180c2febdc050cc3747de2b3ae2b761",
|
|
606
|
+
".codex/mcp/exa.toml.example": "bc746ddc0fc9e88cbaa14d8b6cff1b3d3a5e04e587722b7a82d79d18a6cd21d4",
|
|
606
607
|
".codex/mcp/memory-bridge.toml.example": "3689f1b04410463c2e648e437e16c30901a7b1c5e165255e03b3552c9a4b03e8",
|
|
607
608
|
".codex/mcp/memory.toml.example": "3c5575ebd822729023220c7a6c7f7a6a7e0ac9e43edbf7e0665d4e06938fb8e7",
|
|
608
609
|
".codex/mcp/ref.toml.example": "a7a5d84b04f9d7a35282e91eb45111a0d7ddb185cdc8326461a8306d9b5d802b",
|
|
@@ -621,15 +622,15 @@
|
|
|
621
622
|
".codex/memory/_templates/gotcha.md": "bf06bb72050dd71afb543d9ac9480f35ac240100fe8221ae855cf286dc94c0a7",
|
|
622
623
|
".codex/memory/_templates/handoff.md": "1d83137e655733453a2895b8a2f6cb29238eeff26ed276250164ebeecdd5e204",
|
|
623
624
|
".codex/memory/_templates/prd.md": "11f80e3af46896c7980bef37088381350e5cbc90e2f22399c50ed9dcab3f2bc1",
|
|
624
|
-
".codex/memory/_templates/project.md": "
|
|
625
|
+
".codex/memory/_templates/project.md": "21e720af0d9bbe600f6707ca6bdc88af75e4d134563b825680738d9aa2d2499e",
|
|
625
626
|
".codex/memory/_templates/proposal.md": "5ad769245bd83279bbd70fc37976b23c08190d2a4b416eb46cb696b22d437e19",
|
|
626
627
|
".codex/memory/_templates/research.md": "6966290f90233087979cca5c49c075216c817b9c63c0ae444fea0f4b667ed016",
|
|
627
628
|
".codex/memory/_templates/roadmap.md": "6945f7fa459554d7195104bc1e8f1debdd3c5d37f869e63ae2a60ecb37065045",
|
|
628
|
-
".codex/memory/_templates/session-context.md": "
|
|
629
|
-
".codex/memory/_templates/state.md": "
|
|
629
|
+
".codex/memory/_templates/session-context.md": "fb39fb199be3323d1417982ecdfd7eb758a5a3ef06662eab5df10696d6c3eba5",
|
|
630
|
+
".codex/memory/_templates/state.md": "98286fa2aa00e216dc29dcc7fe7d9da1401cb33d36af5a482f88e8188bcc788c",
|
|
630
631
|
".codex/memory/_templates/tasks.md": "54119ce84fd0aa6ecd0148355f33808c061147da774475c94bf7e47bb18f73dd",
|
|
631
|
-
".codex/memory/_templates/tech-stack.md": "
|
|
632
|
-
".codex/memory/_templates/user.md": "
|
|
632
|
+
".codex/memory/_templates/tech-stack.md": "38c0e2255360cc777295bcb89202510f3e0ee0927d7a23422ca55b33a6ef9448",
|
|
633
|
+
".codex/memory/_templates/user.md": "d12ba5cdc382dbeeda5128a0b0ffe81993fbebfd882edaa46e6778cf7088cf73",
|
|
633
634
|
".codex/memory/project/gotchas.md": "05ce128ced24deffbb51a8b7167000c4e4816c4e3275a98f439fddb0e95c2bd6",
|
|
634
635
|
".codex/memory/project/project.md": "94a76028472946ba9782534de4920e9a77cfdf0f4daa063a97569660ccc06e21",
|
|
635
636
|
".codex/memory/project/roadmap.md": "6027b3bd3eaeed02b16a59037e760200ce8505f3007375faf2543b4b58bcee6e",
|
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.0.5] — 2026-03-18
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **Windows compatibility**: CLI entry point changed from bash script (`bin/codexkit`) to Node.js wrapper (`bin/codexkit.js`), fixing `The term '/bin/bash.exe' is not recognized` error when installing via `npm install -g`, `pnpm add -g`, or `bun add -g` on Windows
|
|
15
|
+
- Node.js wrapper auto-detects bash from Git for Windows, MSYS2, WSL, or PATH; provides clear error message with install links if bash is not found
|
|
16
|
+
- Works cross-platform with all major package managers (npm, pnpm, bun, yarn)
|
|
17
|
+
|
|
18
|
+
## [1.0.4] — 2026-03-18
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- New `/prompts:search` workflow entrypoint for querying durable project memory, prior decisions, and related context
|
|
23
|
+
- Richer memory templates for project, state, session context, tech stack, and user notes
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- Context7 and Exa MCP documentation/examples now give clearer tool-selection and two-step lookup guidance
|
|
28
|
+
- Scout agent instructions, memory docs, and session-management skills were refined for clearer research and context workflows
|
|
29
|
+
- Global and project installers now emit more helpful progress output during setup and upgrades
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
|
|
33
|
+
- Install/validation coverage now better preserves customized files while checking the updated install surface
|
|
34
|
+
- Supporting scripts and prompt docs were aligned with the new search and memory-management flows
|
|
35
|
+
|
|
10
36
|
## [1.0.3] — 2026-03-17
|
|
11
37
|
|
|
12
38
|
### Added
|
package/README.md
CHANGED
|
@@ -198,7 +198,7 @@ See [docs/profiles.md](docs/profiles.md) for detailed descriptions and customiza
|
|
|
198
198
|
|
|
199
199
|
## Prompts
|
|
200
200
|
|
|
201
|
-
|
|
201
|
+
21 structured workflow entry points — the **"what"** of your development process.
|
|
202
202
|
|
|
203
203
|
> **Note:** Codex prompt discovery is user-scoped at `~/.codex/prompts`. `codexkit install` bootstraps that prompt directory automatically for the current user, while `codexkit install-global` installs the full shared inventory.
|
|
204
204
|
|
|
@@ -224,6 +224,7 @@ See [docs/profiles.md](docs/profiles.md) for detailed descriptions and customiza
|
|
|
224
224
|
| | `resume` | Resume work from a previous session |
|
|
225
225
|
| | `status` | Show project status dashboard |
|
|
226
226
|
| | `compound` | Extract and persist learnings |
|
|
227
|
+
| | `search` | Search project memory and context for prior knowledge |
|
|
227
228
|
|
|
228
229
|
### Standard Development Flow
|
|
229
230
|
|
package/bin/codexkit
CHANGED
|
@@ -28,9 +28,9 @@ usage() {
|
|
|
28
28
|
Codexkit CLI
|
|
29
29
|
|
|
30
30
|
Usage:
|
|
31
|
-
codexkit install [target-dir] [--force] [--upgrade] [--template <name>] [--full-local]
|
|
32
|
-
codexkit install-global [--force] [--upgrade]
|
|
33
|
-
codexkit upgrade [target-dir] [--auto-apply-patches]
|
|
31
|
+
codexkit install [target-dir] [--force] [--upgrade] [--template <name>] [--full-local] [--verbose]
|
|
32
|
+
codexkit install-global [--force] [--upgrade] [--verbose]
|
|
33
|
+
codexkit upgrade [target-dir] [--auto-apply-patches] [--verbose]
|
|
34
34
|
codexkit run [codex args...] # Load project .codex/.env, then exec codex
|
|
35
35
|
codexkit doctor # Ownership + validation report
|
|
36
36
|
codexkit bead-start <bead-id> [--use-current-branch]
|
package/bin/codexkit.js
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
const { execFileSync, execSync } = require("child_process");
|
|
5
|
+
const path = require("path");
|
|
6
|
+
const fs = require("fs");
|
|
7
|
+
const os = require("os");
|
|
8
|
+
|
|
9
|
+
const BASH_SCRIPT = path.join(__dirname, "codexkit");
|
|
10
|
+
|
|
11
|
+
function findBash() {
|
|
12
|
+
if (os.platform() !== "win32") {
|
|
13
|
+
return "/bin/bash";
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// On Windows, try common bash locations in order
|
|
17
|
+
const candidates = [];
|
|
18
|
+
|
|
19
|
+
// Git for Windows (most common)
|
|
20
|
+
const programFiles = process.env.ProgramFiles || "C:\\Program Files";
|
|
21
|
+
const programFilesX86 =
|
|
22
|
+
process.env["ProgramFiles(x86)"] || "C:\\Program Files (x86)";
|
|
23
|
+
candidates.push(
|
|
24
|
+
path.join(programFiles, "Git", "bin", "bash.exe"),
|
|
25
|
+
path.join(programFilesX86, "Git", "bin", "bash.exe"),
|
|
26
|
+
path.join(programFiles, "Git", "usr", "bin", "bash.exe")
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
// MSYS2
|
|
30
|
+
candidates.push("C:\\msys64\\usr\\bin\\bash.exe");
|
|
31
|
+
|
|
32
|
+
// WSL
|
|
33
|
+
const system32 = path.join(
|
|
34
|
+
process.env.SystemRoot || "C:\\Windows",
|
|
35
|
+
"System32"
|
|
36
|
+
);
|
|
37
|
+
candidates.push(path.join(system32, "bash.exe"));
|
|
38
|
+
|
|
39
|
+
// Check PATH via where
|
|
40
|
+
try {
|
|
41
|
+
const result = execSync("where bash.exe", {
|
|
42
|
+
encoding: "utf8",
|
|
43
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
44
|
+
}).trim();
|
|
45
|
+
if (result) {
|
|
46
|
+
const first = result.split(/\r?\n/)[0];
|
|
47
|
+
if (first && fs.existsSync(first)) {
|
|
48
|
+
return first;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
} catch (_) {
|
|
52
|
+
// not found via where
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
for (const candidate of candidates) {
|
|
56
|
+
if (fs.existsSync(candidate)) {
|
|
57
|
+
return candidate;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
console.error(
|
|
62
|
+
"Error: bash not found. Codexkit requires bash to run.\n\n" +
|
|
63
|
+
"On Windows, install one of the following:\n" +
|
|
64
|
+
" - Git for Windows: https://git-scm.com/download/win\n" +
|
|
65
|
+
" - WSL: wsl --install\n" +
|
|
66
|
+
" - MSYS2: https://www.msys2.org/\n"
|
|
67
|
+
);
|
|
68
|
+
process.exit(1);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const bash = findBash();
|
|
72
|
+
const args = process.argv.slice(2);
|
|
73
|
+
|
|
74
|
+
try {
|
|
75
|
+
const result = execFileSync(bash, [BASH_SCRIPT, ...args], {
|
|
76
|
+
stdio: "inherit",
|
|
77
|
+
env: { ...process.env },
|
|
78
|
+
windowsHide: false,
|
|
79
|
+
});
|
|
80
|
+
process.exit(0);
|
|
81
|
+
} catch (err) {
|
|
82
|
+
if (err.status != null) {
|
|
83
|
+
process.exit(err.status);
|
|
84
|
+
}
|
|
85
|
+
console.error(err.message);
|
|
86
|
+
process.exit(1);
|
|
87
|
+
}
|
|
@@ -7,10 +7,12 @@ REPO_DIR="$(dirname "$SCRIPT_DIR")"
|
|
|
7
7
|
# Parse flags
|
|
8
8
|
FORCE=false
|
|
9
9
|
UPGRADE=false
|
|
10
|
+
VERBOSE=false
|
|
10
11
|
for arg in "$@"; do
|
|
11
12
|
case "$arg" in
|
|
12
13
|
--force) FORCE=true ;;
|
|
13
14
|
--upgrade) UPGRADE=true ;;
|
|
15
|
+
--verbose|-v) VERBOSE=true ;;
|
|
14
16
|
esac
|
|
15
17
|
done
|
|
16
18
|
|
|
@@ -20,45 +22,109 @@ MANIFEST="$REPO_DIR/.codex/.template-manifest.json"
|
|
|
20
22
|
GLOBAL_DIR="${HOME}/.codex"
|
|
21
23
|
GLOBAL_AGENT_BRIDGE="${HOME}/.agents"
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
# Counters
|
|
26
|
+
_count_created=0
|
|
27
|
+
_count_upgraded=0
|
|
28
|
+
_count_kept=0
|
|
29
|
+
_count_skipped=0
|
|
30
|
+
|
|
31
|
+
# Returns: 0 = new file, 1 = skip, 2 = safe to upgrade
|
|
32
|
+
check_copy_action() {
|
|
24
33
|
local target="$1"
|
|
25
34
|
local source_path="$2"
|
|
26
35
|
local manifest_hash installed_hash
|
|
27
36
|
|
|
28
|
-
# New file → always copy
|
|
29
37
|
[ ! -f "$target" ] && return 0
|
|
38
|
+
$FORCE && return 2
|
|
30
39
|
|
|
31
|
-
# Force → always copy
|
|
32
|
-
$FORCE && return 0
|
|
33
|
-
|
|
34
|
-
# Upgrade mode → check if customized
|
|
35
40
|
if $UPGRADE && [ -f "$MANIFEST" ]; then
|
|
36
41
|
manifest_hash=$(python3 -c 'import json,sys; d=json.load(open(sys.argv[1])); print(d.get("files",{}).get(sys.argv[2],""))' "$MANIFEST" "$source_path" 2>/dev/null || echo "")
|
|
37
42
|
installed_hash=$(shasum -a 256 "$target" 2>/dev/null | cut -d' ' -f1)
|
|
38
|
-
|
|
39
43
|
if [ -n "$manifest_hash" ] && [ "$installed_hash" = "$manifest_hash" ]; then
|
|
40
|
-
|
|
41
|
-
return 0
|
|
44
|
+
return 2
|
|
42
45
|
fi
|
|
43
|
-
|
|
44
|
-
# File was customized (or not tracked) → skip
|
|
45
46
|
return 1
|
|
46
47
|
fi
|
|
47
48
|
|
|
48
|
-
# Default: skip existing
|
|
49
49
|
return 1
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
should_copy() {
|
|
53
|
+
local rc=0
|
|
54
|
+
check_copy_action "$1" "$2" || rc=$?
|
|
55
|
+
[ "$rc" -ne 1 ]
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
log_file_op() {
|
|
59
|
+
local display_path="$1"
|
|
60
|
+
local action="$2"
|
|
61
|
+
case "$action" in
|
|
62
|
+
created)
|
|
63
|
+
if $VERBOSE; then echo " CREATED $display_path"; fi
|
|
64
|
+
_count_created=$((_count_created + 1))
|
|
65
|
+
;;
|
|
66
|
+
upgraded)
|
|
67
|
+
if $VERBOSE; then echo " UPGRADED $display_path"; fi
|
|
68
|
+
_count_upgraded=$((_count_upgraded + 1))
|
|
69
|
+
;;
|
|
70
|
+
kept)
|
|
71
|
+
if $VERBOSE; then echo " KEPT $display_path (customized)"; fi
|
|
72
|
+
_count_kept=$((_count_kept + 1))
|
|
73
|
+
;;
|
|
74
|
+
skipped)
|
|
75
|
+
if $VERBOSE; then echo " SKIP $display_path (exists)"; fi
|
|
76
|
+
_count_skipped=$((_count_skipped + 1))
|
|
77
|
+
;;
|
|
78
|
+
esac
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
copy_and_log() {
|
|
82
|
+
local target="$1"
|
|
83
|
+
local source="$2"
|
|
84
|
+
local source_path="$3"
|
|
85
|
+
local display_path="$4"
|
|
86
|
+
local rc=0
|
|
87
|
+
|
|
88
|
+
check_copy_action "$target" "$source_path" || rc=$?
|
|
89
|
+
|
|
90
|
+
if [ "$rc" -eq 0 ]; then
|
|
91
|
+
mkdir -p "$(dirname "$target")"
|
|
92
|
+
cp "$source" "$target"
|
|
93
|
+
log_file_op "$display_path" "created"
|
|
94
|
+
elif [ "$rc" -eq 2 ]; then
|
|
95
|
+
mkdir -p "$(dirname "$target")"
|
|
96
|
+
cp "$source" "$target"
|
|
97
|
+
log_file_op "$display_path" "upgraded"
|
|
98
|
+
elif $UPGRADE; then
|
|
99
|
+
log_file_op "$display_path" "kept"
|
|
100
|
+
else
|
|
101
|
+
log_file_op "$display_path" "skipped"
|
|
102
|
+
fi
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
print_summary() {
|
|
106
|
+
echo ""
|
|
107
|
+
local parts=()
|
|
108
|
+
[ "$_count_created" -gt 0 ] && parts+=("◆ Created $_count_created new files")
|
|
109
|
+
[ "$_count_upgraded" -gt 0 ] && parts+=("◆ Upgraded $_count_upgraded files")
|
|
110
|
+
[ "$_count_kept" -gt 0 ] && parts+=("● Preserved $_count_kept customized files")
|
|
111
|
+
[ "$_count_skipped" -gt 0 ] && parts+=("○ Skipped $_count_skipped existing files")
|
|
112
|
+
|
|
113
|
+
for part in "${parts[@]+"${parts[@]}"}"; do
|
|
114
|
+
echo " $part"
|
|
115
|
+
done
|
|
116
|
+
}
|
|
117
|
+
|
|
52
118
|
echo "=== Codexkit Global Install ==="
|
|
53
119
|
|
|
54
120
|
if $UPGRADE && [ ! -f "$MANIFEST" ] && ! $FORCE; then
|
|
55
|
-
echo "⚠ Upgrade checks unavailable (missing .template-manifest.json); existing files will be kept"
|
|
121
|
+
echo " ⚠ Upgrade checks unavailable (missing .template-manifest.json); existing files will be kept"
|
|
56
122
|
fi
|
|
57
123
|
|
|
58
124
|
# Check Codex CLI
|
|
59
125
|
if ! command -v codex &> /dev/null; then
|
|
60
|
-
echo "⚠ Codex CLI not found. Install from: https://github.com/openai/codex"
|
|
61
|
-
echo "
|
|
126
|
+
echo " ⚠ Codex CLI not found. Install from: https://github.com/openai/codex"
|
|
127
|
+
echo " Continuing anyway..."
|
|
62
128
|
fi
|
|
63
129
|
|
|
64
130
|
# Create directory
|
|
@@ -70,15 +136,7 @@ for file in "$REPO_DIR/templates/global/"*; do
|
|
|
70
136
|
[ "$filename" = "README.md" ] && continue
|
|
71
137
|
target="$GLOBAL_DIR/$filename"
|
|
72
138
|
source_path="templates/global/$filename"
|
|
73
|
-
|
|
74
|
-
if should_copy "$target" "$source_path"; then
|
|
75
|
-
cp "$file" "$target"
|
|
76
|
-
echo " INSTALLED $target"
|
|
77
|
-
elif $UPGRADE; then
|
|
78
|
-
echo " KEPT $target (customized)"
|
|
79
|
-
else
|
|
80
|
-
echo " SKIP $target (exists, use --force to overwrite)"
|
|
81
|
-
fi
|
|
139
|
+
copy_and_log "$target" "$file" "$source_path" "~/.codex/$filename"
|
|
82
140
|
done
|
|
83
141
|
|
|
84
142
|
install_shared_tree() {
|
|
@@ -86,7 +144,6 @@ install_shared_tree() {
|
|
|
86
144
|
local dest_dir="$2"
|
|
87
145
|
local source_prefix="$3"
|
|
88
146
|
local label="$4"
|
|
89
|
-
local copied=0
|
|
90
147
|
|
|
91
148
|
[ -d "$src_dir" ] || return 0
|
|
92
149
|
mkdir -p "$dest_dir"
|
|
@@ -95,37 +152,17 @@ install_shared_tree() {
|
|
|
95
152
|
rel_path="${file#$src_dir/}"
|
|
96
153
|
target="$dest_dir/$rel_path"
|
|
97
154
|
source_path="$source_prefix/$rel_path"
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
cp "$file" "$target"
|
|
102
|
-
if [[ "$target" == *.sh ]]; then
|
|
103
|
-
chmod +x "$target"
|
|
104
|
-
fi
|
|
105
|
-
copied=$((copied + 1))
|
|
106
|
-
elif $UPGRADE; then
|
|
107
|
-
echo " KEPT $target (customized)"
|
|
155
|
+
copy_and_log "$target" "$file" "$source_path" "~/.codex/${dest_dir#$GLOBAL_DIR/}/$rel_path"
|
|
156
|
+
if [ -f "$target" ] && [[ "$target" == *.sh ]]; then
|
|
157
|
+
chmod +x "$target"
|
|
108
158
|
fi
|
|
109
159
|
done < <(find "$src_dir" -type f | sort)
|
|
110
|
-
|
|
111
|
-
if [ "$copied" -gt 0 ]; then
|
|
112
|
-
echo " INSTALLED $copied $label → $dest_dir"
|
|
113
|
-
else
|
|
114
|
-
echo " SKIP $label (already installed, use --force to overwrite)"
|
|
115
|
-
fi
|
|
116
160
|
}
|
|
117
161
|
|
|
118
162
|
# Install shared config, agents, prompts, skills, and hook helpers.
|
|
119
163
|
config_source="$REPO_DIR/templates/global/.codex-config-template.toml"
|
|
120
164
|
config_target="$GLOBAL_DIR/config.toml"
|
|
121
|
-
|
|
122
|
-
cp "$config_source" "$config_target"
|
|
123
|
-
echo " INSTALLED $config_target"
|
|
124
|
-
elif $UPGRADE; then
|
|
125
|
-
echo " KEPT $config_target (customized)"
|
|
126
|
-
else
|
|
127
|
-
echo " SKIP $config_target (exists, use --force to overwrite)"
|
|
128
|
-
fi
|
|
165
|
+
copy_and_log "$config_target" "$config_source" "templates/global/.codex-config-template.toml" "~/.codex/config.toml"
|
|
129
166
|
|
|
130
167
|
install_shared_tree "$REPO_DIR/.codex/agents" "$GLOBAL_DIR/agents" ".codex/agents" "agent files"
|
|
131
168
|
install_shared_tree "$REPO_DIR/.codex/prompts" "$GLOBAL_DIR/prompts" ".codex/prompts" "prompt files"
|
|
@@ -135,16 +172,20 @@ install_shared_tree "$REPO_DIR/.codex/skills" "$GLOBAL_DIR/skills" ".codex/skill
|
|
|
135
172
|
# global skill and config discovery patterns to stay consistent.
|
|
136
173
|
install_shared_tree "$REPO_DIR/.codex/scripts" "$GLOBAL_DIR/scripts" ".codex/scripts" "helper scripts"
|
|
137
174
|
|
|
175
|
+
# Codex CLI discovers skills at .agents/skills/ (official path).
|
|
176
|
+
# Codexkit stores skills canonically at .codex/skills/.
|
|
177
|
+
# This symlink bridges the two so Codex finds Codexkit skills natively.
|
|
138
178
|
mkdir -p "$GLOBAL_AGENT_BRIDGE"
|
|
139
179
|
if [ ! -e "$GLOBAL_AGENT_BRIDGE/skills" ]; then
|
|
140
180
|
ln -s ../.codex/skills "$GLOBAL_AGENT_BRIDGE/skills"
|
|
141
|
-
|
|
181
|
+
log_file_op "~/.agents/skills → ~/.codex/skills" "created"
|
|
142
182
|
elif [ -L "$GLOBAL_AGENT_BRIDGE/skills" ]; then
|
|
143
|
-
|
|
183
|
+
log_file_op "~/.agents/skills symlink" "kept"
|
|
144
184
|
else
|
|
145
|
-
|
|
185
|
+
log_file_op "~/.agents/skills directory" "kept"
|
|
146
186
|
fi
|
|
147
187
|
|
|
188
|
+
print_summary
|
|
148
189
|
echo ""
|
|
149
190
|
echo "✓ Global install complete"
|
|
150
191
|
echo " Location: $GLOBAL_DIR"
|