snow-flow-commands
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSnow-Flow CLI Commands
Snow-Flow CLI 命令
Snow-Flow provides a powerful CLI for ServiceNow development orchestration.
Snow-Flow 为ServiceNow开发编排提供了功能强大的CLI。
Core Commands
核心命令
Starting Snow-Flow
启动Snow-Flow
bash
undefinedbash
undefinedStart interactive TUI
启动交互式TUI
snow-flow
snow-flow
Start with specific model
使用特定模型启动
snow-flow --model claude-sonnet
snow-flow --model claude-opus
snow-flow --model gpt-4
snow-flow --model claude-sonnet
snow-flow --model claude-opus
snow-flow --model gpt-4
Resume previous session
恢复之前的会话
snow-flow --resume
snow-flow --continue
undefinedsnow-flow --resume
snow-flow --continue
undefinedSystem Status
系统状态
bash
undefinedbash
undefinedCheck system status
检查系统状态
snow-flow status
snow-flow status
Real-time monitoring
实时监控
snow-flow monitor
snow-flow monitor
Version info
版本信息
snow-flow --version
undefinedsnow-flow --version
undefinedSPARC Modes
SPARC 模式
SPARC (Specification, Pseudocode, Architecture, Refinement, Completion) modes provide structured development workflows.
SPARC(Specification, Pseudocode, Architecture, Refinement, Completion,即规格说明、伪代码、架构、细化、完成)模式提供结构化的开发工作流。
Available Modes
可用模式
| Mode | Command | Purpose |
|---|---|---|
| Orchestrator | | Multi-agent coordination |
| Coder | | Direct implementation |
| Researcher | | Investigation and analysis |
| TDD | | Test-driven development |
| 模式 | 命令 | 用途 |
|---|---|---|
| Orchestrator | | 多Agent协调 |
| Coder | | 直接实现 |
| Researcher | | 调研与分析 |
| TDD | | 测试驱动开发 |
Usage
使用方法
bash
undefinedbash
undefinedOrchestrator mode (default)
Orchestrator模式(默认)
snow-flow sparc "Create incident dashboard widget"
snow-flow sparc "Create incident dashboard widget"
Specific mode
特定模式
snow-flow sparc run coder "Implement auto-assignment business rule"
snow-flow sparc run researcher "Analyze current incident workflow"
snow-flow sparc run coder "Implement auto-assignment business rule"
snow-flow sparc run researcher "Analyze current incident workflow"
Test-driven development
测试驱动开发
snow-flow sparc tdd "Add SLA breach notification"
undefinedsnow-flow sparc tdd "Add SLA breach notification"
undefinedAgent Management
Agent 管理
Spawning Agents
生成Agent
bash
undefinedbash
undefinedSpawn specialized agent
生成专用Agent
snow-flow agent spawn developer
snow-flow agent spawn researcher
snow-flow agent spawn reviewer
snow-flow agent spawn developer
snow-flow agent spawn researcher
snow-flow agent spawn reviewer
List active agents
列出活跃Agent
snow-flow agent list
snow-flow agent list
Agent status
Agent状态
snow-flow agent status <agent-id>
undefinedsnow-flow agent status <agent-id>
undefinedAgent Types
Agent类型
| Type | Purpose |
|---|---|
| ServiceNow artifact creation |
| Investigation and analysis |
| Code review and validation |
| Testing and QA |
| 类型 | 用途 |
|---|---|
| ServiceNow工件创建 |
| 调研与分析 |
| 代码评审与验证 |
| 测试与QA |
Swarm Coordination
Swarm 协作
Multi-agent swarms for complex tasks.
bash
undefined用于复杂任务的多Agent集群。
bash
undefinedStart swarm with objective
以目标启动集群
snow-flow swarm "Build HR portal with self-service features"
snow-flow swarm "Build HR portal with self-service features"
Swarm options
集群选项
snow-flow swarm "objective" --strategy parallel
snow-flow swarm "objective" --strategy sequential
snow-flow swarm "objective" --mode development
snow-flow swarm "objective" --monitor
undefinedsnow-flow swarm "objective" --strategy parallel
snow-flow swarm "objective" --strategy sequential
snow-flow swarm "objective" --mode development
snow-flow swarm "objective" --monitor
undefinedSwarm Strategies
Swarm策略
| Strategy | Description |
|---|---|
| Agents work simultaneously |
| Agents work in order |
| Dynamic coordination |
| 策略 | 描述 |
|---|---|
| Agent同时工作 |
| Agent按顺序工作 |
| 动态协调 |
Task Management
任务管理
bash
undefinedbash
undefinedCreate task
创建任务
snow-flow task create "Implement feature X"
snow-flow task create "Implement feature X"
List tasks
列出任务
snow-flow task list
snow-flow task list
Task status
任务状态
snow-flow task status <task-id>
snow-flow task status <task-id>
Orchestrate complex task
编排复杂任务
snow-flow task orchestrate "Multi-step implementation"
undefinedsnow-flow task orchestrate "Multi-step implementation"
undefinedMemory Operations
内存操作
Persistent memory across sessions.
bash
undefined跨会话的持久化内存。
bash
undefinedStore data
存储数据
snow-flow memory store <key> <data>
snow-flow memory store <key> <data>
Retrieve data
检索数据
snow-flow memory get <key>
snow-flow memory get <key>
List all keys
列出所有键
snow-flow memory list
snow-flow memory list
Search memory
搜索内存
snow-flow memory search <query>
snow-flow memory search <query>
Clear memory
清空内存
snow-flow memory clear
undefinedsnow-flow memory clear
undefinedConfiguration
配置
bash
undefinedbash
undefinedConfigure ServiceNow instance
配置ServiceNow实例
snow-flow config instance <url>
snow-flow config instance <url>
Set credentials
设置凭据
snow-flow config auth
snow-flow config auth
View configuration
查看配置
snow-flow config show
snow-flow config show
Reset configuration
重置配置
snow-flow config reset
undefinedsnow-flow config reset
undefinedAuthentication
认证
bash
undefinedbash
undefinedAuthenticate with ServiceNow
与ServiceNow认证
snow-flow auth servicenow
snow-flow auth servicenow
Authenticate with enterprise services
与企业服务认证
snow-flow auth enterprise
snow-flow auth enterprise
Check auth status
检查认证状态
snow-flow auth status
snow-flow auth status
Logout
登出
snow-flow auth logout
undefinedsnow-flow auth logout
undefinedEnvironment Variables
环境变量
| Variable | Purpose |
|---|---|
| Default AI model |
| Enable token debugging |
| Logging verbosity |
| ServiceNow instance URL |
| 变量 | 用途 |
|---|---|
| 默认AI模型 |
| 启用令牌调试 |
| 日志详细程度 |
| ServiceNow实例URL |
Common Workflows
常见工作流
Starting Development Session
启动开发会话
bash
undefinedbash
undefined1. Start snow-flow
1. 启动snow-flow
snow-flow
snow-flow
2. In TUI, create Update Set first
2. 在TUI中,先创建更新集
3. Develop features
3. 开发功能
4. Complete Update Set when done
4. 完成后结束更新集
undefinedundefinedDebugging Token Usage
调试令牌使用
bash
undefinedbash
undefinedEnable token debugging
启用令牌调试
SNOWCODE_DEBUG_TOKENS=true snow-flow
SNOWCODE_DEBUG_TOKENS=true snow-flow
Check debug output
检查调试输出
cat .snow-code/token-debug/debug-*.jsonl | jq .
undefinedcat .snow-code/token-debug/debug-*.jsonl | jq .
undefinedMulti-Agent Development
多Agent开发
bash
undefinedbash
undefinedStart swarm for complex feature
为复杂功能启动集群
snow-flow swarm "Build customer portal" --strategy parallel --monitor
snow-flow swarm "Build customer portal" --strategy parallel --monitor
Monitor progress
监控进度
snow-flow monitor
undefinedsnow-flow monitor
undefinedTUI Shortcuts
TUI快捷键
Inside the interactive TUI:
| Key | Action |
|---|---|
| Cancel current operation |
| Exit |
| Autocomplete |
| Navigate history |
| Show help |
| Clear screen |
| Toggle debug mode |
在交互式TUI中:
| 按键 | 操作 |
|---|---|
| 取消当前操作 |
| 退出 |
| 自动补全 |
| 浏览历史 |
| 显示帮助 |
| 清屏 |
| 切换调试模式 |
Best Practices
最佳实践
- Always start with Update Set - Track all changes
- Use SPARC modes - Structured development
- Monitor tokens - Watch context usage
- Persist memory - Save important data
- Use swarms - For complex multi-part tasks
- 始终从更新集开始 - 跟踪所有变更
- 使用SPARC模式 - 结构化开发
- 监控令牌 - 关注上下文使用
- 持久化内存 - 保存重要数据
- 使用集群 - 处理复杂多部分任务