{"_id":"@aimasaou/ytcli","name":"@aimasaou/ytcli","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@aimasaou/ytcli","version":"1.0.0","description":"YouTube CLI Tool with multi-profile support","type":"module","bin":{"ytcli":"bin/ytcli.js"},"main":"./src/cli.js","scripts":{"start":"node bin/ytcli.js","test":"node --test"},"keywords":["youtube","cli","upload","management","video","analytics","multi-profile"],"author":{"name":"masao"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/MASAKASUNO1/ytcli.git"},"homepage":"https://github.com/MASAKASUNO1/ytcli#readme","bugs":{"url":"https://github.com/MASAKASUNO1/ytcli/issues"},"dependencies":{"chalk":"^5.3.0","commander":"^12.0.0","googleapis":"^134.0.0","ora":"^8.0.1"},"engines":{"node":">=20.0.0"},"gitHead":"4773db806de7520f012ee1c6b5be340ba69b0e37","_id":"@aimasaou/ytcli@1.0.0","_nodeVersion":"25.2.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-5NGCEsDuvPzVwAJ9/31usZP9w+nVbUSh/7bJ5VaM5RApdBXBvwFiykNX+C9DuXbUNvLhcpm0cZzC/0aI0f32wQ==","shasum":"401acee2283a2a4a3a855b46ec03eef33ec42e8a","tarball":"https://registry.npmjs.org/@aimasaou/ytcli/-/ytcli-1.0.0.tgz","fileCount":15,"unpackedSize":75502,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGGoMVvSLzp8ufbPIq/IGJ5/iBZwlBqP13C5g9sDLBrOAiAQUUs06hq/Uh1WcGeiIpH0T7elkzN8+8qf+ogQ0DRcvQ=="}]},"_npmUser":{"name":"masakasu","email":"masanari.takigawa@bond-ai.co.jp"},"directories":{},"maintainers":[{"name":"masakasu","email":"masanari.takigawa@bond-ai.co.jp"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ytcli_1.0.0_1770229758967_0.40709307890914603"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-04T18:29:18.878Z","1.0.0":"2026-02-04T18:29:19.122Z","modified":"2026-02-04T18:29:19.674Z"},"maintainers":[{"name":"masakasu","email":"masanari.takigawa@bond-ai.co.jp"}],"description":"YouTube CLI Tool with multi-profile support","homepage":"https://github.com/MASAKASUNO1/ytcli#readme","keywords":["youtube","cli","upload","management","video","analytics","multi-profile"],"repository":{"type":"git","url":"git+https://github.com/MASAKASUNO1/ytcli.git"},"author":{"name":"masao"},"bugs":{"url":"https://github.com/MASAKASUNO1/ytcli/issues"},"license":"MIT","readme":"# ytcli - YouTube CLI Tool\n\nYouTubeの動画管理をコマンドラインから行うCLIツール。複数アカウント（プロファイル）対応。\n\n## 機能\n\n- 動画のアップロード（サムネイル、予約公開対応）\n- 動画一覧の取得・検索\n- 動画メタデータの更新（タイトル、説明、タグ、公開状態）\n- チャンネル・動画のアナリティクス表示\n- 複数YouTubeアカウント（プロファイル）の切り替え\n- JSON出力対応（スクリプト連携用）\n\n## 必要条件\n\n- Node.js 20.0.0 以上\n- Google Cloud Projectの作成とOAuth2認証情報\n\n## インストール\n\n```bash\n# npmからグローバルインストール\nnpm install -g @aimasaou/ytcli\n\n# または、リポジトリからインストール\ngit clone https://github.com/MASAKASUNO1/ytcli.git\ncd ytcli\nnpm install\nnpm link\n```\n\n## クイックスタート\n\n```bash\n# 1. プロファイルを作成\nytcli profile create default\n\n# 2. OAuth2認証情報を入力（対話形式）\n#    Client IDとClient Secretを入力\n\n# 3. YouTubeに認証\nytcli auth login\n\n# 4. 動画一覧を確認\nytcli list\n\n# 5. 動画をアップロード\nytcli upload video.mp4 -t \"My Video\"\n```\n\n## OAuth2認証情報の取得\n\n1. [Google Cloud Console](https://console.cloud.google.com/) にアクセス\n2. プロジェクトを作成（または選択）\n3. 「APIとサービス」→「ライブラリ」から以下を有効化:\n   - YouTube Data API v3\n   - YouTube Analytics API\n4. 「認証情報」→「認証情報を作成」→「OAuthクライアントID」\n5. アプリケーションの種類: 「デスクトップアプリ」\n6. 作成後、Client IDとClient Secretをコピー\n\n## コマンド一覧\n\n### 認証 (auth)\n\n```bash\n# ログイン（OAuth2認証）\nytcli auth login [--profile <name>] [--force]\n\n# ログアウト\nytcli auth logout [--profile <name>]\n\n# 認証状態を確認\nytcli auth status [--profile <name>]\n```\n\n### プロファイル管理 (profile)\n\n```bash\n# プロファイル一覧\nytcli profile list\n\n# デフォルトプロファイルを切り替え\nytcli profile use <name>\n\n# プロファイルを作成（対話形式）\nytcli profile create <name>\n\n# プロファイルを作成（引数指定）\nytcli profile create <name> --client-id <id> --client-secret <secret>\n\n# プロファイルを削除\nytcli profile delete <name>\n\n# プロファイル詳細を表示\nytcli profile show [name]\n```\n\n### 動画操作\n\n```bash\n# 動画一覧を取得\nytcli list [-m, --max <number>] [-s, --status <status>] [--next-page-token <token>] [-q, --query <text>] [--json]\n\n# 動画の詳細を取得\nytcli get <videoId> [--json]\n\n# 動画のメタデータを更新\nytcli update <videoId> [-t, --title <title>] [-d, --description <desc>] [--tags <tags>] [--privacy <status>] [--thumbnail <path>]\n\n# 動画をアップロード\nytcli upload <file> -t <title> [-d, --description <desc>] [--tags <tags>] [--privacy <status>] [--thumbnail <path>] [--category <id>] [--publish-at <datetime>]\n```\n\n### アナリティクス\n\n```bash\n# チャンネル全体のアナリティクス\nytcli analytics [-d, --days <number>] [--json]\n\n# 特定動画のアナリティクス\nytcli analytics <videoId> [-d, --days <number>] [--json]\n```\n\n### チャンネル情報\n\n```bash\n# チャンネル情報を表示\nytcli channel [--json]\n```\n\n## プロファイル選択の優先順位\n\n1. `--profile <name>` オプション\n2. `YTCLI_PROFILE` 環境変数\n3. `~/.cerberus/youtube-cli/.current-profile` ファイル\n4. `default` プロファイル\n\n## プロファイル保存場所\n\n```\n~/.cerberus/youtube-cli/\n├── profiles/\n│   ├── default.json\n│   └── work.json\n└── .current-profile\n```\n\n## カテゴリID一覧\n\n| ID | カテゴリ |\n|----|----------|\n| 1 | Film & Animation |\n| 2 | Autos & Vehicles |\n| 10 | Music |\n| 15 | Pets & Animals |\n| 17 | Sports |\n| 19 | Travel & Events |\n| 20 | Gaming |\n| 22 | People & Blogs (default) |\n| 23 | Comedy |\n| 24 | Entertainment |\n| 25 | News & Politics |\n| 26 | Howto & Style |\n| 27 | Education |\n| 28 | Science & Technology |\n| 29 | Nonprofits & Activism |\n\n## 例\n\n```bash\n# 基本的なアップロード（非公開）\nytcli upload video.mp4 -t \"My Video\"\n\n# 説明・タグ付きで公開アップロード\nytcli upload video.mp4 -t \"Tutorial\" -d \"Description here\" --tags \"AI,tutorial\" --privacy public\n\n# サムネイル付きでアップロード\nytcli upload video.mp4 -t \"My Video\" --thumbnail thumb.jpg\n\n# 予約公開（日本時間）\nytcli upload video.mp4 -t \"My Video\" --publish-at \"2030-12-25T09:00:00+09:00\"\n\n# JSON形式で動画一覧を取得\nytcli list --json\n\n# 動画一覧を検索（取得したページ内）\nytcli list -m 50 --query \"tutorial\"\n\n# 次ページを取得（表示されたトークンを利用）\nytcli list --next-page-token <TOKEN>\n\n# 特定動画のタイトルを変更\nytcli update VIDEO_ID -t \"New Title\"\n\n# 過去7日間のアナリティクス\nytcli analytics -d 7\n\n# 別プロファイルで操作\nytcli list --profile work\n```\n\n## 環境変数\n\n| 変数名 | 説明 |\n|--------|------|\n| `YTCLI_PROFILE` | 使用するプロファイル名を指定 |\n\n## トラブルシューティング\n\n### 認証エラー（401/403）が発生する\n\n```bash\n# トークンを再取得\nytcli auth login --force\n```\n\n### 「プロファイルが見つかりません」エラー\n\n```bash\n# プロファイル一覧を確認\nytcli profile list\n\n# プロファイルを作成\nytcli profile create default\n```\n\n### YouTube Data API のクォータ制限\n\nYouTube Data API には1日あたりのクォータ制限があります。大量のアップロードや頻繁なAPI呼び出しを行う場合は、[Google Cloud Console](https://console.cloud.google.com/)でクォータ使用量を確認してください。\n\n### サムネイルのアップロードに失敗する\n\n- サポートされる形式: JPEG, PNG, GIF, BMP\n- 最大ファイルサイズ: 2MB\n- 推奨解像度: 1280x720 (16:9)\n\n## 開発\n\n```bash\n# リポジトリをクローン\ngit clone https://github.com/MASAKASUNO1/ytcli.git\ncd ytcli\n\n# 依存関係をインストール\nnpm install\n\n# CLIを実行\nnpm start -- list\n# または\nnode bin/ytcli.js list\n\n# テスト\nnpm test\n```\n\n## ライセンス\n\nMIT\n","readmeFilename":"README.md","_rev":"1-2b7484e31a71994bb71e78e6ff20b22f"}