Skip to main content

Siada CLI is a Ai Pair Programming Tool in terminal

Project description

Siada CLI

简体中文 | English

Siada CLI Screenshot

This repository contains Siada CLI, a command-line AI workflow tool that provides specialized intelligent agents for code development, debugging, and automation tasks.

With Siada CLI you can:

  • Fix bugs in large codebases through intelligent analysis and automated solutions.
  • Generate new applications and components using specialized frontend and backend agents.
  • Automate development workflows through intelligent code generation and testing.
  • Execute system commands and interact with development environments.
  • Seamlessly support multiple programming languages and frameworks.

Installation/Update

  1. System Requirements
  • MAC, Linux
  • GCC 11+
  1. Installation Command TODO

Installation (Developer Mode)

  1. Prerequisites: Ensure you have Python 3.12 or higher and Poetry installed.

  2. Clone and Install:

    git clone https://github.com/your-org/siada-agenthub.git
    cd siada-agenthub
    poetry install
    
  3. Run CLI:

    # Method 1: Run with Poetry
    poetry run siada-cli
    
    # Method 2: Activate virtual environment then use (recommended)
    source $(poetry env info --path)/bin/activate
    siada-cli
    

Configuration

Model Configuration

Method 1: Default Configuration

  • The system reads default configuration from agent_config.yaml file
  • Current defaults: model claude-sonnet-4, provider openrouter

Method 2: Customize via Configuration File

  • Regular Users
    • Edit configuration file ~/.siada-cli/conf.yaml
      # 1. Create configuration file in user home directory
      cd ~
      mkdir -p ~/.siada-cli
      touch ~/.siada-cli/conf.yaml
      
      # 2. Configuration file content example
      llm_config:
         model: "claude-sonnet-4"          # Change to your desired model
         provider: "openrouter"
      
    • Required when using OpenRouter provider
         export OPENROUTER_API_KEY="your_openrouter_key"
      
  • Developer Mode
    • Edit the llm_config section in agent_config.yaml file:
      llm_config:
         provider: "openrouter"
         model_name: "claude-sonnet-4"     # Change to your desired model
      

Method 3: Via Environment Variables

# Set model
export SIADA_MODEL="claude-sonnet-4"

# Set provider
export SIADA_PROVIDER="openrouter"

# Required when using OpenRouter provider
export OPENROUTER_API_KEY="your_openrouter_key"

Method 4: Via Command Line Parameters (Highest Priority)

# Only change model (keep provider unchanged)
siada-cli --model claude-sonnet-4

# Change both model and provider
siada-cli --model gpt-4.1 --provider openrouter

# Only change provider (keep model unchanged)
siada-cli --provider openrouter

Important Notes:

  • Complete Priority: Command line parameters > Environment variables (SIADA_ prefix) > Configuration file (agent_config.yaml)
  • Provider Requirements: When using openrouter, must set OPENROUTER_API_KEY environment variable

Agent Configuration (Developer Mode)

Edit agent_config.yaml to customize agent behavior:

agents:
  bugfix:
    class: "siada.agent_hub.coder.bug_fix_agent.BugFixAgent"
    description: "Specialized agent for code bug fixing"
    enabled: true

llm_config:
  provider: "openrouter"
  model_name: "claude-sonnet-4"
  repo_map_tokens: 8192
  repo_map_mul_no_files: 16
  repo_verbose: true

Environment Variables

Set environment variables to configure behavior:

# Siada-specific settings (use SIADA_ prefix)
export SIADA_AGENT="bugfix"
export SIADA_MODEL="claude-sonnet-4"
export SIADA_THEME="dark"

# Required when using OpenRouter provider
export OPENROUTER_API_KEY="your_openrouter_key"

# Unset environment variables in current terminal session
unset SIADA_MODEL

Usage Modes

Siada CLI supports two usage modes to meet different usage scenarios:

Non-Interactive Mode

Features:

  • One-time execution: Execute a single task and automatically exit
  • Stateless: Does not retain session context
  • Use cases: Automation scripts, CI/CD pipelines, single task execution

Usage:

# Use --prompt parameter to trigger non-interactive mode
siada-cli --agent bugfix --prompt "Fix login errors in auth.py"

# Combine with other parameters
siada-cli --agent coder --model claude-sonnet-4 --prompt "Create a REST API endpoint"

Interactive Mode

Features:

  • Continuous conversation: Maintains session state after startup, allows continuous dialogue
  • Context memory: AI remembers previous conversation content
  • Real-time interaction: Supports slash commands, editor mode, and other advanced features
  • Use cases: Exploratory programming, complex tasks, development work requiring multiple rounds of dialogue

Usage:

# Start directly (defaults to interactive mode)
siada-cli --agent coder

Interactive Process:

> Create a user management API
[AI response...]
> Add data validation to this API
[AI response...]
> Write some unit tests
[AI response...]

Command Line Options

# Use a specific agent
siada-cli --agent coder
# Supports abbreviations
siada-cli -a coder

# Non-interactive mode with a single prompt
siada-cli --prompt "Fix authentication errors in login.py"
# Supports abbreviations
siada-cli -p "Fix authentication errors in login.py"

# Use a different model
siada-cli --model claude-sonnet-4

# Use OpenRouter provider (requires API key setup)
siada-cli --provider openrouter

# Set color theme
siada-cli --theme dark

# Enable verbose output
siada-cli --verbose

# List all available models
siada-cli --list-models
siada-cli --models

Slash Commands

In the CLI, you can use slash commands for additional functionality:

  • /shell - Switch to shell mode to execute system commands (type exit or quit to exit shell mode)
  • /models - List available AI models
  • /run <command> or !<command> - Execute shell commands
  • /editor - Open editor for multiline input
  • /exit or /quit - Exit the application

Shell Mode Usage Guide

Siada CLI provides two ways to execute system commands:

Method 1: Use /shell to switch to shell mode

Switch to persistent shell mode where you can continuously execute multiple system commands:

> /shell
# After entering shell mode, you can execute multiple commands
ls -la
cd my-project
npm install
git status
# Use exit or quit to exit shell mode
exit

Method 2: Use ! prefix to execute commands directly

Execute single system commands directly in interactive mode without switching modes:

> !ls -la
> !git status
> !npm run dev

Differences between the two methods:

  • /shell: Suitable for scenarios requiring continuous execution of multiple system commands, switch once and use persistently
  • !<command>: Suitable for occasionally executing single system commands, returns to AI conversation mode immediately after execution

Agent Types

Bug Fix Agent (--agent bugfix / -a bugfix / --bugfix)

Only supports non-interactive mode!

Specialized for identifying, analyzing, and fixing bugs in codebases. Provides detailed analysis and automated fix suggestions.

Code Generation Agent (--agent coder / -a coder / --coder)

General-purpose code development agent for creating new features, refactoring code, and implementing functionality in various programming languages.

Frontend Generation Agent (--agent fegen / -a fegen / --fegen)

Focused on frontend development tasks, including React components, CSS styling, and user interface implementation.

Examples

Activate Virtual Environment (Developer Mode Only)

First, enter the siada-agenthub project directory and activate the virtual environment:

# Enter project directory
cd ~/path/to/siada-agenthub

# Activate virtual environment (recommended method)
source $(poetry env info --path)/bin/activate

# Or use Poetry run (no need to activate environment)
# poetry run siada-cli

Usage Examples

After activating the environment, you can choose between interactive mode or non-interactive mode to interact with AI agents.

Interactive Mode:

# Enter project directory
cd my-project/

# Start interactive mode
siada-cli --agent coder

# Then you can input prompts in the interactive interface
> Create a REST API server with user authentication using FastAPI
# AI will respond and you can continue the conversation...
> Add logging functionality to this API

Non-Interactive Mode (One-time execution):

# Execute a single task and exit (uses coder agent by default)
siada-cli --prompt "Create a user registration API"

# Specify a specific agent to execute tasks
siada-cli --agent bugfix --prompt "Fix authentication errors in login.py"
siada-cli --agent fegen --prompt "Create a responsive navigation bar component using React and Tailwind CSS"

Exit Virtual Environment (Developer Mode Only):

# Exit virtual environment after use
deactivate

Common Tasks

Debug and Fix Code Issues

> Analyze this error message and suggest a fix: [paste error]
> Help me reproduce this intermittent bug that occurs during high load

Code Generation and Development

> Implement a caching layer for the database queries in this service
> Refactor this monolithic function into smaller, more maintainable pieces

Frontend Development

> Create a responsive dashboard layout with sidebar navigation
> Add form validation to the user registration form

Troubleshooting

Common Issues

Command not found: If running siada-cli directly shows command not found:

  • This is normal behavior in developer mode as the command is installed in the virtual environment
  • Refer to examples to activate the virtual environment

Model API errors:

  • Check your internet connection
  • If using OpenRouter provider, ensure API key is set correctly
  • If using OpenRouter provider, verify your account has sufficient credits

Installation issues:

  • Ensure you have Python 3.12+ installed
  • Install Poetry using the official installation method
  • Try removing poetry.lock and re-running poetry install

Agent not working:

  • Check if the agent is enabled in agent_config.yaml
  • Verify the agent class path is correct
  • Use --verbose flag to see detailed output

For more detailed troubleshooting, check logs and use the --verbose flag for additional debug information.

Contributing

We welcome contributions to Siada CLI! Whether you want to fix bugs, add new features, improve documentation, or suggest enhancements, your contributions are greatly appreciated.

To get started with contributing, please read our Contributing Guide which includes:

  • Our project vision and development goals
  • Project directory structure and development guidelines
  • Pull request guidelines and best practices
  • Code organization principles

Before submitting any changes, please make sure to check our issue tracker and follow the contribution workflow outlined in the guide.

Acknowledgements

Siada CLI is built upon the foundation of numerous open source projects, and we extend our deepest respect and gratitude to their contributors.

Special thanks to the OpenAI Agent SDK for providing the foundational framework that powers our intelligent agent capabilities.

For a complete list of open source projects and licenses used in Siada CLI, please see our CREDITS.md file.

License

Distributed under the Apache-2.0 License. See LICENSE for more information.

DISCLAIMERS

See disclaimers.md


Built with ❤️ by Li Auto Code Intelligence Team and the open source community

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

siada_cli-0.0.1.tar.gz (10.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

siada_cli-0.0.1-py3-none-any.whl (10.4 MB view details)

Uploaded Python 3

File details

Details for the file siada_cli-0.0.1.tar.gz.

File metadata

  • Download URL: siada_cli-0.0.1.tar.gz
  • Upload date:
  • Size: 10.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for siada_cli-0.0.1.tar.gz
Algorithm Hash digest
SHA256 105bf4bd5be5aa2580e9a1a478377c39d93b41acc52449dac29a824a35bc2c5d
MD5 893f20d142bc307baf1f2eb635570f8a
BLAKE2b-256 f60479b7f86d2e1d21c72d3022c245186184e54675c366571af6f2d748d625b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for siada_cli-0.0.1.tar.gz:

Publisher: publish.yml on liauto-siada/siada-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file siada_cli-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: siada_cli-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for siada_cli-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 16d25d746e911e79f5756c35f46a23b2275d1a6ee139173663a88464bb9c85de
MD5 f119d176d157ea9ae9505f51412344f1
BLAKE2b-256 03e6a4ab742f77a12ca43178ef26529dcb49e8a06740f8ce4721b310ad0071dc

See more details on using hashes here.

Provenance

The following attestation bundles were made for siada_cli-0.0.1-py3-none-any.whl:

Publisher: publish.yml on liauto-siada/siada-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page