# Open source at Indian Opinion

We publish 47 small repositories at [github.com/IndianOpinion](https://github.com/IndianOpinion): PHP libraries, WordPress plugins and two Workers, each doing one job. They share the same rules: PHP 8.1 or later, zero or near-zero runtime dependencies, MIT licence, drafts only for anything that writes content, a daily cap and kill switch on anything that spends, no prices shipped, and nothing that deletes operator data on its own. Every repo is at v0.1.0 and tested on stubs and a throwaway database. CI has not yet run on GitHub. [We open-sourced 47 small utilities in nine days](https://indianopinion.org/blog/forty-seven-small-utilities/) explains how they were made.

None is on Packagist yet. Install with Composer by adding the repo as a vcs repository entry:

{
"repositories": [
{"type": "vcs", "url": "https://github.com/IndianOpinion/llm-json-php"}
],
"require": {"indianopinion/llm-json-php": "^0.1"}
}

Report bugs on the issues tab of the repo concerned. Report security problems by email, as each repo's SECURITY.md describes.

## Model calls and shared services

- [llm-json-php: validated JSON from chat endpoints in plain PHP](https://indianopinion.org/blog/open-source/llm-json-php/). A dependency-free PHP library that turns one chat completions call into a schema-valid array or a typed exception, with a model chain, retries, cooldowns, credit-exhaustion handling and a guard on the text.

- [gen-queue: a capped job queue for paid generation work](https://indianopinion.org/blog/open-source/gen-queue/). A WordPress job queue for plugins that call a paid generation API in bulk. It has a daily spend cap that defaults to nothing running, a kill switch, retries and per-attempt cost records.

- [spend-meter: one ledger, price table and cap for model calls](https://indianopinion.org/blog/open-source/spend-meter/). A WordPress plugin that records every model call other plugins make and decides before each call whether it may spend. It has one ledger, one operator-owned price table, daily and monthly caps and a kill switch.

- [prompt-library: versioned prompt templates for WordPress](https://indianopinion.org/blog/open-source/prompt-library/). A WordPress plugin that stores prompt templates with typed variables as immutable numbered versions, renders them for other plugins by slug, and offers a capped test runner.

## Importing and feeds

- [feed-rules: include, exclude and mapping rules for imports](https://indianopinion.org/blog/open-source/feed-rules/). A WordPress plugin that puts include, exclude, category, tag and author rules for imported items in one place, matches whole words in any script, and tests each rule on the last hundred items before it may act.

- [feed-health: per-feed monitoring for WordPress importers](https://indianopinion.org/blog/open-source/feed-health/). A WordPress plugin that tracks yield, failures, HTTP status and duplicate rate for every feed an importer fetches, and alerts when a feed goes quiet, starts failing, stops being fetched or recovers.

- [import-scheduler: one cron lane and one lock per import rule](https://indianopinion.org/blog/open-source/import-scheduler/). A WordPress plugin that runs each import rule on its own interval with its own database lock and history, so one slow or failing source cannot starve the others.

- [newsapi-pull: NewsAPI headlines into WordPress drafts](https://indianopinion.org/blog/open-source/newsapi-pull/). A WordPress plugin that pulls headlines from NewsAPI into drafts only, with URL-hash de-duplication, source attribution, a daily quota meter and a hard refusal to run a free-tier key on a production site.

- [gnews-unwrap: turn Google News links into publisher URLs](https://indianopinion.org/blog/open-source/gnews-unwrap/). A dependency-free PHP library that turns Google News wrapper links back into publisher URLs, with outlet keys and article keys so attribution and de-duplication work. It has a budget, a circuit breaker and a cache.

- [readable-extract: article body extraction with confidence](https://indianopinion.org/blog/open-source/readable-extract/). A plain PHP library that extracts the body, title, authors, dates and lead image from a news page, says where each field came from, and refuses to pass off a biography or a section front as an article.

- [outlet-key: which newsroom, which article, from a URL](https://indianopinion.org/blog/open-source/outlet-key/). A PHP library that turns a news URL into an outlet key and an article key, so mirrors and AMP paths collapse and sibling titles under one portal stay separate.

- [echo-skip-seen: stop importers re-downloading seen articles](https://indianopinion.org/blog/open-source/echo-skip-seen/). A WordPress plugin that answers a feed importer's duplicate filter from a small table of URL hashes, so an article already imported is never downloaded again. Fails open, and works with Echo RSS Post Importer or any importer.

- [echo-robots-guard: honour robots.txt before an import download](https://indianopinion.org/blog/open-source/echo-robots-guard/). A WordPress plugin that reads the publisher's robots.txt under RFC 9309 before Echo RSS Post Importer downloads an article page, and skips the item when the rules disallow it for your product token.

- [feed-item-brief: attributed summary drafts from feed items](https://indianopinion.org/blog/open-source/feed-item-brief/). A WordPress plugin that turns one feed item into a short summary draft for an editor, with an attribution block the plugin renders itself. Written from scratch from an idea, v0.1.0, tested on stubs and a throwaway database.

## Text, scripts and similarity

- [script-share: letter share by writing system, no model](https://indianopinion.org/blog/open-source/script-share/). A dependency-free PHP library that reports what share of a string's letters fall in each writing system, to catch a model answering in the wrong language or one Indic script bleeding into another.

- [simhash-unicode: 64-bit simhash for short text in any script](https://indianopinion.org/blog/open-source/simhash-unicode/). A PHP library for 64-bit simhash fingerprints of short text, with Hamming distance and near-duplicate search. It tokenises every script and refuses to call two texts near when there is too little signal.

- [ascii-slugs: readable ASCII slugs from non-Latin titles](https://indianopinion.org/blog/open-source/ascii-slugs/). A dependency-free PHP transliteration library and a thin WordPress plugin that replace percent-encoded, truncated slugs with short ASCII ones, plus a dry-run-first repair command for slugs already cut.

- [packed-vectors: exact vector search in a flat file](https://indianopinion.org/blog/open-source/packed-vectors/). A PHP library that stores embeddings in a packed float32 file, rebuilds it atomically, and scans it by exact cosine similarity in bounded memory, for corpora too small to justify a vector database.

- [post-embeddings: related posts and semantic search for WordPress](https://indianopinion.org/blog/open-source/post-embeddings/). A WordPress plugin that embeds each published post in the background, keeps a packed sidecar file for fast similarity scans, and offers related-posts and semantic search blocks under daily caps and a kill switch.

- [translate-sidecar: post translations kept in their own table](https://indianopinion.org/blog/open-source/translate-sidecar/). A WordPress plugin that stores translations as rows instead of duplicate posts, routes language prefixes to them, and refuses machine output that is partial or in the wrong script. Nothing goes live without human approval.

## Images and media

- [featured-from-source: checked featured images from the source page](https://indianopinion.org/blog/open-source/featured-from-source/). A WordPress plugin that finds a featured image on the page a post is based on, checks it, copies it into the media library with its credit and provenance, and never replaces an editor's choice.

- [featured-from-prompt: suggested featured images held for review](https://indianopinion.org/blog/open-source/featured-from-prompt/). A WordPress plugin that builds a prompt from a post, asks any image API through an adapter, checks the file that comes back, and holds it for an editor to accept. Written from scratch from an idea, v0.1.0.

- [srcset-truth: honest image sizes and WebP for WordPress](https://indianopinion.org/blog/open-source/srcset-truth/). A WordPress plugin that replaces core's default sizes attribute with the real width of each image slot, serves WebP siblings through picture, and audits the before-and-after image weight of a page.

- [share-cards: social preview images rendered on first request](https://indianopinion.org/blog/open-source/share-cards/). A WordPress plugin that draws a 1200 by 630 headline card for posts, categories and tags the first time a scraper asks, keeps it on disk, and uses featured images as they are when they already fit.

- [alt-text-fill: reviewed alt text for the media library](https://indianopinion.org/blog/open-source/alt-text-fill/). A WordPress plugin that finds images with no alt text, asks a vision model for a description, and queues every suggestion for review. Nothing is written without approval, and every write can be undone. Written from scratch, v0.1.0.

- [uploads-on-r2: serve WordPress uploads from R2](https://indianopinion.org/blog/open-source/uploads-on-r2/). A Cloudflare Worker that answers WordPress /wp-content/uploads/ URLs from an R2 bucket and falls back to the origin, with a deny list for private folders and a copy-only sync script.

- [read-aloud: approved audio versions of WordPress posts](https://indianopinion.org/blog/open-source/read-aloud/). A WordPress plugin that turns a post into an audio file once, through any text-to-speech API, and shows a player after an editor approves it. It resynthesises only when the spoken words change. Written from scratch, v0.1.0.

- [audio-to-post: audio recordings into transcripts and drafts](https://indianopinion.org/blog/open-source/audio-to-post/). A WordPress plugin that turns an uploaded recording or a podcast episode into a transcript and a draft post, with speaker turns and timestamps, a cost estimate the editor confirms first, and no publishing.

- [yt-to-post: one YouTube video into one WordPress draft](https://indianopinion.org/blog/open-source/yt-to-post/). A WordPress plugin that turns a video's captions or a supplied transcript into a structured draft with the video embedded and the source credited. It never publishes, and it checks every quote against the transcript.

## Caching, serving and search engines

- [wp-edge-cache-headers: per-template Cache-Control for WordPress](https://indianopinion.org/blog/open-source/wp-edge-cache-headers/). A WordPress plugin that sends one correct Cache-Control per template, never for logged-in, preview or cookie pages, and generates the matching nginx snippet and Cloudflare cache rule so all three layers agree.

- [query-id-cache: remember post IDs for slow WP_Query lists](https://indianopinion.org/blog/open-source/query-id-cache/). A WordPress plugin that remembers the post IDs and row counts of slow secondary queries for a few minutes and hands them back to anonymous requests, with invalidation on every change that could alter a list.

- [comments-through-cache: held comments behind a page cache](https://indianopinion.org/blog/open-source/comments-through-cache/). A WordPress must-use plugin that keeps a held comment visible to its author on refresh, and purges only the affected article URLs when a moderator approves or removes a comment.

- [cloudflare-realip-nginx: keep nginx's real-IP list current](https://indianopinion.org/blog/open-source/cloudflare-realip-nginx/). A bash tool that keeps nginx's trusted-proxy list in step with Cloudflare's published ranges, tests the new snippet before installing it, and reloads nginx only when the content changed.

- [indexnow-batch: batched IndexNow pings for WordPress](https://indianopinion.org/blog/open-source/indexnow-batch/). A WordPress plugin that tells IndexNow search engines about new and updated pages in scheduled batches, never on the publish path, and re-checks every URL at send time.

- [jetpack-sync-quiet: stop Jetpack's sync loopbacks](https://indianopinion.org/blog/open-source/jetpack-sync-quiet/). A small WordPress plugin that makes Jetpack read dedicated sync as off, so sync runs from cron and at the end of write requests instead of loopback requests after page views.

- [sigv4-php: AWS request signing in plain PHP, no SDK](https://indianopinion.org/blog/open-source/sigv4-php/). A dependency-free PHP library for AWS Signature Version 4 signing, presigned URLs and an instance-role credential chain, for sites that make a handful of AWS calls and do not want the SDK.

## Mail and accounts

- [signed-mail-gateway: signed HTTPS mail for WordPress](https://indianopinion.org/blog/open-source/signed-mail-gateway/). A Cloudflare Worker that sends mail only for HMAC-signed, non-replayed requests, plus a WordPress plugin that routes wp_mail() through it and falls back to SMTP only when the message certainly did not go out.

- [wp-mail-from: a real From address for every WordPress email](https://indianopinion.org/blog/open-source/wp-mail-from/). A must-use WordPress plugin that sets a real From address, From name and envelope sender on every wp_mail() message, without breaking mail that sets its own From on purpose.

## Editor tools

- [editor-ai-sidebar: one editor sidebar with an approve step](https://indianopinion.org/blog/open-source/editor-ai-sidebar/). A WordPress block editor host that shows every AI action your plugins register in one sidebar, with one result format and one server-checked approve step before anything is written. It makes no model calls itself.

- [headline-options: scored headline candidates in the editor](https://indianopinion.org/blog/open-source/headline-options/). A WordPress plugin that, on a click, asks a model for several headline candidates and scores each one and the current headline with plain rules. It never changes a headline on its own. Written from scratch from an idea, v0.1.0.

- [meta-writer: reviewed SEO titles and descriptions for posts](https://indianopinion.org/blog/open-source/meta-writer/). A WordPress plugin that drafts an SEO title and meta description for each post and holds them as suggestions until an editor accepts them. It never overwrites a value a person wrote. Written from scratch from an idea, v0.1.0.

- [tldr-block: approved summaries at the top of long posts](https://indianopinion.org/blog/open-source/tldr-block/). A WordPress plugin that drafts a short summary for long posts, holds it for an editor to approve, shows only approved text, and withdraws it when the post changes materially. Written from scratch from an idea, v0.1.0.

- [comment-draft-replies: held reply drafts for moderators](https://indianopinion.org/blog/open-source/comment-draft-replies/). A WordPress plugin that drafts a reply to each eligible reader comment and holds it beside the comment. Nothing is published until a logged-in moderator clicks. Written from scratch from an idea, v0.1.0.

- [wc-product-copy: draft product copy from store data](https://indianopinion.org/blog/open-source/wc-product-copy/). A WooCommerce plugin that writes product descriptions as drafts from the store's own data. It never overwrites text a person wrote, and every bulk run starts with a dry run.

- [crosspost: announce new posts on four networks safely](https://indianopinion.org/blog/open-source/crosspost/). A WordPress plugin that announces a published post on X, Threads, Bluesky and Mastodon through a retry queue, and treats a call with an unknown outcome as possibly live. It never edits or deletes a remote post.

- [sse-chat-widget: a streamed chat box that answers from your posts](https://indianopinion.org/blog/open-source/sse-chat-widget/). A WordPress chat widget that answers readers from the site's own published posts, streams the answer over Server-Sent Events, and keeps the prompt, model, key and limits on the server.

- [finetune-export: export posts as JSONL without leaking drafts](https://indianopinion.org/blog/open-source/finetune-export/). A WordPress plugin that exports published posts as JSONL for fine-tuning, with field selection, name and address redaction, a preview and a local token estimate. Files stay in a protected directory behind a signed, expiring link.

Canonical: https://indianopinion.org/blog/open-source/

AI disclosure: Every summary and comment here is written by AI and published automatically, without a person reviewing each article. We do no original reporting. How this works: https://indianopinion.org/ai-use-policy/
