startup
Verify GitHub authentication, validate state files, and check configuration status to ensure the open source contribution manager is ready for use.
Instructions
Run startup checks including GitHub auth verification, state file validation, and configuration status.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The main handler for the 'startup' command. It performs setup checks, auth verification, daily digest updates, and initiates the dashboard server.
export async function runStartup(): Promise<StartupOutput> { const version = getCLIVersion(); const stateManager = getStateManager(); // 1. Check setup — auto-detect if incomplete let autoDetected = false; if (!stateManager.isSetupComplete()) { const detectedUsername = await detectGitHubUsername(); if (detectedUsername) { try { stateManager.initializeWithDefaults(detectedUsername); autoDetected = true; } catch (err) { console.error( `[STARTUP] Auto-detected username "${detectedUsername}" but failed to save config:`, errorMessage(err), ); return { version, setupComplete: false }; } } else { return { version, setupComplete: false }; } } // 2. Check auth const token = getGitHubToken(); if (!token) { return { version, setupComplete: true, authError: 'GitHub authentication required. Install GitHub CLI (https://cli.github.com/) and run "gh auth login", or set GITHUB_TOKEN.', }; } // 3. Run daily check const daily = await executeDailyCheck(token); // 4. Launch interactive SPA dashboard // Skip opening on first run (0 PRs) — the welcome flow handles onboarding let dashboardUrl: string | undefined; let dashboardOpened = false; if (daily.digest.summary.totalActivePRs > 0) { try { const spaResult = await launchDashboardServer(); if (spaResult) { dashboardUrl = spaResult.url; openInBrowser(spaResult.url); dashboardOpened = true; } else { console.error('[STARTUP] Dashboard SPA assets not found. Build with: cd packages/dashboard && pnpm run build'); } } catch (error) { console.error('[STARTUP] SPA dashboard launch failed:', errorMessage(error)); } } // Append dashboard status to brief summary (only startup opens the browser, not daily) if (dashboardOpened) { daily.briefSummary += ' | Dashboard opened in browser'; } // 5. Detect issue list const issueList = detectIssueList(); return { version, setupComplete: true, autoDetected, daily, dashboardUrl, issueList, }; } - packages/mcp-server/src/tools.ts:272-281 (registration)MCP tool registration for 'startup' which wraps the 'runStartup' handler.
// 15. startup — Run startup checks server.registerTool( 'startup', { description: 'Run startup checks including GitHub auth verification, state file validation, and configuration status.', inputSchema: {}, annotations: { readOnlyHint: false, destructiveHint: false }, }, wrapTool(runStartup),