<h1 align="center">googx</h1>

<p align="center">
  <strong>Accelerate Google Search indexing from your terminal.</strong>
</p>

<p align="center">
  <img alt="npm version" src="https://img.shields.io/npm/v/googx?color=212121&label=">
  <img alt="license" src="https://img.shields.io/npm/l/googx?color=212121">
  <br>
  <a href="https://github.com/antfu/eslint-config#readme">
    <img alt="code style" src="https://antfu.me/badge-code-style.svg">
  </a>
</p>

<p align="center">
  Submit URLs, ping sitemaps, and monitor indexing status — without leaving the CLI.
</p>

---

## Why googx?

Getting a new site or fresh pages into Google can take days or weeks if you wait for natural crawling alone. **googx** wraps the workflows developers already rely on — Indexing API, sitemap pings, Search Console checks — into a single, scriptable command-line tool.

Built for CI pipelines, static site deploy hooks, and one-off submissions after a release.

## Features

| Capability | Status |
| --- | --- |
| URL submission via Google Indexing API | 🚧 In progress |
| Bulk submit from file / stdin | 🚧 Planned |
| Sitemap ping (`sitemap.xml`) | 🚧 Planned |
| IndexNow protocol support | 🚧 Planned |
| Search Console indexing status lookup | 🚧 Planned |
| Deploy-hook integration (Vercel, Netlify, GitHub Actions) | 🚧 Planned |

> **Note:** The CLI is under active development. Running `npx googx` currently prints `WIP` while core commands are being implemented.

## Quick start

```bash
npx googx
# WIP
```

Install globally (optional):

```bash
npm i -g googx
googx
```

## Planned usage

```bash
# Submit a single URL after deploy
googx submit https://example.com/blog/new-post

# Bulk submit from a list
googx submit --file urls.txt

# Ping sitemap after build
googx sitemap https://example.com/sitemap.xml

# Check indexing status
googx status https://example.com/blog/new-post
```

Authentication will use a Google Cloud service account JSON key or OAuth via Search Console — details coming in the first stable release.

## Roadmap

- [ ] `submit` — Indexing API + fallback sitemap ping
- [ ] `sitemap` — notify Google of updated sitemaps
- [ ] `status` — query URL indexing state
- [ ] `init` — guided setup for credentials and site verification
- [ ] GitHub Action / shell hook examples in `examples/`

Track progress in [Issues](https://github.com/Zhengqbbb/googx/issues) and [Discussions](https://github.com/Zhengqbbb/googx/discussions).

## Development

```bash
git clone https://github.com/Zhengqbbb/googx.git
cd googx
pnpm i
pnpm dev
```

## Related

- [Google Indexing API](https://developers.google.com/search/apis/indexing-api/v3/quickstart)
- [Google Search Console](https://search.google.com/search-console)
- [IndexNow](https://www.indexnow.org/)

## License

MIT © [Q.Ben Zheng](https://github.com/Zhengqbbb)
