Skip to main content
Glama
README.md
<img src="docs/logo.svg" alt="plaudo-yt logo" width="72">

# youtube-advanced-suite

**Your YouTube analytics: local, fast, and readable by your AI agents.**

<a href="docs/demo.mp4"><img src="docs/demo.gif" alt="plaudo-yt dashboard demo: switching periods and views with no loading" width="800"></a>

YouTube Studio is slow to load and slow to click through. The public YouTube Analytics API leaves out part of what Studio shows, such as thumbnail impressions and click-through rate, and new and returning viewers. Neither is built for AI agents.

`plaudo-yt` fixes all three. It captures your own channel's analytics in the background, with your own Google sign-in, and keeps them in a SQLite database on your machine. Every view of the local dashboard opens at once, the numbers build up into a history you can browse, compare and export, and your AI agent can read them through the built-in MCP server. Part of [Plaudo](https://plaudo.dev).

> **Unofficial.** This project is not made, endorsed or supported by YouTube or Google. YouTube is a trademark of Google LLC. YouTube's Terms of Service restrict access to the service by automated means, which may cover this use. Read [TERMS-NOTICE.md](TERMS-NOTICE.md): you accept it before the first capture, and you carry any consequence for your account.

Status: version 0.1.0. macOS is the tested platform; CI runs the tests on Linux and Windows too, but captures there are not tested.

## Quick start

You need Node.js 24.13 or newer, Google Chrome (or its path in `PLAUDO_CHROME`) and a YouTube channel you can open in Studio.

```sh
npm install -g plaudo-yt
plaudo-yt serve   # opens the dashboard on http://127.0.0.1:4319/
```

To build it from this repository instead, see [CONTRIBUTING.md](CONTRIBUTING.md).

The dashboard opens on a welcome screen. Click **Add your channel**, accept the notice, and sign in to Studio by hand in the Chrome window that opens (pick the channel if your account manages several). A first Full capture then starts, with its progress in the top bar. **Add a channel...** in the channel menu adds another one.

To look around first, `plaudo-yt serve --demo` shows two invented channels on port 4320, without touching your data.

From a terminal instead:

```sh
plaudo-yt init                 # shows the notice and asks you to type yes
plaudo-yt login --alias main   # sign in by hand in the Chrome window; saves the session, then runs a Full capture
plaudo-yt capture              # later captures: Quick over plain HTTP, no browser
plaudo-yt serve
```

`login` starts the Full capture by itself once the session is saved; Ctrl+C stops the capture and keeps the sign-in, and `--no-capture` skips it. For another channel, sign it in on a profile of its own (`plaudo-yt login --profile <name> --alias <name>`). `plaudo-yt doctor` says what is missing or wrong, and every command has `--help`.

## The dashboard

The channel's views are Overview, Traffic, Retention, Audience, Comments and History; each video has its own page with Summary, Retention, Traffic, Comments and History tabs. Periods are 7, 28, 90 or 365 days, all stored days or a custom range. Every table downloads as CSV.

![Channel overview](docs/screenshots/overview.png)

![A video's page, with its Summary, Retention, Traffic, Comments and History tabs](docs/screenshots/video.png)

![The channel's traffic sources with views, watch time, impressions and click-through rate](docs/screenshots/traffic.png)

![A video's audience retention curve](docs/screenshots/retention.png)

![The Comments view, read-only](docs/screenshots/comments.png)

## Captures

A capture sends Studio the requests its own pages send, over plain HTTP with the session saved at sign-in, and opens no browser. It only reads: it changes nothing on your channel. Each day captured adds to the history; a second capture on the same day replaces that day.

| Preset            | Reads                                                                                                                             |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `channel`         | Channel totals, daily numbers and breakdowns, every video's daily numbers, Studio's Audience tab                                  |
| `quick` (default) | Plus retention and insight tabs of recent videos and of up to 10 never asked, the Overview and Content tabs, comments, thumbnails |
| `standard`        | Plus per-video breakdowns, traffic source details such as search terms, the Research tab, retention of every video without one    |
| `full`            | Plus every breakdown the compatibility table vouches for, more comments and more thumbnails                                       |

`plaudo-yt capture --help` has the details and options, and `--dry-run` prints the plan without sending anything. A sign-in (`plaudo-yt login`, or **Add your channel** in the dashboard) starts a Full capture of the channel by itself; on a larger channel it stops at the 300-request cap as partial, and `plaudo-yt capture --resume` continues it.

A capture started in a terminal shows in an open dashboard as running, with its progress, like one started from the page. Ctrl+C, a closed terminal or a kill stops a terminal capture as cancelled; a run left running by a process that ended without stopping it (a crash, a power cut) is marked failed by the next capture or `serve`. Both can be continued with `plaudo-yt capture --resume`.

While `plaudo-yt serve` runs, it captures each signed-in channel on its own with the Quick preset every 6 hours; set Off, 12 or 24 hours in the Settings menu, or start it with `--no-auto-capture`. It pauses for a channel that needs a new sign-in and waits longer after repeated failures.

## Connect your AI

`plaudo-yt mcp` is a read-only [MCP](https://modelcontextprotocol.io) server, so an AI assistant can answer questions from the captured data; "Connect your AI (MCP)" in the Settings menu shows how to add it. Read [docs/mcp.md](docs/mcp.md) first: it says what your AI client does with the answers.

## Where your data lives

| Platform | Default data folder                                                  |
| -------- | -------------------------------------------------------------------- |
| macOS    | `~/Library/Application Support/plaudo-youtube`                       |
| Windows  | `%APPDATA%\plaudo-youtube`                                           |
| Linux    | `$XDG_DATA_HOME/plaudo-youtube` (or `~/.local/share/plaudo-youtube`) |

`--home <dir>` or `PLAUDO_HOME` picks another folder. It holds the database, the settings, the server's token, and per profile a Chrome profile and the saved Google session ([layout](docs/architecture.md#data-folder)). `plaudo-yt export` writes any table or view as CSV, JSON or NDJSON.

`plaudo-yt logout --profile <name>` deletes a saved session and keeps the history. To delete everything, stop `serve`, close the tool's Chrome window and delete the folder. The Google session stays valid until you sign out of your Google account.

## Privacy and security

Comments hold other people's names and words: they stay in your database and `export` leaves them out. The security model, what leaves your machine and how to report a vulnerability are in [SECURITY.md](SECURITY.md).

## Known limits

- When Studio changes, captures can come back partial or empty until the parsers are updated; the raw answers are kept, so `plaudo-yt reparse` can read them again.
- Unique, new and returning viewers are not in the totals (Studio's query answers zero for them); unique viewers show only where a video's insight card plots them.
- Long tables (search terms, suggesting videos, cities) hold only Studio's top rows; the dashboard says when one is cut off.
- A run sends at most 300 requests by default and stops on sign-out or repeated failures; `plaudo-yt capture --resume` continues it.
- How long a saved session lasts is not measured yet: expect to sign in again now and then.

## Roadmap

A desktop app around the same server, autoposting as a separate module with its own confirmation step, and optional use of the official YouTube Analytics and Reporting APIs with your own OAuth client.

## Development and licence

Setup, tests and the fixture rule are in [CONTRIBUTING.md](CONTRIBUTING.md), the code map in [docs/architecture.md](docs/architecture.md), changes in [CHANGELOG.md](CHANGELOG.md). MIT licence, see [LICENSE](LICENSE). The software is provided as is, without warranty of any kind.