pi-fastboot
v1.0.0
Published
Make Pi startup feel close to PI_OFFLINE=1 while still letting npm-based extensions update
Maintainers
Readme
pi-fastboot
Quick & dirty pi extension that makes normal Pi startup feel close to PI_OFFLINE=1, while still letting npm-based extensions update.
It pins npm: package versions in ~/.pi/agent/settings.json after startup, so the next launch can skip npm registry resolution without turning offline mode on.
Pinned startup was roughly the same as PI_OFFLINE=1 for the measured paths: about 0.48–0.49s for pi --version and 1.15–1.18s for pi --help.
Install
pi install npm:pi-fastbootHow it works
Add npm packages to Pi as usual:
{
"packages": [
"npm:@sting8k/pi-vcc"
]
}After a Pi session starts, pi-fastboot checks those npm packages in the background and rewrites them with the latest version:
{
"packages": [
"npm:@sting8k/[email protected]"
]
}The update is non-blocking, so it should not slow down the current startup. The benefit is on the next launch, when Pi no longer needs to resolve unpinned npm packages.
Disable
To disable pi-fastboot, set enabled to false in the agent settings:
~/.pi/agent/settings.json
{
"pi-fastboot": {
"enabled": false
}
}Notes
- Registry lookups time out after 5 seconds.
- If a lookup fails, the package entry is left unchanged.
License
MIT
