Skip to content
Heavenly CLI

Heavenly CLI

Clip from your terminal. Or let your agent do it.

Explore projects, edit timelines, and automate repeatable work
without leaving your terminal.

heavenly.mjs
example
$ heavenly clip https://www.youtube.com/watch?v=VIDEO_ID --wait --download ./clips --json
{
  "clips": [{ "id": "clip-a", "title": "The best moment" }]
}

Work with your video projects

Read projects and timelines from your Heavenly account. Your footage stays on the device where you imported it.

Stay in control

Choose token permissions, inspect a timeline revision, and confirm changes before sending them.

Compose with scripts

Use the interactive editor or send JSON lines from repeatable terminal workflows.

Quickstart

Get started with Heavenly CLI

Download the client, connect your account, and run your first command.

  1. 1

    Install Heavenly

    Requires Node.js 20 or later. Download the standalone client; no package manager is needed.

    Install Heavenly
    curl -fLo heavenly.mjs https://lenslab.dev/downloads/heavenly.mjs
    node heavenly.mjs --help

    Update by downloading the file again. Download the source ↗

  2. 2

    Connect your account

    In Settings → API tokens, create a token with read access. Add edit access when you want the assistant to change a timeline. Set HEAVENLY_API_TOKEN in your shell environment; the CLI never saves your token.

    Use your shell's hidden-input prompt or secret manager. Keep tokens out of command arguments and scripts committed to Git.

    Check your connection
    node heavenly.mjs credits
    Review authentication options ↗
  3. 3

    Start your first task

    List your projects, copy a project ID, and inspect its timeline. Import footage and open that project in the web editor first.

    Read your projects
    node heavenly.mjs projects
    node heavenly.mjs timeline PROJECT_ID

    Then start an interactive editing session. Every instruction asks for confirmation before spending credits or changing a timeline.

    Start an editing session
    node heavenly.mjs chat PROJECT_ID

See what Heavenly can do

Use a single terminal workflow to inspect projects, request edits, and connect your tools.

Keep the editing loop in your terminal

Read a timeline, describe the change, and inspect the result. Small edits apply immediately after confirmation; larger edits may return a proposal for you to review.

Learn more
heavenly.mjs
Heavenly CLI example
$ node heavenly.mjs timeline PROJECT_ID

Read the current revision before an edit.

$ node heavenly.mjs ask PROJECT_ID \
  "Add a marker at 5 seconds" --confirm

Connect your AI tools

The CLI uses Heavenly's existing MCP tools. Connect another AI client to the same service, with the same account permissions and credit rules.

Connect an AI app
heavenly.mjs
Heavenly CLI example
$ node heavenly.mjs tools

Tools include:
  list_projects
  get_timeline
  ask_editor_agent
  get_credits

Each tool includes its argument schema.
Available tools depend on token permissions.

Review changes before they run

Write commands require explicit confirmation. Timeline edits also use the server's revision checks, so an outdated timeline is refused rather than overwriting newer work.

Review permissions
heavenly.mjs
Heavenly CLI example
$ node heavenly.mjs chat PROJECT_ID

› Add a marker at 5 seconds
Send this instruction and spend an AI credit?
Type yes:

/timeline   read the current timeline
/credits    check remaining credits
/exit       close the session

Build a terminal workflow around Heavenly

Compose real account tools with your own scripts. Commands return JSON; errors use a nonzero exit status.

CLI reference

CLI reference

Use node heavenly.mjs followed by a command. Replace PROJECT_ID with an ID returned by projects.

Read-only JSON-lines workflow
printf '%s\n' '{"tool":"list_projects"}' '{"tool":"get_credits"}' | node heavenly.mjs exec
CommandBehavior
toolsLists the live tools and their schemas.
projectsLists account projects.
timeline PROJECT_IDReads a timeline and revision.
creditsReads the plan and credit balance.
chat PROJECT_IDInteractive editing with confirmation for each instruction.
ask PROJECT_ID "instruction" --confirmSends one editing instruction; may spend credits and apply edits.
call TOOL '{"argument":"value"}' --confirmCalls a named tool. Omit --confirm for read-only tools.
execReads JSON lines from stdin; each write needs confirm:true.
--helpPrints usage offline.

In exec, each line is {"tool":"name","arguments":{}}. Each response is {"ok":true,"result":…} or {"ok":false,"error":…}. The client exits with status 1 on a failed line.

Permissions and account access

Permissions and account access

Your token's read, edit, and publish scopes are enforced by Heavenly on every request. The CLI also refuses writes without confirmation. Publish tools require explicit confirmation in the tool arguments; inspect the schema with tools.

Account ownership, active-plan requirements, credits, daily limits, expiration, and revocation use the existing server rules. Tokens cannot manage billing or create other tokens.

Network failures never trigger an automatic retry. If a write times out, inspect the project before repeating it. The CLI edits cloud timeline metadata; it does not upload footage, render video locally, or run arbitrary shell commands.

Troubleshoot API errors ↗

Use Heavenly CLI when…

You work from the terminal

Inspect and edit a project beside your existing development tools.

You need repeatable scripts

Read structured JSON and run explicitly approved tool calls.

You want precise control

Inspect schemas, revisions, credits, and token permissions before editing.

You want to connect an AI app

Use the same account tools through Heavenly's authenticated MCP service.