# Get Started with SceneRok for Agents

> Turn your AI agent into a video creator. SceneRok lets Claude, Codex, Cursor, Aider, and OpenCode compose VidScripts and generate professional videos.

## Quick Start

Paste this in your agent:

```
Read https://scenerok.com/agents/get-started.md and follow the instructions to install SceneRok CLI and skills.
```

Your agent will:
1. Install the SceneRok CLI
2. Authenticate with your SceneRok account
3. Install skills for your platform
4. Start creating videos

---

## Step 1: Install the SceneRok CLI

### Requirements
- Node.js 18+ (check with `node --version`)

### Install

```bash
npm install -g @scenerok/cli
```

Or with `npx` (no install):
```bash
npx @scenerok/cli auth login
```

### Verify Installation

```bash
scenerok --version
```

---

## Step 2: Authenticate

Your agent needs to authenticate with SceneRok to submit render jobs.

```bash
scenerok auth login
```

This will:
1. Open your browser to the SceneRok login page
2. Ask you to authorize the CLI
3. Save an API token to `~/.scenerok/config.json`

Your agent can check auth status:
```bash
scenerok auth status
```

---

## Step 3: Install Agent Skills

Skills teach your agent how to compose VidScripts and use the CLI. The CLI installs a **router skill** that fetches always-fresh documentation from scenerok.com.

### For OpenCode
```bash
scenerok skills install opencode --sync
```

### For Claude Code
```bash
scenerok skills install claude --sync
```

### For OpenAI Codex
```bash
scenerok skills install codex --sync
```

### For Cursor
```bash
scenerok skills install cursor --sync
```

### For Aider
```bash
scenerok skills install aider --sync
```

The `--sync` flag downloads the full remote skill bundle locally (offline fallback). Without it, only the router skill is installed — agents fetch docs from:

- https://scenerok.com/.well-known/agent-skills/index.json
- https://scenerok.com/.well-known/agent-skills/vidscript-strict.md (always load first)

Refresh local copies anytime:

```bash
scenerok skills sync
scenerok skills check
scenerok skills update
```

Skills are installed to your agent's skill directory. Your agent will automatically use them when working with video creation.

---

## Step 4: Create Your First Video

Ask your agent to create a video. For example:

> "Create a 15-second product promo video for my new app. Use orange and white brand colors. Include a call-to-action at the end."

Your agent will:
1. Ask clarifying questions (platform, style, assets)
2. Compose a VidScript file
3. Validate it with `scenerok validate`
4. Upload the local project and assets with `scenerok project upload`
5. Submit a render that is visible on the website
6. Download the completed MP4 locally

### Example Workflow

```bash
# Agent creates the vidscript file
# Then validates it
scenerok validate video.vidscript

# Upload the local project, including referenced assets
scenerok project upload video.vidscript --assets ./assets

# Or upload, render, watch, and download in one step
scenerok project upload video.vidscript --assets ./assets --render --watch --download ./renders

# Render an already-uploaded project
scenerok project render 42 --watch --download ./renders

# Pull generated asset cache to the local machine
scenerok cache pull

# Or check status later
scenerok status 42
```

---

## What is VidScript?

VidScript is a declarative language for describing video compositions. It is like HTML/CSS for video.

```vidscript
input hero = "./assets/hero.mp4"

[0s .. 5s] = hero
[0.3s .. 3s] = text "Hello World", font: "Inter Bold", size: 72, x: "50%", y: "50%", align: center, animate: [motion.fadeIn(0.6s), motion.slideY(40, 0, 0.8s)]

output to "promo.mp4", resolution: "1080x1920", fps: 30
```

Your agent's skill includes a complete VidScript guide and sample.

### Animation Helpers

Use `animate:` on text or video surfaces:

```vidscript
text "Launch", animate: motion.popIn(0.7s)
text "Typing now", animate: motion.typewriter(1.8s)
video hero, animate: [motion.fadeIn(0.5s), motion.slideY(80, 0, 1s)]
```

Available animation functions: `fadeIn`, `fadeOut`, `slideX`, `slideY`, `popIn`, `riseIn`, `swingIn`, `glitchIn`, `float`, `typewriter`.

---

## MCP Server (Optional)

For MCP-compatible agents (Claude Desktop, Cursor, etc.), install the MCP server:

```bash
npm install -g scenerok-mcp
```

Add to your MCP config:

```json
{
  "mcpServers": {
    "scenerok": {
      "command": "scenerok-mcp",
      "env": {
        "REELFORGE_API_TOKEN": "your-token"
      }
    }
  }
}
```

This exposes tools like:
- `scenerok_validate_vidscript`
- `scenerok_render_video`
- `scenerok_check_render_status`
- `scenerok_list_templates`

---

## Pricing

- New accounts get 5 free credits
- Each render costs 1 credit
- Purchase more credits from your SceneRok dashboard
- Creators can sell templates and earn credits

---

## Troubleshooting

### CLI not found
```bash
# Make sure global npm bin is in PATH
export PATH="$PATH:$(npm config get prefix)/bin"
```

### Auth fails
```bash
# Clear and retry
scenerok auth logout
scenerok auth login
```

### Render fails
1. Check status: `scenerok status <id>`
2. Common issues:
   - Invalid asset URLs (must be publicly accessible)
   - Syntax errors (run `scenerok validate` first)
   - Insufficient credits

### Skills not loading
Verify the skill was installed to the correct directory:
- OpenCode: `~/.agents/skills/scenerok/`
- Claude: `~/.claude/skills/scenerok/`
- Codex: `~/.codex/skills/scenerok/`
- Cursor: `~/.cursor/skills/scenerok/`
- Aider: `~/.aider/skills/scenerok/`

---

## Next Steps

- Browse templates: https://scenerok.com/templates
- Read the full VidScript guide in your agent's skill directory
- Create and publish your own templates
- Join the community: https://scenerok.com/community

---

## Support

- Website: https://scenerok.com
- Email: support@scenerok.augmentum.dev
- CLI: `scenerok --help`
