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

ocr-cli-aicli

v1.0.2

Published

OCR Open Platform CLI

Readme

ocr-cli-aicli

OCR 开放平台官方命令行工具。

安装

npm install -g ocr-cli-aicli

首次配置 API Key

ocr-cli login --api-key your_api_key

查看平台接入信息

ocr-cli whoami

查看本地配置

ocr-cli config show

更新本地配置

ocr-cli config set --base-url https://aicli.top --timeout 60000
ocr-cli config set --api-key your_api_key

清空本地配置

ocr-cli config clear

识别文件

ocr-cli scan ./demo.png
ocr-cli scan ./contract.pdf --json
ocr-cli scan ./invoice.jpg --text

输出到文件

ocr-cli scan ./demo.pdf --output result.json

可选参数

  • --json 输出完整 JSON
  • --text 仅输出合并后的文本段落
  • --output <file> 写入输出文件
  • --base-url <baseUrl> 覆盖默认平台地址
  • --api-key <apiKey> 临时覆盖本地保存的 API Key
  • --timeout <timeout> 设置请求超时毫秒数

退出码

  • 1 通用错误
  • 2 文件不存在
  • 3 未配置 API Key
  • 4 API Key 无效
  • 5 调用额度不足
  • 6 网络错误或超时
  • 7 本地配置无效
  • 8 输出文件写入失败

本地开发测试

npm install
node ./bin/ocr-cli.js --help
node ./bin/ocr-cli.js login --api-key your_api_key
node ./bin/ocr-cli.js whoami
node ./bin/ocr-cli.js scan ./demo.png --base-url https://aicli.top

本地全局软链接测试

npm link
ocr-cli --help