{"_id":"youtube-content-kit","_rev":"2-d0b97cc5beee1dc117ba9bf4ae0e681f","name":"youtube-content-kit","dist-tags":{"latest":"0.1.0"},"versions":{"0.0.0-stage":{"name":"youtube-content-kit","version":"0.0.0-stage","_id":"youtube-content-kit@0.0.0-stage","stub":true,"maintainers":[{"name":"orvirt","email":"orvirt@gmail.com"}],"dist":{"shasum":"cf33330c2c25beff81d2aa154013b6c2c48964f5","tarball":"https://registry.npmjs.org/youtube-content-kit/-/youtube-content-kit-0.0.0-stage.tgz","fileCount":2,"integrity":"sha512-DiUeqM97sHk4RjBILtgWZ9wLmnoYdaeSSAWABKZXouHARGQ5m61mXk66pcmwvcrieT6KVa+KF4AN6vLnkCHj7Q==","signatures":[{"sig":"MEUCICpx7B0zBNyhek0Z4B2Zbq+RcXPL4HFEOfItmyX4qHC9AiEA7+L02v9xHUy/Ss/C9WzUZ4196MclVJ3m/xrQKGuSBOw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":341},"_npmUser":{"name":"orvirt","email":"orvirt@gmail.com"},"description":"Temporary package placeholder for staged publishing","directories":{}},"0.1.0":{"_id":"youtube-content-kit@0.1.0","bin":{"youtube-content":"dist/cli.js"},"bugs":{"url":"https://github.com/oliver-virt/ads-kit/issues"},"dist":{"shasum":"b1345dbd9a3d5662b76854386a6abdc72a61be60","tarball":"https://registry.npmjs.org/youtube-content-kit/-/youtube-content-kit-0.1.0.tgz","fileCount":11,"integrity":"sha512-0tLAgVltTNqA+DAyPp6SDmAuzEkT0aJaM5WnBHcCenV4MMOdlhCLsuG9IDMgOk5gOvcTd0wAZPihWxX3kmPpyw==","signatures":[{"sig":"MEQCIALt5mnSl1KPiho8PmHRqPVQQ2lbojwUet0SEzB9GkRAAiBCiQHOO63tgqM+S3f9V8A0Grbsk6KZwi/40i28+B7H3w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCt9CZunKUcYsd5cygLs0XgjJG/ZaO6VuU2yfqqujvX4gIhAM4c9jJLSMzXsbdtvszUN6P8P7tExqUI3kIgZj3xat+7"}],"unpackedSize":35585},"main":"./dist/index.js","name":"youtube-content-kit","type":"module","types":"./dist/index.d.ts","author":{"name":"Or Virt","email":"orvirt@gmail.com"},"engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./store":{"types":"./dist/store.d.ts","import":"./dist/store.js","default":"./dist/store.js"}},"license":"MIT","scripts":{"test":"vitest run","build":"tsc","typecheck":"tsc --noEmit","prepublishOnly":"npm run build && npm test"},"version":"0.1.0","_npmUser":{"name":"orvirt","email":"orvirt@gmail.com"},"homepage":"https://github.com/oliver-virt/ads-kit#readme","keywords":["youtube","youtube-data-api","shorts","mcp","typescript"],"repository":{"url":"git+https://github.com/oliver-virt/ads-kit.git","type":"git","directory":"packages/youtube-content-kit"},"_npmVersion":"12.0.1","description":"Typed YouTube client, CLI and MCP server for a channel's own content: upload private drafts, read channel and video stats.","directories":{},"maintainers":[{"name":"orvirt","email":"orvirt@gmail.com"}],"_nodeVersion":"24.18.0","dependencies":{"zod":"^4.2.0","@modelcontextprotocol/server":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.0","typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/youtube-content-kit_0.1.0_1792764328839_0.9722525929415096"}}},"time":{"created":"2026-10-23T14:04:31.552Z","modified":"2026-10-23T14:05:29.193Z","0.0.0-stage":"2026-10-23T14:04:31.552Z","0.1.0":"2026-10-23T14:05:28.958Z"},"description":"Typed YouTube client, CLI and MCP server for a channel's own content: upload private drafts, read channel and video stats.","maintainers":[{"name":"orvirt","email":"orvirt@gmail.com"}],"readme":"# youtube-content-kit\n\nTyped client, CLI and MCP server for a YouTube channel's own content: upload videos as private drafts and read channel and per-video stats. Zero-config beyond one Google Cloud OAuth client; credentials stay in your home folder.\n\n| | |\n|---|---|\n| Upload drafts | YouTube Data API `videos.insert`, resumable: the video lands on the channel as private and the owner publishes it in YouTube Studio. A vertical video up to 3 minutes becomes a Short. |\n| Stats | Channel subscribers, views and video count; each upload's privacy, duration, views, likes and comment count (private uploads included). |\n| Not here | Comments, playlists, thumbnails, live streams. |\n\n## Before you rely on it\n\n- **Audit.** Videos uploaded from a Google Cloud project created after 28 July 2020 that has not passed YouTube's compliance audit are locked as private, and the owner cannot publish them. Submit the [YouTube API Services audit form](https://support.google.com/youtube/contact/yt_api_form) once the client works.\n- **7-day sign-in in Testing.** While the OAuth consent screen is in \"Testing\", Google revokes the refresh token after 7 days. Move it to \"In production\" (unverified is fine for your own channel; you click through a warning once) to keep the sign-in.\n- **Quota.** `videos.insert` has its own bucket of 100 uploads a day; everything else shares 10,000 units.\n\n## Setup\n\n1. In Google Cloud: create a project, enable **YouTube Data API v3**, set up the OAuth consent screen (External; add the channel owner's Google account as a test user while in Testing), and create an OAuth client of type **Desktop app**.\n2. Write `~/.config/youtube-content-kit/<profile>/credentials.env`, mode 600:\n\n```\nYOUTUBE_CLIENT_ID=...apps.googleusercontent.com\nYOUTUBE_CLIENT_SECRET=...\n```\n\n3. Sign in once: `npx youtube-content-kit auth --profile <profile>` (the bin is `youtube-content`). It opens Google, listens on a loopback port for the redirect, and saves the token. Pick the account (or brand account) that owns the channel.\n\n## CLI\n\n```\nyoutube-content auth                         --profile brand\nyoutube-content upload clip.mp4 --title \"…\"  --profile brand\nyoutube-content status <video_id>\nyoutube-content stats\nyoutube-content mcp\n```\n\n`--profile` falls back to `$YOUTUBE_PROFILE`, then `default`. `$YOUTUBE_CONTENT_HOME` moves the store.\n\n## MCP\n\n```json\n\"youtube\": {\n  \"command\": \"npx\",\n  \"args\": [\"-y\", \"youtube-content-kit@0.1.0\", \"mcp\"],\n  \"env\": { \"YOUTUBE_PROFILE\": \"brand\" }\n}\n```\n\nTools: `upload_draft` (local file path, title, optional description, tags, category), `upload_status`, `channel_stats`, `list_videos`. Uploads are private; nothing is published.\n\n## Library\n\n```ts\nimport { createYouTubeContent } from \"youtube-content-kit\";\nimport { Profile } from \"youtube-content-kit/store\";\n\nconst yt = createYouTubeContent({ accessToken: await new Profile(\"brand\").accessToken() });\nconst { videoId, studioUrl } = await yt.uploadDraft(video, { title: \"…\", categoryId: \"27\" });\nawait yt.waitForProcessing(videoId);\nconst videos = await yt.listVideos();\n```\n\nErrors throw `YouTubeContentError` with the HTTP status and Google's own reason (`quotaExceeded`, `uploadLimitExceeded`, …).\n\n## License\n\nMIT\n","readmeFilename":"README.md","homepage":"https://github.com/oliver-virt/ads-kit#readme","keywords":["youtube","youtube-data-api","shorts","mcp","typescript"],"repository":{"url":"git+https://github.com/oliver-virt/ads-kit.git","type":"git","directory":"packages/youtube-content-kit"},"author":{"name":"Or Virt","email":"orvirt@gmail.com"},"bugs":{"url":"https://github.com/oliver-virt/ads-kit/issues"},"license":"MIT"}