@1mancompany/onemancompany 0.2.650 → 0.2.651

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.
Files changed (2) hide show
  1. package/bin/cli.js +13 -6
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -220,6 +220,7 @@ ${cyan("OneManCompany")} — The AI Operating System for One-Person Companies
220
220
 
221
221
  ${green("Usage:")}
222
222
  npx @1mancompany/onemancompany Start (runs in background)
223
+ npx @1mancompany/onemancompany --update Pull latest version then start
223
224
  npx @1mancompany/onemancompany --debug Start with logs (Ctrl+C to stop)
224
225
  npx @1mancompany/onemancompany stop Stop background service
225
226
  npx @1mancompany/onemancompany init Re-run setup process (interactive)
@@ -232,6 +233,7 @@ ${green("Usage:")}
232
233
  ${green("Options:")}
233
234
  --dir <path> Install directory (default: ./OneManCompany)
234
235
  --port <port> Server port (default: 8000)
236
+ --update Pull latest version before starting (default: use local)
235
237
  --debug Run in foreground with logs (default: background)
236
238
  --help, -h Show this help
237
239
 
@@ -328,12 +330,17 @@ ${green("What gets installed automatically:")}
328
330
  }
329
331
 
330
332
  // ── Clone or update ───────────────────────────────────────────────────
333
+ const wantUpdate = passthrough.includes("--update");
331
334
  if (fs.existsSync(path.join(installDir, ".git"))) {
332
- info(`Updating existing installation at ${installDir}`);
333
- try {
334
- run("git pull --ff-only", { cwd: installDir });
335
- } catch {
336
- warn("git pull failed — continuing with current version");
335
+ if (wantUpdate) {
336
+ info(`Updating existing installation at ${installDir}`);
337
+ try {
338
+ run("git pull --ff-only", { cwd: installDir });
339
+ } catch {
340
+ warn("git pull failed — continuing with current version");
341
+ }
342
+ } else {
343
+ info(`Using existing installation at ${installDir}`);
337
344
  }
338
345
  } else if (fs.existsSync(installDir)) {
339
346
  info(`Directory ${installDir} exists (not a git repo) — using as-is`);
@@ -515,7 +522,7 @@ ${green("What gets installed automatically:")}
515
522
 
516
523
  // Start server
517
524
  const debugMode = passthrough.includes("--debug");
518
- const launchArgs = passthrough.filter((a) => a !== "--debug");
525
+ const launchArgs = passthrough.filter((a) => a !== "--debug" && a !== "--update");
519
526
 
520
527
  // Build env: pass OMC_DEBUG=1 in debug mode
521
528
  const childEnv = { ...process.env };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1mancompany/onemancompany",
3
- "version": "0.2.650",
3
+ "version": "0.2.651",
4
4
  "description": "The AI Operating System for One-Person Companies",
5
5
  "bin": {
6
6
  "onemancompany": "bin/cli.js"