Skip to main content

Extensible code concatenator and clipboard tool

Project description

cbler

Concatenate code into your clipboard with filters.

cbler is a CLI tool for extracting source files, filtering them, and copying the result to your clipboard.

  • Built with Typer
  • Rich output
  • Multi-flag filtering
  • Regex support
  • Designed for piping code into ChatGPT or similar

Install

pip install cbler

Usage

cbler code gml . --contains Step
cbler code py . --not-suffix .test.py .old.py --prefix util_

Filters the files, copies them to your clipboard, prints a tree of what got included, and shows a summary panel.


Filters (all optional)

Each of these accepts multiple values and regex patterns:

  • --prefix, --not-prefix
  • --suffix, --not-suffix
  • --contains, --not-contains
  • --path-contains, --not-path-contains
  • --parent-contains, --not-parent-contains (matches immediate folder only)
  • --changed (only get's changed files from git diff)

Examples

All .gml and .yy scripts under weather-related GameMaker objects:

cbler code gml . --path-contains Weather

All Python files that aren't test files:

cbler code py . --not-parent-contains test --not-suffix _test.py

Python utility scripts:

cbler code py . --parent-contains utils helpers

Output

  • Copies code to your clipboard using pyperclip
  • Shows a Rich tree of included files
  • Summary panel shows copied and skipped counts

CLI Layout

cbler code gml [path] [filters]
cbler code py  [path] [filters]
cbler git log  [repo] [count]

Roadmap

  • --max-files limit with confirmation
  • Progress bar
  • --output for saving to file
  • Show skipped files with reasons

Dev install

uv pip install -e .
cbler code py . --suffix .py

License

MIT


Name

"cbler" = clipboard + -ler

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

cbler-1.0.7.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

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

cbler-1.0.7-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file cbler-1.0.7.tar.gz.

File metadata

  • Download URL: cbler-1.0.7.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for cbler-1.0.7.tar.gz
Algorithm Hash digest
SHA256 a2019741c7caf15ae6c3f63a1b883af7bda0c27f574570ba8bef5ad7e9c2e2c9
MD5 59292663a0b9c5bfc476791e2161afe2
BLAKE2b-256 06dffaf41ac52c9f41b2602ebbec84458192f2271b355dd4dd1211e1967aa4c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for cbler-1.0.7.tar.gz:

Publisher: workflow.yml on Gaburyuu/CBler

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cbler-1.0.7-py3-none-any.whl.

File metadata

  • Download URL: cbler-1.0.7-py3-none-any.whl
  • Upload date:
  • Size: 15.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for cbler-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 52ef9991054988ff09fc8dbb7afcb02c483d07488d8c4375cdf4058e93da042d
MD5 7f72a2b07157b5fc3bf8dcb0844e4a06
BLAKE2b-256 fa998fb0c04c8c5013fe2b2e54d90d4ef2d1be3a8946b3aca6913789fa48fbfa

See more details on using hashes here.

Provenance

The following attestation bundles were made for cbler-1.0.7-py3-none-any.whl:

Publisher: workflow.yml on Gaburyuu/CBler

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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