@litfamily/litcodex 1.0.39 → 1.0.40
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-Ko-KR.md +35 -13
- package/README.md +35 -13
- package/dist/cli.js +13 -0
- package/dist/install/extensions-notice.d.ts +13 -0
- package/dist/install/extensions-notice.js +26 -6
- package/dist/install/extensions.d.ts +74 -0
- package/dist/install/extensions.js +856 -0
- package/dist/install/generated-skill-payload-hashes.d.ts +8 -8
- package/dist/install/generated-skill-payload-hashes.js +8 -8
- package/dist/install/index.js +7 -1
- package/marketplace/plugins/litcodex/.codex-plugin/plugin.json +1 -1
- package/marketplace/plugins/litcodex/components/auto-update/package.json +1 -1
- package/marketplace/plugins/litcodex/components/comment-checker/package.json +1 -1
- package/marketplace/plugins/litcodex/components/git-bash/package.json +1 -1
- package/marketplace/plugins/litcodex/components/lit-loop/directives/lit-schematic.md +5 -3
- package/marketplace/plugins/litcodex/components/lit-loop/directives/lit-scientific-visualization.md +5 -3
- package/marketplace/plugins/litcodex/components/lit-loop/dist/route-heads.js +1 -2
- package/marketplace/plugins/litcodex/components/lit-loop/package.json +1 -1
- package/marketplace/plugins/litcodex/components/lsp/package.json +1 -1
- package/marketplace/plugins/litcodex/components/rules/package.json +1 -1
- package/marketplace/plugins/litcodex/components/start-work-continuation/package.json +1 -1
- package/marketplace/plugins/litcodex/components/telemetry/package.json +1 -1
- package/marketplace/plugins/litcodex/components/wikify-knowledge/package.json +1 -1
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/SKILL.md +6 -4
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/SKILL.md +6 -4
- package/marketplace/plugins/litcodex/skills/lit-docx/SKILL.md +6 -4
- package/marketplace/plugins/litcodex/skills/lit-pptx/SKILL.md +6 -4
- package/marketplace/plugins/litcodex/skills/lit-schematic/SKILL.md +6 -4
- package/marketplace/plugins/litcodex/skills/lit-scientific-visualization/SKILL.md +6 -4
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/SKILL.md +6 -4
- package/marketplace/plugins/litcodex/skills/readme-studio/SKILL.md +6 -4
- package/marketplace/plugins/litcodex/skills/visual-qa/SKILL.md +6 -4
- package/node_modules/@litcodex/lit-loop/directives/lit-schematic.md +5 -3
- package/node_modules/@litcodex/lit-loop/directives/lit-scientific-visualization.md +5 -3
- package/node_modules/@litcodex/lit-loop/dist/route-heads.js +1 -2
- package/node_modules/@litcodex/lit-loop/package.json +1 -1
- package/node_modules/@litcodex/lit-loop/skills/lit-schematic/SKILL.md +6 -4
- package/node_modules/@litcodex/lit-loop/skills/lit-scientific-visualization/SKILL.md +6 -4
- package/package.json +2 -2
- package/readme-assets/badge-version.svg +1 -1
package/README-Ko-KR.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
<p align="center"><picture><source media="(prefers-reduced-motion: reduce)" srcset="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.
|
|
1
|
+
<p align="center"><picture><source media="(prefers-reduced-motion: reduce)" srcset="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.40/readme-assets/cover-motion-still.webp" /><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.40/readme-assets/cover-motion.webp" width="100%" alt="LitFamily 모션 커버: 일곱 머신의 칸이 차례로 켜지고, 셋째 칸의 LitCodex 머신이 주황 바이저와 테두리를 밝힌 뒤 LITFAMILY와 KEEP THE WORK LIT. 문구가 밝아지는 영상" /></picture></p>
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
|
-
<a href="#설치"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.
|
|
5
|
-
<a href="https://github.com/wjgoarxiv/litcodex/blob/main/LICENSE"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.
|
|
4
|
+
<a href="#설치"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.40/readme-assets/badge-version.svg" alt="1.0.40" /></a>
|
|
5
|
+
<a href="https://github.com/wjgoarxiv/litcodex/blob/main/LICENSE"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.40/readme-assets/badge-license.svg" alt="MIT license" /></a>
|
|
6
6
|
</p>
|
|
7
7
|
|
|
8
8
|
<p align="center">
|
|
9
|
-
<a href="https://github.com/wjgoarxiv/litcodex/blob/main/docs/usage-Ko-KR.md"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.
|
|
9
|
+
<a href="https://github.com/wjgoarxiv/litcodex/blob/main/docs/usage-Ko-KR.md"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.40/readme-assets/lucide-book-open.svg" width="16" alt="" /> 문서</a> <a href="#설치">설치</a> <a href="https://github.com/wjgoarxiv/litcodex/blob/main/docs/assets/readme/ignition-film.mp4"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.40/readme-assets/lucide-play.svg" width="16" alt="" /> Ignition</a> <a href="https://github.com/wjgoarxiv/litcodex/blob/main/LICENSE"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.40/readme-assets/lucide-shield-check.svg" width="16" alt="" /> MIT</a>
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
12
|
# LitCodex
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
Node.js 22 이상과 Codex CLI가 필요합니다.
|
|
24
24
|
|
|
25
25
|
```sh
|
|
26
|
-
npm exec --yes --package @litfamily/litcodex@1.0.
|
|
26
|
+
npm exec --yes --package @litfamily/litcodex@1.0.40 -- litcodex install
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
설치기는 어떤 모델이 이끌지, 어떤 모델이 거들지, 답변 스타일은 무엇으로 할지 묻고, 쓰려는 내용을 먼저 보여 준 뒤
|
|
30
30
|
`~/.codex/config.toml`에서 자기가 관리하는 항목만 고칩니다. 계획만 먼저 보려면
|
|
31
|
-
`npm exec --yes --package @litfamily/litcodex@1.0.
|
|
31
|
+
`npm exec --yes --package @litfamily/litcodex@1.0.40 -- litcodex --dry-run install`을 실행하고, 묻는 단계 없이
|
|
32
32
|
설치하려면 `install` 뒤에 `--yes`를 붙이세요.
|
|
33
33
|
|
|
34
34
|
```sh
|
|
@@ -39,7 +39,7 @@ litcodex install
|
|
|
39
39
|
전역으로 설치하면 영상 스킬이 쓸 도구를 미리 준비하느라 버전이 고정된 파일 몇 개를 내려받습니다. 무엇을 받는지와
|
|
40
40
|
건너뛰는 방법은 [설치 안내](https://github.com/wjgoarxiv/litcodex/blob/main/docs/install-Ko-KR.md#전역-명령으로-쓰기)에 있습니다.
|
|
41
41
|
|
|
42
|
-
> 전역 설치가 없다면 `npm exec --yes --package @litfamily/litcodex@1.0.
|
|
42
|
+
> 전역 설치가 없다면 `npm exec --yes --package @litfamily/litcodex@1.0.40 -- litcodex <command>` 형식을 사용하세요.
|
|
43
43
|
|
|
44
44
|
## 첫 작업
|
|
45
45
|
|
|
@@ -78,15 +78,37 @@ lit 회원가입 폼에 입력 검증을 추가해줘
|
|
|
78
78
|
LitCodex에는 LitFamily 코어가 들어 있고, 이 코어는 혼자서도 완결되어 동작합니다. 파일을 만드는 스킬 아홉
|
|
79
79
|
개(발표자료, 문서, 그림, 디자인, 영상과 커버)는 LitFamily 확장이며 확장 선반인
|
|
80
80
|
[wjgoarxiv-skills](https://github.com/wjgoarxiv/wjgoarxiv-skills)에 있습니다. 쓰는 것만 LitCodex 옆에 설치하면
|
|
81
|
-
LitFamily를 온전히 쓸 수 있습니다.
|
|
81
|
+
LitFamily를 온전히 쓸 수 있습니다. 설치는 LitCodex가 대신 해 줄 수 있고, 명령마다 `--yes`를 붙이기 전까지는 할
|
|
82
|
+
일만 보여 줍니다.
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
litcodex extensions list
|
|
86
|
+
litcodex extensions install lit-docx --yes
|
|
87
|
+
litcodex extensions install --family figures --yes
|
|
88
|
+
litcodex extensions check
|
|
89
|
+
litcodex extensions update --yes
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
`install`은 `~/.agents/skills`나 프로젝트 스킬 폴더에 같은 이름의 스킬이 있으면 멈추고, 아니면 예전 복사본을
|
|
93
|
+
통째로 `~/.codex/extension-backups/`로 옮긴 뒤 복사하고 영수증을 남깁니다. `--from <받아 둔 경로>`가 없으면
|
|
94
|
+
`~/.cache/litcodex/extensions-src`에 선반의 작은 클론을 둡니다. `remove`는 직접 만든 폴더를 거절하고, `check`는
|
|
95
|
+
문제마다 고치는 명령을 한 줄씩 보여 주며, `prune-backups --yes`는 오래된 백업을 지웁니다.
|
|
96
|
+
|
|
97
|
+
손으로 하려면 선반을 한 번 받아 두고 프로젝트 폴더에서 네 줄을 실행하세요. 자리표시자 대신 받아 둔 경로를
|
|
98
|
+
넣습니다. `lit-docx`라면 이렇습니다.
|
|
82
99
|
|
|
83
100
|
```bash
|
|
84
101
|
git clone https://github.com/wjgoarxiv/wjgoarxiv-skills
|
|
85
|
-
|
|
86
|
-
|
|
102
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; p="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"; for d in "$cx/skills" "$HOME/.agents/skills" "$p/.agents/skills" "$p/.codex/skills"; do [ -e "$d/lit-docx" ] && echo "found: $d/lit-docx"; done; echo "check done"
|
|
103
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; if [ -e "$cx/skills/lit-docx" ]; then b="$cx/extension-backups/$(date +%Y%m%d-%H%M%S)"; mkdir -p "$b" && [ ! -e "$b/lit-docx" ] && mv "$cx/skills/lit-docx" "$b/lit-docx" && echo "moved aside: $b/lit-docx"; fi
|
|
104
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; if [ -e "$cx/skills/lit-docx" ]; then echo "stopped: $cx/skills/lit-docx still exists"; else mkdir -p "$cx/skills" && cp -R "<path to your wjgoarxiv-skills clone>/variants/litcodex/lit-docx" "$cx/skills/lit-docx"; fi
|
|
105
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; [ -f "$cx/skills/lit-docx/SKILL.md" ] && printf '{"id":"lit-docx","source":"%s","variant":"litcodex","installed_at":"%s"}\n' "<path to your wjgoarxiv-skills clone>/variants/litcodex/lit-docx" "$(date -u +%Y-%m-%dT%H:%M:%SZ)" > "$cx/skills/lit-docx/.litfamily-extension.json"
|
|
87
106
|
```
|
|
88
107
|
|
|
89
|
-
|
|
108
|
+
네 줄은 Codex가 읽는 모든 폴더에서 같은 이름의 스킬을 찾고, 예전 복사본을 통째로
|
|
109
|
+
`~/.codex/extension-backups/<날짜-시각>/lit-docx`로 옮기고(Codex는 이곳을 읽지 않습니다), 빈 자리에 복사한 뒤
|
|
110
|
+
폴더 안에 영수증을 남깁니다. 다시 실행하면 업데이트되고, 둘째 줄만 실행하면 확장이 백업 폴더로 빠집니다. `$litcodex:lit-pptx` 같은
|
|
111
|
+
스텁마다 자기 네 줄을 보여 줍니다. 업그레이드는 LitCodex 스킬 폴더에 추가하거나
|
|
90
112
|
고친 파일을 먼저 `~/.codex/litcodex-backups/<날짜>/`에 저장합니다. 1.0.38까지 쓰던 런타임은
|
|
91
113
|
`~/.cache/litcodex/office`와 `~/.cache/litcodex/motion-runtime`에 남아 있으니, 확장을 설치하지 않는다면 지워도
|
|
92
114
|
됩니다.
|
|
@@ -111,7 +133,7 @@ cp -R wjgoarxiv-skills/variants/litcodex/lit-docx "${CODEX_HOME:-$HOME/.codex}/s
|
|
|
111
133
|
## 확인, 문제 해결, 제거
|
|
112
134
|
|
|
113
135
|
```sh
|
|
114
|
-
npm exec --yes --package @litfamily/litcodex@1.0.
|
|
136
|
+
npm exec --yes --package @litfamily/litcodex@1.0.40 -- litcodex doctor
|
|
115
137
|
```
|
|
116
138
|
|
|
117
139
|
`litcodex doctor`는 등록·훅·설정·호스트 기능을, `litcodex loop doctor`는 현재 프로젝트의 루프 상태를 확인합니다.
|
|
@@ -119,7 +141,7 @@ npm exec --yes --package @litfamily/litcodex@1.0.39 -- litcodex doctor
|
|
|
119
141
|
[문제 해결](https://github.com/wjgoarxiv/litcodex/blob/main/README-Ko-KR.md#문제-해결)에 있습니다.
|
|
120
142
|
|
|
121
143
|
```sh
|
|
122
|
-
npm exec --yes --package @litfamily/litcodex@1.0.
|
|
144
|
+
npm exec --yes --package @litfamily/litcodex@1.0.40 -- litcodex uninstall
|
|
123
145
|
```
|
|
124
146
|
|
|
125
147
|
플러그인과 LitCodex가 관리하는 설정을 지우고, 관련 없는 설정은 그대로 둡니다.
|
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
<p align="center"><picture><source media="(prefers-reduced-motion: reduce)" srcset="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.
|
|
1
|
+
<p align="center"><picture><source media="(prefers-reduced-motion: reduce)" srcset="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.40/readme-assets/cover-motion-still.webp" /><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.40/readme-assets/cover-motion.webp" width="100%" alt="LitFamily motion cover: seven armored machines power on bay by bay, the LitCodex machine in the third bay wakes with a glowing orange visor and a lit frame, then LITFAMILY and KEEP THE WORK LIT. light up." /></picture></p>
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
|
-
<a href="#install"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.
|
|
5
|
-
<a href="https://github.com/wjgoarxiv/litcodex/blob/main/LICENSE"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.
|
|
4
|
+
<a href="#install"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.40/readme-assets/badge-version.svg" alt="1.0.40" /></a>
|
|
5
|
+
<a href="https://github.com/wjgoarxiv/litcodex/blob/main/LICENSE"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.40/readme-assets/badge-license.svg" alt="MIT license" /></a>
|
|
6
6
|
</p>
|
|
7
7
|
|
|
8
8
|
<p align="center">
|
|
9
|
-
<a href="https://github.com/wjgoarxiv/litcodex/blob/main/docs/usage.md"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.
|
|
9
|
+
<a href="https://github.com/wjgoarxiv/litcodex/blob/main/docs/usage.md"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.40/readme-assets/lucide-book-open.svg" width="16" alt="" /> Docs</a> <a href="#install">Install</a> <a href="https://github.com/wjgoarxiv/litcodex/blob/main/docs/assets/readme/ignition-film.mp4"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.40/readme-assets/lucide-play.svg" width="16" alt="" /> Ignition</a> <a href="https://github.com/wjgoarxiv/litcodex/blob/main/LICENSE"><img src="https://cdn.jsdelivr.net/npm/@litfamily/litcodex@1.0.40/readme-assets/lucide-shield-check.svg" width="16" alt="" /> MIT</a>
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
12
|
# LitCodex
|
|
@@ -24,12 +24,12 @@ today's stopped.
|
|
|
24
24
|
You need Node.js 22 or later and Codex CLI.
|
|
25
25
|
|
|
26
26
|
```sh
|
|
27
|
-
npm exec --yes --package @litfamily/litcodex@1.0.
|
|
27
|
+
npm exec --yes --package @litfamily/litcodex@1.0.40 -- litcodex install
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
The installer asks which model leads, which model helps and which output style you like, shows what it is
|
|
31
31
|
about to write, and changes only the keys it manages in `~/.codex/config.toml`. To see the plan first, run
|
|
32
|
-
`npm exec --yes --package @litfamily/litcodex@1.0.
|
|
32
|
+
`npm exec --yes --package @litfamily/litcodex@1.0.40 -- litcodex --dry-run install`. To skip the
|
|
33
33
|
questions, add `--yes` after `install`.
|
|
34
34
|
|
|
35
35
|
```sh
|
|
@@ -41,7 +41,7 @@ A global install also gets the video skill's tools ready with a few pinned downl
|
|
|
41
41
|
[install guide](https://github.com/wjgoarxiv/litcodex/blob/main/docs/install.md#a-global-command) lists them
|
|
42
42
|
and shows how to skip them.
|
|
43
43
|
|
|
44
|
-
> Without a global install, use `npm exec --yes --package @litfamily/litcodex@1.0.
|
|
44
|
+
> Without a global install, use `npm exec --yes --package @litfamily/litcodex@1.0.40 -- litcodex <command>`.
|
|
45
45
|
|
|
46
46
|
## First task
|
|
47
47
|
|
|
@@ -82,15 +82,37 @@ Pick any skill in the Codex skill picker or mention it by scoped name, such as `
|
|
|
82
82
|
LitCodex carries the LitFamily core, which is complete and works on its own. Nine skills that make files (decks,
|
|
83
83
|
documents, figures, design, video and covers) are LitFamily extensions, kept in the extension shelf
|
|
84
84
|
[wjgoarxiv-skills](https://github.com/wjgoarxiv/wjgoarxiv-skills). Install the ones you use alongside LitCodex to
|
|
85
|
-
get the full LitFamily experience
|
|
85
|
+
get the full LitFamily experience. LitCodex can install them for you, and each command only prints its plan until
|
|
86
|
+
you add `--yes`:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
litcodex extensions list
|
|
90
|
+
litcodex extensions install lit-docx --yes
|
|
91
|
+
litcodex extensions install --family figures --yes
|
|
92
|
+
litcodex extensions check
|
|
93
|
+
litcodex extensions update --yes
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
`install` stops when a same-name skill sits in `~/.agents/skills` or the project's skill folders, moves an old copy
|
|
97
|
+
whole to `~/.codex/extension-backups/`, copies and leaves a receipt. Without `--from <path to your clone>` it keeps a
|
|
98
|
+
sparse clone of the shelf in `~/.cache/litcodex/extensions-src`. `remove` refuses folders you made yourself, `check`
|
|
99
|
+
prints a fix line per problem, and `prune-backups --yes` deletes old backups.
|
|
100
|
+
|
|
101
|
+
To do it by hand, clone the shelf once, then run four lines from your project folder with your clone path in place
|
|
102
|
+
of the placeholder, for example for `lit-docx`:
|
|
86
103
|
|
|
87
104
|
```bash
|
|
88
105
|
git clone https://github.com/wjgoarxiv/wjgoarxiv-skills
|
|
89
|
-
|
|
90
|
-
|
|
106
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; p="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"; for d in "$cx/skills" "$HOME/.agents/skills" "$p/.agents/skills" "$p/.codex/skills"; do [ -e "$d/lit-docx" ] && echo "found: $d/lit-docx"; done; echo "check done"
|
|
107
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; if [ -e "$cx/skills/lit-docx" ]; then b="$cx/extension-backups/$(date +%Y%m%d-%H%M%S)"; mkdir -p "$b" && [ ! -e "$b/lit-docx" ] && mv "$cx/skills/lit-docx" "$b/lit-docx" && echo "moved aside: $b/lit-docx"; fi
|
|
108
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; if [ -e "$cx/skills/lit-docx" ]; then echo "stopped: $cx/skills/lit-docx still exists"; else mkdir -p "$cx/skills" && cp -R "<path to your wjgoarxiv-skills clone>/variants/litcodex/lit-docx" "$cx/skills/lit-docx"; fi
|
|
109
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; [ -f "$cx/skills/lit-docx/SKILL.md" ] && printf '{"id":"lit-docx","source":"%s","variant":"litcodex","installed_at":"%s"}\n' "<path to your wjgoarxiv-skills clone>/variants/litcodex/lit-docx" "$(date -u +%Y-%m-%dT%H:%M:%SZ)" > "$cx/skills/lit-docx/.litfamily-extension.json"
|
|
91
110
|
```
|
|
92
111
|
|
|
93
|
-
|
|
112
|
+
The lines look for same-name skills in every folder Codex reads, move an old copy whole to
|
|
113
|
+
`~/.codex/extension-backups/<date-time>/lit-docx` (Codex does not read it), copy into the empty folder, and leave a
|
|
114
|
+
receipt inside it. Run them again to update; run only the second line to remove. Each stub, such as
|
|
115
|
+
`$litcodex:lit-pptx`, prints its own lines. An upgrade saves files you added or changed in
|
|
94
116
|
LitCodex skill folders to `~/.codex/litcodex-backups/<date>/` first. Versions up to 1.0.38 left runtimes in
|
|
95
117
|
`~/.cache/litcodex/office` and `~/.cache/litcodex/motion-runtime`; delete them if you do not install the extensions.
|
|
96
118
|
|
|
@@ -115,7 +137,7 @@ rather have neither, set `LITCODEX_NO_UPDATE_CHECK=1`. A doctor run that failed,
|
|
|
115
137
|
## Check, fix, remove
|
|
116
138
|
|
|
117
139
|
```sh
|
|
118
|
-
npm exec --yes --package @litfamily/litcodex@1.0.
|
|
140
|
+
npm exec --yes --package @litfamily/litcodex@1.0.40 -- litcodex doctor
|
|
119
141
|
```
|
|
120
142
|
|
|
121
143
|
`litcodex doctor` checks registration, hooks, config and host capabilities; `litcodex loop doctor` checks
|
|
@@ -123,7 +145,7 @@ the current project's loop state. If `lit` does nothing, run doctor and check th
|
|
|
123
145
|
in Codex. More fixes are under [troubleshooting](https://github.com/wjgoarxiv/litcodex#troubleshooting).
|
|
124
146
|
|
|
125
147
|
```sh
|
|
126
|
-
npm exec --yes --package @litfamily/litcodex@1.0.
|
|
148
|
+
npm exec --yes --package @litfamily/litcodex@1.0.40 -- litcodex uninstall
|
|
127
149
|
```
|
|
128
150
|
|
|
129
151
|
This removes the plugin and the config LitCodex manages, and leaves your other settings alone.
|
package/dist/cli.js
CHANGED
|
@@ -54,6 +54,7 @@ function renderInstallDryRun(rest) {
|
|
|
54
54
|
const ROUTES = {
|
|
55
55
|
install: (rest, dryRun) => (dryRun ? ok(renderInstallDryRun(rest)) : ok("litcodex install\n")),
|
|
56
56
|
doctor: () => ok("litcodex doctor\n"),
|
|
57
|
+
extensions: () => ok("litcodex extensions\n"),
|
|
57
58
|
uninstall: () => ok("litcodex uninstall\n"),
|
|
58
59
|
"agent-file": (rest) => {
|
|
59
60
|
if (rest[0] === "--help" || rest[0] === "-h" || rest[0] === "project") {
|
|
@@ -107,6 +108,7 @@ function renderHelp() {
|
|
|
107
108
|
" litcodex install [--dry-run] [options] Install LitCodex into Codex",
|
|
108
109
|
" litcodex doctor Diagnose the LitCodex install",
|
|
109
110
|
" litcodex uninstall Remove LitCodex from Codex",
|
|
111
|
+
" litcodex extensions list|check|install|update|remove|prune-backups Manage the nine LitFamily extensions (dry run until --yes)",
|
|
110
112
|
" litcodex config migrate Migrate Codex config for LitCodex",
|
|
111
113
|
" litcodex config agentFile on|off Add or remove the LitFamily block in the global AGENTS.md",
|
|
112
114
|
" litcodex config attribution keep|off Ask the model not to add AI attribution to commits and PRs (a request, not a guarantee)",
|
|
@@ -214,6 +216,17 @@ export async function runCli(rawArgv) {
|
|
|
214
216
|
const { hudCommand } = await import("@litcodex/lit-loop/dist/hud-cli.js");
|
|
215
217
|
return hudCommand(rest.slice(1), { stdout: process.stdout, stderr: process.stderr, env: process.env });
|
|
216
218
|
}
|
|
219
|
+
if (head === "extensions") {
|
|
220
|
+
// Every write verb is a dry run until --yes; a global --dry-run wins over --yes.
|
|
221
|
+
const { runExtensionsCli } = await import("./install/extensions.js");
|
|
222
|
+
const args = rest.slice(1).filter((token) => !(dryRun && token === "--yes"));
|
|
223
|
+
return runExtensionsCli(args, {
|
|
224
|
+
stdout: process.stdout,
|
|
225
|
+
stderr: process.stderr,
|
|
226
|
+
env: process.env,
|
|
227
|
+
cwd: process.cwd(),
|
|
228
|
+
});
|
|
229
|
+
}
|
|
217
230
|
if (head === "statusline" && !isHelp) {
|
|
218
231
|
// Read-only and always exit 0, so a dry run is the real run.
|
|
219
232
|
const { statuslineCommand } = await import("@litcodex/lit-loop/dist/statusline.js");
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
export declare const EXTENSIONS_REPO_URL = "https://github.com/wjgoarxiv/wjgoarxiv-skills";
|
|
2
|
+
export declare const CLONE_PLACEHOLDER = "<path to your wjgoarxiv-skills clone>";
|
|
3
|
+
/**
|
|
4
|
+
* The four shell lines that install one extension's Codex edition, the same in every stub, README and this notice.
|
|
5
|
+
* Each line works alone in bash and zsh: a read-only check of every folder Codex 0.167 reads skills from (its own
|
|
6
|
+
* skills folder, ~/.agents/skills, and the project's .agents/skills and .codex/skills); a move-aside of an existing
|
|
7
|
+
* copy into extension-backups/, which Codex does not scan; a copy that refuses an occupied folder, so `cp -R` cannot
|
|
8
|
+
* nest; and a dot-file receipt inside the installed folder. Running them again is the update; the move-aside alone
|
|
9
|
+
* is the removal. Nothing is deleted.
|
|
10
|
+
*/
|
|
11
|
+
export declare function extensionInstallLines(id: string, clone?: string): readonly string[];
|
|
2
12
|
export interface ExtensionsNoticeInput {
|
|
3
13
|
/** The replaced payload's version on an upgrade; absent on a first install or a same-version repair. */
|
|
4
14
|
readonly previousVersion?: string;
|
|
5
15
|
/** Runtime and cache folders the earlier version left behind that still exist. */
|
|
6
16
|
readonly leftovers: readonly string[];
|
|
17
|
+
/** One line pointing at `litcodex extensions check` when the extension folders need a look. */
|
|
18
|
+
readonly checkLine?: string;
|
|
7
19
|
}
|
|
8
20
|
export declare function renderExtensionsNotice(input: ExtensionsNoticeInput): string;
|
|
9
21
|
/** The two runtime caches LitCodex 1.0.38 and earlier wrote; the extensions keep their own elsewhere. */
|
|
@@ -19,6 +31,7 @@ export interface AnnounceExtensionsOptions {
|
|
|
19
31
|
readonly json: boolean;
|
|
20
32
|
readonly write: (text: string) => void;
|
|
21
33
|
readonly exists?: (path: string) => boolean;
|
|
34
|
+
readonly checkLine?: string;
|
|
22
35
|
}
|
|
23
36
|
/**
|
|
24
37
|
* After a successful install: when the bundled payload was (re)placed, print the notice (not with --json) and leave
|
|
@@ -5,18 +5,37 @@ import { existsSync, mkdirSync, renameSync, writeFileSync } from "node:fs";
|
|
|
5
5
|
import { homedir } from "node:os";
|
|
6
6
|
import { dirname, join } from "node:path";
|
|
7
7
|
export const EXTENSIONS_REPO_URL = "https://github.com/wjgoarxiv/wjgoarxiv-skills";
|
|
8
|
+
export const CLONE_PLACEHOLDER = "<path to your wjgoarxiv-skills clone>";
|
|
8
9
|
const NOTICE_SCHEMA_VERSION = 1;
|
|
10
|
+
/**
|
|
11
|
+
* The four shell lines that install one extension's Codex edition, the same in every stub, README and this notice.
|
|
12
|
+
* Each line works alone in bash and zsh: a read-only check of every folder Codex 0.167 reads skills from (its own
|
|
13
|
+
* skills folder, ~/.agents/skills, and the project's .agents/skills and .codex/skills); a move-aside of an existing
|
|
14
|
+
* copy into extension-backups/, which Codex does not scan; a copy that refuses an occupied folder, so `cp -R` cannot
|
|
15
|
+
* nest; and a dot-file receipt inside the installed folder. Running them again is the update; the move-aside alone
|
|
16
|
+
* is the removal. Nothing is deleted.
|
|
17
|
+
*/
|
|
18
|
+
export function extensionInstallLines(id, clone = CLONE_PLACEHOLDER) {
|
|
19
|
+
const cx = `cx="\${CODEX_HOME:-$HOME/.codex}"; `;
|
|
20
|
+
const source = `${clone}/variants/litcodex/${id}`;
|
|
21
|
+
return [
|
|
22
|
+
`${cx}p="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"; for d in "$cx/skills" "$HOME/.agents/skills" "$p/.agents/skills" "$p/.codex/skills"; do [ -e "$d/${id}" ] && echo "found: $d/${id}"; done; echo "check done"`,
|
|
23
|
+
`${cx}if [ -e "$cx/skills/${id}" ]; then b="$cx/extension-backups/$(date +%Y%m%d-%H%M%S)"; mkdir -p "$b" && [ ! -e "$b/${id}" ] && mv "$cx/skills/${id}" "$b/${id}" && echo "moved aside: $b/${id}"; fi`,
|
|
24
|
+
`${cx}if [ -e "$cx/skills/${id}" ]; then echo "stopped: $cx/skills/${id} still exists"; else mkdir -p "$cx/skills" && cp -R "${source}" "$cx/skills/${id}"; fi`,
|
|
25
|
+
`${cx}[ -f "$cx/skills/${id}/SKILL.md" ] && printf '{"id":"${id}","source":"%s","variant":"litcodex","installed_at":"%s"}\\n' "${source}" "$(date -u +%Y-%m-%dT%H:%M:%SZ)" > "$cx/skills/${id}/.litfamily-extension.json"`,
|
|
26
|
+
];
|
|
27
|
+
}
|
|
9
28
|
export function renderExtensionsNotice(input) {
|
|
10
29
|
const lines = [
|
|
11
30
|
"LitFamily extensions",
|
|
12
31
|
"LitCodex carries the LitFamily core, which is complete and works on its own.",
|
|
13
|
-
`Nine skills that make files (decks, documents, figures, design and video covers) are now LitFamily extensions, kept in the extension shelf ${EXTENSIONS_REPO_URL}
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
`
|
|
17
|
-
` cp -R wjgoarxiv-skills/variants/litcodex/lit-docx "\${CODEX_HOME:-$HOME/.codex}/skills/lit-docx"`,
|
|
18
|
-
"Each extension's stub, such as $litcodex:lit-pptx, prints its own copy line.",
|
|
32
|
+
`Nine skills that make files (decks, documents, figures, design and video covers) are now LitFamily extensions, kept in the extension shelf ${EXTENSIONS_REPO_URL}. Install the ones you use alongside LitCodex to get the full LitFamily experience. LitCodex can install them for you; each command only shows its plan until you add --yes:`,
|
|
33
|
+
" litcodex extensions list",
|
|
34
|
+
" litcodex extensions install lit-docx --yes",
|
|
35
|
+
`It looks for same-name skills, moves an old copy aside to \${CODEX_HOME:-$HOME/.codex}/extension-backups/, copies, and leaves a receipt; \`litcodex extensions update --yes\` refreshes what you installed. Each extension's stub, such as $litcodex:lit-pptx, also prints the same steps as shell lines.`,
|
|
19
36
|
];
|
|
37
|
+
if (input.checkLine !== undefined)
|
|
38
|
+
lines.push(input.checkLine);
|
|
20
39
|
if (input.previousVersion !== undefined && input.leftovers.length > 0) {
|
|
21
40
|
lines.push(`LitCodex ${input.previousVersion} left its office and film runtimes in ${input.leftovers.join(" and ")}; you can delete them if you do not install those extensions.`);
|
|
22
41
|
}
|
|
@@ -41,6 +60,7 @@ export function announceExtensions(opts) {
|
|
|
41
60
|
const text = renderExtensionsNotice({
|
|
42
61
|
...(opts.payload.previousVersion === undefined ? {} : { previousVersion: opts.payload.previousVersion }),
|
|
43
62
|
leftovers: opts.payload.previousVersion === undefined ? [] : leftoverRuntimePaths(opts.env, opts.exists),
|
|
63
|
+
...(opts.checkLine === undefined ? {} : { checkLine: opts.checkLine }),
|
|
44
64
|
});
|
|
45
65
|
if (!opts.json)
|
|
46
66
|
opts.write(`\n${text}`);
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export declare const EXTENSION_FAMILIES: {
|
|
2
|
+
readonly decks: readonly ["lit-pptx"];
|
|
3
|
+
readonly documents: readonly ["lit-docx"];
|
|
4
|
+
readonly figures: readonly ["lit-diagram-drawer", "lit-schematic", "lit-scientific-visualization"];
|
|
5
|
+
readonly design: readonly ["frontend-ui-ux", "visual-qa"];
|
|
6
|
+
readonly "video-covers": readonly ["lit-typographic-motion", "readme-studio"];
|
|
7
|
+
};
|
|
8
|
+
export type FamilyName = keyof typeof EXTENSION_FAMILIES;
|
|
9
|
+
export declare const EXTENSION_IDS: readonly string[];
|
|
10
|
+
export declare const RECEIPT_NAME = ".litfamily-extension.json";
|
|
11
|
+
export interface GitResult {
|
|
12
|
+
readonly status: number | null;
|
|
13
|
+
readonly stderr: string;
|
|
14
|
+
readonly error?: Error;
|
|
15
|
+
}
|
|
16
|
+
export type GitRunner = (args: readonly string[]) => GitResult;
|
|
17
|
+
export interface ExtensionsDeps {
|
|
18
|
+
readonly now?: () => Date;
|
|
19
|
+
readonly git?: GitRunner;
|
|
20
|
+
/** The shelf's clone URL; tests point it at a local repository. */
|
|
21
|
+
readonly repoUrl?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface ExtensionsContext {
|
|
24
|
+
readonly env: NodeJS.ProcessEnv;
|
|
25
|
+
readonly cwd: string;
|
|
26
|
+
}
|
|
27
|
+
export interface ExtensionsIo extends ExtensionsContext {
|
|
28
|
+
readonly stdout: NodeJS.WritableStream;
|
|
29
|
+
readonly stderr: NodeJS.WritableStream;
|
|
30
|
+
}
|
|
31
|
+
interface Receipt {
|
|
32
|
+
readonly id: string;
|
|
33
|
+
readonly source: string;
|
|
34
|
+
readonly variant: string;
|
|
35
|
+
readonly installed_at: string;
|
|
36
|
+
readonly sha256?: string;
|
|
37
|
+
}
|
|
38
|
+
type State = "not-installed" | "installed" | "user-managed" | "not-a-folder";
|
|
39
|
+
export interface ListEntry {
|
|
40
|
+
readonly id: string;
|
|
41
|
+
readonly family: string;
|
|
42
|
+
readonly state: State;
|
|
43
|
+
readonly path: string;
|
|
44
|
+
readonly receipt?: Receipt;
|
|
45
|
+
/** Same-name skills in the other folders Codex reads, which it would list as well. */
|
|
46
|
+
readonly competing: readonly string[];
|
|
47
|
+
}
|
|
48
|
+
export interface Finding {
|
|
49
|
+
readonly kind: "competing" | "duplicate" | "nested" | "no-receipt" | "not-a-folder" | "source-missing" | "stale-notice" | "leftover-runtime";
|
|
50
|
+
readonly id?: string;
|
|
51
|
+
readonly path: string;
|
|
52
|
+
readonly message: string;
|
|
53
|
+
readonly fix: string;
|
|
54
|
+
}
|
|
55
|
+
export interface CheckReport {
|
|
56
|
+
readonly entries: readonly ListEntry[];
|
|
57
|
+
readonly findings: readonly Finding[];
|
|
58
|
+
readonly backups: {
|
|
59
|
+
readonly root: string;
|
|
60
|
+
readonly count: number;
|
|
61
|
+
readonly bytes: number;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
export declare function checkExtensions(ctx: ExtensionsContext): CheckReport;
|
|
65
|
+
/** The one line `litcodex doctor` prints. */
|
|
66
|
+
export declare function extensionsDoctorLine(ctx: ExtensionsContext): string;
|
|
67
|
+
/** One notice line for existing users, or undefined when check is clean. */
|
|
68
|
+
export declare function extensionsNoticeLine(ctx: ExtensionsContext): string | undefined;
|
|
69
|
+
/** sha256 over every file's relative path and bytes, leaving out the receipt. */
|
|
70
|
+
export declare function folderHash(dir: string): string;
|
|
71
|
+
export declare const EXTENSIONS_HELP_TEXT: string;
|
|
72
|
+
/** `litcodex extensions <verb> ...`; returns the exit code and never throws. */
|
|
73
|
+
export declare function runExtensionsCli(args: readonly string[], io: ExtensionsIo, deps?: ExtensionsDeps): number;
|
|
74
|
+
export {};
|