create-clicksmith
v0.1.6
Published
Project installer for ClickSmith: detect your stack, wire stable locators, write agent instructions, merge agents.config.json, and register the MCP server.
Readme
create-clicksmith
The one-command ClickSmith installer.
pnpm dlx create-clicksmith # or: npm create clicksmithIt detects your stack and wires everything up without clobbering your files:
- Detects your package manager, bundler, framework, and any stable
attributes already in use (
data-testid,data-cy, …). - Recommends the hybrid locator strategy
source → attr → behavioral → dom. - Wires the dev-only
@clicksmith/unplugininto your Vite config (when the stack supports it) so the agent gets exactfile:linelocators. - Writes agent instruction files for Claude (
CLAUDE.md), Cursor (.cursor/rules/clicksmith.mdc), Codex (AGENTS.md), and a generic agent — using managed blocks so your existing content is preserved. - Merges
agents.config.json(defaults + any project overrides) into.clicksmith/. - Registers the daemon's MCP server in
.mcp.json(and.cursor/mcp.json), merging with any servers you already have. - Gitignores ClickSmith's runtime state (
.clicksmith/).
Flags
create-clicksmith [dir]
--dry-run # print the plan, write nothing
--no-unplugin # skip the data-loc plugin wiring
--agents claude,cursor # which instruction files to renderProgrammatic API
The CLI is a thin wrapper around testable functions:
import { detectProject, planInstall, applyPlan } from 'create-clicksmith';
const info = await detectProject(process.cwd());
const plan = await planInstall(info, { useUnplugin: info.supportsUnplugin });
// inspect plan.changes (each has action: create | merge | skip) …
await applyPlan(process.cwd(), plan);planInstall reads existing files and computes the final merged contents up
front, so it is fully deterministic and easy to test. applyPlan only writes.
