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

arkanalyzer

v1.0.88

Published

1. 从 [Download Visual Studio Code](https://code.visualstudio.com/download) 下载 VS Code 并安装,或安装其他 IDE。 2. 从 [Download Node.js](https://nodejs.org/en/download/current) 下载 Node.js 并安装(自带 npm)。 3. 安装依赖库: ```shell npm install ``` 4. 【可选】生成最新 API 文档,输出目录为 `docs/

Readme

方舟分析器:面向ArkTS语言的静态程序分析框架

ArkAnalyzer 环境配置

  1. Download Visual Studio Code 下载 VS Code 并安装,或安装其他 IDE。
  2. Download Node.js 下载 Node.js 并安装(自带 npm)。
  3. 安装依赖库:
npm install
  1. 【可选】生成最新 API 文档,输出目录为 docs/api_docs
npm run gendoc

ArkAnalyzer 命令行(CLI)

可执行入口为 arkanalyzer(见 package.jsonbin 字段)。本地使用 CLI 前请先编译,生成 lib/

npm run build

查看帮助:

npx arkanalyzer --help
npx arkanalyzer cg --help
npx arkanalyzer ir --help

<input> 均指 ArkTS/TypeScript 工程根目录

cg:调用图构建与可达性分析

用法:arkanalyzer cg <input> [options]

| 选项 | 说明 | 默认值 | |------|------|--------| | -a, --algorithm <name> | 构图算法:cha | rta | rta | | -o, --output <file> | 结果输出文件路径 | stdout | | -f, --format <type> | 输出格式:json | text | dot | csv | json | | -e, --entry <method> | 入口方法,可多次指定;@dummyMain 表示与默认入口一致 | 自动推断 | | -r, --reachable-from <method> | 可达性分析根方法,可多次指定 | — | | --direction <dir> | 可达方向:forward(顺调)| backward(谁调到根) | forward | | --edges <type> | 边类型过滤:call | virtual | interface | all | all | | --ohos-sdk-home <path> | OpenHarmony SDK 根路径;未设置时读取环境变量 OHOS_SDK_HOME | — |

示例:

npx arkanalyzer cg ./myapp -a rta -f json
npx arkanalyzer cg ./myapp -e "@dummyMain" -r MyClass.myMethod --direction backward -f text

ir:导出工程 IR 产物

用法:arkanalyzer ir <input> [options]

| 选项 | 说明 | 默认值 | |------|------|--------| | -o, --output <dir> | 产物输出目录 | out | | -f, --format <type> | json | text | dot | text | | --ohos-sdk-home <path> | 同 cg | — | | --no-infer-types | 跳过 Scene.inferTypes() 以加快执行 | 默认会做类型推断 |

命令会在标准输出打印一行 JSON 摘要(含 inputformatoutputDirfileCount 等)。

示例:

npx arkanalyzer ir ./myapp -f text -o ./out
npx arkanalyzer ir ./myapp -f json -o ./out

更细的参数语义与典型用法可参考仓库内 skills/arkanalyzer/skills/cg.mdskills/arkanalyzer/skills/ir.md

ArkAnalyzer 文档

  1. ArkAnalyzer 快速入门文档,请参考:链接
  2. ArkAnalyzer API文档,请参考:链接
  3. 程序分析 SIG 说明:简体中文 · English

ArkAnalyzer 代码上库

遵守openharmony-sig代码上库规范, 操作方法请参考:链接

ArkAnalyzer 调试

将调试配置文件.vscode/launch.jsonargs参数数组修改为想要调试的文件路径,然后启动调试。

添加自验证测试用例

新增测试代码统一放至tests目录下,对应的样例代码和其他资源文件统一放至tests\resources,按测试场景创建不同文件夹。

ArkAnalyzer Issues

请参考连接提交Issues。