# CLI

<script>
  import InstallCommand from "$lib/components/registry/install-command.svelte";
  import { registryConfig } from "$registry/config";
</script>

Install a registry item with the command shown on its docs page.

<InstallCommand
  kind="exec"
  args={`shadcn-svelte@latest add ${registryConfig.homepage}/r/button.json`}
/>

The command displayed on item pages uses the `homepage` value from `registry/config.ts` for the base URL. Update `homepage` before deploying.

Human-facing item pages also work with the CLI through content negotiation. A browser can view [`/components/button`](/components/button), while the CLI receives the installable item JSON from the same URL when it sends a `shadcn` user agent or the shadcn JSON Accept header:

<InstallCommand
  kind="exec"
  args={`shadcn-svelte@latest add ${registryConfig.homepage}/components/button`}
/>