Skip to main content

一个将目录结构和文件内容复制到剪切板的工具

Project description

DirCat

PyPI version License: MIT

一个简单的命令行工具,可以将整个目录的结构和文件内容递归地复制到剪切板中,方便与 AI 进行代码分析和调试。

🚀 安装

通过 pip 安装:

pip install DirCat

✨ 特性

  • 一键复制: 在任何目录下运行,即可将整个项目结构和代码复制到剪贴板。
  • 智能过滤: 自动跳过包含过多文件的目录 (例如 node_modules),保持输出的简洁性。
  • 自动忽略: 默认跳过 .git, node_modules, __pycache__ 等常见的元数据和依赖文件夹,无需手动排除。
  • 自定义排除: 使用 -n 选项可以轻松排除您想忽略的任何其他文件或文件夹。

📖 使用方法

基本用法

在您想要复制的项目根目录下,直接运行:

dircat

指定目录

您也可以指定一个特定的目录路径:

dircat /path/to/your/project

排除文件或文件夹

如果您想排除列表之外的特定文件或文件夹,可以使用 -n 选项。

# 这将排除 output 文件夹和 my_secret.txt 文件
dircat -n output my_secret.txt

调整项目数量限制

默认情况下,如果一个文件夹下的文件和子文件夹总数超过 20,该文件夹将被跳过。您可以使用 --max-items 选项来修改这个限制:

dircat --max-items 30

📄 许可证

本项目根据 MIT 许可证授权。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dircat-0.1.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dircat-0.1.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file dircat-0.1.0.tar.gz.

File metadata

  • Download URL: dircat-0.1.0.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for dircat-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6913a1aa69d329959c26894c83fc6653afbb0d8ee7011cf5840dc60c48652b1b
MD5 dfddc9299daef36549e8e0bffeca12d2
BLAKE2b-256 448d2cfd0adea2decdfa51618d71a4e56753a1dc63780ca6b6aa4efb0b95c3d1

See more details on using hashes here.

File details

Details for the file dircat-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: dircat-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for dircat-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 58949a5bc50e3bbe5a0299a20cfabd1f743b5b08017e523aedbe5d3641d90363
MD5 00292645fc06bd687c37a74f6d0cee9f
BLAKE2b-256 8f000adcc1e8aecabc6f848cc1f9811ee8c5777285142f42370dd297d7bd5812

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page