Skip to main content

Add your description here

Project description

ytee

A minimal CLI for uploading videos to YouTube — single files or entire directories, powered by the YouTube Data API v3.


Quickstart

ytee init → ytee set-creds → ytee upload

These three commands are all you need. init must be run before anything else.


Setup

1. Get Google API credentials

Before using ytee, you need a Google Cloud project with the YouTube Data API v3 enabled:

  1. Go to the Google Cloud Console.
  2. Enable the YouTube Data API v3.
  3. Create OAuth 2.0 credentials for a Desktop application.
  4. Download the credentials as a JSON file (e.g. client_secret.json).

2. Install ytee

pip install ytee 

CLI commands

ytee initRun this first

Copies your Google OAuth credentials into ~/.secrets/ so ytee can find them.

ytee init --secret-path /path/to/client_secret.json
Options:
  -sp, --secret-path    Path to your client_secret.json (required on first run)
  -tp, --token-path     Path to an existing token.json (optional)

⚠️ This must be run at least once before any other command will work.


ytee set-creds — Authenticate with Google

Opens a browser window for Google OAuth authorization and saves the access token to ~/.secrets/token.json.

ytee set-creds

Run this after init. If your credentials are still valid, it reuses them automatically.


ytee upload — Upload a video or directory

Upload a single video:

ytee upload --path video.mp4 --name "My Video Title" --desc "My description"

Upload all videos in a directory:

ytee upload --path ./videos --name "Episode - " --desc "My description" --is-dir

When uploading a directory, each filename is appended to the --name prefix to form the video title. For example, if the directory contains part1.mp4, the title becomes Episode - part1.

Options:
  -p, --path      Path to a video file or directory
  -n, --name      YouTube video title (used as a prefix for directory uploads)
  -d, --desc      YouTube video description
      --is-dir    Treat --path as a directory and upload all files inside it

After each successful upload, ytee logs the file path and YouTube video ID to uploaded.txt in your current directory:

{"path": "videos/part1.mp4", "id": "abc123XYZ"}

ytee show-uploads — View upload history

ytee show-uploads

Shows previously uploaded videos from the local uploaded.txt log.


Full example walkthrough

# Step 1 — point ytee to your Google credentials (once)
ytee init --secret-path ~/Downloads/client_secret.json

# Step 2 — authenticate with Google (once, or when token expires)
ytee set-creds

# Step 3a — upload a single video
ytee upload --path ~/videos/intro.mp4 --name "Introduction" --desc "Welcome to my channel"

# Step 3b — or upload a whole folder
ytee upload --path ~/videos --name "Lecture - " --desc "Course upload" --is-dir

Notes

  • Videos are uploaded as unlisted by default.
  • Secrets are stored in ~/.secrets/ (client_secret.json and token.json).
  • Directory uploads process files sequentially with a short delay between each upload.
  • Batch uploads currently include all files in the directory regardless of extension.

Requirements

  • Python 3.9+
  • YouTube Data API v3 enabled on a Google Cloud project

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

ytee-0.1.1.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

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

ytee-0.1.1-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file ytee-0.1.1.tar.gz.

File metadata

  • Download URL: ytee-0.1.1.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ytee-0.1.1.tar.gz
Algorithm Hash digest
SHA256 62edbd01b1eb7d5733db4ef3e44b47a216cabfcb3e5cf411809a7c68cec42f90
MD5 a3d43be7eb0f8e500a15be74c9208edb
BLAKE2b-256 5c5f033f7e3a4112b420f8a1702dc2b9beb8e04e3cdcfd3fdbc3073611372474

See more details on using hashes here.

Provenance

The following attestation bundles were made for ytee-0.1.1.tar.gz:

Publisher: publish.yml on rooooop5/ytee

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

File details

Details for the file ytee-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ytee-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ytee-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c1be2f2efd0304a1819b7bd6942733bfa713a7f113aa79a0a61dbbc00173de89
MD5 08ae2b422709a059ef2bf2b2aa8b68fe
BLAKE2b-256 2140fb76e14d9d3f1f051b30b7e78d7c502db01f0cf332ea48ab2dc1d4a23756

See more details on using hashes here.

Provenance

The following attestation bundles were made for ytee-0.1.1-py3-none-any.whl:

Publisher: publish.yml on rooooop5/ytee

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