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

@hangox/adb-logcat

v0.2.2

Published

ADB Logcat 日志守护与查询系统 — 自动记录 Android 设备日志,支持多维查询

Downloads

489

Readme

@hangox/adb-logcat

ADB Logcat 日志守护与查询系统 — 自动记录 Android 设备日志,支持多维历史查询。

安装

npm install -g @hangox/adb-logcat

快速开始

# 启动守护进程(前台)
adb-logcat daemon start

# 注册开机自启
adb-logcat daemon install

# 查询日志
adb-logcat query --since "30m ago" --level E
adb-logcat query --grep "crash|ANR" --since "1h ago"
adb-logcat query --tag ActivityManager --json

# 查看设备
adb-logcat devices

# 查看存储
adb-logcat storage

功能

  • 自动录制: 守护进程自动检测 USB/WiFi 设备,持续录制 logcat
  • 毫秒级响应: 基于 adb track-devices TCP 协议,设备插拔即时感知
  • 多维查询: 按 tag、级别、时间、正则、PID、包名过滤
  • 日志轮转: 按天切分,自动清理过期日志
  • 开机自启: 集成 macOS launchd
  • JSON 输出: 支持结构化输出,便于管道处理

命令

| 命令 | 说明 | |------|------| | daemon start | 前台启动守护进程 | | daemon stop | 停止守护进程 | | daemon status | 查看运行状态 | | daemon install | 注册 launchd 开机自启 | | daemon uninstall | 卸载 launchd 服务 | | query | 查询历史日志 | | devices | 列出已记录设备 | | storage | 查看存储用量 | | clean | 手动清理日志 | | config show/set | 配置管理 |

查询参数

| 参数 | 说明 | 示例 | |------|------|------| | -d, --device | 设备 serial | -d ZY22CX8RS5 | | -t, --tag | 按 tag 过滤 | -t ActivityManager,WindowManager | | -l, --level | 最低级别 | -l E (V/D/I/W/E/F) | | --since | 起始时间 | --since "1h ago" | | --until | 结束时间 | --until "2026-03-31 14:00" | | -g, --grep | 正则搜索 | -g "crash\|ANR" | | --pid | 进程 ID | --pid 1234 | | --package | 包名 | --package com.example | | -n, --limit | 最大行数 | -n 1000 (默认 500) | | --no-color | 禁用颜色 | | | --json | JSON 输出 | |

License

MIT