forkit-connect 0.1.29 → 0.1.31
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/QUICKSTART.md +6 -10
- package/README.md +5 -3
- package/dist/cli.js +150 -26
- package/package.json +1 -1
package/QUICKSTART.md
CHANGED
|
@@ -20,28 +20,24 @@ export PATH="$HOME/.local/bin:$PATH"
|
|
|
20
20
|
## Recommended First Run
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
|
-
forkit-connect init
|
|
24
23
|
forkit-connect login
|
|
25
|
-
forkit-connect workspace
|
|
26
|
-
forkit-connect runtime register
|
|
24
|
+
forkit-connect workspace status
|
|
27
25
|
forkit-connect scan
|
|
28
26
|
forkit-connect inbox
|
|
29
|
-
forkit-connect
|
|
27
|
+
forkit-connect runtime status
|
|
30
28
|
forkit-connect status
|
|
31
|
-
forkit-connect start
|
|
32
29
|
```
|
|
33
30
|
|
|
34
31
|
## What Each Step Does
|
|
35
32
|
|
|
36
|
-
- `init` creates local Connect identity and privacy posture metadata.
|
|
37
33
|
- `login` completes the device-login flow against Forkit.dev.
|
|
38
|
-
- `workspace
|
|
39
|
-
- `runtime register` creates or reuses a governed runtime for the current repo/worktree and stores its runtime key locally.
|
|
34
|
+
- `workspace status` shows whether this account already has governed workspace/project scope.
|
|
40
35
|
- `scan` detects supported local runtimes and AI models.
|
|
41
36
|
- `inbox` shows what is ready to connect, what needs confirmation, and what is already connected.
|
|
42
|
-
- `
|
|
37
|
+
- `runtime status` shows runtime connection and signal posture.
|
|
43
38
|
- `status` summarizes readiness, daemon state, discovery counts, and next recommended action.
|
|
44
|
-
|
|
39
|
+
|
|
40
|
+
Advanced users can run `forkit-connect init` when they explicitly want to prepare or reset local identity and privacy posture before login.
|
|
45
41
|
|
|
46
42
|
## Useful Next Commands
|
|
47
43
|
|
package/README.md
CHANGED
|
@@ -31,7 +31,9 @@ Published npm install:
|
|
|
31
31
|
```bash
|
|
32
32
|
npx forkit-connect --help
|
|
33
33
|
npm install -g forkit-connect
|
|
34
|
-
forkit-connect
|
|
34
|
+
forkit-connect login
|
|
35
|
+
forkit-connect scan
|
|
36
|
+
forkit-connect inbox
|
|
35
37
|
```
|
|
36
38
|
|
|
37
39
|
From `integrations/connect`:
|
|
@@ -57,8 +59,8 @@ If `~/.local/bin` is already on your `PATH`, the command is immediately accessib
|
|
|
57
59
|
|
|
58
60
|
## Public Commands
|
|
59
61
|
|
|
60
|
-
- `forkit-connect init` — initialize local Connect identity and privacy posture
|
|
61
62
|
- `forkit-connect login` — link this device to Forkit.dev with the device flow
|
|
63
|
+
- `forkit-connect init` — optional advanced local identity and privacy posture setup
|
|
62
64
|
- `forkit-connect scan` — discover local runtimes and AI models
|
|
63
65
|
- `forkit-connect inbox` — review the Smart Registration Inbox
|
|
64
66
|
- `forkit-connect connect <modelNameOrDiscoveryHash>` — prepare or sync a passport draft for a detected model
|
|
@@ -125,7 +127,7 @@ npm install /absolute/path/to/forkit-connect-0.1.24.tgz
|
|
|
125
127
|
npx forkit-connect --help
|
|
126
128
|
npx forkit-connect status
|
|
127
129
|
npx forkit-connect inbox
|
|
128
|
-
npx forkit-connect
|
|
130
|
+
npx forkit-connect login
|
|
129
131
|
```
|
|
130
132
|
|
|
131
133
|
For a user-space Ubuntu install that creates a stable command path, prefer `pnpm run install:ubuntu`.
|
package/dist/cli.js
CHANGED
|
@@ -94,6 +94,19 @@ const PUBLIC_COMMANDS = [
|
|
|
94
94
|
['ignore', 'Deny one detected local model on this device'],
|
|
95
95
|
['doctor', 'Run local environment diagnostics'],
|
|
96
96
|
];
|
|
97
|
+
const START_HERE_COMMANDS = [
|
|
98
|
+
['forkit-connect login', 'Pair this machine with your Forkit.dev account'],
|
|
99
|
+
['forkit-connect workspace status', 'Confirm the active workspace and project scope'],
|
|
100
|
+
['forkit-connect scan', 'Find local models, agents, and runtimes'],
|
|
101
|
+
['forkit-connect inbox', 'Review what should become a Passport'],
|
|
102
|
+
['forkit-connect runtime status', 'Check runtime connection and signal posture'],
|
|
103
|
+
];
|
|
104
|
+
const EVERYDAY_COMMANDS = [
|
|
105
|
+
['forkit-connect status', 'One-line account, device, queue, and scope health'],
|
|
106
|
+
['forkit-connect start', 'Open the guided local launcher'],
|
|
107
|
+
['forkit-connect sync', 'Flush queued metadata and lifecycle evidence'],
|
|
108
|
+
['forkit-connect doctor', 'Diagnose local setup issues'],
|
|
109
|
+
];
|
|
97
110
|
const ADVANCED_COMMAND_GROUPS = [
|
|
98
111
|
['connect', 'Model connection, runtime review, and handoff utilities'],
|
|
99
112
|
['runtime', 'Repo-scoped runtime observation and journaling utilities'],
|
|
@@ -118,28 +131,32 @@ const ADVANCED_COMMAND_GROUPS = [
|
|
|
118
131
|
['notify', 'Notification preview and delivery controls'],
|
|
119
132
|
];
|
|
120
133
|
function usage() {
|
|
121
|
-
printCliHeader('CLI', '
|
|
122
|
-
console.log(cliKeyLine('
|
|
123
|
-
console.log(cliKeyLine('
|
|
124
|
-
console.log(cliKeyLine('
|
|
125
|
-
printCliSection('
|
|
126
|
-
for (const [command, description] of
|
|
127
|
-
console.log(
|
|
134
|
+
printCliHeader('CLI', 'Local AI runtime passporting without copying model data.');
|
|
135
|
+
console.log(cliKeyLine('best first run', 'forkit-connect login'));
|
|
136
|
+
console.log(cliKeyLine('privacy model', 'metadata only; secrets stay local'));
|
|
137
|
+
console.log(cliKeyLine('advanced map', 'forkit-connect --advanced-help'));
|
|
138
|
+
printCliSection('Start Here');
|
|
139
|
+
for (const [command, description] of START_HERE_COMMANDS) {
|
|
140
|
+
console.log(cliCommandLine(command, description));
|
|
141
|
+
}
|
|
142
|
+
printCliSection('Daily Ops');
|
|
143
|
+
for (const [command, description] of EVERYDAY_COMMANDS) {
|
|
144
|
+
console.log(cliCommandLine(command, description));
|
|
128
145
|
}
|
|
129
146
|
printCliSection('Flags');
|
|
130
147
|
console.log(cliKeyLine('--json', 'Machine-readable output when supported'));
|
|
131
148
|
console.log(cliKeyLine('--version', 'Print the Forkit Connect CLI version'));
|
|
132
|
-
console.log(cliKeyLine('--all-ready', 'Register every ready local model in the current scope'));
|
|
133
|
-
console.log(cliKeyLine('--model', 'Model name used by register'));
|
|
134
|
-
console.log(cliKeyLine('--entrypoint', 'Relative project path used by runtime register'));
|
|
135
149
|
console.log(cliKeyLine('--dry-run', 'Show inferred runtime payload without creating it'));
|
|
136
|
-
console.log(cliKeyLine('--no-browser', 'Do not auto-open browser verification during login'));
|
|
137
150
|
console.log(cliKeyLine('--plain', 'Disable the interactive terminal table surface'));
|
|
138
|
-
console.log(cliKeyLine('--advanced-help', 'Show
|
|
151
|
+
console.log(cliKeyLine('--advanced-help', 'Show the full engineering command map'));
|
|
139
152
|
}
|
|
140
153
|
function advancedUsage() {
|
|
141
|
-
|
|
142
|
-
printCliSection('
|
|
154
|
+
printCliHeader('Advanced CLI', 'Full engineering map for automation, C2, and release operations.');
|
|
155
|
+
printCliSection('Public Commands');
|
|
156
|
+
for (const [command, description] of PUBLIC_COMMANDS) {
|
|
157
|
+
console.log(cliKeyLine(command, description));
|
|
158
|
+
}
|
|
159
|
+
printCliSection('Advanced Routes');
|
|
143
160
|
console.log(cliKeyLine('connect', 'forkit-connect connect <modelNameOrDiscoveryHash>'));
|
|
144
161
|
console.log(cliKeyLine('connect', 'forkit-connect connect <start|init|status|inbox|services|permissions|handoff|evolution review|runtime review|runtime status>'));
|
|
145
162
|
console.log(cliKeyLine('targets', 'forkit-connect runtime target <add|list|remove|status>'));
|
|
@@ -156,6 +173,103 @@ function advancedUsage() {
|
|
|
156
173
|
console.log(cliKeyLine('--api-key', 'Runtime signal API key used by runtime observe'));
|
|
157
174
|
console.log(cliKeyLine('--draft-only', 'Allow private continuation when governed publish is blocked'));
|
|
158
175
|
}
|
|
176
|
+
function commandUsage(command) {
|
|
177
|
+
switch (command) {
|
|
178
|
+
case 'init':
|
|
179
|
+
printCliHeader('Init', 'Prepare local Connect identity and privacy posture without signing in.');
|
|
180
|
+
console.log(cliKeyLine('usage', 'forkit-connect init'));
|
|
181
|
+
console.log(cliKeyLine('when', 'Optional local setup; most users should start with forkit-connect login'));
|
|
182
|
+
console.log(cliKeyLine('privacy', 'Creates local metadata state only; no model files, prompts, outputs, or secrets are uploaded'));
|
|
183
|
+
console.log(cliKeyLine('next', 'forkit-connect login'));
|
|
184
|
+
return true;
|
|
185
|
+
case 'login':
|
|
186
|
+
printCliHeader('Login', 'Pair this machine with Forkit.dev through browser device approval.');
|
|
187
|
+
console.log(cliKeyLine('usage', 'forkit-connect login [--no-browser]'));
|
|
188
|
+
console.log(cliKeyLine('opens', `${DEFAULT_BASE_URL}/connect/verify`));
|
|
189
|
+
console.log(cliKeyLine('stores', 'Session reference in secure local storage where available'));
|
|
190
|
+
console.log(cliKeyLine('privacy', 'No model files, prompts, outputs, or secrets are uploaded'));
|
|
191
|
+
console.log(cliKeyLine('--no-browser', 'Print the approval URL instead of opening a browser'));
|
|
192
|
+
return true;
|
|
193
|
+
case 'logout':
|
|
194
|
+
printCliHeader('Logout', 'Remove the stored Forkit.dev session from this device.');
|
|
195
|
+
console.log(cliKeyLine('usage', 'forkit-connect logout'));
|
|
196
|
+
console.log(cliKeyLine('keeps', 'Local discovery state and reviewed metadata remain on this device'));
|
|
197
|
+
return true;
|
|
198
|
+
case 'changes':
|
|
199
|
+
printCliHeader('Changes', 'Review local evidence, runtime signal history, and queued metadata.');
|
|
200
|
+
console.log(cliKeyLine('usage', 'forkit-connect changes [--json] [--limit <count>]'));
|
|
201
|
+
console.log(cliKeyLine('safe', 'Read-only local review; does not publish or sync by itself'));
|
|
202
|
+
return true;
|
|
203
|
+
case 'start':
|
|
204
|
+
printCliHeader('Start', 'Open the guided launcher or run the local daemon loop.');
|
|
205
|
+
console.log(cliKeyLine('usage', 'forkit-connect start [--plain] [--foreground]'));
|
|
206
|
+
console.log(cliKeyLine('plain', 'Use --plain for non-interactive terminals'));
|
|
207
|
+
console.log(cliKeyLine('foreground', 'Use --foreground to run sync loop in this terminal'));
|
|
208
|
+
return true;
|
|
209
|
+
case 'stop':
|
|
210
|
+
printCliHeader('Stop', 'Stop the local Connect daemon without deleting local state.');
|
|
211
|
+
console.log(cliKeyLine('usage', 'forkit-connect stop'));
|
|
212
|
+
console.log(cliKeyLine('safe', 'Does not revoke account access or remove local metadata'));
|
|
213
|
+
return true;
|
|
214
|
+
case 'sync':
|
|
215
|
+
printCliHeader('Sync', 'Flush approved metadata-only queue items to Forkit.dev.');
|
|
216
|
+
console.log(cliKeyLine('usage', 'forkit-connect sync [--json]'));
|
|
217
|
+
console.log(cliKeyLine('requires', 'Signed-in account and approved local queue items'));
|
|
218
|
+
return true;
|
|
219
|
+
case 'scan':
|
|
220
|
+
case 'discover':
|
|
221
|
+
printCliHeader('Scan', 'Discover local models, agents, and runtimes with metadata-only checks.');
|
|
222
|
+
console.log(cliKeyLine('usage', 'forkit-connect scan [--json] [--dry-run]'));
|
|
223
|
+
console.log(cliKeyLine('checks', 'Ollama, LM Studio, OpenAI-compatible local servers, and local model folders'));
|
|
224
|
+
console.log(cliKeyLine('next', 'forkit-connect inbox'));
|
|
225
|
+
return true;
|
|
226
|
+
case 'inbox':
|
|
227
|
+
printCliHeader('Inbox', 'Review detected records before creating or connecting Passports.');
|
|
228
|
+
console.log(cliKeyLine('usage', 'forkit-connect inbox [--json]'));
|
|
229
|
+
console.log(cliKeyLine('safe', 'Review-only by default; create/publish actions are explicit'));
|
|
230
|
+
return true;
|
|
231
|
+
case 'status':
|
|
232
|
+
printCliHeader('Status', 'Show account, device, queue, runtime, and scope posture.');
|
|
233
|
+
console.log(cliKeyLine('usage', 'forkit-connect status [--json]'));
|
|
234
|
+
console.log(cliKeyLine('next', 'If session is expired, run forkit-connect login'));
|
|
235
|
+
return true;
|
|
236
|
+
case 'workspace':
|
|
237
|
+
printCliHeader('Workspace', 'Manage governed workspace and project scope for Signal and Protocol accounts.');
|
|
238
|
+
console.log(cliKeyLine('usage', 'forkit-connect workspace status [--json]'));
|
|
239
|
+
console.log(cliKeyLine('usage', 'forkit-connect workspace select --workspace <id> --project <id>'));
|
|
240
|
+
console.log(cliKeyLine('note', 'Origin remains personal/public; governed scope starts with Signal'));
|
|
241
|
+
return true;
|
|
242
|
+
case 'runtime':
|
|
243
|
+
printCliHeader('Runtime', 'Review and connect local runtime posture without uploading runtime data.');
|
|
244
|
+
console.log(cliKeyLine('usage', 'forkit-connect runtime status [--json]'));
|
|
245
|
+
console.log(cliKeyLine('usage', 'forkit-connect runtime review [--json]'));
|
|
246
|
+
console.log(cliKeyLine('privacy', 'Metadata-only status, heartbeat, and lifecycle evidence'));
|
|
247
|
+
return true;
|
|
248
|
+
case 'doctor':
|
|
249
|
+
printCliHeader('Doctor', 'Diagnose local setup, secure storage, runtime availability, and session truth.');
|
|
250
|
+
console.log(cliKeyLine('usage', 'forkit-connect doctor [--json]'));
|
|
251
|
+
console.log(cliKeyLine('healthy', 'PASS/WARN/FAIL checks with clear next action'));
|
|
252
|
+
return true;
|
|
253
|
+
case 'update-check':
|
|
254
|
+
printCliHeader('Update Check', 'Compare npm CLI and desktop installer release channels.');
|
|
255
|
+
console.log(cliKeyLine('usage', 'forkit-connect update-check'));
|
|
256
|
+
console.log(cliKeyLine('cli', 'Uses the public npm forkit-connect latest version'));
|
|
257
|
+
console.log(cliKeyLine('desktop', 'Uses Forkit Connect desktop installer metadata separately'));
|
|
258
|
+
return true;
|
|
259
|
+
case 'connect':
|
|
260
|
+
printCliHeader('Connect', 'Prepare or sync a detected model into a passport-ready flow.');
|
|
261
|
+
console.log(cliKeyLine('usage', 'forkit-connect connect <modelNameOrDiscoveryHash>'));
|
|
262
|
+
console.log(cliKeyLine('review', 'Use forkit-connect inbox first to choose the right target'));
|
|
263
|
+
return true;
|
|
264
|
+
case 'register':
|
|
265
|
+
printCliHeader('Register', 'Register ready local models through the reviewed Connect flow.');
|
|
266
|
+
console.log(cliKeyLine('usage', 'forkit-connect register <modelNameOrDiscoveryHash>'));
|
|
267
|
+
console.log(cliKeyLine('safe', 'Governed accounts require workspace/project scope before registration'));
|
|
268
|
+
return true;
|
|
269
|
+
default:
|
|
270
|
+
return false;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
159
273
|
function showUsage() {
|
|
160
274
|
if (hasFlag('--advanced-help')) {
|
|
161
275
|
advancedUsage();
|
|
@@ -879,6 +993,9 @@ function cliTag(label, tone = 'muted') {
|
|
|
879
993
|
function cliKeyLine(label, value) {
|
|
880
994
|
return ` ${cliDim(`${label}`.padEnd(CLI_LABEL_WIDTH, ' '))} ${value}`;
|
|
881
995
|
}
|
|
996
|
+
function cliCommandLine(command, value) {
|
|
997
|
+
return ` ${cliDim(command.padEnd(34, ' '))} ${value}`;
|
|
998
|
+
}
|
|
882
999
|
function printCliHeader(title, subtitle) {
|
|
883
1000
|
console.log(`[forkit-connect] ${cliBold(title)}`);
|
|
884
1001
|
if (subtitle) {
|
|
@@ -2593,6 +2710,25 @@ function printTrayStatus(status, menu) {
|
|
|
2593
2710
|
async function run() {
|
|
2594
2711
|
const args = process.argv.slice(2);
|
|
2595
2712
|
const command = args[0];
|
|
2713
|
+
if (!command) {
|
|
2714
|
+
showUsage();
|
|
2715
|
+
return;
|
|
2716
|
+
}
|
|
2717
|
+
if (command === 'version' || command === '--version' || command === '-v') {
|
|
2718
|
+
console.log((0, update_1.getCurrentConnectVersion)());
|
|
2719
|
+
return;
|
|
2720
|
+
}
|
|
2721
|
+
if (isHelpCommand(command)) {
|
|
2722
|
+
showUsage();
|
|
2723
|
+
return;
|
|
2724
|
+
}
|
|
2725
|
+
if (hasFlag('--help') || hasFlag('-h')) {
|
|
2726
|
+
if (!commandUsage(command)) {
|
|
2727
|
+
showUsage();
|
|
2728
|
+
process.exitCode = 2;
|
|
2729
|
+
}
|
|
2730
|
+
return;
|
|
2731
|
+
}
|
|
2596
2732
|
const service = new service_1.ConnectV1Service();
|
|
2597
2733
|
const sessionRef = getArg('--session-ref');
|
|
2598
2734
|
const workspaceId = getArg('--workspace');
|
|
@@ -2607,18 +2743,6 @@ async function run() {
|
|
|
2607
2743
|
if (sessionRef !== null) {
|
|
2608
2744
|
service.setSessionRef(sessionRef);
|
|
2609
2745
|
}
|
|
2610
|
-
if (!command) {
|
|
2611
|
-
showUsage();
|
|
2612
|
-
return;
|
|
2613
|
-
}
|
|
2614
|
-
if (command === 'version' || command === '--version' || command === '-v') {
|
|
2615
|
-
console.log((0, update_1.getCurrentConnectVersion)());
|
|
2616
|
-
return;
|
|
2617
|
-
}
|
|
2618
|
-
if (isHelpCommand(command)) {
|
|
2619
|
-
showUsage();
|
|
2620
|
-
return;
|
|
2621
|
-
}
|
|
2622
2746
|
const runPublicConnectInit = () => {
|
|
2623
2747
|
printConnectInit(service.initializeConnectIdentity());
|
|
2624
2748
|
};
|