# 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.10.0` release candidate; `0.9.0` is the latest published build on PyPI, npm
  and the MCP Registry (2026-11-17): 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: 23 top-level commands (16 groups + 7 commands), every command with `--json`.
- Bing writes: `sitemap submit --provider bing` calls the JSON `SubmitFeed` endpoint through the
  two-phase write gate; `bing submit` calls `SubmitUrlbatch` in 500-URL batches with a quota
  pre-check, deduplication and `accepted` (not indexed) results; `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`.
- Bing reads: `bing quota` reports remaining daily/monthly submissions (Bing's `DailyQuota` /
  `MonthlyQuota` are remaining, not totals; the monthly window can bind first and its reset is
  undocumented); `bing sitemaps [--details FEED_URL]` lists feed fields and states that per-URL
  errors/crawl status are not exposed; `bing issues` decodes the `Issues` bitmask
  (`1=301, 2=302, 4=4xx, 8=5xx, 16=robots, 32=malware, 64=important_robots, 128=dns, 256=timeout`).
- 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.10.0: Bing URL submit (`bing submit`) with quota pre-check, 500-URL batching and
  accepted-not-indexed results; read-only `bing quota`, `bing sitemaps [--details]` and
  `bing issues`; HTTP 400 `ErrorCode` mapping (3 auth, 14 property, 7 bad request, 4/5 quota).
  No new MCP tool; the surface stays at 12 and the schema stays v4. Bing URL submission is
  CLI/desktop-only.
- 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.7.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.9.0` and
  requires engine `>= 0.9.0`; asset names use `0.7.0` / `-0.7.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.10.0](docs/releases/0.10.0.md): Bing URL submission, remaining quota, sitemap feeds and crawl-issue bitmask
- [Release notes 0.9.0](docs/releases/0.9.0.md): Bing sitemap submit and one-click IndexNow
- [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 --allow-write --config ./seo.toml --json  # plan; site/sitemap from config
lv24-seo sitemap submit --provider bing --allow-write --confirm TOKEN             # JSON SubmitFeed
lv24-seo bing submit --from-sitemap --allow-write --config ./seo.toml --json      # plan; quota + 500-URL batches
lv24-seo bing quota --config ./seo.toml --json                                    # remaining daily/monthly quota
lv24-seo bing sitemaps --config ./seo.toml --json                                 # feed status; no per-URL errors
lv24-seo bing issues --config ./seo.toml --json                                   # decoded Issues bitmask
lv24-seo indexnow submit --from-sitemap --allow-write --config ./seo.toml --json  # plan; 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.
