Add CLI package, config file support, and workspace setup

Add cli/ package with initial scaffolding. Add config-schema to shared
package for typed configuration. Add server config-file loader for
paperclip.config.ts support. Register cli in pnpm workspace. Add
.paperclip/ and .pnpm-store/ to gitignore. Minor Companies page fix.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Forgotten
2026-02-17 13:39:47 -06:00
parent 0975907121
commit 5306142542
28 changed files with 1091 additions and 7 deletions

View File

@@ -0,0 +1,33 @@
import { readConfig, configExists, resolveConfigPath } from "../config/store.js";
import type { CheckResult } from "./index.js";
export function configCheck(configPath?: string): CheckResult {
const filePath = resolveConfigPath(configPath);
if (!configExists(configPath)) {
return {
name: "Config file",
status: "fail",
message: `Config file not found at ${filePath}`,
canRepair: false,
repairHint: "Run `paperclip onboard` to create one",
};
}
try {
readConfig(configPath);
return {
name: "Config file",
status: "pass",
message: `Valid config at ${filePath}`,
};
} catch (err) {
return {
name: "Config file",
status: "fail",
message: `Invalid config: ${err instanceof Error ? err.message : String(err)}`,
canRepair: false,
repairHint: "Run `paperclip onboard` to recreate",
};
}
}