Metadata-Version: 2.4
Name: swe-cli
Version: 0.1.5
Summary: AI-powered command-line tool for accelerated development workflows
Author-email: SWE-CLI Team <bdqnghi@gmail.com>
Maintainer-email: SWE-CLI Team <bdqnghi@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/swe-cli/swe-cli
Project-URL: Documentation, https://github.com/swe-cli/swe-cli#readme
Project-URL: Repository, https://github.com/swe-cli/swe-cli
Project-URL: Bug Tracker, https://github.com/swe-cli/swe-cli/issues
Project-URL: Changelog, https://github.com/swe-cli/swe-cli/releases
Keywords: ai,coding-assistant,cli,developer-tools,code-generation,llm,automation,software-engineering,mcp,agentic-systems
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Code Generators
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Classifier: Environment :: Console
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: pydantic>=2.12.3
Requires-Dist: rich>=14.2.0
Requires-Dist: prompt-toolkit>=3.0.52
Requires-Dist: httpx>=0.28.1
Requires-Dist: requests>=2.32.5
Requires-Dist: beautifulsoup4>=4.14.2
Requires-Dist: gitpython>=3.1.45
Requires-Dist: python-dotenv>=1.1.1
Requires-Dist: tiktoken>=0.12.0
Requires-Dist: fastmcp>=2.12.5
Requires-Dist: playwright>=1.55.0
Requires-Dist: pillow>=10.0.0
Requires-Dist: fastapi>=0.119.1
Requires-Dist: uvicorn>=0.38.0
Provides-Extra: dev
Requires-Dist: pytest>=8.4.2; extra == "dev"
Requires-Dist: pytest-asyncio>=1.2.0; extra == "dev"
Requires-Dist: black>=25.9.0; extra == "dev"
Requires-Dist: ruff>=0.14.1; extra == "dev"
Requires-Dist: mypy>=1.18.2; extra == "dev"
Dynamic: requires-python

<div align="center">

<img src="logo/swe-cli-high-resolution-logo-grayscale-transparent.png" alt="SWE-CLI Logo" width="300"/>

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

<p>
  <a href="https://github.com/swe-cli/swe-cli/stargazers"><img src="https://img.shields.io/github/stars/swe-cli/swe-cli?style=for-the-badge&logo=star&logoColor=white&labelColor=1a1a2e&color=00d9ff" /></a>
  <img src="https://img.shields.io/badge/Python-3.10+-4ecdc4?style=for-the-badge&logo=python&logoColor=white&labelColor=1a1a2e">
  <img src="https://img.shields.io/badge/License-MIT-ff6b6b?style=for-the-badge&logo=opensourceinitiative&logoColor=white&labelColor=1a1a2e">
</p>

<p>
  <img src="https://img.shields.io/badge/Architecture-SOLID-9b59b6?style=for-the-badge&logoColor=white&labelColor=1a1a2e">
  <img src="https://img.shields.io/badge/Status-Active-00b894?style=for-the-badge&logoColor=white&labelColor=1a1a2e">
</p>

<p>
  <img src="https://img.shields.io/badge/📄_Technical_Report-Coming_Soon-ffa726?style=for-the-badge&logoColor=white&labelColor=1a1a2e">
</p>

---

### 🎬 Demo

![SWE-CLI Demo](demo_video/swecli_demo.gif)

*Interactive coding assistant in action*

</div>

---

## 📖 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)**
```bash
brew install swe-cli
```

**pip**
```bash
pip install swe-cli
```

**From source**
```bash
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:

```bash
swecli
```

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

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

For more details, see the [documentation](./docs).

---

## ⚙️ Configuration

SWE-CLI uses JSON configuration with environment variable support:

**Example** (`config-fireworks-sample.json`):

```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

<div align="center">

### 📁 Project Structure

</div>

```
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

<table align="center" width="80%">
<tr>
<td align="center" width="25%">
<h4>🎨 SOLID</h4>
<p>Clean, maintainable code following SOLID principles</p>
</td>
<td align="center" width="25%">
<h4>🔌 Interface-Driven</h4>
<p>Loose coupling through interface abstractions</p>
</td>
<td align="center" width="25%">
<h4>💉 Dependency Injection</h4>
<p>Services injected into ChatEngine</p>
</td>
<td align="center" width="25%">
<h4>🧩 Service-Oriented</h4>
<p>Modular services with clear responsibilities</p>
</td>
</tr>
</table>

---

## 📄 License

<div align="center">

**MIT License**

Copyright (c) 2025 SWE-CLI Contributors

</div>
