panam v0.2.2
π Panam Core API
Panam Core API provides a programmatic way to interact with package managers through a unified and efficient interface. Designed for flexibility and extensibility, the Core API eliminates the need to manually adapt to various package manager commands, enabling seamless development workflows.
π Installation
Install the Core API as a standalone package:
With
npm
:npm install panam
With
yarn
:yarn add panam
With
pnpm
:pnpm add panam
π οΈ Usage
Importing the API
Start by importing Panam Core API into your project:
import pnm from 'panam';
Run Commands
Use the unified API to execute commands across various package managers:
Install dependencies
await pnm.install();
Add a package
await pnm.add('lodash');
Remove a package
await pnm.remove('lodash');
Run a script
await pnm.run('build');
Execute a tool
await pnm.exec('eslint .');
Use dlx
to execute temporary tools
await pnm.dlx('create-react-app my-app');
π API Reference
Methods
install()
: Installs all dependencies in the current project.add(...packages: string[])
: Adds specified packages to the project.remove(...packages: string[])
: Removes specified packages from the project.run(script: string)
: Runs a script defined in the project'spackage.json
.exec(command: string)
: Executes a specific command using the detected package manager.dlx(binary: string)
: Runs a package as a one-time executable.
π Features
- Cross-runtime compatibility: Unified API
for
npm
,pnpm
,yarn
,bun
,deno
, and more. - Simplified workflows: Consistent commands across package managers.
- Extensibility: Easily extendable to support new tools and managers.
π Documentation
For detailed documentation, visit the Panam website.
π‘οΈ License
Licensed under the MIT License. Created with β€οΈ by Sigui KessΓ© Emmanuel.