feat: scaffold nani CLI + MCP server

Single Rust binary with three modes:
- Human CLI with colored output
- M2M mode (--json, --plain, --silent flags)
- MCP server over stdio (nani mcp-server)

HTTP client for config.saiden.dev REST API:
- Projects: list, set metadata, delete
- Secrets: get, set, list, delete
- Files: get, put, list, delete

Global flags: --json, --plain, --silent, --dry-run, --url, --api-key
Config: ~/.config/nani/config.json + NANI_API_KEY/NANI_URL env vars

MCP tools: nani_get, nani_set, nani_list, nani_delete, nani_file_get, nani_file_put

Dependencies: clap (derive), reqwest (rustls-tls), serde, tokio, rmcp, colored

Closes infra/nani#1
This commit is contained in:
BT-7274
2026-06-12 22:02:08 +02:00
parent b202a19329
commit e8c3e44bad
10 changed files with 1342 additions and 1 deletions
+26
View File
@@ -0,0 +1,26 @@
[package]
name = "nani"
version = "0.1.0"
edition = "2021"
description = "CLI and MCP server for config.saiden.dev"
license = "MIT"
[[bin]]
name = "nani"
path = "src/main.rs"
[dependencies]
clap = { version = "4", features = ["derive"] }
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls", "json"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tokio = { version = "1", features = ["rt-multi-thread", "macros", "io-util", "io-std"] }
dirs = "6"
colored = "3"
thiserror = "2"
rmcp = { version = "1", features = ["server", "macros", "transport-io"] }
schemars = "1"
[profile.release]
strip = true
lto = true