Metadata-Version: 2.4
Name: entelligence-cli
Version: 0.1.0
Summary: EntelligenceAI CLI - AI-powered code review from your terminal
Author-email: EntelligenceAI <info@entelligence.ai>
License: MIT
Project-URL: Homepage, https://entelligenceai.com
Project-URL: Documentation, https://github.com/entelligenceai/cli#readme
Project-URL: Repository, https://github.com/entelligenceai/cli
Keywords: code-review,ai,cli,git,entelligence
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: click>=8.0.0
Requires-Dist: requests>=2.28.0
Requires-Dist: rich>=13.0.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: black>=22.0.0; extra == "dev"
Requires-Dist: flake8>=5.0.0; extra == "dev"
Requires-Dist: mypy>=0.990; extra == "dev"

# EntelligenceAI CLI

AI-powered code review from your terminal.

## Quick Start

```bash
# Setup (this will install uv if not already there)
make setup

# Authenticate
entelligence auth login

# Run review
entelligence review
```

## Installation

```bash
# Development (recommended)
make setup
# or
uv sync --dev

# Production
uv pip install entelligence-cli
```

## Authentication

Get your API key from [app.entelligence.ai/settings?tab=api](https://app.entelligence.ai/settings?tab=api)

```bash
entelligence auth login
entelligence auth status
entelligence auth logout
```

## Usage

```bash
# Review changes
entelligence review

# Options
entelligence review --base-branch main --priority high --mode concise
entelligence review --include-uncommitted  # Include uncommitted changes
entelligence review --plain                # Plain text output
entelligence review --debug               # Debug mode
```

## Configuration

**Config file:** `~/.entelligence/config.json` (permissions: `0o600`)

**Stored locally:**
- `api_key` - Saved during `entelligence auth login`

**Fetched from backend:**
- `OrgUUID` - Fetched from `/getUserInfo/` endpoint at session start (required)
- `GitHubToken` - Fetched from `/getUserInfo/` endpoint at session start (optional)

**Environment variables:**
- `ENTELLIGENCE_API_KEY` - API key (auto-saved to config file on login)
- `ENTELLIGENCE_ENDPOINT` - API endpoint (default: `http://127.0.0.1:8000/generateReviewForPR/`)

## Development

```bash
make setup          # Initial setup
make test           # Run tests
make format         # Format code
make lint           # Lint code
make type-check     # Type check
make check          # Run all checks
make clean          # Clean build artifacts
make help           # Show all commands
```

## Publishing

The package is automatically published to PyPI when a new GitHub release is created.

**Before publishing:**
1. Update version in `pyproject.toml`
2. Commit and push changes
3. Create a new GitHub release (tagged with version, e.g., `v0.1.0`)

**Manual publishing:**
```bash
# Build package
uv build

# Publish to PyPI (requires PyPI credentials)
uv publish
```

**Setup PyPI Trusted Publisher (one-time):**
1. Go to PyPI project settings → "Publishing" → "Add a new trusted publisher"
2. Select "GitHub" as publisher
3. Specify repository: `Entelligence-AI/cli`
4. Workflow file: `.github/workflows/publish.yml`
5. Environment name: `(Any)` or `pypi`

## Uninstall

```bash
# Uninstall the CLI tool
uv pip uninstall entelligence-cli

# Remove configuration files (API keys, tokens, etc.)
rm -rf ~/.entelligence/
```

## Troubleshooting

**401 Unauthorized:** Verify API key with `entelligence auth status`

**Connection errors:** Ensure backend is running at the configured endpoint
