Snow CLI (snow-ai)

repository·main·Indexed 22 days ago

https://github.com/mayday-wpf/snow-cli

An agentic coding tool for terminal-based AI assistance, allowing developers to perform codebase analysis, vulnerability hunting, and automated coding workflows. It includes the snow-ai npm package and integrations for VSCode and JetBrains IDEs, featuring the ACE Code Search system for symbol navigation, reference finding, and real-time diagnostics across supported languages like TypeScript, Python, Go, Rust, Java, and C#.

Tokens
107.1K
Snippets
319
Records
529
Agent score
75%

What's inside Snow CLI

  1. Overview of Snow CLI Configuration and Features

    main

    Snow CLI offers extensive configuration options and functional modes for agentic coding:

    Configuration Categories

    • Initial Setup: API configuration, model selection, and basic settings.
    • Advanced Settings: Proxy/browser settings, codebase integration, sub-agent management (including project-level Markdown agents), and sensitive command protection.
    • Automation & UI: Workflow automation via Hooks, theme customization, and third-party proxy/relay station configuration.

    Key Functional Modes

    • Command Injection Mode: Execute commands directly within messages.
    • Vulnerability Hunter Mode: Specialized security analysis and vulnerability detection.
    • Headless Mode: Fast command-line dialogue and script integration.
    • MCP (Model Context Protocol): Manage and configure external MCP services.
    • Async Task Management: Create and manage background tasks with approval workflows.
    • Team Mode: Multi-agent collaboration and parallel task execution.
  2. Use the Command Panel in Snow CLI

    main

    The Command Panel is a quick command system that allows you to execute operations using slash commands. All commands begin with a / and are entered directly into the chat input box.

    Command Categories

    Commands are organized into several functional categories:

    • Session management: Control conversation state (e.g., /clear, /resume, /export, /compact).
    • Mode switching: Change the AI's operational mode (e.g., /yolo, /plan, /vulnerability-hunting).
    • Code review & analysis: Perform deep code tasks (e.g., /review, /diff, /reindex, /codebase).
    • Configuration & management: Manage IDE connections, MCP, and system settings (e.g., /connect, /mcp, /config).
    • Custom extensions: Use user-defined commands and skills (e.g., /custom, /skills).
    • Special commands: Agent and task-specific triggers (e.g., /agent-, /todo-).
    • Goal management: Persistent, objective-driven automation (e.g., /goal).
  3. Features of the Snow CLI JetBrains Plugin

    main

    The plugin provides several integration features between your IDE and the Snow AI CLI:

    • WebSocket Integration: Enables real-time bi-directional communication.
    • Editor Context Tracking: Automatically shares your active file, cursor position, and selected text with the CLI.
    • Code Diagnostics: Shares and retrieves code diagnostics with the AI.
    • Navigation & Search: Supports Go to Definition and Find References for symbols via the CLI.
    • Document Symbols: Extracts and shares the document structure with the AI.
    • Reliability: Includes an auto-reconnection mechanism using an exponential backoff strategy.
    • Terminal Integration: Provides quick access to the Snow CLI from the IDE toolbar.
  4. Overview of Snow CLI Skills

    main

    Skills are an extension feature in Snow CLI that allow you to create specialized knowledge bases and toolkits. They encapsulate domain-specific knowledge, reusable task patterns, and practical tools. Skills are fully compatible with Claude Code Skills.

    Skill Types

    • Tool Skills: Encapsulate specific tools (e.g., slack-gif-creator).
    • Knowledge Skills: Contain professional knowledge and best practices.
    • Template Skills: Provide reusable code, document, or configuration templates.
    • Workflow Skills: Define standardized task execution processes.
  5. What is Team Mode in Snow CLI

    main
    Team Mode (Multi-Agent Collaboration) is an advanced feature that allows you to launch multiple AI teammates working independently and simultaneously. Teammates coordinate through a shared task list to achieve parallel development. Each teammate operates in an independent Git worktree located in the .snow/worktrees/ directory, ensuring isolated context and preventing interference with the main workflow.
  6. Core Concepts of Team Mode

    main

    Team Mode allows you to orchestrate multiple AI agents (Teammates) working in parallel on a single project. Unlike Sub-Agents, which operate in independent contexts, Team Mode teammates work in independent Git worktrees, enabling true parallel development and bidirectional communication.

    Key Abstractions

    • Teammate: An AI agent with a specific role and prompt, operating in its own Git worktree.
    • Shared Task List: A centralized list of tasks that can be assigned to specific teammates.
    • Message Communication: A system for teammates to send messages to specific teammates or broadcast to the entire team.

    Comparison: Team Mode vs. Sub-Agents

    FeatureSub-AgentTeam Mode
    WorkspaceIndependent contextIndependent Git worktree
    ParallelismSerial invocationTrue parallel
    PersistenceTemporaryPersistent worktree
    CollaborationUnidirectionalBidirectional communication
    MergeReturn resultsGit merge
  7. Use the StatusLine context object in plugins

    main

    The getItems(context) method receives a context object containing real-time information about the Snow CLI environment.

    Core Fields:

    • cwd: Current working directory.
    • platform: Node.js platform (e.g., darwin, linux, win32).
    • language: Current language (en, zh, zh-TW).
    • simpleMode: Boolean indicating if the simple theme is active.
    • labels: Localized labels for reuse.
    • system: A snapshot of the system state.

    Key system sub-objects:

    • system.memory: usageMb, formattedUsage.
    • system.modes: Flags like yolo, plan, telemetry, simple.
    • system.ide: connectionStatus, editorContext (active file, cursor position).
    • system.backend: connectionStatus, instanceName.
    • system.contextWindow: Token metrics (percentage, totalInputTokens, cacheCreationTokens, etc.).
    • system.codebase: Indexing status and progress.
    • system.clipboard: Last clipboard action (text, isError).
    • system.profile: Full configuration snapshot (excluding apiKey), including model names and thinking/reasoning settings.
    • system.speedometer: Real-time token metrics (tps, peakTps, ttftMs) available when the /speedometer command is active.
  8. How Sub-Agent configuration inheritance works

    main

    Sub-agents follow a specific inheritance model regarding their API and prompt settings:

    Configuration Profile Inheritance

    If a sub-agent does not have a specific Configuration Profile assigned, it inherits the currently active profile of the main workflow. This includes:

    • The same API configuration and model.
    • The same system prompt and request headers.

    Prompt Composition

    At runtime, a sub-agent's prompt is constructed by layering instructions:

    1. Base: The system prompt defined in the selected Configuration Profile.
    2. Layer: The sub-agent's own Role Definition (appended on top).

    Note: Sub-agents are completely isolated from the main workflow's context. You must provide all necessary context in the prompt when calling a sub-agent.

  9. Understand Headless Mode limitations

    main

    When using Headless Mode, be aware of the following constraints:

    • No Interactive Tools: The askuser tool is unavailable; the AI cannot request user input.
    • No Plan Mode: All tool calls execute immediately via YOLO mode; you cannot review a plan before execution.
    • No Real-time Streaming: Output is not streamed; results are displayed all at once after completion.
    • Session Size: Long session histories increase token consumption. It is recommended to start new sessions periodically.
    • Security: While YOLO mode automates non-sensitive tasks, sensitive commands still require confirmation, making it unsuitable for completely unattended automation.