mirror of
https://github.com/prdlk/dotfiles.git
synced 2026-11-04 03:47:36 +00:00
feat(cable): add agents and obsidian cable configuration files
This commit is contained in:
1 parent
04515ea8d2
commit
af4711d52d
2 files changed
+138
No files matched your search
@@ -0,0 +1,72 @@
|
||||
[metadata]
|
||||
name = "agents"
|
||||
description = """
|
||||
AI coding agent CLIs found on PATH. Enter starts the agent's TUI in the current
|
||||
directory. ctrl-a in fish opens this cable (_agents_bind).
|
||||
"""
|
||||
requirements = []
|
||||
|
||||
# Entries are "<name + description>\t<launch command>\t<binary>". Only agents
|
||||
# whose binary resolves on PATH are listed; add a row to the table to support
|
||||
# another one. The launch command may carry flags (claude, as in `ai`).
|
||||
[source]
|
||||
command = '''
|
||||
while IFS='|' read -r bin cmd desc; do
|
||||
command -v "$bin" >/dev/null 2>&1 &&
|
||||
printf '%-13s %s\t%s\t%s\n' "$bin" "$desc" "$cmd" "$bin"
|
||||
done <<'EOF'
|
||||
omp|omp|oh-my-pi coding agent
|
||||
claude|claude --dangerously-skip-permissions|Claude Code (Anthropic)
|
||||
codex|codex|Codex CLI (OpenAI)
|
||||
opencode|opencode|OpenCode (sst)
|
||||
crush|crush|Crush (Charm)
|
||||
pi|pi|pi coding agent
|
||||
cursor-agent|cursor-agent|Cursor Agent CLI
|
||||
copilot|copilot|GitHub Copilot CLI
|
||||
gemini|gemini|Gemini CLI (Google)
|
||||
agy|agy|Antigravity CLI (Google)
|
||||
grok|grok|Grok CLI (xAI)
|
||||
muse|muse|Muse Code (Meta)
|
||||
ori|ori|Ori (OpenRouter)
|
||||
hermes|hermes|Hermes Agent (Nous Research)
|
||||
amp|amp|Amp (Sourcegraph)
|
||||
droid|droid|Droid (Factory)
|
||||
qwen|qwen|Qwen Code (Alibaba)
|
||||
kimi|kimi|Kimi CLI (Moonshot)
|
||||
goose|goose|goose (Block)
|
||||
aider|aider|aider
|
||||
auggie|auggie|Auggie (Augment Code)
|
||||
kiro-cli|kiro-cli|Kiro CLI (AWS)
|
||||
cn|cn|Continue CLI
|
||||
fractal|fractal|fractal
|
||||
EOF
|
||||
'''
|
||||
shell = "bash"
|
||||
display = "{split:\\t:0}"
|
||||
output = "{split:\\t:1}"
|
||||
|
||||
[preview]
|
||||
command = '''
|
||||
p=$(command -v '{split:\t:2}')
|
||||
printf 'command %s\npath %s\n' '{split:\t:1}' "$p"
|
||||
r=$(readlink -f "$p")
|
||||
[ "$r" != "$p" ] && printf 'resolves %s\n' "$r"
|
||||
# ~/.local/bin wrappers install the agent through mise on first run.
|
||||
tool=$(grep -o 'mise x "[^"]*"' "$r" 2>/dev/null | cut -d'"' -f2)
|
||||
[ -n "$tool" ] && printf 'mise %s\n' "$tool"
|
||||
'''
|
||||
shell = "bash"
|
||||
|
||||
[keybindings]
|
||||
enter = "actions:launch"
|
||||
|
||||
# AGENTS_STATE (set by _agents_bind) tells the fish binding an agent ran, so it
|
||||
# does not move the cursor back up as it does after a cancel.
|
||||
[actions.launch]
|
||||
description = "Start the agent's TUI"
|
||||
command = '''
|
||||
[ -n "$AGENTS_STATE" ] && echo ran >"$AGENTS_STATE"
|
||||
{split:\t:1}
|
||||
'''
|
||||
shell = "bash"
|
||||
mode = "execute"
|
||||
Reference in new issue
Block a user