cronus-ui 0.7.4 → 0.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -2
- package/dist/commands/mcp.d.ts +12 -0
- package/dist/commands/mcp.js +48 -0
- package/dist/config.d.ts +2 -2
- package/dist/config.js +1 -1
- package/dist/index.js +14 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -13,6 +13,7 @@ npx cronus-ui upgrade --all --dry-run
|
|
|
13
13
|
npx cronus-ui list
|
|
14
14
|
npx cronus-ui diff
|
|
15
15
|
npx cronus-ui ai
|
|
16
|
+
npx cronus-ui mcp init
|
|
16
17
|
```
|
|
17
18
|
|
|
18
19
|
The canonical product start is `npx create-cronus-app my-app --template saas`,
|
|
@@ -32,6 +33,7 @@ you keep using after.
|
|
|
32
33
|
| `upgrade` | `[components...]` | `-c, --cwd <dir>` · `-r, --registry <source>` · `-a, --all` · `--dry-run` · `-y, --yes` · `-o, --overwrite` |
|
|
33
34
|
| `theme set` | `<name>` | `-m, --mode <mode>` · `-c, --cwd <dir>` |
|
|
34
35
|
| `theme add` | `<source>` | `-c, --cwd <dir>` · `--css <file>` · `--dry-run` |
|
|
36
|
+
| `mcp init` | — | `-c, --cwd <dir>` · `--client <list>` · `-f, --force` |
|
|
35
37
|
| `ai` | — | `-c, --cwd <dir>` · `-a, --assistants <list>` · `-p, --preset <name>` · `-s, --skills <list>` |
|
|
36
38
|
|
|
37
39
|
Notes that match the commander surface:
|
|
@@ -42,6 +44,7 @@ Notes that match the commander surface:
|
|
|
42
44
|
- `theme add <source>` — a Create Studio permalink, a bare `c=` payload, or a path to an exported theme JSON file.
|
|
43
45
|
- `upgrade` 3-way merges each installed file against the release recorded in `cronus-ui.json`. `-a, --all` upgrades every recorded component and 3-way-merges composed pages/layouts against `.cronus-ui/base`. `-o, --overwrite` replaces files installed before the manifest existed. Unresolved files get a prompt in `CRONUS-UPGRADE.md`.
|
|
44
46
|
- `ai --assistants` is comma-separated `claude`, `cursor`, `copilot`, `windsurf`, `gemini` (or `all` / `none`). `--preset` is `standard` (default), `fintech`, `saas`, `oss`, `agency`, or `none`. `--skills` is comma-separated Claude Code skills (or `all` / `none`).
|
|
47
|
+
- `mcp init` writes project MCP config for Claude Code (`.mcp.json`), Cursor, VS Code (`servers` in `.vscode/mcp.json`), Codex, Grok, OpenCode, Gemini, and Zed. `--client` is comma-separated (or `all`). `--force` overwrites. `create-cronus-app` and `cronus-ui ai` emit the same files. Cloud builders paste `https://aicronus.com/mcp`.
|
|
45
48
|
|
|
46
49
|
## How it works
|
|
47
50
|
|
|
@@ -49,7 +52,7 @@ Notes that match the commander surface:
|
|
|
49
52
|
`packages/cli/scripts/build-registry.ts` — each item carries its source, its npm
|
|
50
53
|
`dependencies`, and its `registryDependencies` (other components it imports),
|
|
51
54
|
derived by parsing imports.
|
|
52
|
-
- The default registry is pinned to the CLI package version (`v0.7.
|
|
55
|
+
- The default registry is pinned to the CLI package version (`v0.7.5` here), not
|
|
53
56
|
mutable `main`, so a published CLI reads the registry snapshot it was released
|
|
54
57
|
with. Use `-r, --registry ./registry` when testing local registry changes before
|
|
55
58
|
a release tag exists.
|
|
@@ -80,7 +83,7 @@ Notes that match the commander surface:
|
|
|
80
83
|
"lib": "lib",
|
|
81
84
|
"blocks": "components/blocks"
|
|
82
85
|
},
|
|
83
|
-
"registry": "https://raw.githubusercontent.com/pedrogbraz/cronus-ui/v0.7.
|
|
86
|
+
"registry": "https://raw.githubusercontent.com/pedrogbraz/cronus-ui/v0.7.5/registry"
|
|
84
87
|
}
|
|
85
88
|
```
|
|
86
89
|
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface McpInitOptions {
|
|
2
|
+
cwd: string;
|
|
3
|
+
client?: string;
|
|
4
|
+
force?: boolean;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Write project-scoped MCP config files so Claude Code, Cursor, VS Code,
|
|
8
|
+
* Codex, Grok, OpenCode, Gemini, and Zed can spawn `npx -y cronus-ui-mcp`.
|
|
9
|
+
* Existing files are skipped unless `--force`.
|
|
10
|
+
*/
|
|
11
|
+
export declare function mcpInit(options: McpInitOptions): void;
|
|
12
|
+
//# sourceMappingURL=mcp.d.ts.map
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { MCP_EDITORS, parseList, writeMcpConfigs } from "@cronus-ui/ai-kit";
|
|
2
|
+
import { log } from "../utils.js";
|
|
3
|
+
/**
|
|
4
|
+
* Write project-scoped MCP config files so Claude Code, Cursor, VS Code,
|
|
5
|
+
* Codex, Grok, OpenCode, Gemini, and Zed can spawn `npx -y cronus-ui-mcp`.
|
|
6
|
+
* Existing files are skipped unless `--force`.
|
|
7
|
+
*/
|
|
8
|
+
export function mcpInit(options) {
|
|
9
|
+
let clients;
|
|
10
|
+
try {
|
|
11
|
+
clients = parseList(options.client, MCP_EDITORS, "MCP client");
|
|
12
|
+
}
|
|
13
|
+
catch (err) {
|
|
14
|
+
log.err(err.message);
|
|
15
|
+
process.exitCode = 1;
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
if (clients.length === 0) {
|
|
19
|
+
log.err('No MCP clients selected. Pass --client all (or a list), not "none".');
|
|
20
|
+
process.exitCode = 1;
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
log.title("Wiring the Cronus UI MCP server");
|
|
24
|
+
log.step(`Clients: ${clients.join(", ")}`);
|
|
25
|
+
const { written, skipped } = writeMcpConfigs({
|
|
26
|
+
targetDir: options.cwd,
|
|
27
|
+
clients,
|
|
28
|
+
force: options.force,
|
|
29
|
+
});
|
|
30
|
+
for (const path of written)
|
|
31
|
+
log.ok(`Wrote ${path}`);
|
|
32
|
+
if (skipped.length > 0) {
|
|
33
|
+
log.step(`Skipped ${skipped.length} existing file(s) (pass --force to replace):`);
|
|
34
|
+
for (const path of skipped)
|
|
35
|
+
log.step(` ${path}`);
|
|
36
|
+
}
|
|
37
|
+
if (written.length === 0 && skipped.length === 0) {
|
|
38
|
+
log.title("Nothing to write.");
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
if (written.length === 0) {
|
|
42
|
+
log.title("Nothing to do — MCP config is already in place.");
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
log.title(`Done — ${written.length} file(s) written.`);
|
|
46
|
+
log.step("Restart the agent so it loads the new server. Write tools need a local project.");
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=mcp.js.map
|
package/dist/config.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const CONFIG_FILE = "cronus-ui.json";
|
|
2
|
-
export declare const CLI_VERSION = "0.7.
|
|
3
|
-
export declare const DEFAULT_REGISTRY = "https://raw.githubusercontent.com/pedrogbraz/cronus-ui/v0.7.
|
|
2
|
+
export declare const CLI_VERSION = "0.7.5";
|
|
3
|
+
export declare const DEFAULT_REGISTRY = "https://raw.githubusercontent.com/pedrogbraz/cronus-ui/v0.7.5/registry";
|
|
4
4
|
/** Manifest entry `add`/`upgrade` record per installed registry item. */
|
|
5
5
|
export interface InstalledRecord {
|
|
6
6
|
/** Registry release the files came from (git tag without the leading "v"). */
|
package/dist/config.js
CHANGED
|
@@ -2,7 +2,7 @@ import { existsSync } from "node:fs";
|
|
|
2
2
|
import { readFile, writeFile } from "node:fs/promises";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
export const CONFIG_FILE = "cronus-ui.json";
|
|
5
|
-
export const CLI_VERSION = "0.7.
|
|
5
|
+
export const CLI_VERSION = "0.7.5";
|
|
6
6
|
export const DEFAULT_REGISTRY = `https://raw.githubusercontent.com/pedrogbraz/cronus-ui/v${CLI_VERSION}/registry`;
|
|
7
7
|
export const DEFAULT_CONFIG = {
|
|
8
8
|
aliases: { ui: "@/components/ui", lib: "@/lib", blocks: "@/components/blocks" },
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,7 @@ import { compose } from "./commands/compose.js";
|
|
|
7
7
|
import { diff } from "./commands/diff.js";
|
|
8
8
|
import { init } from "./commands/init.js";
|
|
9
9
|
import { list } from "./commands/list.js";
|
|
10
|
+
import { mcpInit } from "./commands/mcp.js";
|
|
10
11
|
import { themeAdd, themeSet } from "./commands/theme.js";
|
|
11
12
|
import { upgrade } from "./commands/upgrade.js";
|
|
12
13
|
import { CLI_VERSION } from "./config.js";
|
|
@@ -167,6 +168,19 @@ theme
|
|
|
167
168
|
.option("--css <file>", "globals CSS file for the overrides block (default: auto-detect)")
|
|
168
169
|
.option("--dry-run", "print what would be applied, write nothing")
|
|
169
170
|
.action((source, opts) => themeAdd({ source, cwd: opts.cwd, css: opts.css, dryRun: opts.dryRun }));
|
|
171
|
+
const mcp = program
|
|
172
|
+
.command("mcp")
|
|
173
|
+
.description("Wire the Cronus UI MCP server into coding agents (project config files).");
|
|
174
|
+
mcp
|
|
175
|
+
.command("init")
|
|
176
|
+
.description("Write stdio MCP config for Claude Code, Cursor, VS Code, Codex, Grok, OpenCode, Gemini, and Zed.")
|
|
177
|
+
.option("-c, --cwd <dir>", "working directory", process.cwd())
|
|
178
|
+
.option("--client <list>", "comma-separated: claude, cursor, vscode, codex, grok, opencode, gemini, zed (or 'all')")
|
|
179
|
+
.option("-f, --force", "overwrite existing MCP config files")
|
|
180
|
+
.addHelpText("after", `
|
|
181
|
+
Cloud builders (v0, Lovable, Replit, Bolt, Base44) cannot spawn npx — paste
|
|
182
|
+
https://aicronus.com/mcp instead. See https://aicronus.com/docs/mcp.`)
|
|
183
|
+
.action((opts) => mcpInit({ cwd: opts.cwd, client: opts.client, force: opts.force }));
|
|
170
184
|
program
|
|
171
185
|
.command("ai")
|
|
172
186
|
.description("Add the AI Kit (AGENTS.md doctrine + Claude Code / Cursor / Copilot / Windsurf / Gemini config).")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cronus-ui",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.5",
|
|
4
4
|
"description": "cronus-ui — add Cronus UI components to your project, shadcn-style (copy-paste registry).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"registry:check": "bun run scripts/check-registry.ts"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@cronus-ui/ai-kit": "0.7.
|
|
57
|
+
"@cronus-ui/ai-kit": "0.7.5",
|
|
58
58
|
"commander": "^15.0.0",
|
|
59
59
|
"picocolors": "^1.1.1"
|
|
60
60
|
},
|