Add default agent shortcuts

This commit is contained in:
David Heinemeier Hansson
2026-08-04 05:53:30 -07:00
parent ce93c31af6
commit 5ea4fb56f4
4 changed files with 57 additions and 2 deletions
+19 -2
View File
@@ -1,9 +1,22 @@
#!/bin/bash
# omarchy:summary=Launch the default coding agent in a terminal
# omarchy:args=[prompt...]
# omarchy:args=[--inline] [prompt...]
# omarchy:examples=omarchy launch agent | omarchy launch agent "Review this project"
if [[ ${1:-} == "--inline" ]]; then
inline=true
shift
else
inline=false
fi
agent_file="$HOME/.local/state/omarchy/defaults/agent"
if [[ ! -s $agent_file ]]; then
exec omarchy-menu summon setup.default.agent
fi
agent=$(omarchy-default-agent)
if omarchy-cmd-missing "$agent"; then
@@ -58,4 +71,8 @@ pi | omp | claude | codex | grok)
;;
esac
exec omarchy-launch-tui "${command[@]}"
if [[ $inline == "true" ]]; then
exec "${command[@]}"
else
exec omarchy-launch-tui "${command[@]}"
fi