> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dari.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Muse Code

> Run Meta's Muse Code through a Dari Router.

Install the [Dari CLI](https://docs.dari.dev/install-cli.md) and [Muse Code](https://dev.meta.ai/docs/muse-code), then launch Muse Code through your organization's default router:

```bash theme={null}
dari muse
```

On first use, Dari signs you in if needed, creates and privately caches a Routing key, and starts the installed `muse` executable pointed at your router. Your Muse Code settings and sign-in are left intact: the launcher passes the Routing key as `META_API_KEY` and sets the router's endpoint for that run only. Gateway serves any model enabled on your router: switch between them with `/model`, or request `dari/model/<model>` directly. Autorouting is the `dari/routing` option, which picks a model per request; it appears in `/model` only with the Autorouting plan.

On first launch, setup offers to connect a Muse Code subscription. A Muse Code subscription serves only Muse Code, so the other launchers never use it. Later launches go straight to Muse Code; run `dari muse --connect` to connect another one, or use `dari credentials subscription connect muse-code`. When every connected subscription is at its usage limit, Meta models with **API Fallback** keep running on the router's Meta API credential; see [Personal Subscriptions](https://docs.dari.dev/router/configure-provider-keys.md#personal-subscriptions).

Every following argument is forwarded to Muse Code:

```bash theme={null}
dari muse "Review this repository"
dari muse exec "Summarize the open TODOs"
```

In Muse Code's interactive view, the launcher adds a status row under Muse Code's own: the model that served the turn, its thinking level when one is enabled, how many turns remain on the current routing lease, and a link to the turn's conversation in Activity. Routing values come from the `X-Dari-Selected-Model`, `X-Dari-Thinking-Level`, and `X-Dari-Lease-Turns-Remaining` response headers, and the link from `X-Request-Id`. The launcher reads them through a local proxy that forwards Muse Code's requests to your router, and reserves the terminal's last row for them. Headless runs such as `dari muse exec` get no status row.

Set `DARI_ROUTING_API_KEY` before launching to use an existing Routing key instead of the CLI-managed key, or `DARI_MUSE_PATH` to launch a specific `muse` executable.

## Setup Across Computers

The CLI loads your router configuration and subscription preferences from the server. A new computer reuses the existing models and thinking levels rather than applying launcher presets again. Subscription opt-outs are saved per organization, user, and launcher. Local files cache authentication and Routing keys, not setup completion.

A connected Muse Code subscription needs a model served directly by Meta. If the default router has none, setup offers Meta models while preserving the existing models and thinking levels. This happens only while the server configuration is incomplete; new computers reuse it once configured.

Use the dashboard or `dari router update` to change the shared model configuration. Run this launcher's `--connect` option to manage connected accounts explicitly.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.