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

simple-archiver-tui

v1.7.1

Published

A beautiful TUI file archiver with multi-format support

Readme

📦 SimpleArchiver

一个美观、功能丰富的终端用户界面(TUI)文件压缩/解压工具,使用 Go 语言和 Bubble Tea 框架构建。

Go Version License

✨ 特性

  • 🎨 美观的 TUI 界面 - 使用 Bubble Tea 和 Lip Gloss 构建的现代终端界面
  • 📁 交互式文件选择器 - 轻松浏览和选择文件/文件夹
  • 🗜️ 压缩功能 - 支持多种压缩格式
  • 📂 解压功能 - 支持多种归档格式的解压
  • 🔄 模式切换 - 启动时选择压缩或解压模式
  • 🔐 密码保护 - ZIP格式支持AES-256加密
  • 🗜️ 多种压缩格式支持
    • ZIP(通用格式,兼容性最好)
    • 7z(高压缩率,需安装 7z 命令)
    • TAR.GZ(Linux 常用格式)
    • TAR.BZ2(高压缩率)
    • TAR.XZ(最高压缩率)
    • TAR.ZST(Zstandard,速度与压缩率平衡)
    • TAR.LZ4(最快速度)
  • 🚫 智能排除规则 - 预设常见开发目录排除模式
    • Python: venv, __pycache__, .pyc
    • Node.js: node_modules, .npm
    • IDE: .idea, .vscode
    • Git: .git
    • 构建产物: dist, build, target
  • 📊 实时进度显示 - 动画进度条和当前文件显示
  • 📈 速度统计图 - 实时显示速度曲线、当前/平均速度、已用时间
  • 📈 压缩统计 - 显示压缩率、文件数量、大小等信息
  • ⌨️ Vim 风格快捷键 - j/k 导航,h/l 进入/返回
  • 🌍 多语言支持 - 自动检测系统语言(中文/英文)

🚀 安装

⚡ 即用即走(推荐)

无需安装,一行命令即可运行!适合临时使用或快速体验:

bash <(curl -fsSL https://raw.githubusercontent.com/Lynricsy/SimpleArchiver/main/run.sh)

💡 该脚本会自动检测系统架构,优先下载预编译版本,如无可用版本则使用 Go 环境编译运行。

📦 通过 npm 安装

# 全局安装
npm install -g simple-archiver-tui

# 或使用 npx 直接运行
npx simple-archiver-tui

使用 Go Install

go install github.com/Lynricsy/SimpleArchiver@latest

如果你有 Go 环境,也可以直接运行:

go run github.com/Lynricsy/SimpleArchiver@latest

从源码编译

# 克隆仓库
git clone https://github.com/Lynricsy/SimpleArchiver.git
cd SimpleArchiver

# 编译
go build -o simple-archiver .

# 运行
./simple-archiver

📖 使用方法

直接运行程序即可启动交互式界面:

./simple-archiver

操作流程

压缩模式

  1. 选择压缩模式 - 启动后选择"压缩文件/文件夹"
  2. 选择文件/文件夹 - 使用方向键或 j/k 浏览,Space 选择
  3. 选择压缩格式 - 选择需要的压缩格式(ZIP, TAR.GZ 等)
  4. 配置排除规则 - 选择要排除的文件类型(可自定义)
  5. 确认并压缩 - 确认设置后开始压缩

解压模式

  1. 选择解压模式 - 启动后选择"解压归档文件"
  2. 选择归档文件 - 浏览并选择要解压的压缩包(📦 图标标识)
  3. 确认并解压 - 确认后开始解压到同名目录

支持的归档格式

| 格式 | 压缩 | 解压 | 密码支持 | |------|------|------|----------| | ZIP | ✅ | ✅ | ✅ AES-256 | | 7z | ✅ 需要安装 7z | ✅ | ✅ | | TAR.GZ | ✅ | ✅ | ❌ | | TAR.BZ2 | ✅ | ✅ | ❌ | | TAR.XZ | ✅ | ✅ | ❌ | | TAR.ZST | ✅ | ✅ | ❌ | | TAR.LZ4 | ✅ | ✅ | ❌ |

快捷键

| 按键 | 功能 | |------|------| | / k | 上移光标 | | / j | 下移光标 | | Enter / l | 进入目录 | | Backspace / h | 返回上级目录 | | Space | 选择/切换 | | a | 全选排除规则 | | n | 取消全选 | | y / Enter | 确认 | | Esc / q | 返回/退出 | | Ctrl+C | 强制退出 |

🎯 示例

压缩项目目录(排除依赖)

选择: my-project/
格式: TAR.GZ
排除: ☑ Node.js 相关 (node_modules)
      ☑ Python 相关 (venv, __pycache__)
      ☑ Git 版本控制 (.git)
输出: my-project.tar.gz

完整备份

选择: important-files/
格式: ZIP
排除: (全部取消)
输出: important-files.zip

🏗️ 技术栈

  • 语言: Go 1.25+
  • TUI 框架: Bubble Tea
  • 样式: Lip Gloss
  • 组件: Bubbles (进度条, Spinner)
  • 压缩库:
    • pgzip - 并行 Gzip
    • dsnet/compress/bzip2 - Bzip2
    • ulikunitz/xz - XZ
    • klauspost/compress/zstd - Zstandard
    • pierrec/lz4 - LZ4

📁 项目结构

SimpleArchiver/
├── main.go                    # 主程序入口
├── internal/
│   ├── archiver/             # 压缩核心逻辑
│   │   └── archiver.go
│   ├── config/               # 配置和排除规则
│   │   └── config.go
│   └── ui/                   # TUI 组件
│       ├── app.go
│       ├── filepicker.go
│       └── styles.go
├── go.mod
├── go.sum
└── README.md

📝 开发计划

  • [x] ~~解压缩功能~~ ✅ 已完成
  • [x] ~~密码保护压缩~~ ✅ 已完成 (ZIP AES-256)
  • [x] ~~7z格式支持~~ ✅ 已完成 (解压)
  • [ ] 命令行参数支持(非交互模式)
  • [ ] 分卷压缩
  • [ ] 压缩预览
  • [ ] 配置文件支持

🤝 贡献

欢迎提交 Issue 和 Pull Request!

📄 许可证

MIT License - 详见 LICENSE 文件

🙏 致谢

  • Charm - 提供优秀的 TUI 工具链
  • 原始 Shell 脚本 ZipArchive.sh 的灵感

Made with ❤️ by Lynricsy