Metadata-Version: 2.4
Name: langchain-agentx-cli
Version: 0.1.3
Summary: Terminal CLI/TUI for AgentX: migrate Claude Code Ink UI, backed by langchain-agentx-python SDK.
Author: GoodMood2008
License: Apache-2.0
Project-URL: Homepage, https://github.com/GoodMood2008/langchain-agentx-cli
Project-URL: Documentation, https://github.com/GoodMood2008/langchain-agentx-cli#readme
Project-URL: Repository, https://github.com/GoodMood2008/langchain-agentx-cli.git
Project-URL: Python SDK, https://github.com/GoodMood2008/langchain_agentx_python
Keywords: ai,assistant,coding,claude,langchain,terminal,tui
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Environment :: Console
Classifier: Topic :: Software Development
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: langchain-agentx-python<0.4.0,>=0.3.4
Requires-Dist: click>=8.1
Requires-Dist: textual>=0.79.0
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"
Requires-Dist: pytest-asyncio>=0.24; extra == "dev"
Dynamic: license-file

# langchain-agentx-cli

**AgentX Code** — Terminal AI coding assistant with Claude Code compatible TUI.

依托 [langchain-agentx-python](https://github.com/GoodMood2008/langchain_agentx_python) SDK，提供功能完整的终端编码助手。

## Installation

```bash
pip install langchain-agentx-cli
```

Requires Python 3.11+ and `ANTHROPIC_API_KEY` environment variable.

## Quick Start

```bash
# Navigate to your project directory
cd ~/my-project

# Start AgentX Code
agentx-code
```

### Environment Setup

```bash
# Set your Anthropic API key
export ANTHROPIC_API_KEY="sk-ant-..."
```

### Command Options

```bash
agentx-code                                    # Start in current directory
agentx-code --workspace-root /path/to/project  # Specify workspace
agentx-code --model claude-sonnet-4-20250514  # Specify model
agentx-code --provider claude | openai        # Choose provider
agentx-code -p                                # Skip permission prompts
agentx-code --show-config                     # Print merged config
```

## Input Habits (Claude Code Compatible)

| Key | Action |
|-----|--------|
| **Enter** | Send message |
| **Shift+Enter** | Insert newline |
| **\\ + Enter** | Insert newline (alternative) |
| **↑ / ↓** | Navigate history / move in multiline |
| **Tab** | Command completion |
| **Ctrl+R** | History search |
| **Ctrl+Shift+L** | Clear messages |
| **Ctrl+C** | Cancel generation / Quit (twice) |

Type `/help` in the REPL for full command list.

## Development

```bash
# Clone and install in editable mode
git clone https://github.com/GoodMood2008/langchain-agentx-cli.git
cd langchain-agentx-cli
pip install -e ".[dev]"

# Run tests
pytest tests -v

# Run directly (without install)
python -m langchain_agentx_cli
```

## Configuration

Config file location: `~/.config/langchain_agentx/langchain_agentx.json`

```json
{
  "llm": {
    "provider": "claude",
    "model": "claude-sonnet-4-20250514",
    "api_key": null,
    "base_url": null
  },
  "theme": "dark",
  "show_suppressed_text": false,
  "user_message_preview_lines": 30
}
```

## Architecture

工程约定与开发说明见根目录 **`CLAUDE.md`**。

| Layer | Name | Description |
|-------|------|-------------|
| PyPI Package | `langchain-agentx-cli` | `pip install langchain-agentx-cli` |
| CLI Command | `agentx-code` | User types in terminal |
| Python Package | `langchain_agentx_cli` | `import` for use as library |

## Design Docs

- [D01: user_message Dual Output Fix](docs/design-docs/tools/D01-user-message-dual-output.html)
- [Implementation Plans](docs/exec-plan/tools/)

## License

Apache License 2.0
