snow-flow-commands

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Snow-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
undefined
bash
undefined

Start 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
undefined
snow-flow --resume snow-flow --continue
undefined

System Status

系统状态

bash
undefined
bash
undefined

Check system status

检查系统状态

snow-flow status
snow-flow status

Real-time monitoring

实时监控

snow-flow monitor
snow-flow monitor

Version info

版本信息

snow-flow --version
undefined
snow-flow --version
undefined

SPARC Modes

SPARC 模式

SPARC (Specification, Pseudocode, Architecture, Refinement, Completion) modes provide structured development workflows.
SPARC(Specification, Pseudocode, Architecture, Refinement, Completion,即规格说明、伪代码、架构、细化、完成)模式提供结构化的开发工作流。

Available Modes

可用模式

ModeCommandPurpose
Orchestrator
sparc
Multi-agent coordination
Coder
sparc run coder
Direct implementation
Researcher
sparc run researcher
Investigation and analysis
TDD
sparc tdd
Test-driven development
模式命令用途
Orchestrator
sparc
多Agent协调
Coder
sparc run coder
直接实现
Researcher
sparc run researcher
调研与分析
TDD
sparc tdd
测试驱动开发

Usage

使用方法

bash
undefined
bash
undefined

Orchestrator 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"
undefined
snow-flow sparc tdd "Add SLA breach notification"
undefined

Agent Management

Agent 管理

Spawning Agents

生成Agent

bash
undefined
bash
undefined

Spawn 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>
undefined
snow-flow agent status <agent-id>
undefined

Agent Types

Agent类型

TypePurpose
developer
ServiceNow artifact creation
researcher
Investigation and analysis
reviewer
Code review and validation
tester
Testing and QA
类型用途
developer
ServiceNow工件创建
researcher
调研与分析
reviewer
代码评审与验证
tester
测试与QA

Swarm Coordination

Swarm 协作

Multi-agent swarms for complex tasks.
bash
undefined
用于复杂任务的多Agent集群。
bash
undefined

Start 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
undefined
snow-flow swarm "objective" --strategy parallel snow-flow swarm "objective" --strategy sequential snow-flow swarm "objective" --mode development snow-flow swarm "objective" --monitor
undefined

Swarm Strategies

Swarm策略

StrategyDescription
parallel
Agents work simultaneously
sequential
Agents work in order
adaptive
Dynamic coordination
策略描述
parallel
Agent同时工作
sequential
Agent按顺序工作
adaptive
动态协调

Task Management

任务管理

bash
undefined
bash
undefined

Create 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"
undefined
snow-flow task orchestrate "Multi-step implementation"
undefined

Memory Operations

内存操作

Persistent memory across sessions.
bash
undefined
跨会话的持久化内存。
bash
undefined

Store 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
undefined
snow-flow memory clear
undefined

Configuration

配置

bash
undefined
bash
undefined

Configure 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
undefined
snow-flow config reset
undefined

Authentication

认证

bash
undefined
bash
undefined

Authenticate 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
undefined
snow-flow auth logout
undefined

Environment Variables

环境变量

VariablePurpose
SNOWCODE_MODEL
Default AI model
SNOWCODE_DEBUG_TOKENS
Enable token debugging
SNOWCODE_LOG_LEVEL
Logging verbosity
SERVICENOW_INSTANCE
ServiceNow instance URL
变量用途
SNOWCODE_MODEL
默认AI模型
SNOWCODE_DEBUG_TOKENS
启用令牌调试
SNOWCODE_LOG_LEVEL
日志详细程度
SERVICENOW_INSTANCE
ServiceNow实例URL

Common Workflows

常见工作流

Starting Development Session

启动开发会话

bash
undefined
bash
undefined

1. 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. 完成后结束更新集

undefined
undefined

Debugging Token Usage

调试令牌使用

bash
undefined
bash
undefined

Enable 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 .
undefined
cat .snow-code/token-debug/debug-*.jsonl | jq .
undefined

Multi-Agent Development

多Agent开发

bash
undefined
bash
undefined

Start 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
undefined
snow-flow monitor
undefined

TUI Shortcuts

TUI快捷键

Inside the interactive TUI:
KeyAction
Ctrl+C
Cancel current operation
Ctrl+D
Exit
Tab
Autocomplete
Up/Down
Navigate history
/help
Show help
/clear
Clear screen
/debug
Toggle debug mode
在交互式TUI中:
按键操作
Ctrl+C
取消当前操作
Ctrl+D
退出
Tab
自动补全
Up/Down
浏览历史
/help
显示帮助
/clear
清屏
/debug
切换调试模式

Best Practices

最佳实践

  1. Always start with Update Set - Track all changes
  2. Use SPARC modes - Structured development
  3. Monitor tokens - Watch context usage
  4. Persist memory - Save important data
  5. Use swarms - For complex multi-part tasks
  1. 始终从更新集开始 - 跟踪所有变更
  2. 使用SPARC模式 - 结构化开发
  3. 监控令牌 - 关注上下文使用
  4. 持久化内存 - 保存重要数据
  5. 使用集群 - 处理复杂多部分任务