Documentation
Installation
Renders a tool's documented installation sources, grouped by install method.
Installation
Ways to install this tool.
Package manager
Release binary
Docker
docker run --rm curlimages/curl https://example.comInstallation
pnpm dlx shadcn@latest add https://commandly.divyeshio.in/r/installation.jsonUsage
import { InstallationSection } from "@/components/commandly/installation";Basic Usage
const installation: Installation = {
sources: [
{
key: "brew",
method: "package_manager",
manager: "brew",
command: "brew install curl",
url: "https://formulae.brew.sh/formula/curl",
os: ["macos", "linux"],
},
{
key: "docker",
method: "docker",
command: "docker run --rm curlimages/curl https://example.com",
},
],
};
<InstallationSection installation={installation} />;API Reference
InstallationSection
| Prop | Type | Default | Description |
|---|---|---|---|
installation | Installation | - | The tool's installation sources; renders nothing without any |
className | string | - | Additional classes for the section |
Notes
- Sources are grouped under the method they use, in the order of
INSTALLATION_METHODSrather than the order they appear in the tool - A method with more than one source switches between them with tabs, labelled by package manager, or by the source key read as a title when there is no manager; a method with a single source renders its card directly
- The manager badge is only shown when a tab does not already name it, and the declared operating systems are not rendered
- A source's note is shown alongside its command, and its docs URL becomes an external link
- The copy button confirms in place and resets after a moment
- Nothing renders when the tool documents no installation sources