lyria-cli

GOOGLE LYRIA, ONE COMMAND AWAY

Music, from
your terminal.

Describe a sound. Get a track.
A small CLI that turns your ideas into music with Google Lyria — built for you and your agents.

Node.js 22+ · Bring your Gemini API key · MIT

~/your-next-trackEXAMPLE

# A little idea. A whole new sound.

$ lyria-cli generate \
    --prompt "Warm jazz piano,
      upright bass, no vocals" \
    --output ./evening.mp3 \
    --json

Generating music with lyria-3.5...

evening.mp3Audio saved. Ready for your next step.
MP3
TEXT → MUSICMP3 OUTPUTSTRUCTURED JSONBUNDLED AGENT SKILL

01 / GET STARTED

From install to first track.

Three steps. Your own API key.
No account with us required.

Pre-release: npm installation commands become available after the first package release.

01

Install the CLI

Use npm with Node.js 22 or later.

npm install -g @crapthings/lyria-cli
03

Make something

Describe your sound and save an MP3.

lyria-cli generate \
  --prompt 'Dreamy piano, no vocals' \
  --output ./music.mp3

02 / FIND YOUR SOUND

Your brief.
Your workflow.

A short prompt, a file full of lyrics, or a command inside an agent loop. Same simple interface.

Style, tempo, vocals, and duration belong in your prompt. The default model is lyria-3.5.

A soundtrack for a slower evening.

lyria-cli generate \
  --prompt 'Mellow bossa nova, nylon guitar,
    soft percussion, instrumental only' \
  --output ./evening.mp3

Put your musical directions and lyrics in song.txt.

lyria-cli generate \
  --prompt-file ./song.txt \
  --output ./song.mp3

Use section tags such as [Verse] and [Chorus] in your prompt file.

Give your agent a result it can work with.

lyria-cli generate \
  --prompt 'Gentle ambient synth, no vocals' \
  --output ./ambient.mp3 \
  --json
{ "ok": true, "model": "lyria-3.5",
  "files": [{ "path": "/path/ambient.mp3",
    "mimeType": "audio/mpeg", "bytes": 123456 }],
  "text": "Any returned lyrics or description" }

03 / MADE FOR AGENTS, TOO

Give your agent
a musical skill.

The bundled lyria-music skill covers prompt writing, CLI calls, and result handling. Install the package locally, then add the skill to your agent.

Read the skill

INSTALL IN YOUR PROJECT

npm install @crapthings/lyria-cli

npx skills add \
  ./node_modules/@crapthings/lyria-cli/skills/lyria-music

The skill travels with the npm package.
CLI installation and API credentials are still required.

Predictable output

JSON on stdout, progress on stderr, and clear exit codes for automation.

One request at a time

No automatic generation retries. Set a timeout and control the next step yourself.

Saved to your workspace

Complete MP3 files, saved locally. Existing files are protected by default.

A FEW DETAILS

Before you press enter.

Which models can I use?

The default is lyria-3.5. You can select lyria-3-clip-preview with --model for a fixed 30-second clip. Your Gemini API key needs access to the selected model.

Can I generate songs with lyrics?

Yes. Put your musical directions, language, vocal style, and lyrics in the prompt or a UTF-8 prompt file. For instrumental music, explicitly ask for no vocals. See the Lyria prompt guide.

What does generation cost?

You bring your own Gemini API key, and usage is billed by your API provider. Check Google's current pricing. The CLI does not automatically retry a generation request.

Can I stream music or export WAV?

This version generates one complete MP3 per request. It supports text prompts, including lyrics. Real-time streaming, image input, WAV output, and audio editing are outside the current CLI.

Where can I find every option?

Run lyria-cli --help. Use --timeout to set a request deadline and --overwrite when you intend to replace an existing output. Duration and tempo are prompt instructions, not exact guarantees.

Small command. New possibilities.

Make your first track