← All modules
development

Forge

Live

Domain name brainstorming with repository creation and workspace management.

event.type === "forge" modules/forge
Overview

What Forge does

Forge is the workspace bootstrapper. Feed it a list of keywords, get back name candidates scored on domain, GitHub-org, and Twitter availability. Pick one, and Forge provisions the GitHub repo, the local clone, and the workspace entry pointing at the canonical path. Every step emits an event so the dashboard can render the timeline.

Sessions are persistent — generated names are cached so you can come back tomorrow and keep iterating. Workspaces become first-class objects the Repository module then indexes, so a Forge'd project shows up everywhere else automatically.

Wire payload

Same shape, three syntaxes

The wire protocol is plain HTTP, plain JSON, HMAC-SHA256. The TypeScript tab uses the SDK; the cURL tab is the raw HTTP equivalent; the Python tab shows the preview SDK shape.

import { createCuittyClient } from "@cuitty/sdk";

const cuitty = createCuittyClient({
  portalUrl: "https://app.cuitty.com",
  projectId: process.env.CUITTY_PROJECT_ID!,
  apiKey: process.env.CUITTY_API_KEY!,
});
cuitty.start();

await cuitty.emit({
  type: "forge",
  timestamp: new Date().toISOString(),
  data: {
    sessionId: "sess_a1b2c3",
    keywords: ["audit", "fast", "open"],
    candidates: [
      { name: "auditly", scoreDomain: 90, scoreGithub: 100 },
      { name: "fastaudit", scoreDomain: 60, scoreGithub: 80 },
    ],
  },
});
Storage

Database schema

Excerpt from modules/forge/schema.sql. One libSQL file per module — back it up with cp.

CREATE TABLE IF NOT EXISTS name_candidates (
  id INTEGER PRIMARY KEY AUTOINCREMENT,
  session_id INTEGER NOT NULL REFERENCES name_sessions(id) ON DELETE CASCADE,
  name TEXT NOT NULL,
  rationale TEXT,
  score_domain INTEGER DEFAULT 0,
  score_twitter INTEGER DEFAULT 0,
  score_github INTEGER DEFAULT 0,
  status TEXT DEFAULT 'pending',
  created_at INTEGER DEFAULT (unixepoch())
);

Related modules