The PRD's first acceptance gate now holds: grep -RinE '\bx\.ai\b|grok' crates/ --include='*.rs' → 0 matches (exempt: NOTICE and third-party license archives, README provenance, and the required 'Based on Grok Build Open Source' attribution, now sourced from version_attribution.txt). Wire-visible renames (both sides in this repo, changed in lockstep): - Auth method id 'grok.com' → 'kimi-code' (AuthMethodKind::KimiCode). - Every x.ai/* and _x.ai/* ACP ext method and meta key → kigi/* / _kigi/* (~200 names; grokShell → kigiShell). Session-file replay keeps a read-side alias for the legacy '_x.ai/session/update' method so existing updates.jsonl histories load; writes emit only the new name (both directions test-pinned). - Agent types grok-build* → kigi* with a documented legacy-prefix alias at resolution time so persisted sessions keep resolving. - ToolNamespace/BuiltinAgentName GrokBuild* → Kigi* (wire snake_case kigi/kigi_concise/kigi_hashline; schema regenerated); grok_build implementation dirs renamed to kigi*. - x-grok-* headers → x-kigi-*, __GROK_* sentinels → __KIGI_*, themes grokday/groknight → kigiday/kiginight (old persisted values fall back to the default theme), web_fetch allowlist xAI hosts → kimi.com + moonshot platforms, changelog CDN → this repo, grok-build changelog archives deleted. - BYOK default endpoint removed: [endpoints] api_base_url is now truly optional with NO default — consumers fail fast with the flag name when unset (no silent x.ai egress). Mock harnesses inject it explicitly. - System-prompt identity fixed: 'released by xAI' → 'an unofficial community CLI for Kimi' (template + regenerated encrypted form). Also repaired pre-existing grok-era test debt found by the sweep: the stale trace_classify default-model pin, the grok-pager UA label test, pty-harness stale-binary reuse and non-hermetic moonshot routing (a PTY test could previously reach the real api.moonshot.cn), and the outdated oauth fixture scope key. Gates: §9 grep 0; fmt clean; workspace check/clippy 0/0 (-D warnings); FULL cargo test --workspace: 234 suites, 21,961 passed, 0 failed; deny advisories ok.
3.4 KiB
Hooks & Plugins Guide
Kigi supports hooks (event-driven shell commands) and plugins (bundles of skills, agents, hooks, and MCP servers). Both are managed through a unified modal interface.
Opening the Modal
| Method | Opens on tab |
|---|---|
Ctrl+L |
Plugins (any pane; non–VS Code family — on VS Code / Cursor / Windsurf / Zed use /plugins) |
/plugins |
Plugins (any terminal) |
/hooks |
Hooks |
Tabs
The modal has four tabs: Hooks, Plugins, Skills, and MCP Servers. Switch between them with Tab / → (forward) or Shift+Tab / ← (backward).
Hooks Tab
Hooks are shell commands (or HTTP calls) that run automatically on events like session_start, post_tool_use, notification, etc. See Creating Custom Hooks for how to write your own.
Hooks are grouped by source:
- Global hooks — from
~/.kigi/hooks/ - Project hooks — from
.kigi/hooks/in your repo - Plugin hooks — bundled with installed plugins
- Custom hooks — added manually via a path
Each hook shows:
- Event it triggers on (e.g.,
session_start,post_tool_use) - Command or URL that runs
- Timeout duration
- Status — enabled or
[disabled]
Shortcuts (Hooks tab)
| Key | Action |
|---|---|
l |
Reload all hooks |
a |
Add hook from path |
r |
Remove selected hook |
e |
Enable / disable selected hook |
Space |
Expand / collapse group |
Plugins Tab
Plugins are directories containing any combination of skills, agents, hooks, and MCP server configs.
Each plugin shows (when expanded):
- Name and version
- Scope —
user,project, orcli - Skills — names or count
- Agents — names or count
- Hooks — count
- MCP servers — count (or "blocked" if not trusted)
- Description
- Conflicts — ⚠ warning if any
Plugin hooks automatically receive KIGI_PLUGIN_ROOT and KIGI_PLUGIN_DATA environment variables (see the Plugins guide).
Shortcuts (Plugins tab)
| Key | Action |
|---|---|
r |
Reload all plugins |
i |
Install plugin from path |
e |
Enable / disable selected plugin |
Space |
Expand / collapse plugin details |
/ |
Search plugins by name |
General Keyboard Shortcuts
These work across all tabs:
| Key | Action |
|---|---|
Tab / → |
Next tab |
Shift+Tab / ← |
Previous tab |
j / ↓ |
Move selection down |
k / ↑ |
Move selection up |
Space |
Toggle expand / collapse |
/ |
Start search (Plugins) |
Backspace |
Delete search char, or re-enter search |
Esc |
Clear search, or close modal |
q |
Close modal |
Confirmation & Errors
Some actions (like uninstalling a plugin) may ask for confirmation:
- Press
yto confirm - Press
Escor any other key to cancel
Errors are shown as a message overlay — press any key to dismiss.
While an action is in progress, the modal shows "Processing..." and blocks input until the operation completes.
See Also
- Creating Custom Hooks — step-by-step guide to writing your own hooks and scripts
- Hooks user guide — events, matchers, trust model
- Hook Examples — ready-to-use sample hooks
- Plugins user guide — install and trust