PMCommand

A package manager command component.

Basic

npx jsrepo add ui/pm-command

Installation

jsrepo add ui/pm-command

Commands

We use package-manager-detector to ensure that every package manager is properly supported. Also giving your auto-complete for your commands.

npx shadcn-svelte@next add
npm i bits-ui -D

Variants

npx jsrepo add ui/pm-command

Overflow

npx jsrepo build --preview --include-blocks pm-command button copy-button use-clipboard utils

Persisted Package Manager

Use the runed PersistedState API to remember the users package manager.

npx jsrepo add ui/pm-command

Customize Agents

You can also customize the agents to your liking by providing your own array of agents with the agents prop.

npx jsrepo add ui/pm-command

API Reference

PmCommand

The root component for displaying a package manager command with agent tabs and copy functionality.

PropTypeDefault
variant?
enum default
class?
string -
agents?
Agent[] ['npm', 'pnpm', 'yarn', 'bun']
agent? $bindable
Agent npm
command
Command -
args
string[] -