介绍
# NodeTool
可视化 AI 工作流构建器,结合了 ComfyUI 的节点化灵活性与 n8n 的自动化能力。在您的本地机器上构建 LLM 智能体、RAG 管道和多模态数据流。
## 快速开始
```bash # See system info nodetool info
# List workflows nodetool workflows list
# Run a workflow interactively nodetool run <workflow_id>
# Start of chat interface nodetool chat
# Start of web server nodetool serve ```
## 安装
### Linux / macOS
快速单行安装:
```bash curl -fsSL https://raw.githubusercontent.com/nodetool-ai/nodetool/refs/heads/main/install.sh | bash ```
指定自定义目录:
```bash curl -fsSL https://raw.githubusercontent.com/nodetool-ai/nodetool/refs/heads/main/install.sh | bash --prefix ~/.nodetool ```
**非交互模式(自动,无提示):**
两个脚本均支持静默安装:
```bash # Linux/macOS - use -y curl -fsSL https://raw.githubusercontent.com/nodetool-ai/nodetool/refs/heads/main/install.sh | bash -y
# Windows - use -Yes irm https://raw.githubusercontent.com/nodetool-ai/nodetool/refs/heads/main/install.ps1 | iex; .\install.ps1 -Yes ```
**非交互模式下会发生什么:** - 所有确认提示均被自动跳过 - 安装过程无需用户输入即可继续 - 非常适合 CI/CD 管道或自动化设置
### Windows
快速单行安装:
```powershell irm https://raw.githubusercontent.com/nodetool-ai/nodetool/refs/heads/main/install.ps1 | iex ```
指定自定义目录:
```powershell .\install.ps1 -Prefix "C:\nodetool" ```
非交互模式:
```powershell .\install.ps1 -Yes ```
## 核心命令
### 工作流
管理和执行 NodeTool 工作流:
```bash # List all workflows (user + example) nodetool workflows list
# Get details for a specific workflow nodetool workflows get <workflow_id>
# Run workflow by ID nodetool run <workflow_id>
# Run workflow from file nodetool run workflow.json
# Run with JSONL output (for automation) nodetool run <workflow_id> --jsonl ```
### 运行选项
以不同模式执行工作流:
```bash # Interactive mode (default) - pretty output nodetool run workflow_abc123
# JSONL mode - streaming JSON for subprocess use nodetool run workflow_abc123 --jsonl
# Stdin mode - pipe RunJobRequest JSON echo '{"workflow_id":"abc","user_id":"1","auth_token":"token","params":{}}' | nodetool run --stdin --jsonl
# With custom user ID nodetool run workflow_abc123 --user-id "custom_user_id"
# With auth token nodetool run workflow_abc123 --auth-token "my_auth_token" ```
### 资产
管理工作流资产(节点、模型、文件):
```bash # List all assets nodetool assets list
# Get asset details nodetool assets get <asset_id> ```
### 包
管理 NodeTool 包(导出工作流、生成文档):
```bash # List packages nodetool package list
# Generate documentation nodetool package docs
# Generate node documentation nodetool package node-docs
# Generate workflow documentation (Jekyll) nodetool package workflow-docs
# Scan directory for nodes and create package nodetool package scan
# Initialize new package project nodetool package init ```
### 任务
管理后台任务执行:
```bash # List jobs for a user nodetool jobs list
# Get job details nodetool jobs get <job_id>
# Get job logs nodetool jobs logs <job_id>
# Start background job for workflow nodetool jobs start <workflow_id> ```
### 部署
将 NodeTool 部署到云平台(RunPod、GCP、Docker):
```bash # Initialize deployment.yaml nodetool deploy init
# List deployments nodetool deploy list
# Add new deployment nodetool deploy add
# Apply deployment configuration nodetool deploy apply
# Check deployment status nodetool deploy status <deployment_name>
# View deployment logs nodetool deploy logs <deployment_name>
# Destroy deployment nodetool deploy destroy <deployment_name>
# Manage collections on deployed instance nodetool deploy collections
# Manage database on deployed instance nodetool deploy database
# Manage workflows on deployed instance nodetool deploy workflows
# See what changes will be made nodetool deploy plan ```
### 模型管理
发现和管理 AI 模型(HuggingFace、Ollama):
```bash # List cached HuggingFace models by type nodetool model list-hf <hf_type>
# List all HuggingFace cache entries nodetool model list-hf-all
# List supported HF types nodetool model hf-types
# Inspect HuggingFace cache nodetool model hf-cache
# Scan cache for info nodetool admin scan-cache ```
### 管理
维护模型缓存和清理:
```bash # Calculate total cache size nodetool admin cache-size
# Delete HuggingFace model from cache nodetool admin delete-hf <model_name>
# Download HuggingFace models with progress nodetool admin download-hf <model_name>
# Download Ollama models nodetool admin download-ollama <model_name> ```
### 聊天与服务器
交互式聊天和 Web 界面:
```bash # Start CLI chat nodetool chat
# Start chat server (WebSocket + SSE) nodetool chat-server
# Start FastAPI backend server nodetool serve --host 0.0.0.0 --port 8000
# With static assets folder nodetool serve --static-folder ./static --apps-folder ./apps
# Development mode with auto-reload nodetool serve --reload
# Production mode nodetool serve --production ```
### 代理
启动 HTTPS 反向代理:
```bash # Start proxy server nodetool proxy
# Check proxy status nodetool proxy-status
# Validate proxy config nodetool proxy-validate-config
# Run proxy daemon with ACME HTTP + HTTPS nodetool proxy-daemon ```
### 其他命令
```bash # View settings and secrets nodetool settings show
# Generate custom HTML app for workflow nodetool vibecoding
# Run workflow and export as Python DSL nodetool dsl-export
# Export workflow as Gradio app nodetool gradio-export
# Regenerate DSL nodetool codegen
# Manage database migrations nodetool migrations
# Synchronize database with remote nodetool sync ```
## 使用场景
### 工作流执行
运行 NodeTool 工作流并获取结构化输出:
```bash # Run workflow interactively nodetool run my_workflow_id
# Run and stream JSONL output nodetool run my_workflow_id --jsonl | jq -r '.[] | "\(.status) | \(.output)"' ```
### 包创建
为自定义包生成文档:
```bash # Scan for nodes and create package nodetool package scan
# Generate complete documentation nodetool package docs ```
### 部署
将 NodeTool 实例部署到云端:
```bash # Initialize deployment config nodetool deploy init
# Add RunPod deployment nodetool deploy add
# Deploy and start nodetool deploy apply ```
### 模型管理
检查和管理缓存的 AI 模型:
```bash # List all available models nodetool model list-hf-all
# Inspect cache nodetool model hf-cache ```
## 安装
### Linux / macOS
快速单行安装:
```bash curl -fsSL https://raw.githubusercontent.com/nodetool-ai/nodetool/refs/heads/main/install.sh | bash ```
指定自定义目录:
```bash curl -fsSL https://raw.githubusercontent.com/nodetool-ai/nodetool/refs/heads/main/install.sh | bash --prefix ~/.nodetool ```
**非交互模式(自动,无提示):**
两个脚本均支持静默安装:
```bash # Linux/macOS - use -y curl -fsSL https://raw.githubusercontent.com/nodetool-ai/nodetool/refs/heads/main/install.sh | bash -y
# Windows - use -Yes irm https://raw.githubusercontent.com/nodetool-ai/nodetool/refs/heads/main/install.ps1 | iex; .\install.ps1 -Yes ```
**非交互模式下会发生什么:** - 所有确认提示均被自动跳过 - 安装过程无需用户输入即可继续 - 非常适合 CI/CD 管道或自动化设置
### Windows
快速单行安装:
```powershell irm https://raw.githubusercontent.com/nodetool-ai/nodetool/refs/heads/main/install.ps1 | iex ```
指定自定义目录:
```powershell .\install.ps1 -Prefix "C:\nodetool" ```
非交互模式:
```powershell .\install.ps1 -Yes ```
## 安装内容
安装程序将设置: - **micromamba** — Python 包管理器(conda 的替代品) - **NodeTool 环境** — 位于 `~/.nodetool/env` 的 Conda 环境 - **Python 包** — 来自 NodeTool 注册表的 `nodetool-core`、`nodetool-base` - **封装脚本** — 可在任何终端使用的 `nodetool` CLI
### 环境设置
安装后,将自动配置以下变量:
```bash # Conda environment export MAMBA_ROOT_PREFIX="$HOME/.nodetool/micromamba" export PATH="$HOME/.nodetool/env/bin:$HOME/.nodetool/env/Library/bin:$PATH"
# Model cache directories export HF_HOME="$HOME/.nodetool/cache/huggingface" export OLLAMA_MODELS="$HOME/.nodetool/cache/ollama" ```
## 系统信息
检查 NodeTool 环境和已安装的包:
```bash nodetool info ```
输出显示: - 版本 - Python 版本 - 平台/架构 - 已安装的 AI 包(OpenAI、Anthropic、Google、HF、Ollama、fal-client) - 环境变量 - API 密钥状态