Skip to main content

ChatNPM

ChatNPM: ChatArch npm registry and package maintenance helper

文档:https://arch.gh.wzhecnu.cn/ChatNPM/

快速开始

pip install chatnpm
chatnpm --tree
chatnpm --tree-brief
chatnpm package inspect npm --format json
chatnpm trusted audit . --format json
printf '%s\n' 'Open https://www.npmjs.com/login/abc to use your security key' | chatnpm auth parse-output --format json
python -m pytest -q
python -m build

真实 CLI 树

chatnpm --tree 显示参数签名;chatnpm --tree-brief 保留相同节点和用途说明,但省略参数签名。两者均由 ChatStyle 从真实 Click 注册面生成。

chatnpm
├── --help  # Show this message and exit.
├── --version  # Show the version and exit.
├── --tree  # Print the registered CLI tree and exit.
├── --tree-brief  # Print the registered CLI tree without parameter signatures and exit.
├── auth  # Parse npm authentication handoff prompts.
│   └── parse-output [--format OUTPUT-FORMAT]  # Parse npm CLI output from stdin into a card-handoff payload.
├── package  # Inspect public npm registry metadata; read-only network access.
│   └── inspect <PACKAGE> [--version PACKAGE-VERSION] [--registry REGISTRY] [--format OUTPUT-FORMAT]  # Read public package metadata; sends one request and never outputs auth values.
└── trusted  # Audit npm Trusted Publishing evidence; read-only filesystem access.
    └── audit [PATH] [--format OUTPUT-FORMAT]  # Read package/workflow evidence under PATH; no account access or secret output.

npm 发布元数据只读检查

chatnpm package inspect <package> 会读取公开 npm registry packument,输出安全摘要:

  • package / version / scope
  • public maintainers count and names from registry metadata
  • repository and safe publishConfig summary
  • dist integrity/signature/attestation presence
  • provenance evidence when dist.attestations is present
  • local GitHub Actions evidence for npm OIDC / npm publish --provenance through chatnpm trusted audit

npm 的公开 registry 不提供类似 PyPI 项目设置页的 Trusted Publisher 表格,因此 ChatNPM 会明确报告:

Trusted Publishing settings: not exposed by public npm registry

这不是失败,也不是推断没有 Trusted Publishing;它只表示公开读回只能验证 registry provenance/attestation evidence,不能读取 npm 账号/包设置里的 trusted-publishing 配置。

CLI 规范

这个包使用 chatstyle>=0.2.0,<0.3.0add_tree_option() 生成完整和简洁命令树,不维护包内 renderer。ChatNPM 没有 env/profile/config 行为,因此不依赖 ChatEnv。

目录结构

  • src/:包源码
  • tests/:CLI、registry、trusted publishing、docs/workflow contract 测试
  • docs/:长期维护文档,由 MkDocs Material + i18n 构建

开发说明

扩展前先阅读 DEVELOP.mdAGENTS.md

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chatnpm-0.1.5.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chatnpm-0.1.5-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file chatnpm-0.1.5.tar.gz.

File metadata

  • Download URL: chatnpm-0.1.5.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for chatnpm-0.1.5.tar.gz
Algorithm Hash digest
SHA256 e999462cd147420ba4a3f07e4c160bb87ee4915fc0c7e9c35e660914d54dc9f5
MD5 14e7f6ba1acbb627dc9915c150c0e471
BLAKE2b-256 d9f3915c2cc436c50b5878396959f354488734ac7ff84686d20da8df56e63de6

See more details on using hashes here.

Provenance

The following attestation bundles were made for chatnpm-0.1.5.tar.gz:

Publisher: publish.yml on ChatArch/ChatNPM

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chatnpm-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: chatnpm-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for chatnpm-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 7fef3521e4f1ffb4adcd4fdb42b8dac3e21c1dc8cf221df12a25b318c0a26c76
MD5 ed20e5134f03a589ced9d3d1a0101c86
BLAKE2b-256 b1742fbee3cbbfc467f497e2019c80595df6db17563e949202ec4bcbb2699e8e

See more details on using hashes here.

Provenance

The following attestation bundles were made for chatnpm-0.1.5-py3-none-any.whl:

Publisher: publish.yml on ChatArch/ChatNPM

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page