class-package-manager
v1.0.3
Published
Class Package Manager – manage sharable classes/components
Maintainers
Readme
Class Package Manager (CPM)
Manage sharable classes and utility functions in your project — like npm, but for individual classes and functions.
📦 Installation
Install globally:
npm install -g class-package-manager🚀 Usage
Initialize a CPM project
cpm init- Creates a
.cpm/cpm.jsonfile in your project. - Tracks installed CPM packages.
Install a package
cpm install hello- Downloads the package into your project’s
.cpmfolder. - Updates
.cpm/cpm.json.
Example usage:
import hello from './.cpm/hello/index.ts';
hello();Search for packages
cpm search hello- Searches npm for packages matching
hello. - Shows results in the terminal.
List installed packages
cpm list- Displays all installed CPM packages and their versions.
Uninstall a package
cpm uninstall hello- Removes the package from
.cpmand updatescpm.json.
📂 Folder Structure Example
my-project/
├─ .cpm/
│ └─ hello/
├─ src/
│ └─ index.ts
└─ package.json✅ Tips
- Use your npm username for scoped packages:
@username/package. - Keep packages small and focused (one class/function or a related set).
📄 License
MIT
