Skip to content
Open
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
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ Understand-Anything works across multiple AI coding platforms.
/plugin install understand-anything
```

### One-line install (Codex / OpenCode / OpenClaw / Antigravity / Gemini CLI / Pi Agent / Vibe CLI / VS Code Copilot / Hermes / Cline / KIMI CLI / Trae / Nanobot)

### One-line install (Codex / OpenCode / OpenClaw / Antigravity / Gemini CLI / Pi Agent / Vibe CLI / VS Code Copilot / Hermes / Cline / KIMI CLI / Trae / Nanobot / Kiro)


**macOS / Linux:**
```bash
Expand All @@ -209,7 +211,7 @@ iwr -useb https://raw.githubusercontent.com/Egonex-AI/Understand-Anything/main/i

The installer clones the repo to `~/.understand-anything/repo` and creates the right symlinks for the chosen platform. Restart your CLI/IDE afterwards.

- Supported `<platform>` values: `gemini`, `codex`, `opencode`, `pi`, `openclaw`, `antigravity`, `vibe`, `vscode`, `hermes`, `cline`, `kimi`, `trae`, `nanobot`
- Supported `<platform>` values: `gemini`, `codex`, `opencode`, `pi`, `openclaw`, `antigravity`, `vibe`, `vscode`, `hermes`, `cline`, `kimi`, `trae`, `nanobot`, `kiro`
- Update later: `./install.sh --update`
- Uninstall: `./install.sh --uninstall <platform>`

Expand All @@ -231,6 +233,18 @@ For personal skills (available across all projects), run the `install.sh` above
copilot plugin install Egonex-AI/Understand-Anything:understand-anything-plugin
```

### Kiro CLI / IDE

```bash
curl -fsSL https://raw.githubusercontent.com/Egonex-AI/Understand-Anything/main/install.sh | bash -s kiro
```

After installation:
- **Kiro CLI**: `kiro-cli chat --agent understand "Analyze this project"`
- **Kiro IDE**: The skills are symlinked into `~/.kiro/skills/` and the `understand` agent is written to `~/.kiro/agents/understand.json`, so both are available after restarting the IDE.

For personal skills (available across all projects), run the `install.sh` above with the `kiro` platform.

### Platform Compatibility

| Platform | Status | Install Method |
Expand All @@ -251,6 +265,8 @@ copilot plugin install Egonex-AI/Understand-Anything:understand-anything-plugin
| KIMI CLI | ✅ Supported | `install.sh kimi` |
| Trae | ✅ Supported | `install.sh trae` |
| Nanobot | ✅ Supported | `install.sh nanobot` |
| Kiro CLI / IDE | ✅ Supported | `install.sh kiro` |


---

Expand Down
42 changes: 42 additions & 0 deletions install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ $Platforms = [ordered]@{
kimi = @{ Target = (Join-Path $HOME '.kimi\skills'); Style = 'folder' }
trae = @{ Target = (Join-Path $HOME '.trae\skills'); Style = 'per-skill' }
nanobot = @{ Target = (Join-Path $HOME '.nanobot\workspace\skills'); Style = 'per-skill' }
kiro = @{ Target = (Join-Path $HOME '.kiro\skills'); Style = 'per-skill' }
}

function Show-Usage {
Expand Down Expand Up @@ -192,6 +193,11 @@ function Link-Plugin-Root {
}
}

function ConvertTo-FileUri([string]$Path) {
# Produce a forward-slashed file URI (Windows: file:///C:/path/...).
return 'file:///' + ($Path -replace '\\', '/')
}

function Cmd-Install([string]$Id) {
$cfg = Resolve-Platform $Id
Clone-Or-Update
Expand All @@ -200,18 +206,54 @@ function Cmd-Install([string]$Id) {
Write-Host '→ Linking universal plugin root'
Link-Plugin-Root

if ($Id -eq 'kiro') {
Write-Host '→ Creating Kiro agent configuration'
$agentsDir = Join-Path $HOME '.kiro\agents'
if (-not (Test-Path $agentsDir)) { New-Item -ItemType Directory -Path $agentsDir | Out-Null }
$pluginRoot = Join-Path $RepoDir 'understand-anything-plugin'

# Build the "resources" list dynamically from the agent definitions in
# the repo so it never drifts as agents are added or removed.
$resources = @(
Get-ChildItem -Path (Join-Path $pluginRoot 'agents') -Filter '*.md' -File |
Sort-Object Name |
ForEach-Object { ConvertTo-FileUri $_.FullName }
)
$agent = [ordered]@{
name = 'understand'
description = 'Analyze codebase into interactive knowledge graph — Understand Anything'
prompt = ConvertTo-FileUri (Join-Path $pluginRoot 'skills\understand\SKILL.md')
tools = @('read', 'write', 'shell', 'grep', 'glob', 'code', 'subagent')
resources = $resources
}
$agentJson = Join-Path $agentsDir 'understand.json'
# WriteAllText emits UTF-8 without a BOM on every PowerShell version.
[System.IO.File]::WriteAllText($agentJson, ($agent | ConvertTo-Json -Depth 5))
Write-Host " ✓ $agentJson"
}

Write-Host "`n✓ Installed Understand-Anything for $Id"
Write-Host ' Restart your CLI or IDE to pick up the skills.'
if ($Id -eq 'vscode') {
Write-Host "`n Tip: VS Code can also auto-discover the plugin by opening this repo"
Write-Host ' directly (it reads .copilot-plugin/plugin.json), no symlinks needed.'
}
if ($Id -eq 'kiro') {
Write-Host "`n Usage: kiro-cli chat --agent understand `"Analyze this project`""
}
}

function Cmd-Uninstall([string]$Id) {
$cfg = Resolve-Platform $Id
Write-Host "→ Removing skill links for $Id"
Unlink-Skills $cfg.Target $cfg.Style
if ($Id -eq 'kiro') {
$agentJson = Join-Path $HOME '.kiro\agents\understand.json'
if (Test-Path $agentJson) {
Remove-Item -LiteralPath $agentJson -Force
Write-Host " ✓ removed $agentJson"
}
}
if (Remove-Reparse $PluginLink) {
Write-Host " ✓ removed $PluginLink"
}
Expand Down
37 changes: 37 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ cline|$HOME/.cline/skills|folder
kimi|$HOME/.kimi/skills|folder
trae|$HOME/.trae/skills|per-skill
nanobot|$HOME/.nanobot/workspace/skills|per-skill
kiro|$HOME/.kiro/skills|per-skill
EOF
}

Expand Down Expand Up @@ -190,12 +191,44 @@ cmd_install() {
printf -- '→ Linking universal plugin root\n'
link_plugin_root

if [[ "$id" == "kiro" ]]; then
printf -- '→ Creating Kiro agent configuration\n'
mkdir -p "$HOME/.kiro/agents"
local plugin_root="$REPO_DIR/understand-anything-plugin"

# Build the "resources" list dynamically from the agent definitions in the
# repo so it never drifts as agents are added or removed. Deterministic
# order via LC_ALL=C sort; no external deps (no jq) so it runs anywhere.
local resources="" agent_md
while IFS= read -r agent_md; do
[[ -n "$agent_md" ]] || continue
[[ -n "$resources" ]] && resources+=$',\n'
resources+=" \"file://$agent_md\""
done < <(find "$plugin_root/agents" -maxdepth 1 -type f -name '*.md' | LC_ALL=C sort)

cat > "$HOME/.kiro/agents/understand.json" <<KIROEOF
{
"name": "understand",
"description": "Analyze codebase into interactive knowledge graph — Understand Anything",
"prompt": "file://$plugin_root/skills/understand/SKILL.md",
"tools": ["read", "write", "shell", "grep", "glob", "code", "subagent"],
"resources": [
$resources
]
}
KIROEOF
printf ' ✓ %s\n' "$HOME/.kiro/agents/understand.json"
fi

printf '\n✓ Installed Understand-Anything for %s\n' "$id"
printf ' Restart your CLI or IDE to pick up the skills.\n'
if [[ "$id" == "vscode" ]]; then
printf '\n Tip: VS Code can also auto-discover the plugin by opening this repo\n'
printf ' directly (it reads .copilot-plugin/plugin.json), no symlinks needed.\n'
fi
if [[ "$id" == "kiro" ]]; then
printf '\n Usage: kiro-cli chat --agent understand "Analyze this project"\n'
fi
}

cmd_uninstall() {
Expand All @@ -207,6 +240,10 @@ cmd_uninstall() {

printf -- '→ Removing skill links for %s\n' "$id"
unlink_skills "$target" "$style"
if [[ "$id" == "kiro" && -f "$HOME/.kiro/agents/understand.json" ]]; then
rm -f "$HOME/.kiro/agents/understand.json"
printf ' ✓ removed %s\n' "$HOME/.kiro/agents/understand.json"
fi
if [[ -L "$PLUGIN_LINK" ]]; then
rm -f "$PLUGIN_LINK"
printf ' ✓ removed %s\n' "$PLUGIN_LINK"
Expand Down