# lv24-seo-optimizer

> Free-first SEO control plane for humans and AI agents: Google Search Console, Yandex Webmaster,
> Yandex Metrika, Bing/IndexNow, CrUX, PageSpeed Insights, site crawl and nginx logs in one model,
> with scheduled email reports, an MCP server, a JSON-first CLI and portable agent skills.

## Surface

- Engine `lv24-seo 0.9.0` (release candidate; `0.8.0` is the current published build on PyPI,
  npm and the MCP Registry, 2026-11-16): 6 provider adapters (GSC, Yandex Webmaster, Yandex
  Metrika, Bing/IndexNow, CrUX, PSI) plus a 30-rule crawl. Yandex Metrika is a separate `metrika`
  auth provider (`yandex_metrika_token`), not the Webmaster token.
- CLI: 22 top-level commands (15 groups + 7 commands), every command with `--json`.
- Bing writes: `sitemap submit --provider bing` calls the JSON `SubmitFeed` endpoint through the
  two-phase write gate; `indexnow submit --from-sitemap` reads a bounded sitemap (root + five
  children, 10k URLs) and resolves host/key from `[providers.bing]`. GSC sitemap submit and Bing
  sitemap delete stay `WRITE_DISABLED`.
- Core Web Vitals writer: `lv24-seo cwv collect --url URL [--url URL ...] --device all --source crux`
  persists CrUX URL+device p75 rows (`metric_daily`: `source=crux`, `scope=<device>`, `key=<url>`)
  for the weekly `cwv` section; PSI lab rows are returned but never persisted.
- Backup restore has two modes: `--to DIR` extracts into a new directory (no write gate, never
  overwrites; an existing directory is refused) and `--config ABS` replaces the current workspace
  only with `--allow-write --confirm TOKEN`.
- MCP: 12 tools (10 read-class, including 3 local-state writers with `readOnlyHint: false`; 2 gated
  provider writes — `seo_sitemap_submit` is wired for Bing submit, `seo_recrawl_request` and the
  GSC/delete sitemap paths return `WRITE_DISABLED`), 3 resources, 3 prompts.
- New in 0.9.0: Bing sitemap submit (JSON `SubmitFeed`), one-click IndexNow from the project
  sitemap with config host/key/keyLocation, optional `provider`/`property`/`sitemap_url` on
  `seo_sitemap_submit`, and public `providers.bing.indexnow_key` /
  `providers.bing.indexnow_key_location`. No new MCP tool; schema stays v4.
- New in 0.8.0: `cwv collect` URL+device CrUX writer (PSI lab rows never persisted), richer Yandex
  Webmaster indicators (`avg_click_position`, `query_id`, `extra_indicators`, `site_problems`,
  `HTTP_2XX`…`OTHER` series), non-destructive `backup restore --to DIR`, and `schedule install`
  plan-by-default with `status`/`uninstall`. No new MCP tool; schema stays v4.
- New in 0.7.0: `portfolio list` (read-only multi-site roll-up), two-phase `backup restore`,
  persisted Yandex indexing events (schema v4), and a Core Web Vitals by template/device section in
  `report weekly`. No new MCP tool.
- New in 0.6.0: `logs analyze` + `seo_log_analysis` (one nginx JSON log, UA-only bot triage,
  100 MiB cap, read-only), an attributed change digest in `report weekly`, the `tasks` finding
  lifecycle (schema v3), and `backup create` portable zip bundles.
- Skills: `seo-weekly`, `seo-indexing-triage`, `seo-technical-audit`.
- Desktop `0.6.0` (current desktop release): Windows NSIS + portable ZIP, Linux AppImage/deb/rpm,
  macOS arm64/x64 DMG; signed updates for NSIS, `.app` and AppImage; bundles engine `0.8.0`; asset
  names use `0.6.0` / `-0.6.0-`.
- Desktop and CLI share one OS keychain entry per provider (service `lv24-seo`); the opt-in
  `<data-dir>/secrets.json` fallback is shared only with the same workspace/data directory.

## Docs

- [Documentation portal](https://seo.lv24.by/): en/ru/zh guides, CLI/config reference, desktop and MCP docs
- [README](README.md): what it is, install, supported sources
- [AGENTS.md](AGENTS.md): contract for AI agents working in the repo
- [Implementation plan](docs/plans/2026-11-10-implementation-plan.md): waves and work packages
- [Architecture](docs/architecture.md): layers, data model, provider contracts
- [Data sources and limits](docs/data-sources.md): what each API can and cannot do
- [MCP tool surface](docs/mcp.md): tool names, inputs, outputs, annotations
- [CLI reference](docs/cli.md): commands, JSON envelope, exit codes
- [Configuration](docs/config.md): seo.toml, env vars, secrets
- [Scheduling and delivery](docs/scheduling.md): cron, systemd, Task Scheduler, SMTP, Telegram
- [Skills](docs/skills.md): skill format and mirrors
- [Release notes 0.9.0](docs/releases/0.9.0.md): Bing sitemap submit and one-click IndexNow (RC)
- [Release notes 0.8.0](docs/releases/0.8.0.md): CWV writer, Yandex indicators, safe restore, schedule lifecycle
- [Release notes 0.7.0](docs/releases/0.7.0.md): coverage release (portfolio, restore, indexing events, CWV)
- [Release notes 0.6.0](docs/releases/0.6.0.md): insights release (logs, digest, tasks, backup)
- [Release notes 0.5.3](docs/releases/0.5.3.md): published P0 hardening release
- [Desktop app](https://github.com/LevapVeeskela/lv24-seo-optimizer-desktop): Tauri shell, assets and update matrix
- [Desktop plan](docs/plans/2026-11-14-seo-desktop.md): shell scope and milestones
- [Security](SECURITY.md): token handling, write gating

## Examples

```bash
lv24-seo sitemap submit --provider bing --config ./seo.toml --json   # dry run; site/sitemap from config
lv24-seo sitemap submit --provider bing --allow-write --confirm TOKEN # JSON SubmitFeed
lv24-seo indexnow submit --from-sitemap --config ./seo.toml --json    # host/key from [providers.bing]
lv24-seo indexnow submit --from-sitemap --allow-write --confirm TOKEN # re-fetches; changed sitemap aborts
lv24-seo schedule install --kind weekly --config ./seo.toml              # plan only: dry_run=true, installed=false
lv24-seo schedule install --kind weekly --config ./seo.toml --allow-write  # writes the cron block / systemd units / task
lv24-seo schedule status --kind weekly --config ./seo.toml --json        # read-only: state, paths, matches
lv24-seo schedule uninstall --kind weekly --config ./seo.toml --allow-write  # removes exactly the generated job
```

## Machine-readable

- [schemas/tools.json](schemas/tools.json): generated tool schemas for non-MCP agents
- [skills/manifest.json](skills/manifest.json): skill index with schema hash

## Notes for LLM crawlers

Content is licensed Apache-2.0. Provider data is never shipped in this repo; fixtures are synthetic.
