@beyas/packi
v1.1.2
Published
Smart CLI package installer for Node.js — reads requirements.txt, installs npm packages with fuzzy-match suggestions, progress tracking, and a community-powered package database.
Maintainers
Readme
packi
Smart CLI package installer for Node.js
Install all your npm dependencies from a
requirements.txtin one command — with fuzzy-match suggestions, progress tracking, and a community-powered package database.
Features
| Feature | Description |
|---|---|
| requirements.txt support | List your packages the Python way — one per line |
| Fuzzy search & suggestions | Typo in a package name? packi finds the closest match |
| Progress bar | Real-time installation progress displayed in your terminal |
| Community package database | A local database (exists.txt) grows with contributions from users |
| Persistent config | One-time contribution preference saved in .package-installer-config.json |
| Alternative installer | When a package fails, choose an alternative from suggestions interactively |
| Zero native deps | Only one runtime dependency: string-similarity |
How it works
flowchart TD
A[🖥️ Run: npx packi] --> B[📂 Read requirements.txt]
B --> C{File exists?}
C -- No --> D[❌ Show creation instructions]
C -- Yes --> E[📖 Parse package list]
E --> F[🗄️ Load package database\nexists.txt]
F --> G[🔄 For each package...]
G --> H[⬇️ npm install package]
H --> I{Install OK?}
I -- Yes --> J[✅ Verify installation]
J --> K{In database?}
K -- No --> L{User contributes?}
L -- Yes --> M[➕ Add to exists.txt]
L -- No --> N[⏭️ Next package]
M --> N
K -- Yes --> N
I -- No --> O[🔍 Fuzzy search similar packages]
O --> P{Similar found?}
P -- Yes --> Q[💡 Show suggestions]
Q --> R{User selects one?}
R -- Yes --> H
R -- No --> S[❌ Skip — log failure]
P -- No --> S
S --> N
N --> T{More packages?}
T -- Yes --> G
T -- No --> U[ Show summary report]Installation
Use without installing (recommended for one-time use)
npx packiInstall globally
npm install -g packiInstall locally in a project
npm install packiUsage
1. Create your requirements.txt
You can create the file manually:
express
lodash
axios
chalk
dotenvOne package name per line. Lines starting with
#are treated as comments. The formatpackage@versionis also supported.
Or use packi freeze to generate it automatically from your project:
packi freeze
# or
npx packi freezeThis scans your package.json and installed node_modules to produce a requirements.txt — similar to Python's pip freeze.
Note: If
requirements.txtdoesn't exist when you runpacki, it will be auto-generated frompackage.jsonif available.
2. Run packi
packi
# or
npx packi3. Watch the magic
=== Début de l'installation ===
Nombre total de packages à installer: 3
[14:22:01] 📍 Chargement de la base de données des packages
Tentative d'installation de express
express installé avec succès
[████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 33.3%
Tentative d'installation de lodash
lodash installé avec succès
[████████████████████████░░░░░░░░░░░░░░░░] 66.7%
...
=== Résumé de l'installation ===
Durée totale: 8.42 secondes
Packages installés avec succès: 3
Échecs d'installation: 0Configuration
packi creates a .package-installer-config.json in your working directory to remember your contribution preference:
{
"willContribute": true,
"gms": "npm"
}| Key | Type | Description |
|---|---|---|
| willContribute | boolean | Whether to add newly installed packages to the shared database |
| gms | string | Package manager to use (currently npm) |
Why use packi?
One command to install everything
No more copy-pasting package names one by one. List them all in requirements.txt and let packi handle the rest.
Fuzzy matching saves you from typos
Made a mistake?
axois # typo!packi detects the error and suggests:
Échec de l'installation de axois
Suggestions de packages similaires:
1. axios (2,500,000 téléchargements) - Similarité: 83.3%
2. axos (12,000 téléchargements) - Similarité: 57.1%Community-powered package database
Every time you install a new package, you can add it to the local database. Over time, the suggestion engine gets smarter for your whole team.
Full visibility
See exactly what's happening at every step, with timestamps, progress bars, and a final summary.
Project structure
packInstaller/
├── index.js # Main CLI entry point
├── exists.txt # Community package database
├── requirements.txt # Your packages to install (user-created)
├── .package-installer-config.json # Persistent user config (auto-generated)
├── package.json # npm module metadata
└── README.md # This fileContributing
Contributions are welcome! Here's how:
- Fork the repository
- Create a feature branch:
git checkout -b feat/my-feature - Commit your changes:
git commit -m "feat: add my feature" - Push:
git push origin feat/my-feature - Open a Pull Request on GitHub
Contact
| Channel | Link | |---|---| | Email | [email protected] | | GitHub | github.com/ThorLex | | Issues | github.com/ThorLex/packInstaller/issues | | npm | npmjs.com/package/packi |
License
MIT © Bekono Beyas Ambroise (ThorLex)
Made with ❤️ by ThorLex · [email protected]
