Skip to main content

元生无界内部管理系统 CLI

命令名:yswj-internal。CLI 通过系统开放 API 读取数据,权限仍由 API Key 和服务端账号权限控制。

安装

需要 Python 3.10 或更新版本。建议用 pipx 安装隔离环境:

pipx install yswj-internal-cli

也可以在虚拟环境中安装:

python -m pip install yswj-internal-cli

在本仓库开发时,也可以从本地目录安装:

pipx install ./cli

给 AI 助手配置时,请先阅读 一键配置卡;详细流程见 AI 配置指南。安装后的 Python 包中也包含这两份文档。

macOS 或 Windows 用户在系统页面复制自己的 API Key 后,可让 AI 在本机执行一条命令完成安装和配置:

uvx --from yswj-internal-cli==0.1.2 yswj-internal setup --from-clipboard

需要验证已授权模块时,可加 --verify projects 等参数。验证最多请求一条记录,不打印业务数据。其他系统可运行 yswj-internal setup,在本地终端的隐藏提示中输入 Key。

配置

先在系统的“API Key 管理”页面申请 Key,再设置站点地址和密钥:

yswj-internal --profile prod config set-server http://39.107.72.34:6611 --activate
yswj-internal --profile prod config set-key
yswj-internal config show

set-key 会隐藏输入内容。若系统密钥库可用,Key 会保存到系统密钥库;否则保存到本地配置文件,并在 macOS/Linux 上限制为当前用户可读写。配置文件位于 ~/.config/yswj-internal/config.json,可用 YSWJ_INTERNAL_CONFIG 覆盖。

当前线上地址可直连,但使用 HTTP。安装和本机配置不要求 OpenVPN;验证或读取数据会明文传输 API Key,请通过受信任的 VPN 或 HTTPS 入口发送含 Key 的请求。配置 HTTP 地址时 CLI 会显示提醒。

脚本环境也可以通过 YSWJ_INTERNAL_PROFILE、YSWJ_INTERNAL_BASE_URL 和 YSWJ_INTERNAL_API_KEY 临时覆盖配置。不要把 Key 放在 URL、代码仓库或命令行参数中。

数据命令

列表默认输出表格;需要程序处理时选择 JSON,需要电子表格时选择 CSV。

yswj-internal leads list
yswj-internal --profile prod leads list --all --updated-since 2026-11-01T00:00:00+08:00 --format json
yswj-internal contacts get 201 --format json
yswj-internal projects export --format csv --output projects.csv --updated-since 2026-11-01T00:00:00+08:00
yswj-internal activities list --created-since 2026-11-01T00:00:00+08:00 --limit 50

支持 leads、channels、contacts、activities、follow-up-tasks 和 projects。普通列表默认只取 100 条,最多 500 条;全量导出默认每页 500 条并顺序翻页,减少请求次数。全量读取仅在显式使用 --all 或 export 时进行。商机、渠道、联系人、待跟进任务和项目支持 --updated-since;跟进记录支持 --created-since。时间必须包含时区;定期同步建议优先使用增量时间筛选。

export 会顺序读取所有页并写入指定文件;CSV 按页流式写盘,避免大批数据占满内存,交互终端会显示读取进度。大数据集建议使用 CSV 和增量时间筛选。联系人私密字段、项目财务字段以及各数据范围仍遵循该 Key 的权限;CLI 不会扩大 Key 权限。

命令帮助

yswj-internal --help
yswj-internal leads list --help
yswj-internal config --help

Metadata

Release files for yswj-internal-cli 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yswj-internal-cli 0.1.2
File Size Uploaded Provenance Actions
yswj_internal_cli-0.1.2.tar.gz 24.1 kB Without provenance Details for yswj_internal_cli-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for yswj-internal-cli 0.1.2
File Interpreter ABI Platform Actions
yswj_internal_cli-0.1.2-py3-none-any.whl Python 3 none any Details for yswj_internal_cli-0.1.2-py3-none-any.whl

Total release size: 47.2 kB

Release files / yswj_internal_cli-0.1.2.tar.gz

Download URL yswj_internal_cli-0.1.2.tar.gz
Size 24.1 kB
Tags Source
SHA-256 checksum
How to use checksums
2f2d7e96cb6603b87ff2bfe6e8e1aa3d0fe5dd2b953b3166f500d61665da72de
BLAKE2b-256 checksum
How to use checksums
2375ba625bbd668a359cddffe7bc43bb8589ac3fbb70de5742f764e1a39a0e30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / yswj_internal_cli-0.1.2-py3-none-any.whl

Download URL yswj_internal_cli-0.1.2-py3-none-any.whl
Size 23.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4e632c5b440780f29840d4cf84d85ea591c73710e838b2c251a67ed5dfa38d02
BLAKE2b-256 checksum
How to use checksums
afa143d734f14d46816126201722079ee52f86aa7a3e4e24238828a532c59f35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for yswj-internal-cli 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page