{"_id":"@brennanmceachran/sora-cli","_rev":"2-c9d18062fe765cb4dda7887e1d2d3253","name":"@brennanmceachran/sora-cli","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@brennanmceachran/sora-cli","version":"0.1.0","keywords":["sora","openai","video","cli","ink","tui"],"author":{"name":"Brennan McEachran"},"license":"MIT","_id":"@brennanmceachran/sora-cli@0.1.0","maintainers":[{"name":"brennanmceachran","email":"brennanmceachran@gmail.com"}],"homepage":"https://github.com/brennanmceachran/sora-cli#readme","bugs":{"url":"https://github.com/brennanmceachran/sora-cli/issues"},"bin":{"sora":"bin/sora.mjs"},"dist":{"shasum":"1d3ea6c41320d93f2c4f70b2b39989bb3c989c50","tarball":"https://registry.npmjs.org/@brennanmceachran/sora-cli/-/sora-cli-0.1.0.tgz","fileCount":52,"integrity":"sha512-6M2rEuZcbKqQ5/yf+YjbeP1oD+cr2aJZAKnjKIWFdTl/ovdz/pP4AMR9WMvrqvklN56MSU2asrH4OB6tzlLhyg==","signatures":[{"sig":"MEUCIQDJZI9Bg/2s+iRqgEw1QGPXvjfDZqYQUb9hvz5DgQ1e9QIgIB5RsVX6cKUXChrW98uoGA8zBikThRCiA30/h6TfVno=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":142853},"main":"./dist/index.js","type":"module","_from":"file:brennanmceachran-sora-cli-0.1.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=20.8.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./cli":{"types":"./dist/cli/main.d.ts","default":"./dist/cli/main.js"}},"private":false,"scripts":{"sora":"tsx src/cli/cli.ts","build":"tsc --project tsconfig.json","clean":"rm -rf dist","start":"tsx src/cli/start.tsx","typecheck":"tsc --noEmit"},"_npmUser":{"name":"brennanmceachran","email":"brennanmceachran@gmail.com"},"_resolved":"/private/var/folders/n_/8js0js7931g6cc6v0zv2n1w40000gn/T/a4a7cbe4258377a3f6e965411fe5a67c/brennanmceachran-sora-cli-0.1.0.tgz","_integrity":"sha512-6M2rEuZcbKqQ5/yf+YjbeP1oD+cr2aJZAKnjKIWFdTl/ovdz/pP4AMR9WMvrqvklN56MSU2asrH4OB6tzlLhyg==","repository":{"url":"git+https://github.com/brennanmceachran/sora-cli.git","type":"git"},"_npmVersion":"11.6.0","description":"Terminal UI and CLI for generating videos with OpenAI Sora 2.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"ink":"^6.3.1","chalk":"^5.6.2","react":"^19.2.0","dotenv":"^17.2.3","openai":"^6.2.0","clipboardy":"^5.0.0","ink-spinner":"^5.0.0","ink-text-input":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.20.6","typescript":"^5.9.3","@types/node":"^24.7.0","@types/react":"19.1.16"},"_npmOperationalInternal":{"tmp":"tmp/sora-cli_0.1.0_1760033845635_0.544622719255573","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@brennanmceachran/sora-cli","version":"0.2.0","description":"Terminal UI and CLI for generating videos with OpenAI Sora 2.","license":"MIT","type":"module","private":false,"bin":{"sora":"bin/sora.mjs"},"main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./cli":{"types":"./dist/cli/main.d.ts","default":"./dist/cli/main.js"}},"repository":{"type":"git","url":"git+https://github.com/brennanmceachran/sora-cli.git"},"bugs":{"url":"https://github.com/brennanmceachran/sora-cli/issues"},"homepage":"https://github.com/brennanmceachran/sora-cli#readme","keywords":["sora","openai","video","cli","ink","tui"],"author":{"name":"Brennan McEachran"},"engines":{"node":">=20.8.0"},"dependencies":{"@ffmpeg-installer/ffmpeg":"^1.1.0","@ffprobe-installer/ffprobe":"^2.1.2","chalk":"^5.6.2","clipboardy":"^5.0.0","dotenv":"^17.2.3","ink":"^6.3.1","ink-spinner":"^5.0.0","ink-text-input":"^6.0.0","openai":"^6.2.0","react":"^19.2.0"},"devDependencies":{"@types/node":"^24.7.0","@types/react":"19.1.16","tsx":"^4.20.6","typescript":"^5.9.3"},"scripts":{"start":"tsx src/cli/start.tsx","sora":"tsx src/cli/cli.ts","clean":"rm -rf dist","build":"tsc --project tsconfig.json","typecheck":"tsc --noEmit"},"_id":"@brennanmceachran/sora-cli@0.2.0","_integrity":"sha512-om+WzhWODDD5WxYz0UEtQRyVfZKliMXcvpsLUJ+UFMMqHD4RGx1Nsk3uvhovmfIQjlGj9cEBcJs+LY7eOeJ1tA==","_resolved":"/private/var/folders/n_/8js0js7931g6cc6v0zv2n1w40000gn/T/b6db4c1eabce2a54196915314e1309c6/brennanmceachran-sora-cli-0.2.0.tgz","_from":"file:brennanmceachran-sora-cli-0.2.0.tgz","_nodeVersion":"22.14.0","_npmVersion":"11.6.0","dist":{"integrity":"sha512-om+WzhWODDD5WxYz0UEtQRyVfZKliMXcvpsLUJ+UFMMqHD4RGx1Nsk3uvhovmfIQjlGj9cEBcJs+LY7eOeJ1tA==","shasum":"bc95bfe73d3e1d89d4e73c1a0ced2925d9d447db","tarball":"https://registry.npmjs.org/@brennanmceachran/sora-cli/-/sora-cli-0.2.0.tgz","fileCount":58,"unpackedSize":220095,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCCBymSNdUtARZxheq8OzUYE1UwYdIyhGYmwBcpK+segwIgFebKecleMHtcnBBmmTLe6nCnqoRW4SFY+RK+y6pXUbY="}]},"_npmUser":{"name":"brennanmceachran","email":"brennanmceachran@gmail.com"},"directories":{},"maintainers":[{"name":"brennanmceachran","email":"brennanmceachran@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sora-cli_0.2.0_1760119739553_0.9177456699528705"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-09T18:17:25.528Z","modified":"2025-10-10T18:08:59.927Z","0.1.0":"2025-10-09T18:17:25.845Z","0.2.0":"2025-10-10T18:08:59.739Z"},"bugs":{"url":"https://github.com/brennanmceachran/sora-cli/issues"},"author":{"name":"Brennan McEachran"},"license":"MIT","homepage":"https://github.com/brennanmceachran/sora-cli#readme","keywords":["sora","openai","video","cli","ink","tui"],"repository":{"type":"git","url":"git+https://github.com/brennanmceachran/sora-cli.git"},"description":"Terminal UI and CLI for generating videos with OpenAI Sora 2.","maintainers":[{"name":"brennanmceachran","email":"brennanmceachran@gmail.com"}],"readme":"# sora-cli\n\nA terminal-first workflow for the Sora 2 video API. `sora-cli` combines a rich Ink-based TUI for iterative prompting with a one-liner CLI that can render, poll, and download videos straight from your shell.\n\n[walkthrough](https://github.com/user-attachments/assets/7afe2974-05cc-4616-9f19-fabc40ee474e)\n\n\n\n## Features\n\n- Launch the full terminal UI with `sora` to iterate on prompts, monitor jobs, and download assets.\n- Fire-and-forget renders with `sora \"prompt text\"` – the command blocks until the video finishes and prints the signed download URL.\n- Persist job history locally, auto-download videos/thumbnails/sprite sheets, and open assets from the UI.\n- Build animated WebP/APNG references from completed jobs (or upload your own file) to improve continuity, powered by bundled ffmpeg/ffprobe binaries.\n- First-run setup flow that stores your OpenAI API key in `~/.config/sora-cli/.env` (override with `SORA_CLI_CONFIG_DIR`).\n- JSON output mode and no-download mode for scripting scenarios.\n\n## Installation\n\n```bash\npnpm install -g @brennanmceachran/sora-cli\n# or\nnpm install -g @brennanmceachran/sora-cli\n```\n\n> **Note:** Sora 2 currently limits renders to 4, 8, or 12 seconds per the public docs. The CLI enforces those values for `--seconds`.\n\n## Quick Start\n\n1. `sora login sk-...` (or just run `sora` and paste the key when prompted).\n2. `sora \"A dolly shot of a sunlit forest canopy with drifting pollen\"`\n3. Watch progress update in place; when it finishes you’ll see the local file path and a signed URL.\n4. Run `sora` with no arguments to open the full Ink interface. Arrow keys navigate the job list; press `Enter` on a job for details, `c` copies the prompt, `f` force-refreshes status, and `o`/`t`/`p` open downloaded assets.\n\n### CLI Options\n\n```bash\nsora --model sora-2-pro --seconds 12 --size 1920x1080 \"Prompt here\"\n```\n\n- `--model <name>` – `sora-2` (default) or `sora-2-pro`.\n- `--seconds <4|8|12>` – enforce Sora’s current runtime limits.\n- `--size <WIDTHxHEIGHT>` – e.g. `1280x720` or `1920x1080`.\n- `--input-reference <path>` – attach a still/animated image (WebP/APNG recommended) to seed the generation.\n- `--output <file>` – override the date-stamped file name.\n- `--output-dir <dir>` – change the directory for downloads (default `videos/`).\n- `--poll-interval <ms>` – tune the status polling cadence (default 5000ms).\n- `--json` – emit a structured JSON summary instead of human-readable logs.\n- `--no-download` – skip saving the MP4 locally; still prints the signed URL.\n\n### Animated References\n\n- In the TUI, move to the new **Reference** row to toggle between `None`, `Upload file`, and `Auto from job`. Auto builds an animated WebP/APNG from the tail frames of the selected completed job so the next render starts exactly where the last one ended.\n- For manual continuity, supply `--input-reference ./reference.webp` (or `.png`) when running the CLI. The file is uploaded with your render request and also copied into the job’s output folder for reuse.\n- `sora-cli` bundles ffmpeg and ffprobe, so the auto-builder works out of the box on macOS and Linux without additional setup. Set `SORA_CLI_FFMPEG_PATH` / `SORA_CLI_FFPROBE_PATH` if you prefer your own binaries.\n\n### Config & Storage\n\n- API key: stored at `~/.config/sora-cli/.env` as `OPENAI_API_KEY`.\n- Local jobs DB: `data/jobs.json` inside your current working directory.\n- Downloads: by default videos (plus thumbnail/spritesheet) live under `videos/<job-id>/`.\n\nSet `SORA_CLI_CONFIG_DIR` if you want the config in a different location.\n\n## Development\n\n```bash\npnpm install\npnpm typecheck\npnpm build\npnpm sora --help\n```\n\n- `pnpm start` launches the TUI (requires a TTY).\n- `pnpm sora` runs the CLI entry point through `tsx` for local development.\n- `pnpm build` emits ESM bundles + declarations to `dist/` (used by the published package).\n\nPull requests are welcome! See [CONTRIBUTING](./CONTRIBUTING.md) for guidelines.\n\n## License\n\n[MIT](./LICENSE)\n","readmeFilename":"README.md"}