dayshift 0.1.0 → 0.1.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.
Files changed (2) hide show
  1. package/bin/dayshift.js +10 -1
  2. package/package.json +1 -1
package/bin/dayshift.js CHANGED
@@ -54,10 +54,19 @@ async function install({ force = false } = {}) {
54
54
  }
55
55
  }
56
56
  function open(app) { spawnSync('/usr/bin/open', [app], { stdio: 'inherit' }); }
57
+ // `dayshift .` e `dayshift . texto da tarefa`: repassa para o comando que vem dentro do app.
58
+ async function cli(args) {
59
+ let app = installedAt() || await install();
60
+ let sh = join(app, 'Contents/Resources/dayshift');
61
+ if (!existsSync(sh)) { app = await install({ force: true }); sh = join(app, 'Contents/Resources/dayshift'); }
62
+ process.exitCode = spawnSync(sh, args, { stdio: 'inherit' }).status ?? 1;
63
+ }
57
64
 
58
65
  const HELP = `Dayshift: seus agentes de código num só lugar.
59
66
 
60
67
  dayshift instala (se faltar) e abre o app
68
+ dayshift . abre o projeto desta pasta, para criar uma tarefa
69
+ dayshift . <tarefa> cria a tarefa direto (--na-pasta: sem branch)
61
70
  dayshift update baixa a versão mais nova
62
71
  dayshift uninstall remove o app (suas tarefas e ajustes ficam)
63
72
  dayshift --version versão instalada`;
@@ -69,7 +78,7 @@ try {
69
78
  else if (cmd === 'update' || cmd === 'install') await install({ force: cmd === 'update' && process.argv.includes('--force') });
70
79
  else if (cmd === 'uninstall') { const app = installedAt(); if (app) { rmSync(app, { recursive: true, force: true }); console.log(`Removido: ${app}`); } else console.log('O Dayshift não está instalado.'); }
71
80
  else if (!cmd) open(installedAt() || await install());
72
- else { console.error(`Comando desconhecido: ${cmd}\n\n${HELP}`); process.exit(1); }
81
+ else await cli(process.argv.slice(2));
73
82
  } catch (e) {
74
83
  console.error('Não deu certo: ' + e.message);
75
84
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dayshift",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Instala e abre o Dayshift: seus agentes de código (Claude Code, Codex) em tarefas paralelas, num app nativo para Mac.",
5
5
  "type": "module",
6
6
  "bin": {