@f47/pakio
v1.1.0
Published
Save, manage, and reuse npm package templates across projects
Downloads
27
Maintainers
Readme
pakio
Save, manage, and reuse npm package templates across projects.
Instead of remembering which packages you install on every new project, pakio lets you define named templates and apply them in one command.
Install
# npm
npm install -g @f47/pakio
# yarn
yarn global add @f47/pakio
# pnpm
pnpm add -g @f47/pakioUsage
Run without arguments for the interactive menu:
pakioOr use commands directly:
pakio create <name>
pakio add <name> <packages...>
pakio remove-pkg <name> <packages...>
pakio apply <name> [--dev] [--deps]
pakio diff <name>
pakio list
pakio rename <old-name> <new-name>
pakio remove <name>
pakio export [names...] --output <file>
pakio import-file <file>Interactive menu
◆ pakio — npm package template manager
│
◆ What do you want to do?
│ ❯ Create a new template
│ Add packages to a template
│ Edit a template
│ Apply a template to this project
│ View templates
│ Import / Export
│ Remove a template
│ Exit
└Commands
Create a template
pakio create react-baseAdd packages
# dependencies
pakio add react-base axios zustand
# devDependencies
pakio add react-base -D eslint prettier typescriptTo remove packages or manage them more finely, use the interactive menu.
Rename a template
pakio rename react-base react-coreRemove packages from a template
pakio remove-pkg react-base axios zustandIn interactive mode, packages are searched live from npm — results include name, version, and description.
Apply a template
Run inside a project that already has a package.json:
pakio apply react-baseInstalls all dependencies and devDependencies from the template using your project's detected package manager (npm, yarn, or pnpm).
Flags:
--dev: Only installdevDependencies.--deps: Only installdependencies.
Example:
pakio apply react-base --devCompare template with project (Diff)
See what's missing or different before applying:
pakio diff react-baseOutput:
◆ Diff for template "react-base"
│
● Missing dependencies:
│ + [email protected]
│
● Different versions:
│ ~ typescript (current: 5.5.0, template: 5.7.3)
│
└ Run `pakio apply <name>` to sync.Import from a project
Save the current project's dependencies into a template:
pakio import react-baseList templates
pakio listExport and import
Share templates between machines or teammates:
# export
pakio export react-base --output react-base.json
pakio export # exports all → pakio-export.json
# import
pakio import-file ./react-base.jsonRemove a template
pakio remove react-baseStorage
Templates are stored locally in ~/.pakio/templates.json.
{
"react-base": {
"dependencies": ["[email protected]", "[email protected]"],
"devDependencies": ["[email protected]", "[email protected]", "[email protected]"]
}
}Packages are stored with their exact version at the time of adding, so installs are reproducible across machines.
Requirements
Node.js 18 or higher.
License
MIT
