si-overnight 0.1.1 → 0.1.2
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 +23 -16
- package/bin/si-overnight.mjs +2 -45
- package/{README.tr.md → docs/tr/README.md} +27 -5
- package/lib/cli.mjs +145 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# si-overnight
|
|
2
2
|
|
|
3
|
-
**English** · [Türkçe](https://github.com/siguelabs/si/blob/main/README.
|
|
3
|
+
**English** · [Türkçe](https://github.com/siguelabs/si/blob/main/docs/tr/README.md)
|
|
4
4
|
|
|
5
5
|
Give your coding agent a clear plan before you sleep. `si-overnight` helps it
|
|
6
6
|
finish agreed work, test the changes, save checkpoints, and leave a morning report.
|
|
@@ -20,19 +20,23 @@ workers are optional and require host support.*
|
|
|
20
20
|
|
|
21
21
|
## Quick start
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
Install [Node.js](https://nodejs.org/en/download) **20 or newer**, then run this
|
|
24
|
+
one command in your terminal:
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
|
|
28
|
-
cd si
|
|
29
|
-
node bin/si-overnight.mjs --platform codex --project /absolute/path/to/project
|
|
27
|
+
npx si-overnight
|
|
30
28
|
```
|
|
31
29
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
The guided installer walks you through the rest:
|
|
31
|
+
|
|
32
|
+
1. Choose **Codex**, **Claude Code**, **Antigravity**, **pi**, or **All**.
|
|
33
|
+
2. Choose **All projects** (recommended) or **Current project**.
|
|
34
|
+
3. Open your coding agent's chat and run the skill command printed by the installer.
|
|
35
|
+
|
|
36
|
+
No repository clone, Python, or CLI flags are required. All projects installs the
|
|
37
|
+
skill in your user directory so you can use it across projects. Current project
|
|
38
|
+
installs it in the directory where you ran the command. You can also spell the
|
|
39
|
+
installer command as `npx si-overnight install`.
|
|
36
40
|
|
|
37
41
|
For example, in Codex:
|
|
38
42
|
|
|
@@ -47,9 +51,9 @@ Replace the tasks and deadline with your own. The agent inspects the project and
|
|
|
47
51
|
collects the missing decisions before implementation starts. A bare invocation
|
|
48
52
|
starts intake; it does not authorize an unspecified night of changes.
|
|
49
53
|
|
|
50
|
-
###
|
|
54
|
+
### Scripted and source installation
|
|
51
55
|
|
|
52
|
-
|
|
56
|
+
For automation, choose the host and scope explicitly:
|
|
53
57
|
|
|
54
58
|
```bash
|
|
55
59
|
npx --yes si-overnight --platform all --project /absolute/path/to/project
|
|
@@ -60,7 +64,7 @@ To try the current package without a registry release, run from this repository:
|
|
|
60
64
|
|
|
61
65
|
```bash
|
|
62
66
|
npm pack --ignore-scripts
|
|
63
|
-
npm exec --yes --package ./si-overnight-0.1.
|
|
67
|
+
npm exec --yes --package ./si-overnight-0.1.2.tgz -- si-overnight --platform codex --project /absolute/path/to/project
|
|
64
68
|
```
|
|
65
69
|
|
|
66
70
|
Installing the npm package, including globally, only makes the installer command
|
|
@@ -167,12 +171,15 @@ node bin/si-overnight.mjs --help
|
|
|
167
171
|
|
|
168
172
|
| Option | Behavior |
|
|
169
173
|
| --- | --- |
|
|
170
|
-
| `--platform <name>` |
|
|
171
|
-
| `--scope <scope>` | `project
|
|
174
|
+
| `--platform <name>` | For scripted installation: `codex`, `claude`, `antigravity`, `pi`, or `all`; repeatable. |
|
|
175
|
+
| `--scope <scope>` | Explicit flags default to `project`; guided setup recommends `user` (All projects). |
|
|
172
176
|
| `--project <path>` | Existing project directory; defaults to the current directory. Used for project scope. |
|
|
173
177
|
| `--dry-run` | Validate and show destinations without writing files. |
|
|
174
178
|
| `--help`, `-h` | Show CLI help. |
|
|
175
179
|
|
|
180
|
+
Guided setup needs an interactive terminal. In CI or scripts, pass `--platform`
|
|
181
|
+
and the desired `--scope` explicitly.
|
|
182
|
+
|
|
176
183
|
The installer leaves identical installations untouched and refuses to overwrite
|
|
177
184
|
different content. To update, review and move the existing skill directory, then
|
|
178
185
|
install again. It checks all destinations before writing, rejects symbolic links
|
|
@@ -246,7 +253,7 @@ for 14 days. No dependency installation or lockfile is needed.
|
|
|
246
253
|
|
|
247
254
|
### npm releases
|
|
248
255
|
|
|
249
|
-
A stable tag such as `v0.1.
|
|
256
|
+
A stable tag such as `v0.1.2` must match `package.json`. `release.yml` reruns CI,
|
|
250
257
|
verifies the artifact's checksum, and publishes that same tarball with public
|
|
251
258
|
access and provenance. Prerelease tags are rejected. Only the publish job gets
|
|
252
259
|
OIDC permission; it uses Node.js 24 and checks for npm 11.5.1 or newer. Actions
|
package/bin/si-overnight.mjs
CHANGED
|
@@ -1,48 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { installSkill } from '../lib/install.mjs';
|
|
3
|
+
import { runCli } from '../lib/cli.mjs';
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Install the si-overnight skill. No agent process or background job is started.
|
|
9
|
-
|
|
10
|
-
Options:
|
|
11
|
-
--platform <name> codex, claude, antigravity, pi, or all (repeatable)
|
|
12
|
-
--scope <scope> project (default) or user
|
|
13
|
-
--project <path> Existing target project directory (default: current directory)
|
|
14
|
-
--dry-run Show destinations without writing files
|
|
15
|
-
--help, -h Show this help
|
|
16
|
-
|
|
17
|
-
Examples:
|
|
18
|
-
si-overnight --platform all --project /path/to/project
|
|
19
|
-
si-overnight --platform codex --scope user
|
|
20
|
-
si-overnight --platform claude --platform pi --dry-run
|
|
21
|
-
`;
|
|
22
|
-
|
|
23
|
-
try {
|
|
24
|
-
const { values } = parseArgs({
|
|
25
|
-
options: {
|
|
26
|
-
platform: { type: 'string', multiple: true },
|
|
27
|
-
scope: { type: 'string', default: 'project' },
|
|
28
|
-
project: { type: 'string' },
|
|
29
|
-
'dry-run': { type: 'boolean', default: false },
|
|
30
|
-
help: { type: 'boolean', short: 'h' },
|
|
31
|
-
},
|
|
32
|
-
strict: true,
|
|
33
|
-
allowPositionals: false,
|
|
34
|
-
});
|
|
35
|
-
if (values.help) {
|
|
36
|
-
process.stdout.write(help);
|
|
37
|
-
} else {
|
|
38
|
-
installSkill({
|
|
39
|
-
platforms: values.platform,
|
|
40
|
-
scope: values.scope,
|
|
41
|
-
project: values.project,
|
|
42
|
-
dryRun: values['dry-run'],
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
} catch (error) {
|
|
46
|
-
console.error(`Install failed: ${error.message}`);
|
|
47
|
-
process.exitCode = 1;
|
|
48
|
-
}
|
|
5
|
+
process.exitCode = await runCli(process.argv.slice(2));
|
|
@@ -15,8 +15,27 @@ Codex, Claude Code, Google Antigravity ve pi için kurulum aracı içerir.
|
|
|
15
15
|
|
|
16
16
|
## Hızlı başlangıç
|
|
17
17
|
|
|
18
|
-
Node.js **20 veya
|
|
19
|
-
|
|
18
|
+
Önce [Node.js](https://nodejs.org/en/download) **20 veya üzerini** kur. Ardından
|
|
19
|
+
terminalde tek komut çalıştır:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx si-overnight
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Kurulum geri kalan adımlarda sana rehberlik eder:
|
|
26
|
+
|
|
27
|
+
1. **Codex**, **Claude Code**, **Antigravity**, **pi** veya **All** seç.
|
|
28
|
+
2. **All projects** (önerilen) ya da **Current project** seç.
|
|
29
|
+
3. Coding agent'ının sohbetini açıp kurucunun gösterdiği skill komutunu yaz.
|
|
30
|
+
|
|
31
|
+
Repo klonlaman, Python kurman veya CLI bayraklarını bilmen gerekmez. All projects
|
|
32
|
+
skill'i kullanıcı dizinine kurar ve farklı projelerde kullanmanı sağlar. Current
|
|
33
|
+
project komutu çalıştırdığın dizine kurar. Aynı akışı `npx si-overnight install`
|
|
34
|
+
ile de başlatabilirsin.
|
|
35
|
+
|
|
36
|
+
### Betiklerden veya kaynak koddan kurulum
|
|
37
|
+
|
|
38
|
+
Otomasyonda platform ve kapsamı açıkça seç. Bu deponun kök dizininde:
|
|
20
39
|
|
|
21
40
|
```bash
|
|
22
41
|
# Önce kurulum hedeflerini gör.
|
|
@@ -181,12 +200,15 @@ Goal, zamanlanmış görev veya arka plan runner'ı oluşturmaz.
|
|
|
181
200
|
|
|
182
201
|
| Seçenek | Değer / davranış |
|
|
183
202
|
| --- | --- |
|
|
184
|
-
| `--platform` | `codex`, `claude`, `antigravity`, `pi` veya `all`;
|
|
185
|
-
| `--scope` | `project` (
|
|
203
|
+
| `--platform` | Betik kurulumunda `codex`, `claude`, `antigravity`, `pi` veya `all`; tekrarlanabilir. |
|
|
204
|
+
| `--scope` | Bayraklı kurulumda varsayılan `project`; rehberli kurulum `user` (All projects) önerir. |
|
|
186
205
|
| `--project` | Mevcut proje dizini; varsayılan geçerli dizin. Kullanıcı kapsamını değiştirmez. |
|
|
187
206
|
| `--dry-run` | Hedefleri gösterir, dosya yazmaz. |
|
|
188
207
|
| `--help` | Yardımı gösterir. |
|
|
189
208
|
|
|
209
|
+
Rehberli kurulum etkileşimli terminal gerektirir. CI veya betiklerde `--platform`
|
|
210
|
+
ve istediğin `--scope` değerini açıkça ver.
|
|
211
|
+
|
|
190
212
|
Npm CLI'sinde birden fazla platform için bayrağı tekrarla:
|
|
191
213
|
|
|
192
214
|
```bash
|
|
@@ -240,7 +262,7 @@ Yayın işi Node.js 24 ve npm ≥11.5.1 kullanır/kontrol eder.
|
|
|
240
262
|
Kod yapısı: `skills/si-overnight/` ortak çalışma talimatlarını, `bin/` ve `lib/`
|
|
241
263
|
Node kurucusunu, `scripts/install.py` Python alternatifini, `tests/` kontrolleri,
|
|
242
264
|
`.github/` CI ve release akışlarını içerir. Platformlara ilişkin resmi kaynaklar
|
|
243
|
-
[uyumluluk notlarında](skills/si-overnight/references/platforms.md) bulunur.
|
|
265
|
+
[uyumluluk notlarında](../../skills/si-overnight/references/platforms.md) bulunur.
|
|
244
266
|
|
|
245
267
|
Katkı yaparken kurucu değişikliklerini ilgili testlerle doğrula; çalışma akışı
|
|
246
268
|
değişikliklerinde iki dildeki README'yi birlikte güncelle. Paket şu anda
|
package/lib/cli.mjs
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { createInterface } from 'node:readline';
|
|
2
|
+
import { parseArgs } from 'node:util';
|
|
3
|
+
import { installationTargets, installSkill } from './install.mjs';
|
|
4
|
+
|
|
5
|
+
const HOSTS = [
|
|
6
|
+
{ name: 'codex', label: 'Codex', command: '$si-overnight' },
|
|
7
|
+
{ name: 'claude', label: 'Claude Code', command: '/si-overnight' },
|
|
8
|
+
{ name: 'antigravity', label: 'Antigravity', command: '/si-overnight' },
|
|
9
|
+
{ name: 'pi', label: 'pi', command: '/skill:si-overnight' },
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
const help = `Usage: npx si-overnight [install] [options]
|
|
13
|
+
|
|
14
|
+
Run without options for guided setup. Choose your coding agent, then install for
|
|
15
|
+
all projects in your user account (default) or just the current project.
|
|
16
|
+
Installation does not start an agent or a background job.
|
|
17
|
+
|
|
18
|
+
Options (skip guided setup):
|
|
19
|
+
--platform <name> codex, claude, antigravity, pi, or all (repeatable; required)
|
|
20
|
+
--scope <scope> project (default with options) or user
|
|
21
|
+
--project <path> Existing target project directory (default: current directory)
|
|
22
|
+
--dry-run Show destinations without writing files
|
|
23
|
+
--help, -h Show this help
|
|
24
|
+
|
|
25
|
+
Examples:
|
|
26
|
+
npx si-overnight
|
|
27
|
+
npx si-overnight install
|
|
28
|
+
npx si-overnight --platform all --scope user
|
|
29
|
+
npx si-overnight --platform codex --project /path/to/project
|
|
30
|
+
npx si-overnight --platform claude --platform pi --dry-run
|
|
31
|
+
`;
|
|
32
|
+
|
|
33
|
+
function invocationGuidance(output, platforms) {
|
|
34
|
+
output.write('\nReady. Open or restart your coding agent in your project, then enter:\n');
|
|
35
|
+
for (const host of HOSTS) {
|
|
36
|
+
if (platforms.includes('all') || platforms.includes(host.name)) {
|
|
37
|
+
output.write(` ${host.label}: ${host.command}\n`);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function hostChoice(answer) {
|
|
43
|
+
const choices = new Map(HOSTS.flatMap((host, index) => [
|
|
44
|
+
[String(index + 1), host.name], [host.name, host.name], [host.label.toLowerCase(), host.name],
|
|
45
|
+
]));
|
|
46
|
+
choices.set('5', 'all');
|
|
47
|
+
choices.set('all', 'all');
|
|
48
|
+
return choices.get(answer);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
async function guidedOptions({ input, promptOutput, project, userHome }) {
|
|
52
|
+
// RTK and other command wrappers can pipe stdout while stdin remains a terminal.
|
|
53
|
+
if (!input.isTTY || input.readableEnded || input.destroyed) {
|
|
54
|
+
throw new Error('Guided setup needs an interactive terminal. Run npx si-overnight in your terminal, or use: npx si-overnight --platform all --scope user');
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const lines = createInterface({
|
|
58
|
+
input, output: promptOutput, terminal: Boolean(promptOutput.isTTY), crlfDelay: Infinity,
|
|
59
|
+
});
|
|
60
|
+
// Attach the iterator before prompting so pasted answers cannot be lost.
|
|
61
|
+
const answers = lines[Symbol.asyncIterator]();
|
|
62
|
+
let closed = false;
|
|
63
|
+
lines.once('close', () => { closed = true; });
|
|
64
|
+
lines.once('SIGINT', () => lines.close());
|
|
65
|
+
const question = async (prompt) => {
|
|
66
|
+
promptOutput.write(prompt);
|
|
67
|
+
const answer = await answers.next();
|
|
68
|
+
if (answer.done || closed) return undefined;
|
|
69
|
+
const value = answer.value.trim().toLowerCase();
|
|
70
|
+
return ['q', 'quit', 'cancel', 'exit', '\u0003'].includes(value) ? undefined : value;
|
|
71
|
+
};
|
|
72
|
+
const cancel = () => {
|
|
73
|
+
promptOutput.write('\nSetup cancelled. No files were written.\n');
|
|
74
|
+
return undefined;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
try {
|
|
78
|
+
promptOutput.write('si-overnight setup\n\nChoose your coding agent:\n');
|
|
79
|
+
HOSTS.forEach((host, index) => promptOutput.write(` ${index + 1}. ${host.label}\n`));
|
|
80
|
+
promptOutput.write(' 5. All\n');
|
|
81
|
+
const host = await question('Choose 1-5 (or q to cancel): ');
|
|
82
|
+
if (host === undefined || host === '') return cancel();
|
|
83
|
+
const platform = hostChoice(host);
|
|
84
|
+
if (!platform) throw new Error('Invalid coding agent. Choose 1-5 or a listed name. No files were written.');
|
|
85
|
+
|
|
86
|
+
promptOutput.write('\nWhere should the skill be available?\n 1. All projects (your user account; default)\n');
|
|
87
|
+
promptOutput.write(` 2. Current project (${project})\n`);
|
|
88
|
+
const scopeAnswer = await question('Choose 1-2 [1] (or q to cancel): ');
|
|
89
|
+
if (scopeAnswer === undefined) return cancel();
|
|
90
|
+
let scope;
|
|
91
|
+
if (['', '1', 'user', 'all', 'all projects'].includes(scopeAnswer)) scope = 'user';
|
|
92
|
+
if (['2', 'project', 'current', 'current project'].includes(scopeAnswer)) scope = 'project';
|
|
93
|
+
if (!scope) throw new Error('Invalid install location. Choose 1 or 2. No files were written.');
|
|
94
|
+
|
|
95
|
+
const options = { platforms: [platform], scope, project, userHome };
|
|
96
|
+
const { destinations } = installationTargets(options);
|
|
97
|
+
promptOutput.write('\nInstall locations:\n');
|
|
98
|
+
for (const destination of destinations) promptOutput.write(` ${destination}\n`);
|
|
99
|
+
promptOutput.write('\nInstalling...\n');
|
|
100
|
+
return options;
|
|
101
|
+
} finally {
|
|
102
|
+
lines.close();
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export async function runCli(args, {
|
|
107
|
+
input = process.stdin, output = process.stdout, error = process.stderr,
|
|
108
|
+
project = process.cwd(), userHome,
|
|
109
|
+
} = {}) {
|
|
110
|
+
try {
|
|
111
|
+
const optionsArgs = args[0] === 'install' ? args.slice(1) : args;
|
|
112
|
+
let options;
|
|
113
|
+
if (optionsArgs.length === 0) {
|
|
114
|
+
options = await guidedOptions({ input, promptOutput: error, project, userHome });
|
|
115
|
+
if (!options) return 0;
|
|
116
|
+
} else {
|
|
117
|
+
const { values } = parseArgs({
|
|
118
|
+
args: optionsArgs,
|
|
119
|
+
options: {
|
|
120
|
+
platform: { type: 'string', multiple: true },
|
|
121
|
+
scope: { type: 'string', default: 'project' },
|
|
122
|
+
project: { type: 'string' },
|
|
123
|
+
'dry-run': { type: 'boolean', default: false },
|
|
124
|
+
help: { type: 'boolean', short: 'h' },
|
|
125
|
+
},
|
|
126
|
+
strict: true,
|
|
127
|
+
allowPositionals: false,
|
|
128
|
+
});
|
|
129
|
+
if (values.help) {
|
|
130
|
+
output.write(help);
|
|
131
|
+
return 0;
|
|
132
|
+
}
|
|
133
|
+
options = {
|
|
134
|
+
platforms: values.platform, scope: values.scope, project: values.project ?? project,
|
|
135
|
+
userHome, dryRun: values['dry-run'],
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
installSkill({ ...options, log: (message) => output.write(`${message}\n`) });
|
|
139
|
+
if (!options.dryRun) invocationGuidance(output, options.platforms);
|
|
140
|
+
return 0;
|
|
141
|
+
} catch (cause) {
|
|
142
|
+
error.write(`Install failed: ${cause.message}\n`);
|
|
143
|
+
return 1;
|
|
144
|
+
}
|
|
145
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "si-overnight",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Install a portable overnight coding workflow for Codex, Claude Code, Antigravity, and pi.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"lib/",
|
|
16
16
|
"skills/si-overnight/",
|
|
17
17
|
"README.md",
|
|
18
|
-
"README.
|
|
18
|
+
"docs/tr/README.md",
|
|
19
19
|
"docs/assets/overnight-workflow.gif"
|
|
20
20
|
],
|
|
21
21
|
"engines": {
|