Skip to main content

ATCLib CLI

atclib 是琦琦内容生产库的 OAuth 命令行客户端。它使用 OAuth 2.0 Device Authorization 登录,可查询、创建、上传并发布素材和后处理内容。

安装与登录

uv tool install .
atclib login --client-id oc_example
atclib whoami

默认服务为 https://atclib.kispace.cn。可用 ATCLIB_SERVER_URL 或任意命令的 --server 临时覆盖。

管理员须在平台创建公开 OAuth Client:名称 atclib-cli、Token 端点认证选择“公开客户端”、开启 PKCE,并允许以下 scopes:

profile:read materials:read materials:write post_process_contents:read post_process_contents:write

平台要求注册 redirect URI;Device Flow 不会使用它,可登记 http://127.0.0.1:8765/oauth/callback。将平台生成的 client_id 提供给 CLI 用户。

刷新令牌保存在系统密钥链;本地配置只保存服务地址和 client ID。atclib logout 会撤销并删除本地令牌。

常用命令

atclib material list --q "选题"
atclib material category-list
atclib material create "产品访谈" --category cat_123 --content-file ./interview.md --publish
atclib material create "原始图片" --kind image --category cat_123 --file ./cover.png
atclib material upload material_123 ./appendix.pdf
atclib material publish material_123

atclib content create "访谈摘要" --method "人工摘要" --material material_123 --category cat_123 \
  --content-file ./summary.md --publish
atclib content list --q "摘要"

附件支持单文件与 multipart 直传;上传中断后可用 material upload-resumecontent upload-resume 加上资源 ID、会话 ID 和相同文件路径继续。所有命令都支持全局 --json,便于脚本处理。

Release files for atclib-cli 0.1.0

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

Source distribution (sdist)

Source distribution for atclib-cli 0.1.0
File Size Uploaded
atclib_cli-0.1.0.tar.gz 31.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for atclib-cli 0.1.0
File Interpreter ABI Platform
atclib_cli-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 45.2 kB

Release files / atclib_cli-0.1.0.tar.gz

Download URL atclib_cli-0.1.0.tar.gz
Size 31.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d10128d2b0d0a4491436dfbe0fcb2a41ad0fb939a1550989ff001b0737a61fbc
BLAKE2b-256 checksum
How to use checksums
a03bac31245d9df9a2045b8600fef97e86222a904a8dddf8ee015d8d3316d804
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / atclib_cli-0.1.0-py3-none-any.whl

Download URL atclib_cli-0.1.0-py3-none-any.whl
Size 13.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ffc63156f8f75ae1c7e9260ac8cd6b702fb90963fd4dcfb2e622f80df4acfe1c
BLAKE2b-256 checksum
How to use checksums
1e6a2ac1cebe102e0eaaf982d2d3828e94b5097a2cfaa8b67db20d1084aa1d0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

0.4.1

2 release files

0.4.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

This release

0.1.0 This release

2 release files

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