@levr-one/cli 0.6.12 → 0.7.1
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/dist/addHandler-Brr4ndcR.js +1428 -0
- package/dist/cli.js +36 -6
- package/package.json +1 -1
- package/dist/addHandler-K2a4rVv8.js +0 -688
package/dist/cli.js
CHANGED
|
@@ -87,6 +87,18 @@ or when generating a script for a shell other than the one you are running.`
|
|
|
87
87
|
|
|
88
88
|
//#endregion
|
|
89
89
|
//#region src/commands/mcp/add.ts
|
|
90
|
+
const SCOPES = [
|
|
91
|
+
"user",
|
|
92
|
+
"project",
|
|
93
|
+
"local"
|
|
94
|
+
];
|
|
95
|
+
/** Validate `--scope` at parse time so a typo fails before anything is read. */
|
|
96
|
+
function parseScope(raw) {
|
|
97
|
+
const value = raw.trim().toLowerCase();
|
|
98
|
+
const match = SCOPES.find((s) => s === value);
|
|
99
|
+
if (!match) throw new Error(`invalid --scope "${raw}" (expected one of: ${SCOPES.join(", ")})`);
|
|
100
|
+
return match;
|
|
101
|
+
}
|
|
90
102
|
const mcpAddCommand = buildCommand({
|
|
91
103
|
docs: {
|
|
92
104
|
brief: "Add the Levr MCP server to installed AI clients",
|
|
@@ -95,16 +107,27 @@ Claude Code, Cursor, Windsurf, Zed) and write the Levr MCP server into each
|
|
|
95
107
|
one's config. The entry is credential-free — the client opens a browser to
|
|
96
108
|
authorize with Levr the first time it connects.
|
|
97
109
|
|
|
110
|
+
--scope decides where the entry lands:
|
|
111
|
+
user every project you open (the default)
|
|
112
|
+
project this repository, shared with everyone who checks it out
|
|
113
|
+
local this repository, only you (Claude Code only)
|
|
114
|
+
|
|
115
|
+
Not every client supports every scope — Claude Desktop and Windsurf are
|
|
116
|
+
user-only. A client you name with --client fails if it cannot honor the
|
|
117
|
+
scope you asked for; one picked up by --all or interactively falls back to
|
|
118
|
+
the scope it does support, and the report says so.
|
|
119
|
+
|
|
98
120
|
Interactive by default; non-interactive when --all/--client/--yes is passed
|
|
99
121
|
or when not running in a terminal (CI). Config edits preserve existing
|
|
100
122
|
servers and comments, and re-running is a no-op.
|
|
101
123
|
|
|
102
124
|
Examples:
|
|
103
|
-
npx @levr-one/cli mcp add
|
|
104
|
-
levr mcp add --all
|
|
125
|
+
npx @levr-one/cli mcp add # detect clients and pick interactively
|
|
126
|
+
levr mcp add --all # set up every detected client
|
|
105
127
|
levr mcp add --client cursor --yes
|
|
106
|
-
levr mcp add --
|
|
107
|
-
levr mcp add --
|
|
128
|
+
levr mcp add --scope project # commit the config to this repo
|
|
129
|
+
levr mcp add --dry-run # preview without writing
|
|
130
|
+
levr mcp add --url <mcp-url> # target a non-default MCP server`
|
|
108
131
|
},
|
|
109
132
|
parameters: {
|
|
110
133
|
flags: {
|
|
@@ -131,6 +154,13 @@ Examples:
|
|
|
131
154
|
default: false,
|
|
132
155
|
brief: "Show changes without writing"
|
|
133
156
|
},
|
|
157
|
+
scope: {
|
|
158
|
+
kind: "parsed",
|
|
159
|
+
parse: parseScope,
|
|
160
|
+
brief: "Where to install: user (default), project, or local",
|
|
161
|
+
placeholder: "user|project|local",
|
|
162
|
+
optional: true
|
|
163
|
+
},
|
|
134
164
|
url: {
|
|
135
165
|
kind: "parsed",
|
|
136
166
|
parse: String,
|
|
@@ -142,7 +172,7 @@ Examples:
|
|
|
142
172
|
aliases: { y: "yes" }
|
|
143
173
|
},
|
|
144
174
|
loader: async () => {
|
|
145
|
-
const { mcpAddHandler } = await import("./addHandler-
|
|
175
|
+
const { mcpAddHandler } = await import("./addHandler-Brr4ndcR.js");
|
|
146
176
|
return mcpAddHandler;
|
|
147
177
|
}
|
|
148
178
|
});
|
|
@@ -521,7 +551,7 @@ Examples:
|
|
|
521
551
|
|
|
522
552
|
//#endregion
|
|
523
553
|
//#region package.json
|
|
524
|
-
var version = "0.
|
|
554
|
+
var version = "0.7.1";
|
|
525
555
|
|
|
526
556
|
//#endregion
|
|
527
557
|
//#region src/app.ts
|