Skip to main content

AI context and CLI

Add optional AI context. Use the scaffold CLI and understand its limits.
4 min read

AI context is optional. You can install components directly without an assistant, MCP configuration, or Kit scaffold CLI.

Add context to an existing project#

Download a context file for review, then merge useful guidance into your existing project instructions. Preserve project-specific rules and correct any examples that disagree with your installed component source.

Use a new review filename if that file already exists. The download does not configure an assistant or install components. Whether an assistant loads GEMINI.md or AGENTS.md depends on that assistant's configuration.

Published pathContentsHow to use it
/ai/GEMINI.mdCatalog, usage patterns, and styling guidanceMerge relevant context into your assistant's project instructions
/ai/AGENTS.mdComponent API examples, tokens, and hooksReview against source before adopting examples
/ai/components.jsonDescriptions, props, defaults, usage strings, and accessibility notesSupply as structured reference context
/ai/README.mdInstallation and context guidanceStarting point for the static assets
/ai/mcp.jsonExample MCP launch configurationInspect compatibility before using it

All paths above are relative to https://kit.n3wth.com. These files are static context, not executable component implementations or a live source of validated API signatures. For example, their icon guidance does not resolve the missing icon source.

MCP configuration limitations#

The checked-in example launches npx with arguments -y, shadcn@latest, and registry:mcp, and sets REGISTRY_URL to https://kit.n3wth.com/r/registry.json.

Kit's context assets do not implement an MCP server. The example depends on the external shadcn CLI recognizing that command and environment variable. Compatibility and server startup are not established by the presence of mcp.json; check the CLI version and your assistant's MCP setup before enabling it. Use direct registry URLs if the launch command is unsupported.

Scaffold CLI reference#

The source under apps/kit/cli declares package name @n3wth/kit, version 0.1.0, and binary n3wth-kit, targeting dist/index.js. This source does not establish npm publication availability. If you have a built local copy with its dependencies installed, its entry point can be invoked from the directory where you want the new project:

Replace the absolute path with your checkout path. The command scaffolds a project and invokes external tools; run it in a directory where creating my-app is intended.

OptionImplemented behavior
initPrompts for framework and theme, then creates a project
-n, --name <name>Supplies the project name instead of prompting for it
--no-installSkips the CLI's explicit Vite npm install step; does not disable all dependency installation

There are no framework or theme flags in the command definition; those selections remain interactive.

Framework differences#

StepNext.jsVite
Scaffoldcreate-next-app@latest with TypeScript, Tailwind, ESLint, App Router, src, npm, and @/* alias optionscreate-vite@latest with the react-ts template
Explicit dependency installationLeft to the scaffolder and later shadcn commandsRuns npm install unless --no-install
Initialize shadcnRuns shadcn@latest init --defaultsNot performed
Registry configurationUpdates components.json if presentSkips when components.json is absent
Base componentsAttempts cn, button, card, and inputNot performed
ThemeTries to add className="dark" to an exact HTML tag in src/app/layout.tsxNo change when that Next.js layout path is absent
ContextWrites embedded GEMINI.md and AGENTS.mdWrites the same embedded files

Review the generated project#

The CLI writes a registries.n3wth object with a URL and style, then tries n3wth/<component> with overwrite enabled. On failure it tries the bare component name from the default registry, also with overwrite enabled. If both fail, it logs a warning and continues. A final completion message therefore does not prove that Kit components were installed.

Inspect each generated component. If it came from the fallback registry, use the full Kit URL from the catalog and review any replacement. For Vite, configure Tailwind, aliases, and shadcn before adding Kit items manually; the CLI's Vite branch does not do that setup.

The embedded context strings are separate from public/ai; the CLI does not download the published context packs. It writes its two instruction files directly rather than merging with existing contents. Review them before using them as assistant instructions.

Finally, verify theme behavior in the browser. The dark-theme replacement only matches <html lang="en"> exactly. The use-theme hook defaults to a data-theme attribute, so adding the hook requires selectors consistent with that attribute. Run the generated application's checks before relying on the scaffold.

Sources#