setup-api-key
БесплатноБез исполняемых скриптовНе проверенGuides users through connecting to Sonilo — signing in with `sonilo login` (OAuth, no key), the remote OAuth plugin for Claude Code or Muse Code, or an API…
от sonilo-ai★ 117 звёзд на GitHubОб этом скилле
Sonilo Setup
Guide the user through connecting to Sonilo. There are several ways in — pick based on what the user is actually doing, not just whichever is listed first:
| Path | Needs an API key? | Best for |
|---|---|---|
A. sonilo login (CLI sign-in, credential shared with the local MCP server) |
No — OAuth in the browser | Anyone on a machine with a browser. One sign-in covers the CLI and uvx sonilo-mcp, so the MCP config carries no secret. |
B. Remote OAuth MCP plugin (sonilo-claude-plugin, or this repo's Muse Code plugin) |
No — OAuth sign-in | Claude Code and Muse Code users who want nothing running locally. Full tool coverage. |
C. API key (SONILO_API_KEY) |
Yes | CI, containers, headless boxes, and anyone who prefers holding a key. Works with every client. |
Choosing:
- On a machine with a browser and any MCP host → Path A. It is the shortest path and leaves no secret in a config file.
- Claude Code or Muse Code, and nothing local wanted → Path B.
- No browser (CI, a container, a remote box), or the user says they already have a key → Path C.
- Not working through an agent at all (writing code, scripting a shell) → Path D at the end; the MCP configuration in A–C does not apply.
Step 0: Check what already works (all paths)
Do this before changing anything — the answer is often "nothing to do".
There are two transports, and either one is enough. Probe both before concluding that nothing is set up.
- MCP: is a
soniloMCP server connected (any Sonilo tool, e.g.text_to_musicorget_account_services, available to call)? If so, call the free, read-onlyget_account_services(). - CLI: if there are no Sonilo tools, run
sonilo account— the same free, read-only call as above. Exit code 0 means the CLI is installed, signed in, and reaching the API, and the skills can drive it directly. Do not probe withsonilo whoami: it exits 0 even when signed out, so it cannot separate the two states, and on an account with no display name it prints an emptyaccount:line that reads like a broken credential. It is worth running only to show which account is active, never to decide. - Either one succeeds: Sonilo is configured and working. Say so and stop. Ask only whether they want to rotate credentials.
- Fails with 401: authentication is stale, not missing. If they signed in with
sonilo login, the key may have expired (90 days) or been revoked —sonilo loginagain fixes it. Otherwise the key is wrong: continue at Path C. - Neither responds: nothing is connected — pick a path below and run it. MCP is the better default (it needs no shell, and it is the only transport that survives a dubbing job's two-hour poll), but a CLI that is installed and signed in is a complete setup on its own; do not make someone configure MCP they will not use.
Never print, quote, or echo a key or the contents of the credential file. If you must refer to one, redact it.
Path A: sonilo login (no API key, any MCP host)
One sign-in, then both the CLI and the local MCP server are authenticated — the
CLI writes a credential to ~/.config/sonilo/credentials.json and
sonilo-mcp (0.16.0 and later) reads it.
npm install -g sonilo-cli # or: pip install sonilo-cli
sonilo login
The CLI prints a one-time code and opens the browser to
platform.sonilo.com. The user signs in to their Sonilo Platform account
(separate from a consumer sonilo.com account), confirms the code matches what
the terminal printed, and approves. On a machine without a browser, add
--no-browser and have them approve the printed URL from another device.
Then add the MCP server with no secret in the config:
claude mcp add sonilo -- uvx sonilo-mcp # Claude Code
codex mcp add sonilo -- uvx sonilo-mcp # Codex
For Claude Desktop, the whole config is:
{
"mcpServers": {
"sonilo": { "command": "uvx", "args": ["sonilo-mcp"], "env": {} }
}
}
Both need the uv package manager (provides uvx): install it with
brew install uv (macOS), pipx install uv / pip install uv, or
winget install --id=astral-sh.uv (Windows) — other methods at
https://docs.astral.sh/uv/getting-started/installation/.
Worth telling the user up front:
- Approving mints an ordinary API key on their account, named
cli: <hostname>, that expires after 90 days and is visible and revocable at https://platform.sonilo.com/dashboard/api-keys. sonilo whoamishows which account and source is active;sonilo logoutrevokes the key server-side and then forgets it locally.- An exported
SONILO_API_KEYtakes precedence over the sign-in. If tools authenticate as an unexpected account, check for that variable first —sonilo whoamisays so explicitly when it is set. - Sign-in is for humans. Provisioned/POC accounts are issued a key by Sonilo and cannot use
sonilo login; those users belong on Path C.
Validate with `get_account_service
Установить setup-api-key в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл setup-api-key?
Guides users through connecting to Sonilo — signing in with `sonilo login` (OAuth, no key), the remote OAuth plugin for Claude Code or Muse Code, or an API key for CI and headless use. Use when the user needs to configure Sonilo, wants to sign in or connect their Sonilo account, when Sonilo tools are missing, or when a call fails because no key or credential is available. First checks what already works, and only runs full setup when needed.
Как установить скилл setup-api-key?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл setup-api-key запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic