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

35
cli/src/prompts/server.ts Normal file
View File

@@ -0,0 +1,35 @@
import * as p from "@clack/prompts";
import type { ServerConfig } from "../config/schema.js";
export async function promptServer(): Promise<ServerConfig> {
const portStr = await p.text({
message: "Server port",
defaultValue: "3100",
placeholder: "3100",
validate: (val) => {
const n = Number(val);
if (isNaN(n) || n < 1 || n > 65535 || !Number.isInteger(n)) {
return "Must be an integer between 1 and 65535";
}
},
});
if (p.isCancel(portStr)) {
p.cancel("Setup cancelled.");
process.exit(0);
}
const port = Number(portStr) || 3100;
const serveUi = await p.confirm({
message: "Serve the UI from the server?",
initialValue: false,
});
if (p.isCancel(serveUi)) {
p.cancel("Setup cancelled.");
process.exit(0);
}
return { port, serveUi };
}