Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/limen-cli/src/commands/admin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ pub async fn run(proxy: Option<&str>, command: AdminCommand) -> anyhow::Result<(
));
} else if !resp.pending_change_id.is_empty() {
ui::warn(&format!(
"Held for approval: it widens standing access, and another admin approves it with `limen manage changes approve {}`.",
"Held for approval: it widens standing access, and another admin approves it with `limen admin manage changes approve {}`.",
resp.pending_change_id
));
} else if resp.applied {
Expand Down
4 changes: 2 additions & 2 deletions crates/limen-cli/src/commands/manage.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! `limen manage`: the management API (ADR-0042) from the command line, for
//! `limen admin manage`: the management API (ADR-0042) from the command line, for
//! admins and for bots with a `policy_writer` grant (log in with
//! `limen login --bot ...`). Output is JSON, for scripts and CI.

Expand Down Expand Up @@ -59,7 +59,7 @@ pub enum ManageCommand {
/// Defaults to a writer's namespace, or `default` for admins.
#[arg(long)]
namespace: Option<String>,
/// Replace the resource with this etag (from `limen manage get`).
/// Replace the resource with this etag (from `limen admin manage get`).
#[arg(long)]
etag: Option<String>,
/// Check everything and show the impact, but change nothing.
Expand Down
19 changes: 14 additions & 5 deletions crates/limen-cli/src/commands/mcp.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! `limen mcp`: a read-only Model Context Protocol server over stdio.
//! `limen config mcp serve`: a read-only Model Context Protocol server over stdio.
//!
//! A useful tool surface with **no agent identity**. Every tool runs this same binary with `--json` as the person who
//! is logged in, so it grants nothing `limen` doesn't already grant. There is
Expand Down Expand Up @@ -168,7 +168,7 @@ fn config_text(exe: &str, proxy: Option<&str>) -> String {
if let Some(proxy) = proxy {
args.extend(["--server", proxy]);
}
args.push("mcp");
args.extend(["config", "mcp", "serve"]);
let json = serde_json::to_string_pretty(&json!({
"mcpServers": { "limen": { "command": exe, "args": args } }
}))
Expand Down Expand Up @@ -836,7 +836,7 @@ mod tests {
fn config_text_is_valid_json_and_quotes_awkward_paths() {
let text = config_text("/opt/my tools/limen", Some("limen.example.com:443"));
assert!(text.contains(
"claude mcp add --scope user limen -- '/opt/my tools/limen' --server limen.example.com:443 mcp"
"claude mcp add --scope user limen -- '/opt/my tools/limen' --server limen.example.com:443 config mcp serve"
));
let start = text.find('{').unwrap();
let end = text.rfind('}').unwrap();
Expand All @@ -847,11 +847,20 @@ mod tests {
);
assert_eq!(
parsed["mcpServers"]["limen"]["args"],
json!(["--server", "limen.example.com:443", "mcp"])
json!([
"--server",
"limen.example.com:443",
"config",
"mcp",
"serve"
])
);
assert_eq!(shell_quote("it's"), "'it'\\''s'");
let plain = config_text("/usr/bin/limen", None);
assert!(plain.contains("claude mcp add --scope user limen -- /usr/bin/limen mcp\n"));
assert!(
plain
.contains("claude mcp add --scope user limen -- /usr/bin/limen config mcp serve\n")
);
assert!(!plain.contains("--server"));
}

Expand Down
Loading
Loading