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 🙏

© 2025 – Pkg Stats / Ryan Hefner

newbrowser

v1.3.9

Published

多浏览器实例管理工具

Readme

NewBrowser

浏览器实例管理工具,用于创建和管理多个独立的Chrome浏览器配置文件,每个配置文件保持独立的会话、历史记录、cookie和扩展。

安装

全局安装

npm install -g newbrowser

本地安装

git clone <repository-url>
cd newbrowser
npm install
npm link

使用

交互式命令行模式

# 启动交互式命令行界面
newbrowser

# 指定默认打开URL
newbrowser --url http://localhost:3000

# 或使用cli命令
newbrowser cli --url http://localhost:3000

命令行模式

# 启动新的Chrome实例
newbrowser launch my-profile

# 使用指定配置和URL启动Chrome
newbrowser launch my-profile -u http://www.baidu.com

# 列出所有配置和实例
newbrowser list

# 列出所有可用配置
newbrowser profiles

# 停止指定配置的浏览器实例
newbrowser stop my-profile

# 停止所有实例
newbrowser stopall

# 删除指定配置
newbrowser delete my-profile

命令详解

基本命令

  • 无参数: 启动交互式命令行界面

    newbrowser
  • launch: 启动浏览器实例

    newbrowser launch [配置名称] [-u URL]
  • setpath: 设置浏览器程序地址

    newbrowser setpath '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'
  • list: 列出所有配置和运行状态

    newbrowser list
  • profiles: 列出所有可用的配置文件

    newbrowser profiles
  • stop: 停止指定配置的浏览器实例

    newbrowser stop <配置名称>
  • stopall: 停止所有浏览器实例

    newbrowser stopall
  • delete: 删除指定配置目录及其所有数据

    newbrowser delete <配置名称>
  • cli: 启动交互式命令行界面

    newbrowser cli [-u URL]

全局选项

  • -u, --url <url>: 设置服务器URL,默认为 http://localhost:8080
  • --version: 显示版本号
  • --help: 显示帮助信息

交互式命令行命令

在交互式命令行中可使用的命令:

  • help - 显示帮助信息
  • list - 列出所有浏览器配置和运行状态
  • launch [配置名称] - 启动一个新的Chrome实例
  • stop [配置名称] - 停止指定的浏览器实例
  • stopall - 停止所有浏览器实例
  • delete [配置名称] - 删除指定的配置目录及其所有数据
  • profiles - 列出所有可用的配置文件
  • clear - 清屏
  • exit - 退出浏览器管理器

配置和数据

NewBrowser将所有配置文件和浏览器数据存储在用户主目录下的 newbrowserdata 文件夹中:

~/newbrowserdata/
  ├── .browser-profiles/        # 存储所有浏览器配置
  │   ├── my-profile/           # 一个配置示例
  │   └── chrome-2023-...       # 自动生成的配置名称
  │
  └── .browser-manager-config.json  # 工具配置文件,记录上次使用的配置等

特点

  • 会话隔离: 每个配置文件都有独立的cookies、历史记录和会话
  • 自动保存: 自动记忆上次使用的配置
  • 进程管理: 自动发现和管理由工具启动的Chrome实例
  • 跨平台: 支持Windows、macOS和Linux

许可证

MIT