@zachjxyz/moxie 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/moxie +5 -1
- package/lib/agents.sh +70 -0
- package/package.json +1 -1
package/bin/moxie
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
set -euo pipefail
|
|
19
19
|
|
|
20
|
-
MOXIE_VERSION="0.6.
|
|
20
|
+
MOXIE_VERSION="0.6.1"
|
|
21
21
|
# Resolve symlinks (npm installs bin as a symlink)
|
|
22
22
|
_self="$0"
|
|
23
23
|
while [ -L "$_self" ]; do
|
|
@@ -50,6 +50,7 @@ case "$COMMAND" in
|
|
|
50
50
|
cost) cmd_cost "$@" ;;
|
|
51
51
|
logs) cmd_logs "$@" ;;
|
|
52
52
|
models) cmd_models "$@" ;;
|
|
53
|
+
key) cmd_key "$@" ;;
|
|
53
54
|
agents) cmd_agents "$@" ;;
|
|
54
55
|
doctor) cmd_doctor "$@" ;;
|
|
55
56
|
version) echo "moxie $MOXIE_VERSION" ;;
|
|
@@ -66,6 +67,7 @@ Commands:
|
|
|
66
67
|
cost Token usage breakdown by phase and agent
|
|
67
68
|
logs Tail or view logs for a phase
|
|
68
69
|
models List available AI Gateway models
|
|
70
|
+
key Manage AI Gateway API key (set, status, remove)
|
|
69
71
|
agents List configured agents (agents swap to change models)
|
|
70
72
|
doctor Check agent CLIs, auth, and project health
|
|
71
73
|
version Print version
|
|
@@ -86,6 +88,8 @@ Usage:
|
|
|
86
88
|
moxie models List all AI Gateway models
|
|
87
89
|
moxie models -f anthropic Filter models by provider/name
|
|
88
90
|
moxie agents swap Add/remove/swap gateway models
|
|
91
|
+
moxie key set Set or update AI Gateway API key
|
|
92
|
+
moxie key Check key status
|
|
89
93
|
moxie doctor Check agents and dependencies
|
|
90
94
|
|
|
91
95
|
Pipeline: rfc → audit → fix → plan → build
|
package/lib/agents.sh
CHANGED
|
@@ -636,6 +636,76 @@ os.rename(tmp_path, config_path)
|
|
|
636
636
|
"$(IFS='|'; echo "${new_gw_models[*]}")"
|
|
637
637
|
}
|
|
638
638
|
|
|
639
|
+
# ---- Manage AI Gateway API key ----
|
|
640
|
+
|
|
641
|
+
cmd_key() {
|
|
642
|
+
local subcmd="${1:-status}"
|
|
643
|
+
shift 2>/dev/null || true
|
|
644
|
+
|
|
645
|
+
case "$subcmd" in
|
|
646
|
+
set|update|add)
|
|
647
|
+
gateway_store_key "vercel-ai-gateway"
|
|
648
|
+
;;
|
|
649
|
+
status|check)
|
|
650
|
+
if gateway_has_key "vercel-ai-gateway"; then
|
|
651
|
+
echo "AI Gateway key: configured"
|
|
652
|
+
if [ "$MOXIE_PLATFORM" = "darwin" ]; then
|
|
653
|
+
echo " Storage: macOS Keychain"
|
|
654
|
+
elif _is_wsl; then
|
|
655
|
+
echo " Storage: Windows User environment"
|
|
656
|
+
else
|
|
657
|
+
echo " Storage: ~/.moxie/vercel-ai-gateway.key.enc"
|
|
658
|
+
fi
|
|
659
|
+
else
|
|
660
|
+
echo "AI Gateway key: not configured"
|
|
661
|
+
echo ""
|
|
662
|
+
echo "Set one with: moxie key set"
|
|
663
|
+
fi
|
|
664
|
+
;;
|
|
665
|
+
remove|delete)
|
|
666
|
+
if [ "$MOXIE_PLATFORM" = "darwin" ]; then
|
|
667
|
+
security delete-generic-password -a moxie -s "vercel-ai-gateway" 2>/dev/null && \
|
|
668
|
+
echo "Key removed from macOS Keychain." || \
|
|
669
|
+
echo "No key found to remove."
|
|
670
|
+
elif _is_wsl; then
|
|
671
|
+
powershell.exe -Command "[System.Environment]::SetEnvironmentVariable('MOXIE_GATEWAY_KEY_vercel-ai-gateway', \$null, 'User')" 2>/dev/null && \
|
|
672
|
+
echo "Key removed from Windows environment." || \
|
|
673
|
+
echo "No key found to remove."
|
|
674
|
+
elif [ "$MOXIE_PLATFORM" = "linux" ]; then
|
|
675
|
+
local enc_file="$HOME/.moxie/vercel-ai-gateway.key.enc"
|
|
676
|
+
if [ -f "$enc_file" ]; then
|
|
677
|
+
rm -f "$enc_file"
|
|
678
|
+
echo "Key removed: $enc_file"
|
|
679
|
+
else
|
|
680
|
+
echo "No key found to remove."
|
|
681
|
+
fi
|
|
682
|
+
fi
|
|
683
|
+
;;
|
|
684
|
+
help|--help|-h)
|
|
685
|
+
cat <<'EOF'
|
|
686
|
+
Usage: moxie key [subcommand]
|
|
687
|
+
|
|
688
|
+
Manage your Vercel AI Gateway API key.
|
|
689
|
+
|
|
690
|
+
Subcommands:
|
|
691
|
+
set Set or update the API key
|
|
692
|
+
status Check if a key is configured (default)
|
|
693
|
+
remove Delete the stored key
|
|
694
|
+
|
|
695
|
+
Examples:
|
|
696
|
+
moxie key set Enter a new API key
|
|
697
|
+
moxie key Check current key status
|
|
698
|
+
moxie key remove Delete stored key
|
|
699
|
+
EOF
|
|
700
|
+
;;
|
|
701
|
+
*)
|
|
702
|
+
echo "Unknown subcommand: $subcmd" >&2
|
|
703
|
+
echo "Run 'moxie key help' for usage." >&2
|
|
704
|
+
return 1
|
|
705
|
+
;;
|
|
706
|
+
esac
|
|
707
|
+
}
|
|
708
|
+
|
|
639
709
|
# ---- List agents ----
|
|
640
710
|
|
|
641
711
|
cmd_agents() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zachjxyz/moxie",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Run multiple AI coding agents through spec-driven phases with quorum convergence. Supports CLI agents (Claude, Codex, Qwen, Aider, Goose, Amp, Cline, Roo) and Vercel AI Gateway models.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"moxie": "bin/moxie"
|