Bulk-edit Storylane demos (text and AI voiceovers) from the command line via an Excel round-trip.
Project description
slcli — Storylane CLI
Bulk-edit Storylane demos from the command line.
slcli lets you export a demo's text and AI voiceovers to an Excel spreadsheet, edit them offline, and push the changes back. It's significantly faster than clicking through every widget in the web UI when a demo has more than a handful of steps.
Unofficial. This tool talks to Storylane's private API — the same one their web app uses — and is not endorsed by Storylane. Behaviour may break if their API changes.
Install
pipx install storylane-cli
Or with uv:
uv tool install storylane-cli
The installed command is slcli (the PyPI package name is namespaced, but the binary stays short).
Quick start
# 1. Log in once (the auth token is cached in your OS keyring).
slcli login
# 2. Export a demo's text content to an Excel file.
slcli export <project-id>
# 3. Open output/texts.xlsx, fill in the `new text` and/or `new voiceover`
# columns on the rows you want to change. The other columns are protected.
# 4. Push the edits back.
slcli update
The project ID is the UUID in the demo's URL inside the Storylane web app — e.g. https://app.storylane.io/project/78f4ee34-51fd-11f1-84bd-e41fd5b9abcb.
Commands
slcli login
Prompts for your Storylane email and password, calls POST /api/v1/login, and stores the returned bearer token in your OS keyring (macOS Keychain, Windows Credential Manager, or Secret Service on Linux). All subsequent commands use the cached token silently.
slcli login # interactive
slcli login --email you@corp.com # skip the email prompt
slcli logout
Clears the cached token from the keyring.
slcli export <project-id>
Fetches the project and writes output/texts.xlsx with one row per widget. Columns include the widget's HTML and markdown text, the page URL, the CTA label, and two empty editable columns: new text and new voiceover. The sheet is locked except for those two columns, so you can't accidentally damage the metadata columns that slcli update uses to identify widgets.
slcli export <project-id>
slcli export -x demo-edits.xlsx <project-id> # custom output path
slcli export -o ./dump <project-id> # also save the raw API JSON
slcli update
Reads an edited xlsx and PATCHes each widget that has a non-empty new text or new voiceover cell. Markdown in new text is rendered to HTML before being sent. new voiceover cells trigger a TTS regeneration: the text goes to Storylane's TTS endpoint, the resulting mp3 is uploaded through their S3 bucket, and the widget's audio_url, media_duration, and transcription_options.prompt are updated together.
The project ID is read from the xlsx — no need to repeat it.
slcli update # read output/texts.xlsx
slcli update -x demo-edits.xlsx # custom input
slcli update --yes # skip the confirmation prompt
slcli update --voice-name brian # voice for widgets that have none
slcli update --voice-name matilda --voice-override # force this voice everywhere
slcli update --voice-id nPczCjzI2devNBz1zQrb # by id if you prefer
By default, when a widget already has an assigned voice, slcli update keeps it and --voice-name / --voice-id only apply as a fallback for widgets that have no voice yet. Pass --voice-override to force the CLI-provided voice everywhere.
slcli voices
Lists the TTS voices available in your Storylane account (typically over 100). Useful for finding a voice_id or a voice_name.
slcli voices # pretty table on stdout
slcli voices -x voices.xlsx # browsable spreadsheet, includes preview_url
slcli voices --all # include legacy/deprecated voices
How it works
slcli authenticates by POST /api/v1/login and reuses the returned auth_token as a bearer token for the rest of Storylane's private API. The token lives in your OS keyring; --key overrides it for one-off invocations without touching the cache.
- Export pulls
GET /api/v1/company/projects/<id>plus thepagesandthemesendpoints, then writes the xlsx using save-as-xlsx. - Update reads the xlsx with
openpyxl, converts markdown withmarkdown-it-py, regenerates audio viaPOST /api/v1/ai/transcriptions→ S3 upload →POST /api/v1/uploads, computesmedia_durationlocally withmutagen, and PATCHes each widget at/api/v1/company/projects/<pid>/flows/<fid>/widgets/<wid>. - Voices is a thin wrapper around
GET /api/v1/ai/transcriptions/voices.
If a request returns 401, slcli prints a hint telling you to run slcli logout (which clears the stale token so the next command re-prompts via slcli login).
License
MIT — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file storylane_cli-0.1.0.tar.gz.
File metadata
- Download URL: storylane_cli-0.1.0.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fa94f2881c6fff0ce4ba9428deaf2acb36980e10b89810003b5974d3ae88982
|
|
| MD5 |
118312295ef7e56657a238b5805ea885
|
|
| BLAKE2b-256 |
d29e5090ee50628b5aaa6e5bb035dae25e40b15f59bc5adf0802671b6f6a8460
|
File details
Details for the file storylane_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: storylane_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad8581e78c13ed2d071ff44f617140321fe4a8c0d5c90515f464a8db58e9b394
|
|
| MD5 |
96eb69a047aa53d4c4d6520124849f41
|
|
| BLAKE2b-256 |
d2010d31f1c742e5aebdc94297cdb42bd23425988d7a6b3f1975ca4cf17b98b7
|