Quick start
PromptFM is an early MVP. Install from the source checkout with a stable Rust toolchain. Cargo registry packages and prebuilt releases are not published yet.
cargo install --path . --locked
promptfm install
promptfm doctorThe installer detects available supported agents and asks which ones to connect. Choose a music provider, frequency, and opening policy. The default is suggest only.
Restart the coding agent and complete its own MCP trust prompts. PromptFM does not enable broad permissions or bypass host confirmation.
For a non-interactive shell
promptfm install --agent codex --non-interactive --provider spotify --frequency occasional --policy suggest-onlyUse promptfm install --help for the current flags. Add --dry-run --json to preview an installation. Use promptfm status --json for a machine-readable status report.
Coding agents
These five automatic configuration adapters are implemented. Real interactive sessions still need validation with each host and version.
| Agent | Install adapter | Managed configuration |
|---|---|---|
Claude Code claude | Implemented; live session unverified | ~/.claude.json, ~/.claude/CLAUDE.md |
Codex CLI codex | Implemented; live session unverified | ~/.codex/config.toml, ~/.codex/AGENTS.md |
Antigravity CLI agy | Implemented against documented paths; live session unverified | ~/.gemini/config/mcp_config.json, ~/.gemini/config/AGENTS.md |
OpenCode v2 opencode | Implemented; live session unverified | ~/.config/opencode/opencode.json or existing JSONC, AGENTS.md |
Gemini CLI gemini | Implemented against documented paths; live session unverified | ~/.gemini/settings.json, ~/.gemini/GEMINI.md |
| Cursor CLI, Copilot CLI | Automatic setup unsupported | Manual integration only |
Adapters preserve unrelated settings, use absolute paths for the MCP executable, and mark PromptFM-managed instruction sections. Conflicts and malformed configuration stop with an error rather than replacing user data. Gemini’s normal MCP confirmation remains enabled.
Connect another MCP host manually
Install the PromptFM binary using the quick start above. Configure the host’s stdio MCP format to run the absolute path to promptfm with the argument mcp. Add the canonical agent instructions from assets/agent-instructions.md to an instruction file that host loads.
{ "mcpServers": { "promptfm": { "command": "/absolute/path/to/promptfm", "args": ["mcp"] } } }Follow the host’s own trust and permission flow. Keep existing instructions and server entries intact.
How it works
- Your agent understands the session.It uses the context it already has to decide whether a meaningful moment deserves music. PromptFM does not analyze sentiment or read transcripts.
- A long stretch can get a companion.If the agent sees that a requested task is likely to take a while, it may suggest one low-key track for the work—ambient, instrumental, or lounge-like. It does not estimate an exact duration, and the same minimum-turn, frequency, cooldown, and permission rules still apply.
- The agent sends a song to PromptFM.Through the local stdio MCP server, it submits a title, artist, mood, and short reason.
- PromptFM checks local rules.The CLI validates input and checks pause state, quiet hours, cooldown, duplicate history, provider, and opening permission.
- You get a link, or an authorized open.Search results are generated from the track and selected provider. PromptFM never claims that a URL opening started playback.
PromptFM adds no separate AI account, model, API key, backend, telemetry, or continuously running service. It starts as a subprocess when the coding agent needs its MCP tools.
Music providers
Choose from supported public search-link providers. PromptFM encodes the song title and artist into each query.
- Spotify
- YouTube Music
- Apple Music
- YouTube
- Deezer
- TIDAL
- Anghami
These are search links, not verified direct track URLs. PromptFM does not connect to music accounts, resolve exact tracks, use private provider APIs, or control playback. Provider pages and account requirements can vary by country and change independently.
Anghami’s current public search route works for song and artist queries; its URL pattern is not a published integration contract and may change. See Anghami’s search guidance.
Track and artist are selected by the coding agent; music preferences such as genres and language are guidance for that agent. Explicit-content and instrumental preferences cannot be reliably verified without track metadata.
Preferences
Configuration and recommendation history stay in your user data directories. Use promptfm config show to see the active config path, and promptfm status to inspect state.
promptfm config --provider spotify
promptfm config --frequency occasional
promptfm config --cooldown-minutes 20
promptfm config --policy suggest-onlyFrequency presets have a minimum cooldown of 45 minutes for rare, 20 for occasional, and 10 for frequent recommendations. The agent chooses when a moment feels meaningful; there is no timer or scheduled prompt. A global cooldown is enforced locally across concurrent sessions.
Pause suggestions with promptfm pause and resume them with promptfm resume. View local history with promptfm history --limit 10. Clear history with promptfm history --clear --yes.
Opening & playback
Suggest only is the default. Other opening policies require explicit local consent. Opening a search page may interrupt an active application and does not guarantee music starts; PromptFM does not click play.
- Suggest onlyReturn the provider link without opening it.
- Ask before openingWait for you to use an explicit CLI action such as
promptfm open-last. - Open when idleOpen only when the local detector can positively establish idle. Current native detectors cannot confirm system-wide idle, so this policy currently suggests instead.
- Always openOpen after you explicitly authorize the policy. This may interrupt existing media.
Playback coverage: Linux optionally checks compatible MPRIS sessions through playerctl. Playing and paused sessions are recognized; missing tools, failures, timeouts, and all-stopped results are unknown. macOS currently reports unknown. Windows recognizes exposed playing and paused GSMTC sessions; an empty, stopped, or inaccessible session set is unknown, and native runtime coverage remains unverified. Incomplete visibility never counts as confirmed idle.
Privacy & history
No conversation transcripts, code, prompts, tool output, secrets, or environment variables are stored or uploaded by PromptFM. It makes no recommendation API requests. The coding agent’s own service and data handling remain outside PromptFM’s control.
Local history keeps accepted song metadata, provider URL, time, action, optional session identifier, and feedback. Recommendation reasons are not stored by default. You can disable local reason storage in configuration. History is local storage, not encryption.
Provider links contact that music service when opened in your browser or native application. The site preview itself is static, sends no analytics, requests no accounts, and plays no audio.
Current limits
- Early MVP: host adapters are implemented, but live agent sessions are not yet validated on every supported version.
- Only Linux, macOS, and Windows core builds are targeted in this MVP. Native playback visibility differs by operating system.
- Windows native playback has compile coverage but not runtime validation in this environment. macOS playback detection is not implemented.
- Provider links are searches. Exact track resolution, authentication, playlists, and playback control are not implemented.
- Automatic agent setup is unsupported for Cursor and GitHub Copilot CLI; use manual MCP configuration.
- Binary releases and package-manager distribution are not published yet. Build from this source checkout.
For troubleshooting, start with promptfm doctor, then inspect promptfm status --json and your host’s MCP trust/configuration flow.
Make some noise
PromptFM is open source and built with Rust. Its install adapters and local MCP server are designed to keep the music companion small and reversible. Read the repository’s CONTRIBUTING.md and SECURITY.md for project contribution and disclosure guidance.