Plugin cloning via menu (#6433)

* Add plugin cloning via menu

* Split plugin commands by action

* Keep plugin enablement in action commands

* Remove unused plugin edit command

* Simplify plugin rescan arguments

* Assume Omarchy shell is running for plugin commands

* Remove plugin compatibility dispatcher

* Flatten plugin clone command

* Keep only shared plugin helpers

* Remove plugin rescan wrapper

* Keep plugin commands self-contained

* Simplify plugin clone lifecycle
This commit is contained in:
David Heinemeier Hansson
2026-07-29 21:34:47 -04:00
committed by GitHub
parent fb564e3ac1
commit f8835df644
28 changed files with 1238 additions and 1012 deletions
+46
View File
@@ -0,0 +1,46 @@
#!/bin/bash
# omarchy:summary=List discovered shell plugins
# omarchy:group=plugin
# omarchy:args=[--json]
set -euo pipefail
json="false"
while (( $# > 0 )); do
case "$1" in
--json)
json="true"
;;
-h | --help)
echo "Usage: omarchy plugin list [--json]"
exit 0
;;
*)
echo "omarchy-plugin-list: unknown option: $1" >&2
exit 1
;;
esac
shift
done
plugins=$(omarchy-shell shell listPlugins)
if [[ $json == "true" ]]; then
printf '%s\n' "$plugins"
exit 0
fi
jq -r '
.[] |
[ .id,
(if .enabled then "enabled" else "disabled" end),
(if .firstParty then "first-party" else "third-party" end),
((.kinds // []) | join(",")),
(.name // "")
] | @tsv
' <<<"$plugins" | awk -F '\t' '
BEGIN { printf "%-32s %-9s %-11s %-18s %s\n", "ID", "STATE", "SOURCE", "KINDS", "NAME" }
{ printf "%-32s %-9s %-11s %-18s %s\n", $1, $2, $3, $4, $5 }
'