@musicflowai/cli
v0.1.3
Published
Command-line client for the MusicFlow agent API
Downloads
319
Readme
MusicFlow CLI
@musicflowai/cli is the command-line client for the MusicFlow agent API. It is designed to be small, scriptable, and safe to automate against. The CLI talks only to the public v1 API and stores local auth state in ~/.config/musicflow/config.json.
Install
npm install @musicflowai/cliGlobal install is also supported:
npm install -g @musicflowai/cliAuthentication
There are two ways to authenticate.
Interactive login
Use musicflow login to open a browser-based login flow. After you approve the request, the CLI stores a local app-managed API key and reuses it for future requests.
musicflow loginAPI key
Set MUSICFLOW_API_KEY for non-interactive use:
export MUSICFLOW_API_KEY=mf_xxxxxxxxxxxxxxxxxxxxBy default, the CLI talks to the production API at https://api.musicflowai.com. Override the API base URL only if you are testing against a local or alternate environment:
export MUSICFLOW_APP_URL=https://api.musicflowai.comCommands
musicflow loginmusicflow logoutmusicflow whoamimusicflow accountmusicflow auth statusmusicflow capabilitiesmusicflow song createmusicflow video from-songmusicflow publish createmusicflow plan createmusicflow job get
Examples
Create a song draft:
musicflow song create \
--prompt "Write a reflective indie song about starting over" \
--producer-id 7d6b7b2a-7f1d-4f6d-bf4e-66ff5d9f0f4a \
--generate-audioCreate a song and wait for audio completion:
musicflow song create \
--prompt "Write a reflective indie song about starting over" \
--generate-audio \
--syncCreate a single video from a song:
musicflow video from-song \
--song-id 6c4ab1b7-b8b4-4c1f-9c8f-4c33b0ed7a83 \
--caption-mode auto \
--caption-style alexHormozi \
--aspect-ratio 9:16Publish an existing video:
musicflow publish create \
--content-id 0d7df30d-4f42-4db5-b00d-43d48f8dc2f7 \
--youtube-channel-id 0b5b8ad0-4c6f-4b9f-8f08-dfe4e5f0f2d2 \
--privacy-status unlistedInspect a queued job:
musicflow job get --id render:4e6c6fd2-1ad4-4b89-8145-21c64f2c3e19Development
This package is authored in src/ and built to dist/.
cd packages/musicflow-cli
npm install
npm run buildFor iterative development:
npm run dev -- song create --prompt "..."If you want to lint or type-check the package only:
npm run checkRelease Notes
0.1.3
- Changed the default API host to
https://api.musicflowai.com. - Removed the localhost fallback from the published CLI default configuration.
0.1.0
- Initial standalone package extraction.
- Added browser-based login.
- Added support for
whoami,capabilities, song creation, video creation, publishing, plan creation, and job polling. - Switched published entrypoint to
dist/cli.js.
