Documentation

Installation

Renders a tool's documented installation sources, grouped by install method.

Installation

Ways to install this tool.

Package manager

brew install curl

Installs the latest release from Homebrew.

Installation docs

Release binary

https://curl.se/download.html

Download a prebuilt binary for your platform.

Installation docs

Docker

docker run --rm curlimages/curl https://example.com
Installation docs

Installation

pnpm dlx shadcn@latest add https://commandly.divyeshio.in/r/installation.json

Usage

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

PropTypeDefaultDescription
installationInstallation-The tool's installation sources; renders nothing without any
classNamestring-Additional classes for the section

Notes

  • Sources are grouped under the method they use, in the order of INSTALLATION_METHODS rather 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