hamel_tools
CLI tools that wrap the hamel Python library for working with YouTube videos and generating content.
Installation
# Install in development mode
pip install -e .
# Or using the Makefile
make install-dev
This installs three CLI commands:
ai-transcribe- Download YouTube transcriptsai-chapters- Generate YouTube chapter summariesai-annotate-talk- Create annotated blog posts from technical talks
Usage
Transcript Tool
# Download transcript with timestamps
ai-transcribe "https://youtu.be/VIDEO_ID"
# Use seconds-only timestamps
ai-transcribe "https://youtu.be/VIDEO_ID" --seconds
# Save to file
ai-transcribe "https://youtu.be/VIDEO_ID" > transcript.txt
Chapter Generator
# Generate chapters (requires GEMINI_API_KEY)
export GEMINI_API_KEY="your-api-key"
ai-chapters "https://youtu.be/VIDEO_ID"
Annotated Talk Generator
# Generate annotated blog post (requires both API keys)
export GEMINI_API_KEY="your-api-key"
export JINA_READER_KEY="your-api-key"
# Basic usage
ai-annotate-talk "https://youtu.be/VIDEO_ID" slides.pdf output_images/
# With custom transcript
ai-annotate-talk "https://youtu.be/VIDEO_ID" slides.pdf output_images/ --transcript transcript.txt
# Save to file
ai-annotate-talk "https://youtu.be/VIDEO_ID" slides.pdf output_images/ --output post.md
Prerequisites
For annotate-talk, you need poppler-utils:
# macOS
brew install poppler
# Ubuntu/Debian
apt-get install poppler-utils
Development
Running Tests
./test.sh
Version Management
The Makefile includes version bump commands that update both pyproject.toml and __init__.py:
# Bump versions
make bump-patch # 0.1.0 -> 0.1.1
make bump-minor # 0.1.0 -> 0.2.0
make bump-major # 0.1.0 -> 1.0.0
# Create a release (bump + git tag)
make release-patch # Bumps patch and tags
make release-minor # Bumps minor and tags
make release-major # Bumps major and tags
Publishing to PyPI
Setup
-
Install publishing tools:
make install-publish-tools -
Configure twine (see
.pypirc.example):cp .pypirc.example ~/.pypirc # Edit ~/.pypirc with your PyPI tokens
Release Workflow
# 1. Create a release
make release-minor # or release-patch, release-major
# 2. Push to GitHub
git push && git push --tags
# 3. Build and check
make check
# 4. Upload to PyPI
make test-upload # Test first
make upload # Then production
The Makefile uses twine for secure uploads and includes:
make check- Validates distributions before uploadmake test-upload- Tests on TestPyPI firstmake upload- Publishes to PyPI with confirmation prompt
Architecture
Each tool is implemented as a Typer CLI application that wraps functionality from the hamel library:
transcribe.py→hamel.yt.transcribe()chapters.py→hamel.yt.yt_chapters()annotate_talk.py→hamel.writing.generate_annotated_talk_post()
The tools follow a consistent pattern using Typer's app decorator approach without if __name__ == "__main__" blocks.
Metadata
Release files for hamel-tools 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hamel_tools-0.2.0.tar.gz | 4.5 kB | Without provenance | Details for hamel_tools-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hamel_tools-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for hamel_tools-0.2.0-py3-none-any.whl |
Total release size: 9.5 kB
Release files / hamel_tools-0.2.0.tar.gz
| Download URL | hamel_tools-0.2.0.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
16f3475bf4f0786246b37000db789eb972ebfef6e570eef8b494a0b08df69952
|
|
BLAKE2b-256 checksum How to use checksums |
f2fd8cdb5db7df96c3f801103979ec226fb685882bd0c649bca63ed5c10f5db1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.10
|
Release files / hamel_tools-0.2.0-py3-none-any.whl
| Download URL | hamel_tools-0.2.0-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6fc93bb7ea3d1e25e7ff392cbd61c8cd6b7acaebe015346e757227091acc0f8b
|
|
BLAKE2b-256 checksum How to use checksums |
25f220c335fdf9541427c7d0f97547e5ee71288664794ce7f02cfde1568b23d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.10
|
Security for hamel-tools 0.2.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.