feat: support check-related features (#162)

We can run `argc check` to ensure that everything is ready (environment variables, Node/Python dependencies, mcp-bridge server)
This commit is contained in:
sigoden
2025-02-12 07:33:41 +08:00
committed by GitHub
parent 50ee642b3e
commit 4ac72b5845
5 changed files with 189 additions and 5 deletions
+12
View File
@@ -46,6 +46,18 @@ stop() {
"$0" recovery-functions -S
}
# @cmd Check the mcp bridge server is running
check() {
if [[ -f "$MCP_JSON_PATH" ]]; then
echo "Check mcp/bridge"
pid="$(get-server-pid)"
if [[ -z "$pid" ]]; then
stop
echo "✗ server is not running"
fi
fi
}
# @cmd Run the mcp tool
# @arg tool![`_choice_tool`] The tool name
# @arg json The json data