Skip to content

Meir770ar/suno-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

suno-cli — Claude Code Skill

A Claude Code skill that installs a pure-HTTP Suno CLI into your project, so you can generate music from your own paid Suno subscription right in the terminal — no browser automation, no captcha solver, no third-party API. Optionally wires up an MCP server so AI agents can call Suno as a tool.

Ships zero secrets — every user supplies their own Suno session cookie.

Install the skill

Copy this folder into your Claude Code skills directory:

# user-level (available in every project)
cp -r suno-cli ~/.claude/skills/

# or project-level
cp -r suno-cli .claude/skills/

Then in Claude Code just ask: "set up the Suno CLI" (or run /suno-cli).

What it does

  1. Checks Node ≥ 20 and that you have a paid Suno account.
  2. Scaffolds the CLI into your chosen directory (suno.mjs, lib/client.mjs, package.json, .gitignore, README.md, and optionally mcp-server.mjs).
  3. Walks you through copying your __client session cookie from the browser DevTools.
  4. Saves + verifies it, and shows you how to generate songs.

How the CLI works

__client cookie  →  Clerk handshake  →  short-lived JWT (~60s)
                 →  studio-api /api/c/check  →  { "required": false }   (trusted account = no captcha)
                 →  /api/generate/v2 (token:null)  →  poll /api/feed  →  download MP3

It never sends your cookie to Suno directly — it exchanges it for a short-lived token via Clerk, then talks to the studio API exactly like the website does.

Commands (after install)

node suno.mjs set-cookie --file ./my-cookie.txt   # save + verify
node suno.mjs credits                              # balance
node suno.mjs create --tags "calm piano" --title "Calm" --instrumental
node suno.mjs create --lyrics-file ./lyrics.txt --tags "uplifting pop" --title "My Song"

Each request returns 2 variations into _suno/.

Notes

  • Captcha "warming": account trust decays after ~a day idle (c/checkrequired:true). Create one song in the suno.com UI to re-warm; regular use keeps it warm.
  • Terms of Service: using Suno's internal API violates Suno's ToS. Low-volume single-user risk is low-to-moderate but real; you own that risk. Prefer the official UI for commercial work.
  • Cookie = password. Never commit it. Only _profile/cookie.txt (gitignored) or an env var.

MIT licensed. Not affiliated with or endorsed by Suno.

About

Claude Code skill: install a pure-HTTP CLI for your own Suno subscription — generate music from the terminal (no browser, no captcha solver). Optional MCP server for AI agents.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors