Skip to main content

CLI toolbox with YouTube Music downloading and Telegram uploading tools.

Project description

toolsx

toolsx packages a small CLI toolbox with two ready-to-use commands:

  • ytm-dl - download a single YouTube Music song or a full playlist as tagged MP3 files.
  • tg-uploader - upload a file to Telegram with a bot session.
  • toolsx - list the installed tools and dispatch to a tool by name.

Install

pip install tools_extra

The package is published as tools_extra, but the installed CLI commands stay toolsx, ytm-dl, and tg-uploader.

From the repo:

python -m pip install .

Commands

Running toolsx prints the available tools:

toolsx

You can also dispatch through the umbrella command:

toolsx ytm-dl --help
toolsx tg-uploader --help

Direct commands stay available too:

ytm-dl --help
tg-uploader --help

ytm-dl

Public song or playlist

No browser.json file is required for public URLs or IDs.

ytm-dl --url "https://music.youtube.com/playlist?list=PL..."
ytm-dl --url "https://music.youtube.com/watch?v=VIDEO_ID"
ytm-dl --id VIDEO_ID

Private playlists or library access

For private playlists, liked songs, or library selection, create browser.json first with the ytmusicapi browser auth guide:

Then run:

ytm-dl --auth-file browser.json --library-index 1

Useful flags

ytm-dl \
  --url "https://music.youtube.com/playlist?list=PL..." \
  --output-dir ./exports \
  --yes-all \
  --songs-limit 25 \
  --lyrics-metadata \
  --zip \
  --zip-max-size 2000000000
  • --cookies-file uses a cookies.txt file instead of browser cookie extraction.
  • --browser and --browser-profile use cookies directly from a browser when needed.
  • --yes-all skips the first-song confirmation and downloads the whole playlist immediately.
  • --output-dir sets the base export directory; by default files go to ./[Album-Name].
  • --songs-limit defaults to all songs when omitted.
  • --lyrics-metadata fetches lyrics with timestamps and saves them into MP3 metadata.
  • --keep-original-audio skips MP3 conversion/tagging and keeps the downloaded source audio extension.
  • --mp3-bitrate controls MP3 conversion bitrate when MP3 conversion is enabled.
  • --debug enables verbose logs for lyrics, thumbnails, metadata, and full yt-dlp output.
  • --zip-max-size splits archives into .partNN.zip files once the source bytes per archive reach the limit.

If required input is missing in interactive mode, ytm-dl asks for it.

tg-uploader

tg-uploader accepts values from CLI args first, then environment variables, then prompts.

Supported environment variables:

  • TOOLSX_TG_API_ID, TG_API_ID, TELEGRAM_API_ID
  • TOOLSX_TG_API_HASH, TG_API_HASH, TELEGRAM_API_HASH
  • TOOLSX_TG_BOT_TOKEN, TG_BOT_TOKEN, TELEGRAM_BOT_TOKEN
  • TOOLSX_TG_CHAT_ID, TG_CHAT_ID, TELEGRAM_CHAT_ID

Example:

export TOOLSX_TG_API_ID=12345
export TOOLSX_TG_API_HASH=your_api_hash
export TOOLSX_TG_BOT_TOKEN=123:token
export TOOLSX_TG_CHAT_ID=-1001234567890

tg-uploader --file ./archive.zip --caption "Nightly build"

Debug mode:

tg-uploader --file ./archive.zip --debug

Local development

git clone https://github.com/z44d/toolsx
cd toolsx
python -m pip install -e .

Adding more tools

  1. Add the new module under src/.
  2. Register it in src/toolsx/registry.py so toolsx lists it.
  3. Add one console script entry under [project.scripts] in pyproject.toml.

Release workflow

The GitHub workflow at .github/workflows/publish.yml builds and publishes to PyPI on version tags like v0.1.0.

Before using it, configure PyPI trusted publishing for the repository or provide the required PyPI credentials in GitHub.

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

tools_extra-0.1.0.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

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

tools_extra-0.1.0-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tools_extra-0.1.0.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tools_extra-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7ce3aca9b9340620bb9aec5f29e51daf8ce65dc3caf4faf4139daccd1a069406
MD5 cca32b3fb52b75df4a5932cf26f34db2
BLAKE2b-256 33f495e5cc5d3551ac883402df1bb70c3860740f0b41d23a69878a6ca1118151

See more details on using hashes here.

Provenance

The following attestation bundles were made for tools_extra-0.1.0.tar.gz:

Publisher: publish.yml on z44d/toolsx

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

File details

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

File metadata

  • Download URL: tools_extra-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tools_extra-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fb608a3cbadf9d24148327779196a193d24a4730834e4659be65181ac2ec4a04
MD5 729248149d5efd86ff310c948c365c76
BLAKE2b-256 7bc5efd966483bbecc9a24395402170e0c1bba1f2fc1ca3bcc2f905828f97f33

See more details on using hashes here.

Provenance

The following attestation bundles were made for tools_extra-0.1.0-py3-none-any.whl:

Publisher: publish.yml on z44d/toolsx

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