npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

muti-ports-manager

v1.1.2

Published

一个可以管理多个项目所占用端口的 npm cli 工具

Readme

Multi Ports Manager

NPM Version Downloads Stats License

An npm CLI tool for managing ports occupied by multiple projects, with TypeScript support.

中文文档 | English

About The Project

Multi Ports Manager Screenshot

Current Version: 1.1.0 | Changelog | Report Bug

There are many great port management tools available; however, I didn't find one that really suited my needs for managing multiple projects with named ports and environment variable integration. So I created this enhanced one.

Here's why Multi Ports Manager is special:

  • Your time should be focused on creating something amazing. A project that solves port conflicts and helps manage development environments efficiently
  • You shouldn't be doing the same tasks over and over like manually checking port availability and updating .env files
  • Smart port management with automatic detection, naming, and environment variable integration
  • Cross-platform support for Windows, macOS, and Linux

Features

  • 🚀 Multi-Project Management: Allocate and manage ports for different projects
  • 🔧 Port Naming: Each port has a customizable name
  • 📝 Environment Variable Management: Automatically add port information to .env files
  • 🖥️ Cross-Platform Support: Supports Windows, macOS, and Linux
  • 💻 Process Management: View and terminate processes occupying ports
  • 🎯 Smart Detection: Automatically detect port occupancy
  • 🌍 Internationalization: Support for English and Chinese languages
  • Enhanced CLI: Improved error handling and user experience
  • 🔒 Data Persistence: Reliable project and port data storage
  • 📊 Real-time Status: Live port occupancy information

Built With

This section lists the major frameworks/libraries used to bootstrap this project.

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

  • npm
npm install npm@latest -g

Quick Installation

# Install globally from npm
npm install -g muti-ports-manager

# Start using immediately
muti-ports --help

Development Installation

  1. Clone the repo

    git clone https://github.com/AHappyAtlas/muti_ports_manager.git
  2. Install NPM packages

    npm install
  3. Build the project

    npm run build
  4. Install globally (optional)

    npm install -g muti-ports-manager
  5. Change git remote url to avoid accidental pushes to base project

    git remote set-url origin AHappyAtlas/muti-ports-manager
    git remote -v # confirm the changes

Usage

Use this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space.

Basic Commands

# Add a project
muti-ports add-project

# Add a port to a project
muti-ports add-port

# List all projects and ports
muti-ports list

# Check port occupancy
muti-ports check-port 3000

# Terminate process occupying a port
muti-ports kill-port 3000

Language Management

# Set language to English
muti-ports set-language en

# Set language to Chinese
muti-ports set-language zh

# Show current language
muti-ports language

Port Name Management

# Add a port with a name
muti-ports add-port -p myproject -P 3000 -N API_PORT

# Update port name
muti-ports update-port-name -p myproject -P 3000 -N NEW_API_PORT

# Remove a port
muti-ports remove-port -p myproject -P 3000

Environment Variable Management

# Add a port to .env file
muti-ports add-to-env -n API_PORT

# Specify project and .env file path
muti-ports add-to-env -p myproject -e .env.local -n API_PORT

# Remove a port from .env file
muti-ports remove-from-env -n API_PORT

# List port variables in .env file
muti-ports list-env

# Specify .env file path
muti-ports list-env -e .env.production

Command Options

add-project

  • -n, --name <name>: Project name

add-port

  • -p, --project <name>: Project name
  • -P, --port <port>: Port number
  • -N, --name <name>: Port name

update-port-name

  • -p, --project <name>: Project name
  • -P, --port <port>: Port number
  • -N, --name <name>: New port name

add-to-env

  • -p, --project <name>: Project name
  • -e, --env-file <path>: .env file path
  • -n, --name <name>: Port name

remove-from-env

  • -e, --env-file <path>: .env file path
  • -n, --name <name>: Port name

list-env

  • -e, --env-file <path>: .env file path

set-language

  • <language>: Language code (en/zh)

Environment Variable Format

Port names are automatically converted to uppercase format when added to .env files:

# If port name is "API_PORT" and port number is 3000
API_PORT=3000

# If port name is "db_port" and port number is 5432
DB_PORT=5432

For more examples, please refer to the Documentation

Roadmap

  • [x] Multi-project port management
  • [x] Port naming system
  • [x] Environment variable integration
  • [x] Cross-platform support
  • [x] Internationalization (English/Chinese)
  • [x] Enhanced CLI interface and error handling
  • [ ] Web dashboard for port management

See the open issues for a full list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Top contributors:

Contributors

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Email - [email protected]

Project Link: https://github.com/AHappyAtlas/muti_ports_manager

Acknowledgments

Use this space to list resources you find helpful and would like to give credit to. I've included a few of my favorites to kick things off!

Version History

  • v1.1.0 (Current) - Enhanced CLI interface, improved error handling, and better user experience
  • v1.0.0 - Initial release with core functionality

For detailed changes, see CHANGELOG.md.

Development

# Install dependencies
npm install

# Build project
npm run build

# Run in development mode
npm run dev

# Run built version
npm start

Project Structure

src/
├── types.ts          # TypeScript type definitions
├── project-manager.ts # Project manager
├── port-manager.ts   # Port manager
├── env-manager.ts    # Environment variable manager
├── manager.ts        # Main manager
├── i18n/
│   └── index.ts     # Internationalization manager
├── index.ts          # Entry file
└── bin/
    └── muti-ports.ts # CLI entry

Data Storage

Project data is stored in the .muti-ports-manager/projects.json file in the user's home directory.

Internationalization

The tool supports multiple languages:

  • English (en): Default language
  • Chinese (zh): Full Chinese localization

Language can be changed at runtime using the set-language command.