Skip to main content

AI-powered command-line tool for accelerated development workflows

Project description

SWE-CLI Logo

SWE-CLI: One-Stop, Cost Effective CLI-based Coding Agent for Modern Software Engineering


๐ŸŽฌ Demo

SWE-CLI Demo

Interactive coding assistant in action


๐Ÿ“– Overview

SWE-CLI is a one-stop coding agent that interacts with users through a powerful command-line interface. Created with the goal to democratize how coding agents are built, designed, and optimized, SWE-CLI aims to be comparable to state-of-the-art CLI tools on the market while remaining fully open-source and bringing substantial benefits to the developer community.

We support standard features such as MCP (Model Context Protocol) integration, shell command execution, session and context management, and multi-provider LLM support. Beyond these foundations, we plan to deliver unique capabilities including:

  • GitHub Issue Resolution: Automated issue fixing following state-of-the-art scaffolds like SWE-Agent, Agentless, and HyperAgent
  • Intelligent Code Understanding: LSP-powered codebase analysis for accurate context-aware assistance
  • Sub-Agent Architecture: Specialized agents for different coding tasks (testing, refactoring, documentation)
  • CI/CD Integration: Seamless connection with GitHub workflows for automated development pipelines
  • Paper2Code & Text2Web: Advanced code generation from research papers and natural language specifications

Built on SOLID principles with dependency injection and interface-driven design, SWE-CLI serves not only as a powerful development tool but also as an educational resource for understanding modern agentic system architecture.

โœจ Features

โœ… Ready Features

  • Interactive Coding Agent that Understand Codebase
  • Basic Access to Shell Commands and Control Them Through LLMs
  • Context Management
  • Compact Context Automatically
  • Session Management
  • MCP Support
  • Switch between Plan Mode and Normal Mode

๐Ÿ”„ In-Progress

  • Compatible with Multiple Providers (OpenAI, Anthropic, OpenRouter, Fireworks AI, Z.ai, DeepSeek, Alibaba Cloud)
  • Coding Rules
  • LSP for Accurate Codebase Understanding
  • Github Issues Resolve (across scaffolds: SWE-Agent, Agentless, HyperAgent)
  • UI Management

๐Ÿ“‹ In-Plan

  • Sub-Agents
  • Connect with Github CI/CD workflows
  • Paper2Code
  • Text2Web
  • CodeWiki Integration

๐Ÿš€ Quick Start

Installation

macOS (Homebrew)

brew install swe-cli

pip

pip install swe-cli

From source

git clone https://github.com/swe-cli/swe-cli.git
cd swe-cli
pip install -e .

Usage

Run swecli to start the interactive coding assistant:

swecli

Configure your settings in ~/.swecli/settings.json:

{
  "provider": "fireworks",
  "api_key": "your-api-key-here",
  "model": "accounts/fireworks/models/llama-v3p1-70b-instruct"
}

For more details, see the documentation.


โš™๏ธ Configuration

SWE-CLI uses JSON configuration with environment variable support:

Example (config-fireworks-sample.json):

{
  "providers": {
    "fireworks": {
      "api_key": "$FIREWORKS_API_KEY",
      "default_model": "accounts/fireworks/models/llama-v3p1-70b-instruct"
    }
  },
  "experimental": {
    "use_pydantic_ai": false
  },
  "permissions": {
    "skip_requests": true
  }
}

Key Configuration Options:

  • providers - LLM provider configurations (Anthropic, OpenAI, Fireworks)
  • experimental.use_pydantic_ai - Enable PydanticAI engine (Phase 1 complete)
  • permissions.skip_requests - Skip tool approval prompts

๐Ÿ—๏ธ Architecture

๐Ÿ“ Project Structure

src/swecli/
โ”œโ”€โ”€ ui/                      # User Interface Layer (SOLID-refactored)
โ”‚   โ”œโ”€โ”€ chat_engine.py       # Main orchestrator
โ”‚   โ”œโ”€โ”€ interfaces.py        # Service abstractions
โ”‚   โ”œโ”€โ”€ services/            # SOLID-compliant services
โ”‚   โ””โ”€โ”€ main_ui.py           # UI entry point
โ”œโ”€โ”€ llm/                     # LLM Integration
โ”‚   โ”œโ”€โ”€ providers/           # Provider implementations
โ”‚   โ”œโ”€โ”€ manager.py           # Multi-provider orchestration
โ”‚   โ””โ”€โ”€ base.py              # Base classes and types
โ”œโ”€โ”€ tools/                   # Tool System
โ”‚   โ”œโ”€โ”€ filesystem.py        # File operations
โ”‚   โ”œโ”€โ”€ shell.py             # Shell execution
โ”‚   โ”œโ”€โ”€ search.py            # Code search
โ”‚   โ”œโ”€โ”€ edit.py              # File editing
โ”‚   โ””โ”€โ”€ registry.py          # Tool registry
โ”œโ”€โ”€ pydantic_ai/             # PydanticAI Integration (Experimental)
โ”‚   โ””โ”€โ”€ adapter.py           # PydanticAI chat engine
โ””โ”€โ”€ config/                  # Configuration Management
    โ”œโ”€โ”€ models.py            # Pydantic models
    โ””โ”€โ”€ loader.py            # Config loading

๐ŸŽฏ Design Principles

๐ŸŽจ SOLID

Clean, maintainable code following SOLID principles

๐Ÿ”Œ Interface-Driven

Loose coupling through interface abstractions

๐Ÿ’‰ Dependency Injection

Services injected into ChatEngine

๐Ÿงฉ Service-Oriented

Modular services with clear responsibilities


๐Ÿ“„ License

MIT License

Copyright (c) 2025 SWE-CLI Contributors

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

swe_cli-0.1.7.tar.gz (364.9 kB view details)

Uploaded Source

Built Distribution

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

swe_cli-0.1.7-py3-none-any.whl (453.2 kB view details)

Uploaded Python 3

File details

Details for the file swe_cli-0.1.7.tar.gz.

File metadata

  • Download URL: swe_cli-0.1.7.tar.gz
  • Upload date:
  • Size: 364.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for swe_cli-0.1.7.tar.gz
Algorithm Hash digest
SHA256 0152d316d5b3a53d90988a219dddad7aaeefccf2efef71d36ad37d25c32d439d
MD5 259f24c7c294eea6e6f60df7804697c9
BLAKE2b-256 5f1eef66f8547944534adfabf3299780a2d37a87e13f7f418000c47e2d416ad0

See more details on using hashes here.

File details

Details for the file swe_cli-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: swe_cli-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 453.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for swe_cli-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 1fd682dbaa9ad3866a4c6e8145cd2f1ed53d8a9acf085a1f2e516b4d4ff9639c
MD5 06557e5e3a8dcfb02f0b45c28ba34137
BLAKE2b-256 3dde64e16f5b07906e5475321563551de80280f38cfa32e0be4f601658562fa2

See more details on using hashes here.

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