Metadata-Version: 2.4
Name: rgba
Version: 0.3.7
Summary: Command-line interface for RGBA — drive the RGBA video-creation API from your terminal or Claude Code.
Author: RGBA
License-Expression: MIT
Project-URL: Homepage, https://rgba.ai
Project-URL: Documentation, https://rgba.ai/docs
Project-URL: Issues, https://rgba.ai/support
Keywords: rgba,ai,video,cli,claude,agent
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Multimedia :: Video
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typer<1.0,>=0.12
Requires-Dist: httpx<1.0,>=0.27
Dynamic: license-file

# rgba CLI

HTTPS client for the deployed RGBA API, plus a literal local Remotion wrapper.
The API defaults to the right backend URL; override with `RGBA_API_URL` for local dev.
RGBA provides a UI and tools for external agents; it does not run its own agent.

## Install

```bash
pip install rgba             # from PyPI
pipx install rgba            # isolated user install (recommended for daily use)
```

After install you'll have a `rgba` command on your PATH.

## Usage

```bash
rgba auth login              # device-flow → opens https://rgba.ai/cli in your browser
rgba auth status             # show whoami
rgba auth logout             # revoke the active token

rgba me                      # alias for `auth status`
rgba actions                 # discover every /sdk/action with cost + params
rgba actions <name>          # full schema for one action
rgba actions <action> -p key=val # call /sdk/action (`rgba sdk` is a legacy alias)
rgba jobs get <job_id>       # poll a job
rgba jobs wait <job_id>      # poll until status is completed/failed
rgba actions social-publish -p operation=channels # connected social accounts
rgba actions social-publish --params-file publish.json # draft/post/schedule video
```

Credentials live in `~/.rgba/credentials` (mode 0600). The CLI never sees
your Supabase password — auth is brokered through a device-flow OAuth
against the RGBA backend.

## Author and render explainers

First read `rgba prompts animation/guide`. This self-contained prompt includes the
relevant codex-explainer instructions; no additional skill is needed. The same
coding agent writes real React/Remotion source and iterates on rendered review.
RGBA runs the project's installed Remotion CLI and records its workspace; it
does not turn the story into a restricted scene format or rewrite the animation.
The following local commands require no RGBA login:

```bash
rgba prompts animation/guide  # read the complete authoring instructions
rgba explainer scaffold /path/to/new-film --version 4.0.529

rgba remotion --project-dir /path/to/film studio src/index.ts --no-open
rgba remotion --project-dir /path/to/film still src/index.ts Film /tmp/frame.png --frame=120
rgba remotion --project-dir /path/to/film render src/index.ts Film /tmp/film.mp4
rgba remotion --project-dir /path/to/film --help
```

Only an initial `--project-dir DIR` or `--project-dir=DIR` belongs to RGBA.
Every following argument is passed unchanged, including unknown/future flags,
help, props, browser, bundle, render and Studio commands. An initial `--` ends
wrapper option parsing explicitly. The wrapper uses no shell, inherits the
native environment and terminal streams, and preserves exit status and signals.
It uses the installed project dependency rather than silently downloading a
different Remotion version. `scaffold` invokes upstream `create-video`'s blank
template in a new or empty directory; the coding agent then authors the film.

Inspect the actual entrypoint and registered compositions:

```bash
rgba explainer inspect --project-dir /path/to/film --entry-point src/index.ts \
  --studio-url http://localhost:3417 --output /tmp/film-project.json
```

The JSON is the `project` value for `explainer-video` register/update operations.
It includes exact CLI composition metadata, installed package versions, a file
manifest with SHA-256 hashes, and a source revision. The revision is SHA-256 of
canonical JSON (`sort_keys`, compact separators, ASCII escaping) containing
`entrypoint`, `files`, `package_versions` and `compositions`. Paths and optional
Studio URLs are separate from source identity. Inspect passes additional flags
to native composition discovery, so `--props` and browser configuration work.

Inspection includes public assets and excludes dependency caches, build/output
folders and credential files. It rejects source directory symlinks instead of
silently omitting their contents, and rejects changes made during inspection.
Write snapshots **outside** the workspace to avoid hashing the snapshot itself.
The optional Studio address must use `localhost`, `127.0.0.1` or `::1` and does
not start a server. Composition metadata is captured from the installed CLI's
actual discovery result; an unsupported future metadata-adapter layout fails
clearly while `rgba remotion` remains available unchanged.

## Publish videos

Video publishing supports YouTube, Instagram, TikTok, Facebook, Threads, and
Pinterest through Postiz (Pinterest also needs a `cover_url` image per target).
`promote-video` posts link promotions to X, Reddit, and Medium.
In RGBA, open **Settings → Connect Postiz**, save your Postiz workspace API
key, and connect your social accounts. Multiple channels are supported.
The key stays on the server; do not pass it to the CLI.

Run `rgba actions social-publish -p operation=channels` to find channel IDs.
For a YouTube draft, save this as `publish.json` with your channel ID and a
public HTTPS video file URL:

```json
{
  "operation": "publish",
  "request_id": "my-video-001",
  "video_url": "https://your-cdn.example/video.mp4",
  "mode": "draft",
  "targets": [{
    "channel_id": "YOUR_CHANNEL_ID",
    "content": "My video description",
    "settings": {"title": "My video", "type": "private", "selfDeclaredMadeForKids": "no"}
  }]
}
```

Then run `rgba actions social-publish --params-file publish.json`.
Local files can first use `rgba actions upload -p file_path=/path/video.mp4`;
use the returned URL. An owned RGBA video's `video_id` can replace `video_url`.
Publishing defaults to a draft; use `mode=now` or `mode=schedule` with a
timezone-aware `publish_at` for authorized automation. Reuse the same
`request_id` and parameters on retries to avoid duplicate submissions.
An `accepted` receipt means Postiz accepted the submission; use
`operation=posts` with `start_date` and `end_date` to check delivery.
Run `rgba actions social-publish` for the full action schema.

## Environment

| var              | default                                                                  | use                                       |
|------------------|--------------------------------------------------------------------------|-------------------------------------------|
| `RGBA_API_URL`   | `https://lemontree-media-llc--rgba-agent-agent-app.modal.run`            | Override the API origin (e.g. localhost)  |
| `RGBA_CONFIG_DIR`| `~/.rgba`                                                                | Override credentials directory            |
