npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

lyria-cli

v0.1.1

Published

Music generation CLI powered by Google's Lyria 3 API

Readme

lyria

Music generation CLI powered by Google's Lyria 3 API. Generate full songs, 30-second clips, or image-to-music -- all from the command line.

Install

npm install -g lyria-cli

Or with Bun:

bun add -g lyria-cli

Setup

Get an API key from Google AI Studio, then:

lyria keys set gemini AIza...

Or set the GEMINI_API_KEY environment variable.

Usage

Generate from a prompt

lyria generate -p "A chill lo-fi hip hop beat with Rhodes piano and vinyl crackle" -o lofi.mp3

Quick 30-second clip

lyria generate -m clip -p "Upbeat drum loop, 140 BPM" -o loop.mp3

Image-to-music

lyria generate -i sunset.jpg -p "Atmospheric soundtrack for this scene" -o sunset.mp3

Song files

Create and edit a YAML song file with structured sections and lyrics:

lyria init my-song.yaml --genre "indie folk"
# Edit my-song.yaml with your lyrics and structure...
lyria song my-song.yaml

Song file format:

title: Summer Nights
genre: indie pop
tempo: 120 BPM
key: G major
mood: nostalgic, warm
instruments: acoustic guitar, soft drums, bass
voice: female, alto, breathy
model: pro

sections:
  - type: intro
    description: Gentle acoustic guitar picking
  - type: verse
    lyrics: |
      Walking down the boardwalk
      Salt air in my hair
  - type: chorus
    lyrics: |
      Summer nights, summer lights
      Everything feels right
  - type: outro
    description: Fade out with guitar

Models

| Alias | Model | Duration | Cost | |--------|------------------------|-----------|------------| | pro | lyria-3-pro-preview | ~2-3 min | $0.08/song | | clip | lyria-3-clip-preview | 30 sec | $0.04/clip |

Prompting tips

  • Genre & era: "Early 90s hip-hop", "K-pop with Motown influence"
  • Instruments: "Fender Rhodes piano", "TR-808 drum machine"
  • Tempo: "120 BPM" or "slow ballad"
  • Key: "G major", "D minor"
  • Mood: "Nostalgic and bittersweet", "Energetic and triumphant"
  • Vocals: "Male baritone, gravelly and soulful"
  • Structure: Use [Verse 1], [Chorus], [Bridge] tags
  • Lyrics: Prefix with "Lyrics:" then write your words

See the full prompt guide in the Lyria prompt guide.

Development

git clone https://github.com/zhendalf/lyria.git
cd lyria
bun install
bun test          # run tests
bun run typecheck # type check
bun run cli.ts    # run from source

License

MIT