Modern Node.js and TypeScript frontend and backend projects rely heavily on npm package management. However, managing complex package.json configurations, tracking nested dependencies, auditing security advisories, inspecting outdated packages, and running arbitrary npm scripts manually from the command line can be repetitive and fragmented. Running npm outdated, checking npm view, or parsing dependency trees via raw terminal output often requires excessive scrolling and command-line typing. lazynpm is an open-source terminal user interface (TUI) built specifically for Node.js developers. Inspired by the responsive design of lazygit and lazydocker, lazynpm consolidates project dependencies, scripts, audit reports, and remote package searches into a single interactive terminal dashboard.
What Is lazynpm and Why Use It?
lazynpm provides an intuitive, split-pane terminal UI written in Go that acts as a control deck for all npm operations inside your project repository.
Key architectural advantages of lazynpm include:
- Interactive Dependency Explorer: View production (
dependencies) and development (devDependencies) packages in real time with version status indicators. - One-Key Package Updating: Highlight an outdated package and press a single keyboard shortcut to update it to the latest version or specified tag.
- Executable Script Launcher: Automatically parses the
"scripts"block of yourpackage.json, letting you execute test, build, lint, and dev servers interactively without typing full shell strings. - Live Security Auditing: Visualises
npm auditvulnerabilities and provides interactive resolution commands. - Integrated Package Search: Search the global npm registry directly from your terminal and inspect package descriptions and maintainers before installation.
Installing lazynpm on Linux
You can install lazynpm using the Go toolchain or by downloading pre-compiled binary releases from GitHub.
Method 1: Installing via Go
If you have Go installed and configured in your Linux environment:
go install github.com/jesseduffield/lazynpm@latest
Ensure that your local Go binary path is exported in your shell configuration:
echo $PATH | grep -q "$HOME/go/bin" || echo 'export PATH="$HOME/go/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
Method 2: Downloading Pre-Built Binaries from GitHub
For systems without a local Go compiler, download the pre-compiled binary directly:
LAZYNPM_VER=$(curl -s "https://api.github.com/repos/jesseduffield/lazynpm/releases/latest" | grep -Po '"tag_name": "v\K[^"]*')
curl -Lo lazynpm.tar.gz "https://github.com/jesseduffield/lazynpm/releases/download/v${LAZYNPM_VER}/lazynpm_${LAZYNPM_VER}_Linux_x86_64.tar.gz"
tar -xzf lazynpm.tar.gz
sudo mv lazynpm /usr/local/bin/
rm lazynpm.tar.gz
Confirm the installation by checking the binary version:
lazynpm --version
Navigating the lazynpm Interface
To launch the dashboard, open your terminal, navigate to any Node.js project directory containing a package.json file, and run:
cd ~/projects/my-web-app
lazynpm
The interface arranges your project information into distinct interactive panels:
- Scripts Panel: Lists all custom npm scripts defined in
package.json(e.g.,build,test,dev,lint). - Dependencies Panel: Displays all installed production packages alongside current and latest versions.
- Dev Dependencies Panel: Displays development packages and compiler tools.
- Information / Output Panel (Right): Shows package metadata, README extracts, or real-time build terminal output for running scripts.
Core Keyboard Shortcuts and Operations
lazynpm adheres to standard TUI navigation paradigms:
Tab/Shift+Tab: Switch focus between different interface panels.Up / Down Arrows(ork / j): Move cursor up and down through list entries.Enter: Execute the selected npm script or view package details.u: Update the highlighted package to its latest release.d: Uninstall / remove the highlighted dependency frompackage.jsonand node_modules.a: Open the prompt to add/install a new package to the project.q: Exit lazynpm.
Running and Monitoring Build Scripts
Rather than opening multiple terminal windows to run development servers and build jobs, you can manage scripts directly in lazynpm:
- Navigate to the Scripts panel using
Tab. - Highlight your target script (such as
devorwatch). - Press
Enterto launch the background process. - The right-hand pane streams stdout and stderr logs in real time. Press
xto stop or kill a running process.
Auditing and Managing Vulnerabilities
lazynpm flags insecure packages with visual warning indicators. Selecting a flagged dependency displays the specific CVE advisory and severity ranking, allowing you to run automated patches or upgrade major versions without leaving the terminal view.
Integrating lazynpm into your everyday Linux developer workflow consolidates dependency management, accelerates script execution, and simplifies project maintenance.