swe-cli


Nameswe-cli JSON
Version 0.1.8 PyPI version JSON
download
home_pageNone
SummaryAI-powered command-line tool for accelerated development workflows
upload_time2025-10-27 06:28:34
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT
keywords ai coding-assistant cli developer-tools code-generation llm automation software-engineering mcp agentic-systems
VCS
bugtrack_url
requirements pydantic rich prompt-toolkit httpx requests beautifulsoup4 gitpython python-dotenv tiktoken fastmcp playwright nest-asyncio fastapi uvicorn pytest pytest-asyncio black ruff mypy
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <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>

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "swe-cli",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "SWE-CLI Team <bdqnghi@gmail.com>",
    "keywords": "ai, coding-assistant, cli, developer-tools, code-generation, llm, automation, software-engineering, mcp, agentic-systems",
    "author": null,
    "author_email": "SWE-CLI Team <bdqnghi@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/66/50/bc6da694a40b02c1f0da02a398f9d4a9a081f108e31950d35717c8711089/swe_cli-0.1.8.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n\n<img src=\"logo/swe-cli-high-resolution-logo-grayscale-transparent.png\" alt=\"SWE-CLI Logo\" width=\"300\"/>\n\n# SWE-CLI: One-Stop, Cost Effective CLI-based Coding Agent for Modern Software Engineering\n\n<p>\n  <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>\n  <img src=\"https://img.shields.io/badge/Python-3.10+-4ecdc4?style=for-the-badge&logo=python&logoColor=white&labelColor=1a1a2e\">\n  <img src=\"https://img.shields.io/badge/License-MIT-ff6b6b?style=for-the-badge&logo=opensourceinitiative&logoColor=white&labelColor=1a1a2e\">\n</p>\n\n<p>\n  <img src=\"https://img.shields.io/badge/Architecture-SOLID-9b59b6?style=for-the-badge&logoColor=white&labelColor=1a1a2e\">\n  <img src=\"https://img.shields.io/badge/Status-Active-00b894?style=for-the-badge&logoColor=white&labelColor=1a1a2e\">\n</p>\n\n<p>\n  <img src=\"https://img.shields.io/badge/\ud83d\udcc4_Technical_Report-Coming_Soon-ffa726?style=for-the-badge&logoColor=white&labelColor=1a1a2e\">\n</p>\n\n---\n\n### \ud83c\udfac Demo\n\n![SWE-CLI Demo](demo_video/swecli_demo.gif)\n\n*Interactive coding assistant in action*\n\n</div>\n\n---\n\n## \ud83d\udcd6 Overview\n\n**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.\n\nWe 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:\n\n- **GitHub Issue Resolution**: Automated issue fixing following state-of-the-art scaffolds like SWE-Agent, Agentless, and HyperAgent\n- **Intelligent Code Understanding**: LSP-powered codebase analysis for accurate context-aware assistance\n- **Sub-Agent Architecture**: Specialized agents for different coding tasks (testing, refactoring, documentation)\n- **CI/CD Integration**: Seamless connection with GitHub workflows for automated development pipelines\n- **Paper2Code & Text2Web**: Advanced code generation from research papers and natural language specifications\n\nBuilt 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.\n\n## \u2728 Features\n\n### \u2705 Ready Features\n- **Interactive Coding Agent that Understand Codebase**\n- **Basic Access to Shell Commands and Control Them Through LLMs**\n- **Context Management**\n- **Compact Context Automatically**\n- **Session Management**\n- **MCP Support**\n- **Switch between Plan Mode and Normal Mode**\n\n### \ud83d\udd04 In-Progress\n- **Compatible with Multiple Providers** (OpenAI, Anthropic, OpenRouter, Fireworks AI, Z.ai, DeepSeek, Alibaba Cloud)\n- **Coding Rules**\n- **LSP for Accurate Codebase Understanding**\n- **Github Issues Resolve** (across scaffolds: SWE-Agent, Agentless, HyperAgent)\n- **UI Management**\n\n### \ud83d\udccb In-Plan\n- **Sub-Agents**\n- **Connect with Github CI/CD workflows**\n- **Paper2Code**\n- **Text2Web**\n- **CodeWiki Integration**\n\n---\n\n## \ud83d\ude80 Quick Start\n\n### Installation\n\n**macOS (Homebrew)**\n```bash\nbrew install swe-cli\n```\n\n**pip**\n```bash\npip install swe-cli\n```\n\n**From source**\n```bash\ngit clone https://github.com/swe-cli/swe-cli.git\ncd swe-cli\npip install -e .\n```\n\n### Usage\n\nRun `swecli` to start the interactive coding assistant:\n\n```bash\nswecli\n```\n\nConfigure your settings in `~/.swecli/settings.json`:\n\n```json\n{\n  \"provider\": \"fireworks\",\n  \"api_key\": \"your-api-key-here\",\n  \"model\": \"accounts/fireworks/models/llama-v3p1-70b-instruct\"\n}\n```\n\nFor more details, see the [documentation](./docs).\n\n---\n\n## \u2699\ufe0f Configuration\n\nSWE-CLI uses JSON configuration with environment variable support:\n\n**Example** (`config-fireworks-sample.json`):\n\n```json\n{\n  \"providers\": {\n    \"fireworks\": {\n      \"api_key\": \"$FIREWORKS_API_KEY\",\n      \"default_model\": \"accounts/fireworks/models/llama-v3p1-70b-instruct\"\n    }\n  },\n  \"experimental\": {\n    \"use_pydantic_ai\": false\n  },\n  \"permissions\": {\n    \"skip_requests\": true\n  }\n}\n```\n\n**Key Configuration Options**:\n- `providers` - LLM provider configurations (Anthropic, OpenAI, Fireworks)\n- `experimental.use_pydantic_ai` - Enable PydanticAI engine (Phase 1 complete)\n- `permissions.skip_requests` - Skip tool approval prompts\n\n---\n\n## \ud83c\udfd7\ufe0f Architecture\n\n<div align=\"center\">\n\n### \ud83d\udcc1 Project Structure\n\n</div>\n\n```\nsrc/swecli/\n\u251c\u2500\u2500 ui/                      # User Interface Layer (SOLID-refactored)\n\u2502   \u251c\u2500\u2500 chat_engine.py       # Main orchestrator\n\u2502   \u251c\u2500\u2500 interfaces.py        # Service abstractions\n\u2502   \u251c\u2500\u2500 services/            # SOLID-compliant services\n\u2502   \u2514\u2500\u2500 main_ui.py           # UI entry point\n\u251c\u2500\u2500 llm/                     # LLM Integration\n\u2502   \u251c\u2500\u2500 providers/           # Provider implementations\n\u2502   \u251c\u2500\u2500 manager.py           # Multi-provider orchestration\n\u2502   \u2514\u2500\u2500 base.py              # Base classes and types\n\u251c\u2500\u2500 tools/                   # Tool System\n\u2502   \u251c\u2500\u2500 filesystem.py        # File operations\n\u2502   \u251c\u2500\u2500 shell.py             # Shell execution\n\u2502   \u251c\u2500\u2500 search.py            # Code search\n\u2502   \u251c\u2500\u2500 edit.py              # File editing\n\u2502   \u2514\u2500\u2500 registry.py          # Tool registry\n\u251c\u2500\u2500 pydantic_ai/             # PydanticAI Integration (Experimental)\n\u2502   \u2514\u2500\u2500 adapter.py           # PydanticAI chat engine\n\u2514\u2500\u2500 config/                  # Configuration Management\n    \u251c\u2500\u2500 models.py            # Pydantic models\n    \u2514\u2500\u2500 loader.py            # Config loading\n```\n\n### \ud83c\udfaf Design Principles\n\n<table align=\"center\" width=\"80%\">\n<tr>\n<td align=\"center\" width=\"25%\">\n<h4>\ud83c\udfa8 SOLID</h4>\n<p>Clean, maintainable code following SOLID principles</p>\n</td>\n<td align=\"center\" width=\"25%\">\n<h4>\ud83d\udd0c Interface-Driven</h4>\n<p>Loose coupling through interface abstractions</p>\n</td>\n<td align=\"center\" width=\"25%\">\n<h4>\ud83d\udc89 Dependency Injection</h4>\n<p>Services injected into ChatEngine</p>\n</td>\n<td align=\"center\" width=\"25%\">\n<h4>\ud83e\udde9 Service-Oriented</h4>\n<p>Modular services with clear responsibilities</p>\n</td>\n</tr>\n</table>\n\n---\n\n## \ud83d\udcc4 License\n\n<div align=\"center\">\n\n**MIT License**\n\nCopyright (c) 2025 SWE-CLI Contributors\n\n</div>\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "AI-powered command-line tool for accelerated development workflows",
    "version": "0.1.8",
    "project_urls": {
        "Bug Tracker": "https://github.com/swe-cli/swe-cli/issues",
        "Changelog": "https://github.com/swe-cli/swe-cli/releases",
        "Documentation": "https://github.com/swe-cli/swe-cli#readme",
        "Homepage": "https://github.com/swe-cli/swe-cli",
        "Repository": "https://github.com/swe-cli/swe-cli"
    },
    "split_keywords": [
        "ai",
        " coding-assistant",
        " cli",
        " developer-tools",
        " code-generation",
        " llm",
        " automation",
        " software-engineering",
        " mcp",
        " agentic-systems"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "086fa5d27b7aac9853029e1e8a7bcf43135dfd00847dabf6a2485a2eb33ea742",
                "md5": "20bf9d5ad9dc1022b3c6c6bd49f9a243",
                "sha256": "419ab772194712e4bfb0286e04ecec1cb3227dec53409255ad1c6666a88486d6"
            },
            "downloads": -1,
            "filename": "swe_cli-0.1.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "20bf9d5ad9dc1022b3c6c6bd49f9a243",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 465299,
            "upload_time": "2025-10-27T06:28:32",
            "upload_time_iso_8601": "2025-10-27T06:28:32.804605Z",
            "url": "https://files.pythonhosted.org/packages/08/6f/a5d27b7aac9853029e1e8a7bcf43135dfd00847dabf6a2485a2eb33ea742/swe_cli-0.1.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6650bc6da694a40b02c1f0da02a398f9d4a9a081f108e31950d35717c8711089",
                "md5": "a8f53dd80ac3e89225f33a3c2f8ae1a7",
                "sha256": "ee87e10c149a6ecc291a90579190dbd713890e062e30574f44e364b22c865f28"
            },
            "downloads": -1,
            "filename": "swe_cli-0.1.8.tar.gz",
            "has_sig": false,
            "md5_digest": "a8f53dd80ac3e89225f33a3c2f8ae1a7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 376320,
            "upload_time": "2025-10-27T06:28:34",
            "upload_time_iso_8601": "2025-10-27T06:28:34.346335Z",
            "url": "https://files.pythonhosted.org/packages/66/50/bc6da694a40b02c1f0da02a398f9d4a9a081f108e31950d35717c8711089/swe_cli-0.1.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-27 06:28:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "swe-cli",
    "github_project": "swe-cli",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "pydantic",
            "specs": [
                [
                    ">=",
                    "2.12.3"
                ]
            ]
        },
        {
            "name": "rich",
            "specs": [
                [
                    ">=",
                    "14.2.0"
                ]
            ]
        },
        {
            "name": "prompt-toolkit",
            "specs": [
                [
                    ">=",
                    "3.0.52"
                ]
            ]
        },
        {
            "name": "httpx",
            "specs": [
                [
                    ">=",
                    "0.28.1"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    ">=",
                    "2.32.5"
                ]
            ]
        },
        {
            "name": "beautifulsoup4",
            "specs": [
                [
                    ">=",
                    "4.14.2"
                ]
            ]
        },
        {
            "name": "gitpython",
            "specs": [
                [
                    ">=",
                    "3.1.45"
                ]
            ]
        },
        {
            "name": "python-dotenv",
            "specs": [
                [
                    ">=",
                    "1.1.1"
                ]
            ]
        },
        {
            "name": "tiktoken",
            "specs": [
                [
                    ">=",
                    "0.12.0"
                ]
            ]
        },
        {
            "name": "fastmcp",
            "specs": [
                [
                    ">=",
                    "2.12.5"
                ]
            ]
        },
        {
            "name": "playwright",
            "specs": [
                [
                    ">=",
                    "1.55.0"
                ]
            ]
        },
        {
            "name": "nest-asyncio",
            "specs": [
                [
                    ">=",
                    "1.6.0"
                ]
            ]
        },
        {
            "name": "fastapi",
            "specs": [
                [
                    ">=",
                    "0.119.1"
                ]
            ]
        },
        {
            "name": "uvicorn",
            "specs": [
                [
                    ">=",
                    "0.38.0"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    ">=",
                    "8.4.2"
                ]
            ]
        },
        {
            "name": "pytest-asyncio",
            "specs": [
                [
                    ">=",
                    "1.2.0"
                ]
            ]
        },
        {
            "name": "black",
            "specs": [
                [
                    ">=",
                    "25.9.0"
                ]
            ]
        },
        {
            "name": "ruff",
            "specs": [
                [
                    ">=",
                    "0.14.1"
                ]
            ]
        },
        {
            "name": "mypy",
            "specs": [
                [
                    ">=",
                    "1.18.2"
                ]
            ]
        }
    ],
    "lcname": "swe-cli"
}
        
Elapsed time: 2.62558s