Metadata-Version: 2.4
Name: raga-canvas-cli
Version: 0.1.5
Summary: CLI tool for interacting with Raga Canvas no-code agent deployment platform
Author-email: Raga AI <support@raga.ai>
License: MIT
Project-URL: Homepage, https://github.com/raga-ai/raga-canvas-cli
Project-URL: Documentation, https://docs.raga.ai/canvas-cli
Project-URL: Repository, https://github.com/raga-ai/raga-canvas-cli
Project-URL: Issues, https://github.com/raga-ai/raga-canvas-cli/issues
Keywords: cli,agent,deployment,no-code,ai
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
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: Programming Language :: Python :: 3.12
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click>=8.0.0
Requires-Dist: requests>=2.25.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: rich>=12.0.0
Requires-Dist: keyring>=23.0.0
Requires-Dist: python-dotenv>=0.19.0
Requires-Dist: pydantic>=1.8.0
Requires-Dist: tabulate>=0.9.0
Requires-Dist: pathlib
Requires-Dist: typing-extensions>=4.0.0
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: flake8>=5.0.0; extra == "dev"
Requires-Dist: mypy>=0.991; extra == "dev"
Requires-Dist: pre-commit>=2.20.0; extra == "dev"
Dynamic: license-file

# Raga Canvas CLI

A command-line interface for interacting with the Raga Canvas no-code agent deployment platform.

## Installation

```bash
pip install raga-canvas-cli
```

## Quick Start

### 1. Initialize a new Canvas project

```bash
canvas init
```

This creates the folder structure, sample schemas, and starter configuration files.

### 2. Login to your Canvas platform

```bash
canvas login
```

This will prompt for your API base URL and authentication token, storing them securely.

### 3. List your projects

```bash
canvas list projects
```

### 4. List agents in a project

```bash
canvas list agents --project=<project-id>
```

### 5. Deploy an agent

```bash
canvas push <agent-name> <project-id>
```

## Commands

### `canvas init`
Creates the folder structure, sample schemas, and a starter `canvas.yaml`, `environments/dev.yaml`.
Adds `.canvasrc` to `.gitignore`.

### `canvas login`
Stores a profile (API base + token) in `~/.canvasrc` (OS keychain if available).

### `canvas list projects`
Lists projects from the platform API.

### `canvas list agents --project={projectId}`
Lists agents for a specific project.

### `canvas push <agent> <projectid>`
Pushes the effective agent definition to the target project via platform API:
- Uploads bundle to registry (if configured)
- Registers the version
- Applies metadata (owners/tags)
- Does not set or read secret values—only validates presence by name

## Directory Structure

When you run `canvas init` or pull from a project, the following structure is created:

```
my-canvas-repo/
├── canvas.yaml                 # workspace config
├── .canvasrc                   # local profiles (ignored by VCS)
├── agents/
│   ├── test-agent/
│   │   ├── agent.yaml          # core definition (env-agnostic)
│   │   ├── README.md
│   │   ├── prompts/
│   │   │   ├── system.txt
│   │   │   └── fewshot.md
│   │   ├── evals/
│   │   │   └── smoke.yaml
│   │   └── agent.lock.json     # generated by `canvas lock/package`
│   └── claim-router/
│       └── agent.yaml
├── tools/
│   └── fetch-rules.yaml
├── datasources/
│   └── rules-db.yaml
└── environments/
    ├── dev.yaml
    ├── stage.yaml
    ├── prod.yaml
    └── customer-acme.yaml
```

## Configuration

The CLI uses the following configuration files:

- `~/.canvasrc` - Global user configuration and profiles
- `canvas.yaml` - Workspace configuration
- `environments/*.yaml` - Environment-specific overrides

## Development

To set up for development:

```bash
git clone https://github.com/raga-ai/raga-canvas-cli
cd raga-canvas-cli
pip install -e ".[dev]"
```

Run tests:

```bash
pytest
```

## License

MIT License - see LICENSE file for details.
