feat(cli): add interactive chat REPL mode for native muse CLI

This commit is contained in:
operator
2026-10-05 15:58:33 +00:00
parent e44d6c77f4
commit 7c6c3a8fbf
3 changed files with 203 additions and 0 deletions
+7
View File
@@ -26,6 +26,7 @@ show_usage() {
done
echo ""
echo "Common commands:"
echo " chat [--thread <id>] Launch interactive conversational shell / REPL"
echo " status Check agent status, sessions, and unread"
echo " threads List active threads and sidechats"
echo " history --thread <id> View message history"
@@ -96,6 +97,12 @@ if [[ ${#POSITIONAL[@]} -eq 0 ]]; then
POSITIONAL=("status")
fi
# If subcommand is 'chat', launch interactive chat REPL
if [[ "${POSITIONAL[0]}" == "chat" ]]; then
shift_args=("${POSITIONAL[@]:1}")
exec python3 "$NETVM_BIN/muse-chat-repl.py" "$ACCOUNT" "${shift_args[@]}"
fi
# Execute command; if auth fails and auto-cdp fails, offer interactive OTP sign-in if running interactively
set +e
"$NETVM_BIN/muse-cli-node" "$ACCOUNT" "${POSITIONAL[@]}"