ZacharyZhang-NY 5e4e24db99 M2 audit: excise managed connectors and xAI media-gen tools
Managed connectors (grok.com MCP admin) removed root-and-branch:
- The managed-MCP fetch/injection pipeline is gone, including the whole
  kigi-shell-session-support crate (managed-config fetch client, gateway
  tool catalog + dispatch, header injection, refresh task), reactive
  managed re-auth, mcp_doctor's grok.com-source discovery, and the
  [managed_mcps] config surface.
- TUI: the 'Managed by grok.com' section, connectors URL/deep-link,
  Action::OpenManagedConnectors, and session_team_id are gone. Local MCP
  management (list/toggle/add/remove/auth/tools) is fully intact.
- Kept as LOCAL policy: managed-settings.json MCP allow/deny enforcement,
  the multi-source local MCP merge, folder-trust gating. PluginOrigin
  Project/User labels kept (they tag locally discovered plugin dirs).

imagine/media-gen tools (xAI image/video generation) removed:
- image_gen, image_edit, video_gen, image_to_video, reference_to_video
  implementations, registrations, ToolKind/ToolInput/Output variants
  (serde-safe), config plumbing end to end, ZDR video machinery,
  /imagine + /imagine-video commands and guidance text, the bundled
  imagine skill (added to legacy cleanup so user installs delete it),
  and the media-gen render path.
- Kept: image INPUT (paste/attach, [Image #N] meta, pdf/image fetch,
  clipboard wrap), generic media-ref rendering, and the generic tool
  401-retry machinery (tests renamed, assertions unweakened).
- deploy_app stays: it is a permanently-disabled local stub deploying
  nowhere.

121 files changed, 8 deleted. Gates: workspace check/clippy 0/0, fmt,
deny ok; suites green (tools 2554, shell 4862, tui 6608, workspace
1042). Remaining grok.com strings live only in the auth-method ids and
changelog archives (§9/M3 sweep).
2026-07-17 23:45:05 -04:00

Kigi

Kigi (kigi) is an unofficial Kimi Code CLI community build — a terminal-based AI coding agent based on the Apache-2.0 sources of xai-org/grok-build, re-targeted at the Kimi Code subscription API and the Moonshot open platform.

It runs as a full-screen TUI that understands your codebase, edits files, executes shell commands, and manages long-running tasks — interactively, headlessly for scripting/CI, or embedded in editors via the Agent Client Protocol (ACP).

Kigi is not affiliated with Moonshot AI or xAI. It coexists with the official kimi CLI on the same machine: independent binary name, independent config directory (~/.kigi), independent keyring credentials, and a KIGI_* environment-variable namespace. Nothing the official client installs or stores is touched.

Status

0.1.0 — milestone M0 (compilable skeleton) complete:

  • 62 workspace crates renamed to the kigi-* namespace; brand and env-var namespaces separated from upstream.
  • Telemetry, voice input, announcements, plugin marketplace, and relay/gateway remote services removed. Kigi is zero-telemetry: the only outbound connections are the inference/auth APIs you configure, GitHub Releases for updates, and MCP servers you add.
  • Toolchain Rust 1.97.0; cargo check/clippy --workspace --all-targets clean; cargo deny check advisories gate in place.

Authentication and inference against Kimi Code (milestone M1), the compatibility surface (M2), and release distribution (M3) are in progress.

Providers and API keys

Kigi talks to a fixed three-platform registry:

Platform id Base URL Auth
kimi-code https://api.kimi.com/coding/v1 Kimi Code subscription OAuth (kigi login)
moonshot-cn https://api.moonshot.cn/v1 Moonshot open-platform API key
moonshot-ai https://api.moonshot.ai/v1 Moonshot open-platform API key

Moonshot API keys come from the environment or ~/.kigi/config.toml (environment wins; values are never logged):

export KIGI_MOONSHOT_API_KEY=sk-...     # applies to both open platforms
export KIGI_MOONSHOT_CN_API_KEY=sk-...  # platform-scoped, beats the generic name
export KIGI_MOONSHOT_AI_API_KEY=sk-...
# ~/.kigi/config.toml
[platforms.moonshot-cn]
api_key = "sk-..."

[platforms.moonshot-ai]
api_key = "sk-..."

On login and on startup Kigi syncs each configured platform's model list from GET {base}/models and shows the merged catalog in the model picker (catalog keys are {platform_id}/{model_id}). If the sync fails, the last cached catalog is used; with no cache, a small built-in fallback list applies. Model selection resolves as --model CLI flag > KIGI_DEFAULT_MODEL > [models] default in config.toml > server-delivered list > built-in fallback.

KIGI_CODE_BASE_URL re-points the subscription platform (useful for testing); KIGI_MOONSHOT_CN_BASE_URL / KIGI_MOONSHOT_AI_BASE_URL are the equivalent dev/test overrides for the open platforms.

Building from source

rustup toolchain install 1.97.0
cargo build --profile release-dist -p kigi-bin
./target/release-dist/kigi --version

protoc is invoked through the vendored dotslash launcher at bin/protoc; install dotslash (brew install dotslash or cargo install dotslash) if it is not already on your PATH.

License

Apache-2.0. See LICENSE, NOTICE, and THIRD-PARTY-NOTICES. Code ported from openai/codex and sst/opencode is documented in crates/codegen/kigi-tools/THIRD_PARTY_NOTICES.md.

S
Description
Migrated from GitHub
Readme Apache-2.0
30 MiB
Languages
Rust 99.7%
Python 0.3%