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

ChatShare

ChatShare 是 ChatArch 管理的文件分享 CLI。当前后端固定为 Dufs,提供可审计的服务端运行时安装、配置、用户级服务生命周期,以及新机器连接已有分享服务后的流式上传、目录列表和直达 URL 生成。

从 0.2.8 起支持新机器远端 CLI、浏览器可见上传进度及独立网页资源同步。使用旧版 0.2.7 的客户端请先升级;升级服务器时还需同步网页资源。

安全默认值

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

python -m pip install "ChatShare[server]==0.2.8"
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 或不受控后台进程。

最短流程:新机器连接已有分享服务

新机器不要执行 chatshare dufs install 或 chatshare dufs init。配置写入账号后,put、tree 和 url 自动走远端模式:

uv tool install ChatShare
chatenv init -t chatshare -I
chatenv set 'CHATSHARE_DUFS_BASE_URL=https://<share-url>' -I
chatenv set 'CHATSHARE_DUFS_USERNAME=<writer-name>' -I
read -rsp "ChatShare 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 tree
chatshare put --progress ./video.mov videos/video.mov
chatshare url videos/video.mov

浏览器上传会显示文件名、字节进度、速度及“等待服务器确认”阶段;CLI --progress 同样以流式方式显示进度。已有本机实例的服务端仍使用本机发布模式。完整的客户端配置、HTTP/WebDAV 鉴权、大文件边界与服务端部署说明见快速开始。

运行 chatshare --tree 可读取 ChatStyle 从 Click 注册表生成的完整实时命令树;chatshare tree <prefix> 会列出本机受管实例或已配置远端服务中的目录内容;chatshare --tree-brief 显示省略参数签名的同一命令面。隐藏兼容入口不会出现在产品树中。

文档

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

Metadata

Release files for ChatShare 0.2.8

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.8
File Size Uploaded
chatshare-0.2.8.tar.gz 83.9 kB Details

Built distribution (wheel)

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

Total release size: 148.0 kB

Release files / chatshare-0.2.8.tar.gz

Download URL chatshare-0.2.8.tar.gz
Size 83.9 kB
Tags Source
SHA-256 checksum
How to use checksums
38c754d4f6666f9909610bbac79c2680a96f2d171edeb9e35b09f2a1245f3212
BLAKE2b-256 checksum
How to use checksums
8deddb76abd1c691584161037445fc8f3c681ca6413618af5c50129827ffea61
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 Oct 9, 2026.

Transparency log

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

Download URL chatshare-0.2.8-py3-none-any.whl
Size 64.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a1acb7e5b40be17783ef8dd478de97a95cf5c386d78baceb0884281a30f2c307
BLAKE2b-256 checksum
How to use checksums
b8081e720ad77a05d113cd12d4d85e999e55dc6ae8616cf88422731893022f8f
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 Oct 9, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.8 This release

2 release files

0.2.7

2 release files

0.2.6

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