@spekn/cli 1.0.0 → 1.0.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 (154) hide show
  1. package/README.md +58 -0
  2. package/dist/main.js +3707 -611
  3. package/dist/tui/index.mjs +2 -2
  4. package/package.json +29 -12
  5. package/dist/__tests__/export-cli.test.d.ts +0 -1
  6. package/dist/__tests__/export-cli.test.js +0 -70
  7. package/dist/__tests__/tui-args-policy.test.d.ts +0 -1
  8. package/dist/__tests__/tui-args-policy.test.js +0 -50
  9. package/dist/acp-S2MHZOAD.mjs +0 -23
  10. package/dist/acp-UCCI44JY.mjs +0 -25
  11. package/dist/auth/credentials-store.d.ts +0 -2
  12. package/dist/auth/credentials-store.js +0 -5
  13. package/dist/auth/device-flow.d.ts +0 -36
  14. package/dist/auth/device-flow.js +0 -189
  15. package/dist/auth/jwt.d.ts +0 -1
  16. package/dist/auth/jwt.js +0 -6
  17. package/dist/auth/session.d.ts +0 -67
  18. package/dist/auth/session.js +0 -86
  19. package/dist/auth-login.d.ts +0 -34
  20. package/dist/auth-login.js +0 -202
  21. package/dist/auth-logout.d.ts +0 -25
  22. package/dist/auth-logout.js +0 -115
  23. package/dist/auth-status.d.ts +0 -24
  24. package/dist/auth-status.js +0 -109
  25. package/dist/backlog-generate.d.ts +0 -11
  26. package/dist/backlog-generate.js +0 -308
  27. package/dist/backlog-health.d.ts +0 -11
  28. package/dist/backlog-health.js +0 -287
  29. package/dist/bridge-login.d.ts +0 -40
  30. package/dist/bridge-login.js +0 -277
  31. package/dist/chunk-3PAYRI4G.mjs +0 -2428
  32. package/dist/chunk-M4CS3A25.mjs +0 -2426
  33. package/dist/commands/auth/login.d.ts +0 -30
  34. package/dist/commands/auth/login.js +0 -164
  35. package/dist/commands/auth/logout.d.ts +0 -25
  36. package/dist/commands/auth/logout.js +0 -115
  37. package/dist/commands/auth/status.d.ts +0 -24
  38. package/dist/commands/auth/status.js +0 -109
  39. package/dist/commands/backlog/generate.d.ts +0 -11
  40. package/dist/commands/backlog/generate.js +0 -308
  41. package/dist/commands/backlog/health.d.ts +0 -11
  42. package/dist/commands/backlog/health.js +0 -287
  43. package/dist/commands/bridge/login.d.ts +0 -36
  44. package/dist/commands/bridge/login.js +0 -258
  45. package/dist/commands/export.d.ts +0 -35
  46. package/dist/commands/export.js +0 -485
  47. package/dist/commands/marketplace-export.d.ts +0 -21
  48. package/dist/commands/marketplace-export.js +0 -214
  49. package/dist/commands/project-clean.d.ts +0 -1
  50. package/dist/commands/project-clean.js +0 -126
  51. package/dist/commands/repo/common.d.ts +0 -105
  52. package/dist/commands/repo/common.js +0 -775
  53. package/dist/commands/repo/detach.d.ts +0 -2
  54. package/dist/commands/repo/detach.js +0 -120
  55. package/dist/commands/repo/register.d.ts +0 -21
  56. package/dist/commands/repo/register.js +0 -175
  57. package/dist/commands/repo/sync.d.ts +0 -22
  58. package/dist/commands/repo/sync.js +0 -873
  59. package/dist/commands/skills-import-local.d.ts +0 -16
  60. package/dist/commands/skills-import-local.js +0 -352
  61. package/dist/commands/spec/drift-check.d.ts +0 -3
  62. package/dist/commands/spec/drift-check.js +0 -186
  63. package/dist/commands/spec/frontmatter.d.ts +0 -11
  64. package/dist/commands/spec/frontmatter.js +0 -219
  65. package/dist/commands/spec/lint.d.ts +0 -11
  66. package/dist/commands/spec/lint.js +0 -499
  67. package/dist/commands/spec/parse.d.ts +0 -11
  68. package/dist/commands/spec/parse.js +0 -162
  69. package/dist/export.d.ts +0 -35
  70. package/dist/export.js +0 -485
  71. package/dist/main.d.ts +0 -1
  72. package/dist/marketplace-export.d.ts +0 -21
  73. package/dist/marketplace-export.js +0 -214
  74. package/dist/project-clean.d.ts +0 -1
  75. package/dist/project-clean.js +0 -126
  76. package/dist/project-context.d.ts +0 -99
  77. package/dist/project-context.js +0 -376
  78. package/dist/repo-common.d.ts +0 -101
  79. package/dist/repo-common.js +0 -671
  80. package/dist/repo-detach.d.ts +0 -2
  81. package/dist/repo-detach.js +0 -102
  82. package/dist/repo-ingest.d.ts +0 -29
  83. package/dist/repo-ingest.js +0 -305
  84. package/dist/repo-register.d.ts +0 -21
  85. package/dist/repo-register.js +0 -175
  86. package/dist/repo-sync.d.ts +0 -16
  87. package/dist/repo-sync.js +0 -152
  88. package/dist/resources/prompt-loader.d.ts +0 -1
  89. package/dist/resources/prompt-loader.js +0 -62
  90. package/dist/skills-import-local.d.ts +0 -16
  91. package/dist/skills-import-local.js +0 -352
  92. package/dist/spec-drift-check.d.ts +0 -3
  93. package/dist/spec-drift-check.js +0 -186
  94. package/dist/spec-frontmatter.d.ts +0 -11
  95. package/dist/spec-frontmatter.js +0 -219
  96. package/dist/spec-lint.d.ts +0 -11
  97. package/dist/spec-lint.js +0 -499
  98. package/dist/spec-parse.d.ts +0 -11
  99. package/dist/spec-parse.js +0 -162
  100. package/dist/stubs/dotenv.d.ts +0 -5
  101. package/dist/stubs/dotenv.js +0 -6
  102. package/dist/stubs/typeorm.d.ts +0 -22
  103. package/dist/stubs/typeorm.js +0 -28
  104. package/dist/tui/app.d.ts +0 -7
  105. package/dist/tui/app.js +0 -122
  106. package/dist/tui/args.d.ts +0 -8
  107. package/dist/tui/args.js +0 -57
  108. package/dist/tui/capabilities/policy.d.ts +0 -7
  109. package/dist/tui/capabilities/policy.js +0 -64
  110. package/dist/tui/components/frame.d.ts +0 -8
  111. package/dist/tui/components/frame.js +0 -8
  112. package/dist/tui/components/status-bar.d.ts +0 -8
  113. package/dist/tui/components/status-bar.js +0 -8
  114. package/dist/tui/index.d.ts +0 -2
  115. package/dist/tui/index.js +0 -23
  116. package/dist/tui/keymap/use-global-keymap.d.ts +0 -19
  117. package/dist/tui/keymap/use-global-keymap.js +0 -82
  118. package/dist/tui/navigation/nav-items.d.ts +0 -3
  119. package/dist/tui/navigation/nav-items.js +0 -18
  120. package/dist/tui/screens/bridge.d.ts +0 -8
  121. package/dist/tui/screens/bridge.js +0 -19
  122. package/dist/tui/screens/decisions.d.ts +0 -5
  123. package/dist/tui/screens/decisions.js +0 -28
  124. package/dist/tui/screens/export.d.ts +0 -5
  125. package/dist/tui/screens/export.js +0 -16
  126. package/dist/tui/screens/home.d.ts +0 -5
  127. package/dist/tui/screens/home.js +0 -33
  128. package/dist/tui/screens/locked.d.ts +0 -5
  129. package/dist/tui/screens/locked.js +0 -9
  130. package/dist/tui/screens/specs.d.ts +0 -5
  131. package/dist/tui/screens/specs.js +0 -31
  132. package/dist/tui/services/client.d.ts +0 -1
  133. package/dist/tui/services/client.js +0 -18
  134. package/dist/tui/services/context-service.d.ts +0 -19
  135. package/dist/tui/services/context-service.js +0 -246
  136. package/dist/tui/shared-enums.d.ts +0 -16
  137. package/dist/tui/shared-enums.js +0 -19
  138. package/dist/tui/state/use-app-state.d.ts +0 -35
  139. package/dist/tui/state/use-app-state.js +0 -177
  140. package/dist/tui/types.d.ts +0 -77
  141. package/dist/tui/types.js +0 -2
  142. package/dist/tui-bundle.d.ts +0 -1
  143. package/dist/tui-bundle.js +0 -5
  144. package/dist/tui-entry.mjs +0 -1407
  145. package/dist/utils/cli-runtime.d.ts +0 -5
  146. package/dist/utils/cli-runtime.js +0 -22
  147. package/dist/utils/help-error.d.ts +0 -7
  148. package/dist/utils/help-error.js +0 -14
  149. package/dist/utils/interaction.d.ts +0 -19
  150. package/dist/utils/interaction.js +0 -93
  151. package/dist/utils/structured-log.d.ts +0 -7
  152. package/dist/utils/structured-log.js +0 -112
  153. package/dist/utils/trpc-url.d.ts +0 -4
  154. package/dist/utils/trpc-url.js +0 -15
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export declare function runRepoDetachCli(args: string[]): Promise<number>;
@@ -1,120 +0,0 @@
1
- #!/usr/bin/env node
2
- "use strict";
3
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
- if (k2 === undefined) k2 = k;
5
- var desc = Object.getOwnPropertyDescriptor(m, k);
6
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
- desc = { enumerable: true, get: function() { return m[k]; } };
8
- }
9
- Object.defineProperty(o, k2, desc);
10
- }) : (function(o, m, k, k2) {
11
- if (k2 === undefined) k2 = k;
12
- o[k2] = m[k];
13
- }));
14
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
- Object.defineProperty(o, "default", { enumerable: true, value: v });
16
- }) : function(o, v) {
17
- o["default"] = v;
18
- });
19
- var __importStar = (this && this.__importStar) || (function () {
20
- var ownKeys = function(o) {
21
- ownKeys = Object.getOwnPropertyNames || function (o) {
22
- var ar = [];
23
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
- return ar;
25
- };
26
- return ownKeys(o);
27
- };
28
- return function (mod) {
29
- if (mod && mod.__esModule) return mod;
30
- var result = {};
31
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
- __setModuleDefault(result, mod);
33
- return result;
34
- };
35
- })();
36
- Object.defineProperty(exports, "__esModule", { value: true });
37
- exports.runRepoDetachCli = runRepoDetachCli;
38
- const fs = __importStar(require("node:fs"));
39
- const path = __importStar(require("node:path"));
40
- const project_context_1 = require("../../project-context");
41
- function printHelp(stderr) {
42
- stderr(`
43
- repo detach - Detach the current repository from local Spekn project context
44
-
45
- USAGE:
46
- spekn repo detach [options]
47
-
48
- OPTIONS:
49
- --path <dir> Repository root path (default: current directory)
50
- --help Show this help message
51
-
52
- EXAMPLES:
53
- spekn repo detach
54
- spekn repo detach --path /path/to/repo
55
- `);
56
- }
57
- function parseArgs(args) {
58
- let repoPath = process.cwd();
59
- for (let index = 0; index < args.length; index += 1) {
60
- const arg = args[index];
61
- if (arg === '--help') {
62
- throw new Error('HELP_REQUESTED');
63
- }
64
- if (arg === '--path' && args[index + 1]) {
65
- repoPath = path.resolve(args[index + 1]);
66
- index += 1;
67
- continue;
68
- }
69
- if (arg?.startsWith('--path=')) {
70
- repoPath = path.resolve(arg.slice('--path='.length));
71
- }
72
- }
73
- return { repoPath };
74
- }
75
- async function runRepoDetachCli(args) {
76
- try {
77
- const options = parseArgs(args);
78
- const localContextPath = path.join(options.repoPath, '.spekn');
79
- const localContext = (0, project_context_1.loadLocalContext)(options.repoPath);
80
- const globalCleanup = (0, project_context_1.clearRepoFromGlobalContext)(options.repoPath, localContext?.projectId);
81
- const hasLocalContext = fs.existsSync(localContextPath);
82
- if (hasLocalContext) {
83
- fs.unlinkSync(localContextPath);
84
- process.stdout.write(`Detached repository context (${localContextPath}).\n`);
85
- }
86
- else {
87
- process.stdout.write('No local .spekn context file found.\n');
88
- }
89
- if (globalCleanup.removedProjectRefs > 0 ||
90
- globalCleanup.removedSyncCheckpoints > 0 ||
91
- globalCleanup.removedProjects > 0 ||
92
- globalCleanup.clearedLastUsedProjectId) {
93
- process.stdout.write(`Cleared global repo context references: ` +
94
- `${globalCleanup.removedProjectRefs} project path(s), ` +
95
- `${globalCleanup.removedSyncCheckpoints} sync checkpoint(s), ` +
96
- `${globalCleanup.removedProjects} project record(s)` +
97
- `${globalCleanup.clearedLastUsedProjectId ? ', lastUsedProjectId cleared' : ''}.\n`);
98
- }
99
- else {
100
- process.stdout.write('No global repo context references found.\n');
101
- }
102
- return 0;
103
- }
104
- catch (error) {
105
- const message = error instanceof Error ? error.message : String(error);
106
- if (message === 'HELP_REQUESTED') {
107
- printHelp(process.stderr.write.bind(process.stderr));
108
- return 0;
109
- }
110
- process.stderr.write(`Error: ${message}\n`);
111
- return 1;
112
- }
113
- }
114
- async function main() {
115
- const exitCode = await runRepoDetachCli(process.argv.slice(2));
116
- process.exit(exitCode);
117
- }
118
- if (require.main === module) {
119
- void main();
120
- }
@@ -1,21 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * repo-register CLI command
4
- *
5
- * Registers the current git repository with a Spekn project and optionally
6
- * runs AI-powered analysis to discover specs, assess governance, and create
7
- * improvement specifications.
8
- *
9
- * Usage: spekn repo register --project-id <uuid> [--primary] [--analyze] [--no-analyze]
10
- * [--agent <name>] [--path <dir>] [--dry-run] [--api-url <url>]
11
- */
12
- import { type CommonOptions, type Deps } from "./common";
13
- export { repoNameFromUrl, resolveDefaultBranch, discoverFiles, buildAnalysisPrompt, executeAcpSession, runAnalysisWithAgent, verifyMcpServer, } from "./common";
14
- export type { DiscoveredFile } from "./common";
15
- interface RegisterOptions extends CommonOptions {
16
- primary: boolean;
17
- }
18
- declare function parseArgs(args: string[]): RegisterOptions;
19
- export declare function runRepoRegisterCli(args: string[], deps?: Deps): Promise<number>;
20
- declare function main(): Promise<void>;
21
- export { main, parseArgs };
@@ -1,175 +0,0 @@
1
- #!/usr/bin/env node
2
- "use strict";
3
- /**
4
- * repo-register CLI command
5
- *
6
- * Registers the current git repository with a Spekn project and optionally
7
- * runs AI-powered analysis to discover specs, assess governance, and create
8
- * improvement specifications.
9
- *
10
- * Usage: spekn repo register --project-id <uuid> [--primary] [--analyze] [--no-analyze]
11
- * [--agent <name>] [--path <dir>] [--dry-run] [--api-url <url>]
12
- */
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.verifyMcpServer = exports.runAnalysisWithAgent = exports.executeAcpSession = exports.buildAnalysisPrompt = exports.discoverFiles = exports.resolveDefaultBranch = exports.repoNameFromUrl = void 0;
15
- exports.runRepoRegisterCli = runRepoRegisterCli;
16
- exports.main = main;
17
- exports.parseArgs = parseArgs;
18
- const common_1 = require("./common");
19
- const project_context_1 = require("../../project-context");
20
- const structured_log_1 = require("../../utils/structured-log");
21
- // Re-export shared utilities for backward compatibility
22
- var common_2 = require("./common");
23
- Object.defineProperty(exports, "repoNameFromUrl", { enumerable: true, get: function () { return common_2.repoNameFromUrl; } });
24
- Object.defineProperty(exports, "resolveDefaultBranch", { enumerable: true, get: function () { return common_2.resolveDefaultBranch; } });
25
- Object.defineProperty(exports, "discoverFiles", { enumerable: true, get: function () { return common_2.discoverFiles; } });
26
- Object.defineProperty(exports, "buildAnalysisPrompt", { enumerable: true, get: function () { return common_2.buildAnalysisPrompt; } });
27
- Object.defineProperty(exports, "executeAcpSession", { enumerable: true, get: function () { return common_2.executeAcpSession; } });
28
- Object.defineProperty(exports, "runAnalysisWithAgent", { enumerable: true, get: function () { return common_2.runAnalysisWithAgent; } });
29
- Object.defineProperty(exports, "verifyMcpServer", { enumerable: true, get: function () { return common_2.verifyMcpServer; } });
30
- // ── Help & Args ─────────────────────────────────────────────────────
31
- function printHelp(stderr) {
32
- stderr(`
33
- repo register - Register the current git repository with a Spekn project
34
-
35
- USAGE:
36
- spekn repo register --project-id <uuid> [options]
37
-
38
- OPTIONS:
39
- --project-id <uuid> Project ID to register the repo under (optional if .spekn/context is present)
40
- --primary Set this repository as the primary repo for the project
41
- --analyze Run AI analysis after registration (default: true)
42
- --no-analyze Skip AI analysis (metadata-only registration)
43
- --agent <name> Force a specific agent (claude, codex, opencode, etc.)
44
- --path <dir> Repository root path (default: current directory)
45
- --dry-run Discover files only, skip AI analysis
46
- --api-url <url> API base URL (default: SPEKN_API_URL or https://app.spekn.com)
47
- --mcp-url <url> MCP HTTP server URL (default: MCP_HTTP_URL or https://app.spekn.com/mcp)
48
- --debug Show detailed debug output (tokens, HTTP exchanges)
49
- --help Show this help message
50
-
51
- ENVIRONMENT:
52
- SPEKN_API_URL API base URL
53
- SPEKN_AUTH_TOKEN Bearer token for authentication
54
- SPEKN_ORGANIZATION_ID Organization ID header
55
- MCP_HTTP_URL MCP HTTP server URL (default: https://app.spekn.com/mcp)
56
- AGENT_ARGS Override agent CLI args (skips ACP registry resolution)
57
-
58
- EXAMPLES:
59
- spekn repo register --project-id 11111111-1111-4111-8111-111111111111
60
- spekn repo register --project-id 11111111-1111-4111-8111-111111111111 --primary
61
- spekn repo register --project-id 11111111-1111-4111-8111-111111111111 --no-analyze
62
- spekn repo register --project-id 11111111-1111-4111-8111-111111111111 --dry-run
63
- spekn repo register --project-id 11111111-1111-4111-8111-111111111111 --agent claude
64
- spekn repo register --project-id 11111111-1111-4111-8111-111111111111 --path /path/to/repo
65
- `);
66
- }
67
- function parseArgs(args) {
68
- const opts = { ...(0, common_1.commonDefaults)(true), primary: false };
69
- for (let i = 0; i < args.length;) {
70
- const consumed = (0, common_1.parseCommonFlag)(args, i, opts);
71
- if (consumed > 0) {
72
- i += consumed;
73
- continue;
74
- }
75
- if (args[i] === "--primary") {
76
- opts.primary = true;
77
- i++;
78
- continue;
79
- }
80
- i++; // skip unknown
81
- }
82
- return (0, common_1.finalizeOptions)(opts);
83
- }
84
- // ── Main ────────────────────────────────────────────────────────────
85
- async function runRepoRegisterCli(args, deps = common_1.defaultDeps) {
86
- try {
87
- const options = parseArgs(args);
88
- (0, structured_log_1.appendCliStructuredLog)({
89
- source: "cli.repo.register",
90
- level: "info",
91
- message: "Starting repo register",
92
- details: { repoPath: options.repoPath, analyze: options.analyze, apiUrl: options.apiUrl },
93
- });
94
- const { authToken, organizationId, projectId } = await (0, common_1.resolveAuth)(deps, {
95
- projectId: options.projectId,
96
- repoPath: options.repoPath,
97
- });
98
- // ── Phase 1: Register repository metadata ──────────────────────
99
- const git = (0, common_1.readGitMetadata)(options.repoPath, deps);
100
- if (!git)
101
- return 1;
102
- deps.stdout(`Registering repository "${git.name}" (${git.remoteUrl})\n`);
103
- deps.stdout(` Default branch : ${git.defaultBranch}\n`);
104
- deps.stdout(` Project : ${projectId}\n`);
105
- if (options.primary)
106
- deps.stdout(" Primary : yes\n");
107
- const client = (0, common_1.createApiClient)(options.apiUrl, authToken, organizationId);
108
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
109
- const result = await client.gitRepository.create.mutate({
110
- projectId,
111
- name: git.name,
112
- repositoryUrl: git.remoteUrl,
113
- defaultBranch: git.defaultBranch,
114
- isPrimary: options.primary,
115
- });
116
- deps.stdout(`Repository registered successfully. ID: ${result.id}\n`);
117
- (0, structured_log_1.appendCliStructuredLog)({
118
- source: "cli.repo.register",
119
- level: "info",
120
- message: "Repository metadata registered",
121
- details: { projectId, organizationId, repositoryId: result.id },
122
- });
123
- (0, project_context_1.persistProjectContext)(options.repoPath, { projectId, organizationId: organizationId || undefined });
124
- (0, project_context_1.ensureGitignoreHasSpekn)(options.repoPath);
125
- // ── Phase 2: AI analysis (optional) ─────────────────────────────
126
- if (!options.analyze)
127
- return 0;
128
- if (!organizationId) {
129
- deps.stderr("Warning: No organization ID. Skipping AI analysis. Re-run 'spekn auth login' or set SPEKN_ORGANIZATION_ID.\n");
130
- return 0;
131
- }
132
- const exitCode = await (0, common_1.runAnalysisPhase)({ ...options, projectId }, authToken ?? "", deps, organizationId);
133
- (0, structured_log_1.appendCliStructuredLog)({
134
- source: "cli.repo.register",
135
- level: exitCode === 0 ? "info" : "error",
136
- message: "Repo register completed",
137
- details: { exitCode, analyzed: options.analyze, projectId },
138
- });
139
- return exitCode;
140
- }
141
- catch (error) {
142
- if (error instanceof common_1.HelpRequestedError) {
143
- printHelp(deps.stderr);
144
- return 0;
145
- }
146
- const message = error instanceof Error ? error.message : String(error);
147
- deps.stderr(`Error: ${message}\n`);
148
- // Provide specific guidance for common errors
149
- if (message.includes('organization') || message.includes('Organization')) {
150
- deps.stderr(`\n`);
151
- deps.stderr(`Organization context is required. Try one of:\n`);
152
- deps.stderr(` 1. Run 'spekn auth login' to authenticate and select an organization\n`);
153
- deps.stderr(` 2. Set SPEKN_ORGANIZATION_ID environment variable\n`);
154
- deps.stderr(` 3. Pass --organization-id explicitly (if supported)\n`);
155
- }
156
- else if (message.includes('credentials') || message.includes('auth') || message.includes('token')) {
157
- deps.stderr(`\n`);
158
- deps.stderr(`Authentication required. Run:\n`);
159
- deps.stderr(` spekn auth login\n`);
160
- }
161
- (0, structured_log_1.appendCliStructuredLog)({
162
- source: "cli.repo.register",
163
- level: "error",
164
- message: message,
165
- });
166
- return 1;
167
- }
168
- }
169
- async function main() {
170
- const exitCode = await runRepoRegisterCli(process.argv.slice(2));
171
- process.exit(exitCode);
172
- }
173
- if (require.main === module) {
174
- void main();
175
- }
@@ -1,22 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * repo-sync CLI command
4
- *
5
- * Syncs metadata for the current git repository with Spekn.
6
- * Looks up the repo by its remote URL and updates name and default branch.
7
- * By default, also runs ingestion drift analysis against project spec storage.
8
- * Must be run from inside a local git clone.
9
- *
10
- * Usage: spekn repo sync --project-id <uuid> [--analyze|--no-analyze] [--import-to-project] [--api-url <url>]
11
- */
12
- import { type CommonOptions, type Deps } from "./common";
13
- interface SyncOptions extends CommonOptions {
14
- importToProject: boolean;
15
- maxFiles: number;
16
- analysisEngine: "ingestion" | "acp" | "both";
17
- acpTimeoutMs?: number;
18
- }
19
- declare function parseArgs(args: string[]): SyncOptions;
20
- export declare function runRepoSyncCli(args: string[], deps?: Deps): Promise<number>;
21
- declare function main(): Promise<void>;
22
- export { main, parseArgs };