autopilot-code 0.0.9 → 0.0.10

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/dist/cli.js +15 -0
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -273,6 +273,15 @@ function statusSystemdService() {
273
273
  const { spawnSync } = require("node:child_process");
274
274
  spawnSync("systemctl", ["status", "autopilot.service", ...daemonReloadArgs], { stdio: "inherit" });
275
275
  }
276
+ function logsSystemdService() {
277
+ const { useSystem } = getSystemdPaths();
278
+ const args = ["-u", "autopilot", "-f"];
279
+ if (!useSystem) {
280
+ args.unshift("--user");
281
+ }
282
+ console.log(`Streaming logs from ${useSystem ? "system" : "user"} service (Ctrl+C to stop)...\n`);
283
+ (0, node_child_process_1.spawnSync)("journalctl", args, { stdio: "inherit" });
284
+ }
276
285
  async function initCommand() {
277
286
  const cwd = process.cwd();
278
287
  const validation = validatePath(cwd);
@@ -505,4 +514,10 @@ program
505
514
  .action(() => {
506
515
  statusSystemdService();
507
516
  });
517
+ program
518
+ .command("logs")
519
+ .description("Stream live logs from the autopilot systemd service")
520
+ .action(() => {
521
+ logsSystemdService();
522
+ });
508
523
  program.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autopilot-code",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "private": false,
5
5
  "description": "Repo-issue–driven autopilot runner",
6
6
  "license": "MIT",