https://github.com/siguici/panam
π οΈ One tool to manage all runtimes, package managers π¦οΈ and much more (git, docker, ...).
https://github.com/siguici/panam
bun cross-package-manager cross-pm cross-runtime cross-spawn deno docker git jsr nodejs npm package-manager panam pnpm process runtime spawn subprocess yarn
Last synced: 17 days ago
JSON representation
π οΈ One tool to manage all runtimes, package managers π¦οΈ and much more (git, docker, ...).
- Host: GitHub
- URL: https://github.com/siguici/panam
- Owner: siguici
- License: mit
- Created: 2025-01-06T09:57:36.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-02-09T15:11:38.000Z (3 months ago)
- Last Synced: 2025-03-20T11:18:41.521Z (about 1 month ago)
- Topics: bun, cross-package-manager, cross-pm, cross-runtime, cross-spawn, deno, docker, git, jsr, nodejs, npm, package-manager, panam, pnpm, process, runtime, spawn, subprocess, yarn
- Language: TypeScript
- Homepage: https://npm.im/panam
- Size: 180 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Panam
A universal tool for executing commands across multiple package managers,
independent of runtime or environment. Supporting popular tools
like *npm*, *cnpm*, *pnpm*, *yarn*, *bun*, *deno*, and even *jsr*,
it provides a consistent interface to simplify development workflows
and automate tasks, regardless of the package manager being used.This monorepo contains two main packages:
1. **[Panam](./packages/core)**: The core programmatic API
for interacting with package managers.
2. **[Panam CLI](./packages/cli)**: The command-line interface for Panam.---
## π Features
- π **Cross-runtime compatibility**:
Works seamlessly with the most popular package managers
like `npm`, `cnpm`, `pnpm`, `yarn`, `bun`, `deno`, and `jsr`.
- π― **Unified interface**: One tool to handle commands across different managers,
so you can focus on building.
- β‘ **Performance optimized**: Executes commands efficiently with runtime detection
and intelligent fallback strategies.
- π§ **Future-ready**: Easily extendable to support new package managers.
- π οΈ **Command flexibility**: Support for `install`, `add`, `remove`, `run`, `exec`,
and `dlx` commands with consistent behavior across environments.
- π **Custom detection**: Automatically detects the appropriate package manager
for a given project or allows explicit specification.---
## π Packages
### 1. **Panam core**
The [`panam`](https://npm.im/panam) package provides a programmatic interface for developers
who want to integrate Panam functionality into their own applications.- [Read more about Panam core](./packages/core/README.md)
### 2. **Panam CLI**
The [`panam-cli`](https://npm.im/panam-cli) package offers a command-line interface
to execute Panam commands directly in your terminal.- [Read more about Panam CLI](./packages/cli/README.md)
---
## π Installation
Install the specific Panam package based on your needs
using your preferred package manager:### Install Panam
- **With `NPM`**:
```bash
npm install panam
```- **With `Yarn`**:
```bash
yarn add panam
```- **With `PNPM`**:
```bash
pnpm add panam
```- **With `Bun`**:
```bash
bun add panam
```- **With `Deno`**:
```bash
deno add --allow-scrits npm:panam
```### Install Panam CLI
- **With `NPM`**:
```bash
npm install -g panam-cli
```- **With `Yarn`**:
```bash
yarn global add panam-cli
```- **With `PNPM`**:
```bash
pnpm add -g panam-cli
```- **With `Bun`**:
```bash
bun install -g panam-cli
```- **With `Deno`**:
```bash
deno install --allow-scripts npm:panam-cli
```---
## π§βπ» Usage
### Run a command
Panam automatically detects the active package manager for your project:
```bash
pnm install
```### Execute a script
Run a script defined in your `package.json`:
```bash
pnm run
```### Use `exec` or `dlx`
Panam adapts commands like `exec` or `dlx` for compatibility across package managers:
```bash
pnm exec vite --template vue
```---
## π‘ Examples
### Install dependencies
```bash
pnm install
```### Add a package
```bash
pnm add @qwikdev/astro
```### Remove a package
```bash
pnm remove @qwikdev/astro
```### Create a new project
```bash
pnm create @qwikdev/astro my-qwik-astro-app
```### Execute a global tool
```bash
pnm exec @qwikdev/create-astro .
```### Use `dlx` to run a package without installing it globally
```bash
pnm dlx @qwikdev/create-astro my-qwik-astro-app
```---
## π οΈ Programmatic API
Panam also exposes a powerful programmatic API for advanced use cases:
```typescript
import pnm from 'panam';const version = await pnm.version();
console.log(`Current runtime version: ${version}`);await pnm.help(); // Show the runtime help message
await pnm.pm.$('install');
await pnm.install();
await pnm.create('@qwikdev/astro');
await pnm.add('@qwikdev/astro');
await pnm.run('create-astro');
await pnm.exec('astro add @qwikdev/astro');
await pnm.dlx('@qwikdev/create-astro my-qwik-astro-app');
await pnm.x('astro add @qwikdev/astro');
```---
## π Supported Package Managers
Panam currently supports the following package managers:
- β npm
- β cnpm
- β pnpm
- β yarn
- β bun
- β deno
- β jsrMore package managers can be added with ease.
---
## π Documentation
Go to [https://siguici.github.io/panam](https://siguici.github.io/panam)
for more documentation and usage examples.---
## π‘οΈ License
Under the [MIT License](./LICENSE.md).
Created with β€οΈ by [Sigui KessΓ© Emmanuel](https://github.com/siguici).