Skip to main content
PyPI 版本 测试状态 文档
[中文版](README.md) | [英文版](README.en.md)

ChatShare

ChatShare 是 ChatArch 管理的文件分享 CLI。当前后端固定为 Dufs,提供可审计的二进制安装、配置、用户级服务生命周期,以及本机文件/目录导入、分享目录树查看与直达 URL 生成。

安全默认值

从 0.2.5 起,安装 server 可选依赖即可使用应用内目录登录系统。登录页、会话和目录权限由 chatshare serve 负责;反向代理只转发,不承担鉴权。

python -m pip install "ChatShare[server]==0.2.5"
chatshare serve --allowed-host proxy.internal

网关默认监听 127.0.0.1:5001,读取现有实例的 root、Dufs loopback 地址和公网 base URL,不修改 Dufs。仅已知具体文件可匿名 GET/HEAD/Range;根目录、目录、搜索、JSON、归档和写入需要登录/原生鉴权。完整边界见 安全与边界。公网代理切换、TLS 与现场验证由运维单独完成,绕过网关直连 Dufs 不受此门禁保护。

  • Dufs 固定安装到 ~/.chatarch/chatshare/runtimes/dufs/,不写系统目录。
  • 服务只绑定 127.0.0.1;公网入口应由独立反向代理任务配置。
  • 原生 Dufs 仍为匿名可读、鉴权可写;通过网关访问时,匿名只允许已知具体文件,浏览器目录访问使用服务端 cookie 会话。
  • 删除和符号链接访问默认关闭。
  • Linux 生命周期使用 systemd --user,不使用 kill、pkill 或不受控后台进程。

最短流程

uv tool install ChatShare
chatshare dufs install
chatenv init -t chatshare -I
chatenv set CHATSHARE_DUFS_BASE_URL=https://share.example -I
chatenv set CHATSHARE_DUFS_USERNAME=chatshare -I
read -rsp "Dufs writer password: " CHATSHARE_DUFS_PASSWORD && echo
printf 'CHATSHARE_DUFS_PASSWORD=%s\n' "$CHATSHARE_DUFS_PASSWORD" | chatenv paste --stdin -y -I
unset CHATSHARE_DUFS_PASSWORD
chatshare dufs init
chatshare dufs service install
chatshare dufs start
printf 'hello from ChatShare\n' > hello-share.txt
chatshare put ./hello-share.txt examples/hello-share.txt
chatshare tree examples
chatshare url examples/hello-share.txt

运行 chatshare --tree 可读取 ChatStyle 从 Click 注册表生成的完整实时命令树;chatshare tree <prefix> 查看已发布分享目录的实际文件树;chatshare --tree-brief 显示省略参数签名的同一命令面。隐藏兼容入口不会出现在产品树中。

文档

开发约定见 DEVELOP.md 与 AGENTS.md。

Metadata

Release files for ChatShare 0.2.5

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

Source distribution (sdist)

Source distribution for ChatShare 0.2.5
File Size Uploaded
chatshare-0.2.5.tar.gz 72.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ChatShare 0.2.5
File Interpreter ABI Platform
chatshare-0.2.5-py3-none-any.whl Python 3 none any Details

Total release size: 131.9 kB

Release files / chatshare-0.2.5.tar.gz

Download URL chatshare-0.2.5.tar.gz
Size 72.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2907868365c780d5ebbceb8928adc2c34d852a254150043eeb93d457a0ed2e8f
BLAKE2b-256 checksum
How to use checksums
a5a91865d74c6906a0ec406e81c8e4254064c434e31fbf1a7ecf40d4605ae4d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.

Transparency log

Release files / chatshare-0.2.5-py3-none-any.whl

Download URL chatshare-0.2.5-py3-none-any.whl
Size 58.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f1f16aa58a8a021886cf5e8787a51e36ebc9cd31f278b24ce76dbf03c44f743d
BLAKE2b-256 checksum
How to use checksums
521440f8c9674c252a7d7f537a251b93d00305c759d25770416cb7a2325bac56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

This release

0.2.5 This release

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.1

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