@m14i/sith 1.23.0 → 1.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +91 -16
- package/dist/commands/maintenance.d.ts +1 -0
- package/dist/commands/maintenance.d.ts.map +1 -1
- package/dist/commands/nix.d.ts.map +1 -1
- package/dist/index.js +35 -5
- package/docker/nix/shell.nix +5 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,6 +10,22 @@ Standardize and share your OpenCode setup with a fully dockerized environment, d
|
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
+
## Quick Start
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install -g @m14i/sith # Install CLI
|
|
17
|
+
sith --pull # Pull prebuilt Docker image
|
|
18
|
+
sith # Launch TUI
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
No Docker? Use native Nix:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
sith --nix-install && sith --nix
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
13
29
|
## Why?
|
|
14
30
|
|
|
15
31
|
AI coding tools are powerful in isolation. They become fragile at scale:
|
|
@@ -29,6 +45,33 @@ Sith solves this by packaging both tools, all config, and your team's context in
|
|
|
29
45
|
|
|
30
46
|
---
|
|
31
47
|
|
|
48
|
+
## How?
|
|
49
|
+
|
|
50
|
+
Three modes. Pick based on your trust model, infra constraints, and whether Docker is available. The Docker path is recommended for teams and CI — native Nix is for when you want no container overhead on a machine you control.
|
|
51
|
+
|
|
52
|
+
| | `sith --pull` | `sith --build` | `sith --nix` |
|
|
53
|
+
|---|---|---|---|
|
|
54
|
+
| **Setup time** | ~1 min (pull) | ~5–10 min (build) | ~2 min (first run) |
|
|
55
|
+
| **Reproducibility** | Pinned image digest | Dockerfile-pinned | Nix-pinned (`nixos-23.11`) |
|
|
56
|
+
| **Trust model** | GitHub Actions + Cosign | Your machine only | Your machine only |
|
|
57
|
+
| **SBOM included** | ✅ | ❌ | ❌ |
|
|
58
|
+
| **CI/CD ready** | ✅ drop-in | ⚠️ needs build step | ❌ |
|
|
59
|
+
| **Requires Docker** | ✅ | ✅ | ❌ |
|
|
60
|
+
| **Requires Nix** | ❌ | ❌ | ✅ |
|
|
61
|
+
| **Disk usage** | ~2–3 GB (image) | ~2–3 GB (image) | ~500 MB (store) |
|
|
62
|
+
| **Cold start** | ~1–2s (container spin-up) | ~1–2s (container spin-up) | ~200ms (native) |
|
|
63
|
+
| **Runtime overhead** | Low (Linux containers) | Low (Linux containers) | None |
|
|
64
|
+
| **File I/O (macOS)** | ⚠️ Slow (volume mounts) | ⚠️ Slow (volume mounts) | ✅ Native speed |
|
|
65
|
+
| **File I/O (Linux)** | ✅ Native speed | ✅ Native speed | ✅ Native speed |
|
|
66
|
+
| **Memory overhead** | ~50–100MB (Docker daemon) | ~50–100MB (Docker daemon) | None |
|
|
67
|
+
| **Works offline** | ✅ after pull | ✅ after build | ⚠️ after store populated |
|
|
68
|
+
| **macOS support** | ✅ (amd64 + arm64) | ✅ | ✅ |
|
|
69
|
+
| **Linux support** | ✅ | ✅ | ✅ |
|
|
70
|
+
| **Windows support** | ✅ Docker Desktop | ✅ Docker Desktop | ❌ |
|
|
71
|
+
| **Ideal for** | Teams, CI, daily use | Air-gapped, custom | Local dev, no Docker |
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
32
75
|
## Docker
|
|
33
76
|
|
|
34
77
|
The recommended path. One image, works locally and in CI.
|
|
@@ -61,7 +104,7 @@ Supports `linux/amd64` and `linux/arm64`. Images are signed with cosign and incl
|
|
|
61
104
|
cosign verify \
|
|
62
105
|
--certificate-identity-regexp="https://github.com/MerzoukeMansouri/sith" \
|
|
63
106
|
--certificate-oidc-issuer="https://token.actions.githubusercontent.com" \
|
|
64
|
-
ghcr.io/
|
|
107
|
+
ghcr.io/merzoukemansouri/sith:latest
|
|
65
108
|
```
|
|
66
109
|
|
|
67
110
|
**Build from scratch — full control, no external trust:**
|
|
@@ -70,12 +113,6 @@ cosign verify \
|
|
|
70
113
|
sith --build
|
|
71
114
|
```
|
|
72
115
|
|
|
73
|
-
| | `sith --pull` | `sith --build` |
|
|
74
|
-
|--|--------------|----------------|
|
|
75
|
-
| Speed | Fast | Slow |
|
|
76
|
-
| Trust | GitHub Actions + Cosign | Your machine |
|
|
77
|
-
| Use case | Daily use, CI/CD | Air-gapped, custom builds |
|
|
78
|
-
|
|
79
116
|
### Use it
|
|
80
117
|
|
|
81
118
|
**Interactive TUI** — type a prompt or use slash commands:
|
|
@@ -102,13 +139,7 @@ sith opencode -p "fix the bug" # OpenCode starts immediately with your task
|
|
|
102
139
|
sith claude -p "fix the bug" # Claude Code starts immediately with your task
|
|
103
140
|
```
|
|
104
141
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
```bash
|
|
108
|
-
sith skills # Install / manage skills from catalog (~/.sith/skills/)
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
### Cleanup & Uninstall
|
|
142
|
+
### Cleanup
|
|
112
143
|
|
|
113
144
|
```bash
|
|
114
145
|
sith --docker-cleanup # Remove sith Docker images (sith:latest + prebuilt GHCR image)
|
|
@@ -126,7 +157,7 @@ sith --uninstall # Remove ~/.sith/ (skills, config, nix files)
|
|
|
126
157
|
docker run --rm \
|
|
127
158
|
-e CLAUDE_CODE_OAUTH_TOKEN=$CLAUDE_CODE_OAUTH_TOKEN \
|
|
128
159
|
-e GITHUB_TOKEN=$GITHUB_TOKEN \
|
|
129
|
-
ghcr.io/
|
|
160
|
+
ghcr.io/merzoukemansouri/sith:latest "claude auth status"
|
|
130
161
|
```
|
|
131
162
|
|
|
132
163
|
See [Authentication](./doc/AUTH_CLAUDE.md) for how to generate the tokens.
|
|
@@ -149,9 +180,10 @@ sith nix --install # Install Nix
|
|
|
149
180
|
sith nix --shell # Run Nix shell
|
|
150
181
|
```
|
|
151
182
|
|
|
152
|
-
**
|
|
183
|
+
**Maintenance:**
|
|
153
184
|
|
|
154
185
|
```bash
|
|
186
|
+
sith --nix-update # Update Nix channels and upgrade installed packages
|
|
155
187
|
sith --nix-cleanup # Remove ~/.sith/nix/ + run nix-collect-garbage -d
|
|
156
188
|
sith --nix-uninstall # Fully remove Nix from system (daemon, /nix/store) — needs sudo
|
|
157
189
|
```
|
|
@@ -160,6 +192,24 @@ See [doc/NIX_INSTALLATION.md](./doc/NIX_INSTALLATION.md) for full setup guide.
|
|
|
160
192
|
|
|
161
193
|
---
|
|
162
194
|
|
|
195
|
+
## Skills
|
|
196
|
+
|
|
197
|
+
Skills are AI instruction sets installed to `~/.sith/skills/` and automatically mounted into the container at runtime. They shape how Claude Code and OpenCode behave — tone, workflow, shortcuts.
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
sith skills # Browse and install / uninstall skills from catalog
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Installed skills are synced to `~/.sith/CLAUDE.md` (Claude Code) and `~/.sith/opencode.json` (OpenCode) automatically.
|
|
204
|
+
|
|
205
|
+
| Skill | What it does | Auto-loaded |
|
|
206
|
+
|-------|-------------|-------------|
|
|
207
|
+
| `caveman` | Ultra-compressed responses (~75% token reduction) | ✅ |
|
|
208
|
+
|
|
209
|
+
Skills are loaded from `~/.sith/skills/<name>/` and can be toggled individually. Community skills can be installed from any Git URL.
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
163
213
|
## Authentication
|
|
164
214
|
|
|
165
215
|
Two AI providers, two token setups:
|
|
@@ -169,6 +219,31 @@ Two AI providers, two token setups:
|
|
|
169
219
|
|
|
170
220
|
---
|
|
171
221
|
|
|
222
|
+
## Command Reference
|
|
223
|
+
|
|
224
|
+
| Command / Flag | Description |
|
|
225
|
+
|---|---|
|
|
226
|
+
| `sith` | Launch interactive TUI |
|
|
227
|
+
| `sith shell` | Raw Nix shell inside Docker |
|
|
228
|
+
| `sith opencode -p "<prompt>"` | Launch OpenCode with prompt |
|
|
229
|
+
| `sith claude -p "<prompt>"` | Launch Claude Code with prompt |
|
|
230
|
+
| `sith skills` | Manage skills from catalog |
|
|
231
|
+
| `sith nix --install` | Install Nix package manager |
|
|
232
|
+
| `sith nix --shell` | Run Nix shell |
|
|
233
|
+
| `sith --pull` | Pull prebuilt Docker image from GHCR |
|
|
234
|
+
| `sith --build` | Build Docker image from scratch |
|
|
235
|
+
| `sith --it` | Interactive shell in Docker container |
|
|
236
|
+
| `sith --nix` | Launch native Nix shell (no Docker) |
|
|
237
|
+
| `sith --nix-install` | Install Nix package manager |
|
|
238
|
+
| `sith --nix-update` | Update Nix channels + upgrade packages |
|
|
239
|
+
| `sith --nix-cleanup` | Remove `~/.sith/nix/` + garbage collect store |
|
|
240
|
+
| `sith --nix-uninstall` | Fully remove Nix from system (needs sudo) |
|
|
241
|
+
| `sith --docker-cleanup` | Remove sith Docker images from local machine |
|
|
242
|
+
| `sith --uninstall` | Remove `~/.sith/` config directory |
|
|
243
|
+
| `sith --update` | Check for CLI updates |
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
172
247
|
## Development
|
|
173
248
|
|
|
174
249
|
```bash
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare function dockerCleanupCommand(): Promise<void>;
|
|
2
2
|
export declare function nixCleanupCommand(): Promise<void>;
|
|
3
|
+
export declare function nixUpdateCommand(): Promise<void>;
|
|
3
4
|
export declare function nixUninstallCommand(): Promise<void>;
|
|
4
5
|
export declare function uninstallCommand(): Promise<void>;
|
|
5
6
|
//# sourceMappingURL=maintenance.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"maintenance.d.ts","sourceRoot":"","sources":["file:///home/runner/work/sith/sith/src/commands/maintenance.ts"],"names":[],"mappings":"AAkBA,wBAAsB,oBAAoB,kBAwBzC;AAED,wBAAsB,iBAAiB,kBAqBtC;AAED,wBAAsB,mBAAmB,kBAmExC;AAED,wBAAsB,gBAAgB,kBAwBrC"}
|
|
1
|
+
{"version":3,"file":"maintenance.d.ts","sourceRoot":"","sources":["file:///home/runner/work/sith/sith/src/commands/maintenance.ts"],"names":[],"mappings":"AAkBA,wBAAsB,oBAAoB,kBAwBzC;AAED,wBAAsB,iBAAiB,kBAqBtC;AAED,wBAAsB,gBAAgB,kBAmBrC;AAED,wBAAsB,mBAAmB,kBAmExC;AAED,wBAAsB,gBAAgB,kBAwBrC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nix.d.ts","sourceRoot":"","sources":["file:///home/runner/work/sith/sith/src/commands/nix.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAsBrD,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAQ7D;AAED,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,OAAO,CAAC,CAO1D;AAED,wBAAsB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CA0ChD;AAED,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAuClD;AAED,wBAAsB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"nix.d.ts","sourceRoot":"","sources":["file:///home/runner/work/sith/sith/src/commands/nix.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAsBrD,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAQ7D;AAED,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,OAAO,CAAC,CAO1D;AAED,wBAAsB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CA0ChD;AAED,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAuClD;AAED,wBAAsB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CA8DjD;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAc1E"}
|
package/dist/index.js
CHANGED
|
@@ -43075,6 +43075,7 @@ __nccwpck_require__.d(__webpack_exports__, {
|
|
|
43075
43075
|
Yb: () => (/* binding */ dockerCleanupCommand),
|
|
43076
43076
|
V: () => (/* binding */ nixCleanupCommand),
|
|
43077
43077
|
be: () => (/* binding */ nixUninstallCommand),
|
|
43078
|
+
m9: () => (/* binding */ nixUpdateCommand),
|
|
43078
43079
|
Wd: () => (/* binding */ uninstallCommand)
|
|
43079
43080
|
});
|
|
43080
43081
|
|
|
@@ -43152,6 +43153,25 @@ async function nixCleanupCommand() {
|
|
|
43152
43153
|
console.log(source/* default */.Ay.yellow("nix-collect-garbage failed — Nix may not be installed."));
|
|
43153
43154
|
}
|
|
43154
43155
|
}
|
|
43156
|
+
async function nixUpdateCommand() {
|
|
43157
|
+
console.log(source/* default */.Ay.cyan("Updating Nix channels..."));
|
|
43158
|
+
try {
|
|
43159
|
+
(0,external_node_child_process_.execSync)("nix-channel --update", { stdio: "inherit" });
|
|
43160
|
+
console.log(source/* default */.Ay.green("✓ Channels updated."));
|
|
43161
|
+
}
|
|
43162
|
+
catch {
|
|
43163
|
+
console.log(source/* default */.Ay.yellow("nix-channel failed — Nix may not be installed."));
|
|
43164
|
+
return;
|
|
43165
|
+
}
|
|
43166
|
+
console.log(source/* default */.Ay.cyan("Upgrading Nix packages..."));
|
|
43167
|
+
try {
|
|
43168
|
+
(0,external_node_child_process_.execSync)("nix-env -u '*'", { stdio: "inherit" });
|
|
43169
|
+
console.log(source/* default */.Ay.green("✓ Packages upgraded."));
|
|
43170
|
+
}
|
|
43171
|
+
catch {
|
|
43172
|
+
console.log(source/* default */.Ay.yellow("nix-env upgrade failed — no user packages or error above."));
|
|
43173
|
+
}
|
|
43174
|
+
}
|
|
43155
43175
|
async function nixUninstallCommand() {
|
|
43156
43176
|
console.log(source/* default */.Ay.yellow("This will fully remove Nix from your system:"));
|
|
43157
43177
|
console.log(source/* default */.Ay.dim(" /nix/store, Nix daemon, shell profile entries"));
|
|
@@ -43351,13 +43371,11 @@ async function runNixShell() {
|
|
|
43351
43371
|
console.error("Run: sith --nix-install");
|
|
43352
43372
|
process.exit(1);
|
|
43353
43373
|
}
|
|
43354
|
-
//
|
|
43374
|
+
// Always copy to pick up source changes
|
|
43355
43375
|
const homeDir = node_os__WEBPACK_IMPORTED_MODULE_1___default().homedir();
|
|
43356
43376
|
const localConfigDir = node_path__WEBPACK_IMPORTED_MODULE_2___default().join(homeDir, _config_js__WEBPACK_IMPORTED_MODULE_4__/* .NIX_CONFIG */ .Z3.localConfigDir);
|
|
43357
43377
|
const shellNixPath = node_path__WEBPACK_IMPORTED_MODULE_2___default().join(localConfigDir, "shell.nix");
|
|
43358
|
-
|
|
43359
|
-
await copyNixFiles();
|
|
43360
|
-
}
|
|
43378
|
+
await copyNixFiles();
|
|
43361
43379
|
console.log("🚀 Starting Nix shell...");
|
|
43362
43380
|
console.log(`Configuration: ${shellNixPath}`);
|
|
43363
43381
|
console.log('Press Ctrl+D or type "exit" to leave');
|
|
@@ -43379,7 +43397,15 @@ async function runNixShell() {
|
|
|
43379
43397
|
}
|
|
43380
43398
|
// Run nix-shell
|
|
43381
43399
|
try {
|
|
43382
|
-
await (0,execa__WEBPACK_IMPORTED_MODULE_5__/* .execa */ .Ho)("nix-shell", [
|
|
43400
|
+
await (0,execa__WEBPACK_IMPORTED_MODULE_5__/* .execa */ .Ho)("nix-shell", [
|
|
43401
|
+
"--option",
|
|
43402
|
+
"substituters",
|
|
43403
|
+
"https://cache.nixos.org",
|
|
43404
|
+
"--option",
|
|
43405
|
+
"trusted-public-keys",
|
|
43406
|
+
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=",
|
|
43407
|
+
shellNixPath,
|
|
43408
|
+
], {
|
|
43383
43409
|
stdio: "inherit",
|
|
43384
43410
|
env,
|
|
43385
43411
|
cwd: process.cwd(),
|
|
@@ -44110,6 +44136,7 @@ function createProgram() {
|
|
|
44110
44136
|
.option("--update", "Check for updates")
|
|
44111
44137
|
.option("--docker-cleanup", "Remove sith Docker images from local machine")
|
|
44112
44138
|
.option("--nix-cleanup", "Remove ~/.sith/nix and run nix-collect-garbage")
|
|
44139
|
+
.option("--nix-update", "Update Nix channels and upgrade installed packages")
|
|
44113
44140
|
.option("--nix-uninstall", "Fully remove Nix from the system (daemon, /nix/store)")
|
|
44114
44141
|
.option("--uninstall", "Remove ~/.sith config directory");
|
|
44115
44142
|
// Default action - show terminal UI
|
|
@@ -44120,6 +44147,9 @@ function createProgram() {
|
|
|
44120
44147
|
else if (options.nixCleanup) {
|
|
44121
44148
|
await (0,_commands_maintenance_js__WEBPACK_IMPORTED_MODULE_5__/* .nixCleanupCommand */ .V)();
|
|
44122
44149
|
}
|
|
44150
|
+
else if (options.nixUpdate) {
|
|
44151
|
+
await (0,_commands_maintenance_js__WEBPACK_IMPORTED_MODULE_5__/* .nixUpdateCommand */ .m9)();
|
|
44152
|
+
}
|
|
44123
44153
|
else if (options.nixUninstall) {
|
|
44124
44154
|
await (0,_commands_maintenance_js__WEBPACK_IMPORTED_MODULE_5__/* .nixUninstallCommand */ .be)();
|
|
44125
44155
|
}
|
package/docker/nix/shell.nix
CHANGED
|
@@ -15,14 +15,15 @@
|
|
|
15
15
|
let
|
|
16
16
|
# Load packages from external configuration
|
|
17
17
|
packages = import ./nix-config/packages.nix { inherit pkgs; lib = pkgs.lib; };
|
|
18
|
+
isLinux = pkgs.stdenv.isLinux;
|
|
18
19
|
in
|
|
19
20
|
|
|
20
21
|
pkgs.mkShell {
|
|
21
22
|
name = "sith-environment";
|
|
22
|
-
|
|
23
|
+
|
|
23
24
|
# Packages loaded from nix-config/packages.json
|
|
24
25
|
buildInputs = packages;
|
|
25
|
-
|
|
26
|
+
|
|
26
27
|
# Variables d'environnement
|
|
27
28
|
shellHook = ''
|
|
28
29
|
# Source external setup script (not bash, so exports persist)
|
|
@@ -34,9 +35,9 @@ pkgs.mkShell {
|
|
|
34
35
|
# setup.sh sets -e for safety; unset for interactive session
|
|
35
36
|
set +e
|
|
36
37
|
'';
|
|
37
|
-
|
|
38
|
+
|
|
38
39
|
# Variables d'environnement persistantes
|
|
39
|
-
LOCALE_ARCHIVE = "${pkgs.glibcLocales}/lib/locale/locale-archive";
|
|
40
|
+
LOCALE_ARCHIVE = pkgs.lib.optionalString isLinux "${pkgs.glibcLocales}/lib/locale/locale-archive";
|
|
40
41
|
LANG = "en_US.UTF-8";
|
|
41
42
|
LC_ALL = "en_US.UTF-8";
|
|
42
43
|
LC_CTYPE = "en_US.UTF-8";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m14i/sith",
|
|
3
|
-
"version": "1.23.
|
|
3
|
+
"version": "1.23.1",
|
|
4
4
|
"description": "Turn your context to the dark side. Standardize and share your OpenCode setup with a fully dockerized environment, designed for seamless collaboration and CI integration.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|