Metadata-Version: 2.4
Name: clue2app-cli
Version: 0.3.0
Summary: CLI application for clue2app using the clue2app-python-sdk
Author-email: Clue2App CLI Team <support@clue2app.com>
License: MIT
Project-URL: Homepage, https://github.com/clue2solve/clue2app-cli
Project-URL: Documentation, https://docs.clue2app.com/cli
Project-URL: Repository, https://github.com/clue2solve/clue2app-cli
Project-URL: Issues, https://github.com/clue2solve/clue2app-cli/issues
Keywords: cli,clue2app,sdk
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
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
Classifier: Environment :: Console
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Build Tools
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click>=8.0.0
Requires-Dist: requests>=2.28.0
Requires-Dist: rich>=12.0.0
Requires-Dist: keyring>=23.0.0
Requires-Dist: pydantic>=1.10.0
Requires-Dist: toml>=0.10.0
Requires-Dist: questionary>=2.0.0
Requires-Dist: textual>=0.40.0
Requires-Dist: jsonschema>=4.18.0
Requires-Dist: PyYAML>=6.0
Requires-Dist: clue2app-mcp>=0.1.1; python_version >= "3.10"
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: black>=22.0.0; extra == "dev"
Requires-Dist: isort>=5.10.0; extra == "dev"
Requires-Dist: flake8>=5.0.0; extra == "dev"
Requires-Dist: mypy>=0.991; extra == "dev"
Requires-Dist: pandas>=1.5.0; extra == "dev"
Provides-Extra: build
Requires-Dist: pyinstaller>=6.0.0; extra == "build"
Requires-Dist: invoke>=2.0.0; extra == "build"
Requires-Dist: tox>=4.0.0; extra == "build"
Dynamic: license-file

# Clue2App CLI

**Command-line interface for the Clue2App platform**

[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Tests](https://img.shields.io/github/actions/workflow/status/clue2solve/clue2app-cli/tests.yml?label=tests)](https://github.com/clue2solve/clue2app-cli/actions/workflows/tests.yml)
[![Release](https://img.shields.io/github/v/release/clue2solve/clue2app-cli)](https://github.com/clue2solve/clue2app-cli/releases)

## Install

```bash
pip install clue2app-cli
```

Requires Python 3.10+. Verify with `c2a --version`.

## Quick Start

```bash
# Login to your account
c2a login

# Check status
c2a status

# List your projects
c2a project list

# Select a project
c2a project use MyProject

# List apps in current project
c2a app list

# Deploy an app from GitHub
c2a app create my-app --git-url https://github.com/user/repo

# View app logs
c2a logs show my-app

# Rebuild an app
c2a rebuild my-app
```

## Key Commands

| Command | Description |
|---------|-------------|
| `c2a login` | Authenticate with Clue2App |
| `c2a status` | Show CLI and auth status |
| `c2a project list` | List all projects |
| `c2a project use <name>` | Set active project |
| `c2a app list` | List apps in current project |
| `c2a app create <name> --git-url <url>` | Deploy a new app from a Git repo |
| `c2a logs show <app>` | View application logs (`--build` for build logs, `-f` to follow) |
| `c2a build logs <app>` | View latest build logs for an app |
| `c2a rebuild <app>` | Trigger app rebuild |
| `c2a env set <app> KEY=value` | Set environment variables |
| `c2a secrets create -n <name> -u <user> -p <token>` | Create a git credential secret |
| `c2a user invite -e <email> -A <account_uuid> -P <project_uuid> -r <role>` | Invite a project member via the invitations flow (SCK-625) |
| `c2a llm list` / `c2a llm create` / `c2a llm bind <app> <secret>` | Manage LLM Gateway bindings (see [Daari LLM](docs/daari-llm.md)) |
| `c2a daari secrets list` / `bind <app> <secret>` | Manage Daari service bindings (see [Daari](docs/daari.md)) |

### Inviting a project member (SCK-625)

Pass `-A <account_uuid>` to route through the invitations service
(`POST /api/v1/invitations/project-member`, backed by SCK-622). The
new endpoint mints an invitation row, sends the redemption email by
default, and returns a redemption URL the CLI prints:

```bash
# Server sends the invitation email (default delivery).
c2a user invite -e alice@corp.com -A <account_uuid> -P <project_uuid> -r CONTRIBUTOR

# --copy-only skips the email; hand-deliver the printed URL yourself.
c2a user invite -e alice@corp.com -A <account_uuid> -P <project_uuid> -r VIEWER --copy-only
```

`-r` accepts `VIEWER`, `CONTRIBUTOR`, or `PROJECT_ADMIN`. Without
`-A`, `c2a user invite` keeps its legacy behaviour (invite-with-
project-grants via `/api/accounts/{id}/members`, or the LOCAL user
create flow with `-u`/`-p`).

## Configuration

Config files are stored in `~/.c2a/`:
- `config.toml` - CLI settings
- `credentials.json` - Authentication tokens

Override the API base URL (or any other config key) with `c2a config set`:
```bash
c2a config set api.base_url https://custom-api.example.com
```

## Documentation

For complete documentation, guides, and tutorials:

**[https://clue2app.ai/docs](https://clue2app.ai/docs)**

- [Quick Start Guide](https://clue2app.ai/docs/quick-start)
- [CLI Reference](https://clue2app.ai/docs/cli-reference)
- [MCP Server Setup](https://clue2app.ai/docs/mcp-quickstart)
- [Deployment Guide](https://clue2app.ai/docs/deployment-journey)

## Agents

Clue2App includes specialized agents that help manage your applications:

| Agent | Purpose |
|-------|---------|
| **Deployment** | Deploy, rebuild, and manage application lifecycle |
| **Cleanup** | Remove orphaned resources and maintain clean infrastructure |
| **System Health** | Detect anomalies and report system issues |
| **Audit** | Track all operations with full audit trail and rollback support |

Each agent has a single responsibility and they work together to keep your platform healthy.

## MCP Server Integration

Use Clue2App with AI assistants (Claude Code, Cursor, Claude Desktop):

```bash
pip install clue2app-mcp
```

See [MCP Quick Start](https://clue2app.ai/docs/mcp-quickstart) for setup instructions.

## Development

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

# Run tests
pytest

# Build executable
pip install -e ".[build]"
make build
```

## Support

- **Documentation**: [clue2app.ai/docs](https://clue2app.ai/docs)
- **Issues**: [GitHub Issues](https://github.com/clue2solve/clue2app-cli/issues)

## License

MIT License - see [LICENSE](LICENSE) for details.
