BoltPM
BoltPM is a fast, modern, cross-platform NPM alternative written in Rust. It features a CLI, real-time GUI, private registry, and dynamic plugin system.
Installation
From crates.io (Recommended)
From source
Features
- CLI: install, remove, update, run, link, etc.
- GUI: Tauri desktop app with live logs, dependency tree, search, config, and dark mode
- Registry: self-hosted, token-auth, CORS, JSON index
- Plugins: dynamic hooks for install lifecycle
Quick Start
Using the installed binary
# Initialize a new project
# Install a package
# Remove a package
# Update all packages
# Run a script
Building from source
1. Build All Components
2. Run the Registry
# Registry runs at http://localhost:4000
3. Use the CLI
4. Run the GUI
GUI Dark Mode
- Click the 🌙/☀️ button in the header to toggle dark mode.
- Your theme preference is remembered.
Usage Examples
Basic Commands
# Initialize a new project
# Install a package
# Remove a package
# Update all packages
# Run a script
# List installed packages
# Search for packages
Advanced Usage
# Install with specific version
# Install as dev dependency
# Install globally
# Publish a package to your registry
# Use plugins (place compiled .so/.dylib/.dll in .boltpm/plugins/)
# Plugins are called automatically on install/remove/update
Troubleshooting & FAQ
- Q: The GUI is blank or buttons don't work?
- A: Make sure you run
cargo tauri devin theguidirectory and that the backend is built.
- A: Make sure you run
- Q: Install fails with a network error?
- A: Ensure the registry is running at
http://localhost:4000.
- A: Ensure the registry is running at
- Q: Plugin not executing?
- A: Check that your plugin is in
.boltpm/plugins/and built for your OS/arch.
- A: Check that your plugin is in
- Q: How do I clear the cache?
- A: Delete the
.boltpm/cache/directory.
- A: Delete the
Accessibility & UX Tips
- All navigation is keyboard accessible.
- Error messages are shown at the top of the GUI.
- Tooltips are available for all major actions.
- For best experience, keep your plugins stateless and your
package.jsonvalid. - Dark mode is available for comfortable coding at night!
Plugin System
- Plugins are dynamic libraries in
.boltpm/plugins/. - Hooks:
preinstall,postinstall,onError. - Example plugin logs the hook and package info.
- To develop a plugin:
- Implement the
run(ctx: PluginContext)function. - Build as
cdylib. - Place in
.boltpm/plugins/.
- Implement the
Error Handling & UX
- All errors print clear messages to the console and GUI.
- If a plugin fails, the
onErrorhook is called. - GUI shows logs, dependency tree, and config for troubleshooting.
- For best UX, keep plugins simple and stateless.
Contributing
- PRs welcome! Run
cargo test --workspacebefore submitting. - See
dev.mdfor architecture and roadmap.
License
MIT