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

ChatShare

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

安全默认值

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

python -m pip install "ChatShare[server]==0.2.6"
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.6

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.6
File Size Uploaded
chatshare-0.2.6.tar.gz 74.1 kB Details

Built distribution (wheel)

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

Total release size: 132.3 kB

Release files / chatshare-0.2.6.tar.gz

Download URL chatshare-0.2.6.tar.gz
Size 74.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7ffab5ce0d066fe5d72be2f0594033c0355ae1cf13959d5f28a4ceb6a2a24f45
BLAKE2b-256 checksum
How to use checksums
a3bac16e82094f745d6cda92a94742f7eccce840f1d3cc0d15e4dd1768e78ef7
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 11, 2026.

Transparency log

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

Download URL chatshare-0.2.6-py3-none-any.whl
Size 58.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
be21f20e0434d04d1b0c7ffec408acc31a7adf785cb678148efc7d9524a788de
BLAKE2b-256 checksum
How to use checksums
5270ccc93aa8e6e306ec64c34b0c75e17689240568ff96afba6212dd070fb319
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 11, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.8

2 release files

0.2.7

2 release files

This release

0.2.6 This release

2 release files

0.2.5

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