Maintainer's Guide¶
Guidance on releases, dependency management, and handling recurring issues.
Table of Contents¶
Release Process¶
Version Numbering¶
We follow Semantic Versioning: - MAJOR (x.0.0): Breaking changes to CLI flags, behavior, or public API - MINOR (0.x.0): New features, backwards-compatible - PATCH (0.0.x): Bug fixes, backwards-compatible
Creating a Release¶
1. Prepare the Release¶
Ensure the codebase is ready:
# Ensure you're on main branch and up-to-date
git checkout main
git pull origin main
# Run all quality checks
go fmt ./...
go vet ./...
golangci-lint run
go test ./...
# Test build
go build .
2. Update CHANGELOG (if present)¶
If the project has a CHANGELOG.md, update it with: - All notable changes since last release - Bug fixes - New features - Breaking changes - Security fixes
3. Tag the Release¶
# Create an annotated tag
git tag -a v1.2.3 -m "Release v1.2.3: Brief description"
# Push the tag to GitHub
git push origin v1.2.3
This will trigger GitHub Actions (if configured) or prepare for manual release.
4. Build Release Binaries¶
Build binaries for all major platforms:
Linux (amd64)¶
Linux (arm64)¶
macOS (amd64 - Intel)¶
macOS (arm64 - Apple Silicon)¶
Windows (amd64)¶
Windows (arm64)¶
Build Script (for convenience):
#!/bin/bash
# build-release.sh
VERSION=$1
if [ -z "$VERSION" ]; then
echo "Usage: $0 <version>"
exit 1
fi
# Create output directory
mkdir -p dist
PLATFORMS=(
"linux/amd64"
"linux/arm64"
"darwin/amd64"
"darwin/arm64"
"windows/amd64"
"windows/arm64"
)
for platform in "${PLATFORMS[@]}"; do
IFS='/' read -r -a array <<< "$platform"
GOOS="${array[0]}"
GOARCH="${array[1]}"
output="ytdl-go-${GOOS}-${GOARCH}"
if [ "$GOOS" = "windows" ]; then
output="${output}.exe"
fi
echo "Building $output..."
GOOS=$GOOS GOARCH=$GOARCH go build -ldflags="-s -w" -o "dist/${output}" .
done
echo "Build complete! Binaries in dist/"
5. Create GitHub Release¶
- Go to GitHub repository → Releases → "Draft a new release"
- Select the tag you just created (v1.2.3)
- Add release title: "v1.2.3: Brief description"
- Add release notes:
- Summary of changes
- Breaking changes (if any)
- Notable bug fixes
- New features
- Attach the built binaries
- Check "Set as latest release" (if appropriate)
- Click "Publish release"
6. Announce the Release¶
- Update README.md badge if needed
- Post in GitHub Discussions (if enabled)
- Share on relevant social channels (if applicable)
Release Checklist¶
- Code is tested and working
- All tests pass (if tests exist)
- Linting passes
- CHANGELOG updated (if present)
- Version tag created (
git tag -a vX.Y.Z) - Tag pushed to GitHub
- Binaries built for all platforms
- GitHub Release created with binaries attached
- Release notes are clear and complete
- Documentation updated if needed
Dependency Management¶
Core Dependencies¶
ytdl-go relies on several critical dependencies:
| Dependency | Purpose | Update Frequency |
|---|---|---|
github.com/kkdai/youtube/v2 |
YouTube API client | Critical - Monitor closely |
github.com/charmbracelet/bubbletea |
TUI framework | Stable, periodic updates |
github.com/charmbracelet/bubbles |
TUI components | Stable, periodic updates |
github.com/charmbracelet/lipgloss |
TUI styling | Stable, periodic updates |
github.com/bogem/id3v2/v2 |
ID3 tag embedding | Stable, rare updates |
github.com/u2takey/ffmpeg-go |
FFmpeg bindings | Stable, rare updates |
Critical: kkdai/youtube Updates¶
The kkdai/youtube library is the most critical dependency because YouTube frequently changes their API, which can break downloads.
When to Update¶
Update kkdai/youtube when:
1. Users report widespread 403 errors - YouTube likely changed their API
2. The upstream library releases a fix - Check https://github.com/kkdai/youtube/releases
3. New YouTube features - New formats, quality options, etc.
4. Security vulnerabilities - Rare, but important
How to Update¶
# Check current version
grep "github.com/kkdai/youtube/v2" go.mod
# Update to latest
go get github.com/kkdai/youtube/v2@latest
# Or update to specific version
go get github.com/kkdai/youtube/v2@v2.10.6
# Clean up dependencies
go mod tidy
# Test thoroughly!
go build .
./ytdl-go -info https://www.youtube.com/watch?v=dQw4w9WgXcQ
./ytdl-go -audio https://www.youtube.com/watch?v=dQw4w9WgXcQ
Testing After Update¶
Always test these scenarios after updating kkdai/youtube:
- [ ] Regular video download
- [ ] Audio-only download
- [ ] Playlist download
- [ ] YouTube Music URL
- [ ] Format listing (-list-formats)
- [ ] Metadata extraction (-info)
Other Dependencies¶
For other dependencies, follow this schedule: - Security updates: Immediate - Bug fixes: Within 1-2 weeks - Feature updates: Evaluate need, test thoroughly - Major version bumps: Careful evaluation, extensive testing
Checking for Updates¶
# List outdated dependencies
go list -u -m all
# Update all dependencies to latest minor/patch
go get -u ./...
go mod tidy
Dependency Security¶
Monitor for security vulnerabilities:
- Enable GitHub Dependabot alerts
- Check https://pkg.go.dev/vuln/ regularly
- Review go.sum changes in PRs
Troubleshooting Recurring Issues¶
Issue: Users Report 403 Forbidden Errors¶
Symptoms: - Downloads fail with "403 Forbidden" error - Affects multiple users simultaneously - May affect specific formats (audio-only) more than others
Root Causes:
1. YouTube API changes (most common)
2. Rate limiting / IP blocks
3. Outdated kkdai/youtube library
Diagnostic Steps:
-
Verify the issue:
-
Check if it's widespread:
- Look for similar issues on GitHub
- Check
kkdai/youtubeissues: https://github.com/kkdai/youtube/issues -
Test from different networks/IPs
-
Check YouTube library status:
- Visit https://github.com/kkdai/youtube/releases
- Look for recent updates mentioning "403" or "API changes"
- Check issue tracker for related reports
Solutions:
-
Update
kkdai/youtube: -
Try FFmpeg fallback:
- Ensure FFmpeg is installed
- The tool automatically falls back to FFmpeg for audio downloads
-
If not working, check
youtube.goFFmpeg fallback logic -
Temporary workaround (user-facing):
Prevention:
- Monitor kkdai/youtube repository for updates
- Set up GitHub watch notifications for releases
- Keep a test suite of videos for quick verification
Issue: FFmpeg Not Found¶
Symptoms: - "ffmpeg not found" errors - Audio extraction fallback fails
Solution:
-
Verify FFmpeg installation:
-
Installation guide (point users to):
- macOS:
brew install ffmpeg - Ubuntu/Debian:
sudo apt-get install ffmpeg -
Windows: Chocolatey or manual download from https://ffmpeg.org/download.html
-
Check PATH:
Issue: Permission Denied / File Access Errors¶
Symptoms: - "permission denied" when writing files - "directory does not exist" errors
Common Causes: 1. Output directory doesn't exist 2. No write permissions 3. File is locked by another process 4. Invalid characters in filename
Solutions:
-
Check directory permissions:
-
Sanitize filenames:
- The tool already sanitizes filenames in
path.go -
If issues persist, check
sanitizePathComponent()function -
User guidance:
- Use
-oflag with absolute paths - Ensure output directories exist
- Avoid special characters in custom paths
Issue: Memory Usage / Performance Problems¶
Symptoms: - High memory consumption - Slow downloads - System becomes unresponsive
Diagnostic Steps:
-
Check concurrency settings:
-
Monitor resource usage:
Solutions:
-
Reduce concurrency:
-
Check for leaks:
- Review
progress_manager.goandunified_tui.go - Ensure all goroutines are properly cleaned up
- Check for unclosed file handles
Issue: Playlist Downloads Incomplete¶
Symptoms: - Some playlist videos skipped - Early termination
Common Causes: 1. Private or deleted videos in playlist 2. Region-restricted content 3. Network timeouts
Expected Behavior: - Tool should skip problematic videos and continue - Summary shows skipped/failed count
If not working:
- Check error handling in playlist download logic (youtube.go, runner.go)
- Ensure errors don't cause early exit
Security¶
Reporting Security Issues¶
Security vulnerabilities should be reported privately: 1. Do NOT open a public GitHub issue 2. Use the repository's private vulnerability reporting mechanism (for example, GitHub's "Report a vulnerability" feature) or follow SECURITY.md if it contains project-specific instructions 3. Email maintainers directly if specified
Handling Security Reports¶
When you receive a security report: 1. Acknowledge receipt within 24-48 hours 2. Investigate the issue thoroughly 3. Develop a fix in a private branch 4. Test extensively before releasing 5. Coordinate disclosure with reporter 6. Release patch as soon as ready 7. Publish security advisory on GitHub
Security Best Practices¶
- Never commit credentials or API keys
- Validate all user inputs
- Sanitize file paths (already done in
path.go) - Keep dependencies updated
- Enable GitHub security features (Dependabot, Code Scanning)
Communication¶
Responding to Issues¶
Response Time Goals: - Security issues: 24-48 hours - Bug reports: Within 1 week - Feature requests: Within 2 weeks - General questions: Best effort
Issue Triage: 1. Label appropriately: bug, feature, question, etc. 2. Ask for details: Version, OS, command used, error output 3. Reproduce: Try to reproduce the issue locally 4. Prioritize: Security > Bugs > Features 5. Close duplicates: Link to original issue
Pull Request Reviews¶
Review Checklist: - [ ] Code is clean and follows Go conventions - [ ] No obvious bugs or security issues - [ ] Tests pass (if tests exist) - [ ] Documentation updated if needed - [ ] Commit messages are clear - [ ] No merge conflicts
Providing Feedback: - Be respectful and constructive - Explain the "why" behind requested changes - Acknowledge good work - Help newcomers learn
Maintaining Documentation¶
- Keep README.md up-to-date with features
- Update docs/ when architecture changes
- Add examples for new features
- Fix documentation bugs promptly
Frontend Maintainers¶
This section defines maintainer responsibilities for the web UI in frontend/.
Current Frontend Maintainer(s)¶
@lvcoi- project lead and frontend/backend integration owner
Responsibilities¶
Frontend maintainers are responsible for:
- Reviewing pull requests that modify
frontend/. - Keeping frontend dependencies current and secure.
- Preserving UI behavior and interaction consistency.
- Verifying frontend output integrates correctly with embedded web assets.
Ownership Boundaries¶
- Frontend maintainers own
frontend/src/,frontend/docs/, and build config infrontend/. - API contract changes are coordinated with backend maintainers before merge.
Becoming a Frontend Maintainer¶
Active contributors with repeated high-quality frontend contributions may be invited to join maintenance responsibilities.
--
Maintainer Roster: - Add maintainer names/handles here - Include areas of expertise - Contact information (if applicable)
Last Updated: 2026-02-05