raga-canvas-cli


Nameraga-canvas-cli JSON
Version 0.1.9 PyPI version JSON
download
home_pageNone
SummaryCLI tool for interacting with Raga Canvas no-code agent deployment platform
upload_time2025-10-06 04:59:59
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT
keywords cli agent deployment no-code ai
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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) **Login** to authenticate with Canvas platform
```bash
canvas login [--api-base https://api.canvas.raga.ai] [--profile <name>]
```

2) **Initialize** a workspace
```bash
canvas init <directory> [--profile <name>] [--force]
```

3) **Add** a project to your workspace
```bash
canvas add project <project-short-name> [--profile <name>]
```

4) **Set** the default project
```bash
canvas set default-project <project-short-name>
```

5) **Pull** an agent and its dependencies
```bash
canvas pull agent <agent-short-name> [--project <project-name>] [--profile <name>]
```

6) **Push** your modified agent
```bash
canvas push agent <agent-short-name> [--project <project-name>] [--profile <name>] [--force]
```

7) **Deploy** the agent
```bash
canvas deploy agent <agent-short-name> [--project <project-name>] [--profile <name>]
```

## Commands

### canvas login
Authenticate with the Canvas platform and save credentials.

**Usage:**
```bash
canvas login [--api-base <url>] [--profile <name>]
```

Prompts for username and password, validates, and stores a token securely (in system keychain or `~/.canvasrc`).

**Options:**
- `--api-base`: API base URL (default: `https://api.canvas.raga.ai`)
- `--profile`: Profile name to save credentials under (default: `default`)

---

### canvas init
Initialize a Canvas workspace.

**Usage:**
```bash
canvas init <directory> [--profile <name>] [--force]
```

Creates the workspace structure:
- `canvas.yaml` - workspace configuration
- `agents/`, `tools/`, `datasources/` - resource directories
- `.gitignore` - excludes sensitive files

**Arguments:**
- `<directory>`: Directory to initialize (use `.` for current directory)

**Options:**
- `--profile`: Profile to use for authentication
- `--force`: Proceed even if files already exist

---

### canvas add
Add projects to your workspace.

**Usage:**
```bash
canvas add project <project-short-name> [--profile <name>]
```

Downloads project configuration and sets up environment templates for the specified project.

**Examples:**
```bash
canvas add project my-project
canvas add project my-project --profile production
```

---

### canvas set
Set workspace-level defaults.

**Usage:**
```bash
canvas set default-project <project-short-name>
```

Sets the default project in `canvas.yaml` that will be used by other commands when `--project` is not specified.

---

### canvas list
List Canvas resources.

**List Projects:**
```bash
canvas list projects [--profile <name>] [--local]
```
- `--local`: List projects added to local workspace instead of remote projects

**List Agents:**
```bash
canvas list agents [--project <short-name>] [--profile <name>]
```

Shows all agents in the specified project (or default project if not specified).

---

### canvas pull
Pull resources from Canvas platform into your workspace.

**Pull Agent:**
```bash
canvas pull agent <agent-short-name> [--project <short-name>] [--profile <name>]
```

Pulls an agent and all its dependencies (tools, datasources, sub-agents) into the global `agents/` directory.

**Examples:**
```bash
canvas pull agent my-agent
canvas pull agent my-agent --project my-project
```

**Note:** The deprecated `canvas pull project` command has been replaced by `canvas add project`.

---

### canvas push
Push local resources to Canvas platform.

**Push Agent:**
```bash
canvas push agent <agent-short-name> [--project <short-name>] [--profile <name>] [--force]
```

Creates or updates an agent and its dependencies in the target project.

**Arguments:**
- `<agent-short-name>`: Agent directory name in `agents/`

**Options:**
- `--project`: Target project short name (uses default project if not specified)
- `--profile`: Profile to use for authentication
- `--force`: Force push even if validation warnings exist

**Examples:**
```bash
canvas push agent my-agent
canvas push agent my-agent --project my-project
canvas push agent my-agent --force
```

---

### canvas deploy
Deploy an agent to Canvas platform.

**Usage:**
```bash
canvas deploy agent <agent-short-name> [--project <short-name>] [--profile <name>]
```

Triggers deployment of an existing agent version in the target project.

**Examples:**
```bash
canvas deploy agent my-agent
canvas deploy agent my-agent --project my-project
```

---

### canvas help
Show help information for Canvas CLI commands.

**Usage:**
```bash
canvas help [<command>] [--structure]
```

**Options:**
- `--structure`: Show workspace directory structure

**Examples:**
```bash
canvas help                # General help
canvas help pull          # Help for pull command
canvas help --structure   # Show directory structure
```

## Directory Structure

When you run `canvas init` and `canvas add project`, the following structure is created:

```
my-canvas-workspace/
├── canvas.yaml              # Workspace configuration
├── .gitignore              # Ignores sensitive files (.canvasrc, *.env, etc.)
│
├── agents/                 # Global agents directory
│   └── my-agent/
│       ├── agent.yaml      # Agent configuration
│       └── system_prompt.txt  # System prompt (if extracted)
│
├── tools/                  # Global tools directory  
│   └── my-tool/
│       └── tool.yaml       # Tool configuration
│
├── datasources/            # Global datasources directory
│   └── my-datasource/
│       └── datasource.yaml # Datasource configuration
│
├── projects/               # Project-specific configurations
│   └── my-project/
│       └── project.yaml    # Project metadata
│
└── env/                    # Environment-specific variables
    ├── dev.yaml           # Development environment
    ├── staging.yaml       # Staging environment
    └── prod.yaml          # Production environment
```

**Key Files:**
- `canvas.yaml`: Workspace config with default project name and version
- `~/.canvasrc`: Global user profiles and authentication tokens (stored in system keychain when available)
- `agents/<name>/agent.yaml`: Agent configuration with references to tools and datasources by short name
- `projects/<name>/project.yaml`: Project-specific metadata including project ID, environment, and profile
- `env/<environment>.yaml`: Environment-specific variables (API keys, connection strings, etc.)

## Configuration

The CLI uses the following configuration files:

- `~/.canvasrc` - Global user configuration and profiles (or system keychain)
- `canvas.yaml` - Workspace configuration
- `projects/<name>/project.yaml` - Project metadata and settings
- `env/*.yaml` - Environment-specific variables

## 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.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "raga-canvas-cli",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "cli, agent, deployment, no-code, ai",
    "author": null,
    "author_email": "Raga AI <support@raga.ai>",
    "download_url": "https://files.pythonhosted.org/packages/a5/5d/cc0f7344e79ddf86731e097783cdb7ddf4bb6f825ed45b5da26d038a4069/raga_canvas_cli-0.1.9.tar.gz",
    "platform": null,
    "description": "# Raga Canvas CLI\n\nA command-line interface for interacting with the Raga Canvas no-code agent deployment platform.\n\n## Installation\n\n```bash\npip install raga-canvas-cli\n```\n\n## Quick Start\n\n1) **Login** to authenticate with Canvas platform\n```bash\ncanvas login [--api-base https://api.canvas.raga.ai] [--profile <name>]\n```\n\n2) **Initialize** a workspace\n```bash\ncanvas init <directory> [--profile <name>] [--force]\n```\n\n3) **Add** a project to your workspace\n```bash\ncanvas add project <project-short-name> [--profile <name>]\n```\n\n4) **Set** the default project\n```bash\ncanvas set default-project <project-short-name>\n```\n\n5) **Pull** an agent and its dependencies\n```bash\ncanvas pull agent <agent-short-name> [--project <project-name>] [--profile <name>]\n```\n\n6) **Push** your modified agent\n```bash\ncanvas push agent <agent-short-name> [--project <project-name>] [--profile <name>] [--force]\n```\n\n7) **Deploy** the agent\n```bash\ncanvas deploy agent <agent-short-name> [--project <project-name>] [--profile <name>]\n```\n\n## Commands\n\n### canvas login\nAuthenticate with the Canvas platform and save credentials.\n\n**Usage:**\n```bash\ncanvas login [--api-base <url>] [--profile <name>]\n```\n\nPrompts for username and password, validates, and stores a token securely (in system keychain or `~/.canvasrc`).\n\n**Options:**\n- `--api-base`: API base URL (default: `https://api.canvas.raga.ai`)\n- `--profile`: Profile name to save credentials under (default: `default`)\n\n---\n\n### canvas init\nInitialize a Canvas workspace.\n\n**Usage:**\n```bash\ncanvas init <directory> [--profile <name>] [--force]\n```\n\nCreates the workspace structure:\n- `canvas.yaml` - workspace configuration\n- `agents/`, `tools/`, `datasources/` - resource directories\n- `.gitignore` - excludes sensitive files\n\n**Arguments:**\n- `<directory>`: Directory to initialize (use `.` for current directory)\n\n**Options:**\n- `--profile`: Profile to use for authentication\n- `--force`: Proceed even if files already exist\n\n---\n\n### canvas add\nAdd projects to your workspace.\n\n**Usage:**\n```bash\ncanvas add project <project-short-name> [--profile <name>]\n```\n\nDownloads project configuration and sets up environment templates for the specified project.\n\n**Examples:**\n```bash\ncanvas add project my-project\ncanvas add project my-project --profile production\n```\n\n---\n\n### canvas set\nSet workspace-level defaults.\n\n**Usage:**\n```bash\ncanvas set default-project <project-short-name>\n```\n\nSets the default project in `canvas.yaml` that will be used by other commands when `--project` is not specified.\n\n---\n\n### canvas list\nList Canvas resources.\n\n**List Projects:**\n```bash\ncanvas list projects [--profile <name>] [--local]\n```\n- `--local`: List projects added to local workspace instead of remote projects\n\n**List Agents:**\n```bash\ncanvas list agents [--project <short-name>] [--profile <name>]\n```\n\nShows all agents in the specified project (or default project if not specified).\n\n---\n\n### canvas pull\nPull resources from Canvas platform into your workspace.\n\n**Pull Agent:**\n```bash\ncanvas pull agent <agent-short-name> [--project <short-name>] [--profile <name>]\n```\n\nPulls an agent and all its dependencies (tools, datasources, sub-agents) into the global `agents/` directory.\n\n**Examples:**\n```bash\ncanvas pull agent my-agent\ncanvas pull agent my-agent --project my-project\n```\n\n**Note:** The deprecated `canvas pull project` command has been replaced by `canvas add project`.\n\n---\n\n### canvas push\nPush local resources to Canvas platform.\n\n**Push Agent:**\n```bash\ncanvas push agent <agent-short-name> [--project <short-name>] [--profile <name>] [--force]\n```\n\nCreates or updates an agent and its dependencies in the target project.\n\n**Arguments:**\n- `<agent-short-name>`: Agent directory name in `agents/`\n\n**Options:**\n- `--project`: Target project short name (uses default project if not specified)\n- `--profile`: Profile to use for authentication\n- `--force`: Force push even if validation warnings exist\n\n**Examples:**\n```bash\ncanvas push agent my-agent\ncanvas push agent my-agent --project my-project\ncanvas push agent my-agent --force\n```\n\n---\n\n### canvas deploy\nDeploy an agent to Canvas platform.\n\n**Usage:**\n```bash\ncanvas deploy agent <agent-short-name> [--project <short-name>] [--profile <name>]\n```\n\nTriggers deployment of an existing agent version in the target project.\n\n**Examples:**\n```bash\ncanvas deploy agent my-agent\ncanvas deploy agent my-agent --project my-project\n```\n\n---\n\n### canvas help\nShow help information for Canvas CLI commands.\n\n**Usage:**\n```bash\ncanvas help [<command>] [--structure]\n```\n\n**Options:**\n- `--structure`: Show workspace directory structure\n\n**Examples:**\n```bash\ncanvas help                # General help\ncanvas help pull          # Help for pull command\ncanvas help --structure   # Show directory structure\n```\n\n## Directory Structure\n\nWhen you run `canvas init` and `canvas add project`, the following structure is created:\n\n```\nmy-canvas-workspace/\n\u251c\u2500\u2500 canvas.yaml              # Workspace configuration\n\u251c\u2500\u2500 .gitignore              # Ignores sensitive files (.canvasrc, *.env, etc.)\n\u2502\n\u251c\u2500\u2500 agents/                 # Global agents directory\n\u2502   \u2514\u2500\u2500 my-agent/\n\u2502       \u251c\u2500\u2500 agent.yaml      # Agent configuration\n\u2502       \u2514\u2500\u2500 system_prompt.txt  # System prompt (if extracted)\n\u2502\n\u251c\u2500\u2500 tools/                  # Global tools directory  \n\u2502   \u2514\u2500\u2500 my-tool/\n\u2502       \u2514\u2500\u2500 tool.yaml       # Tool configuration\n\u2502\n\u251c\u2500\u2500 datasources/            # Global datasources directory\n\u2502   \u2514\u2500\u2500 my-datasource/\n\u2502       \u2514\u2500\u2500 datasource.yaml # Datasource configuration\n\u2502\n\u251c\u2500\u2500 projects/               # Project-specific configurations\n\u2502   \u2514\u2500\u2500 my-project/\n\u2502       \u2514\u2500\u2500 project.yaml    # Project metadata\n\u2502\n\u2514\u2500\u2500 env/                    # Environment-specific variables\n    \u251c\u2500\u2500 dev.yaml           # Development environment\n    \u251c\u2500\u2500 staging.yaml       # Staging environment\n    \u2514\u2500\u2500 prod.yaml          # Production environment\n```\n\n**Key Files:**\n- `canvas.yaml`: Workspace config with default project name and version\n- `~/.canvasrc`: Global user profiles and authentication tokens (stored in system keychain when available)\n- `agents/<name>/agent.yaml`: Agent configuration with references to tools and datasources by short name\n- `projects/<name>/project.yaml`: Project-specific metadata including project ID, environment, and profile\n- `env/<environment>.yaml`: Environment-specific variables (API keys, connection strings, etc.)\n\n## Configuration\n\nThe CLI uses the following configuration files:\n\n- `~/.canvasrc` - Global user configuration and profiles (or system keychain)\n- `canvas.yaml` - Workspace configuration\n- `projects/<name>/project.yaml` - Project metadata and settings\n- `env/*.yaml` - Environment-specific variables\n\n## Development\n\nTo set up for development:\n\n```bash\ngit clone https://github.com/raga-ai/raga-canvas-cli\ncd raga-canvas-cli\npip install -e \".[dev]\"\n```\n\nRun tests:\n\n```bash\npytest\n```\n\n## License\n\nMIT License - see LICENSE file for details.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "CLI tool for interacting with Raga Canvas no-code agent deployment platform",
    "version": "0.1.9",
    "project_urls": {
        "Documentation": "https://docs.raga.ai/canvas-cli",
        "Homepage": "https://github.com/raga-ai/raga-canvas-cli",
        "Issues": "https://github.com/raga-ai/raga-canvas-cli/issues",
        "Repository": "https://github.com/raga-ai/raga-canvas-cli"
    },
    "split_keywords": [
        "cli",
        " agent",
        " deployment",
        " no-code",
        " ai"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f8012c74413ff17adcb7bf25c747ee31d73d16a054bbf83f79edfa11229dcc4a",
                "md5": "6a9d8f27b1899bb2b993397c604968dd",
                "sha256": "c6feb9dc9e43ddc8f48e233c7aa575157c3c4491c057d47c683b98a196e5abd5"
            },
            "downloads": -1,
            "filename": "raga_canvas_cli-0.1.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6a9d8f27b1899bb2b993397c604968dd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 48930,
            "upload_time": "2025-10-06T04:59:57",
            "upload_time_iso_8601": "2025-10-06T04:59:57.846107Z",
            "url": "https://files.pythonhosted.org/packages/f8/01/2c74413ff17adcb7bf25c747ee31d73d16a054bbf83f79edfa11229dcc4a/raga_canvas_cli-0.1.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a55dcc0f7344e79ddf86731e097783cdb7ddf4bb6f825ed45b5da26d038a4069",
                "md5": "98d50da4160a73c16c1663a5c14672b9",
                "sha256": "8efcd421f53ea404bdb41aa4292164efc22a24121cd98a19e0f98e3e16d5ac09"
            },
            "downloads": -1,
            "filename": "raga_canvas_cli-0.1.9.tar.gz",
            "has_sig": false,
            "md5_digest": "98d50da4160a73c16c1663a5c14672b9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 40633,
            "upload_time": "2025-10-06T04:59:59",
            "upload_time_iso_8601": "2025-10-06T04:59:59.645653Z",
            "url": "https://files.pythonhosted.org/packages/a5/5d/cc0f7344e79ddf86731e097783cdb7ddf4bb6f825ed45b5da26d038a4069/raga_canvas_cli-0.1.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-06 04:59:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "raga-ai",
    "github_project": "raga-canvas-cli",
    "github_not_found": true,
    "lcname": "raga-canvas-cli"
}
        
Elapsed time: 1.80419s