Metadata-Version: 2.5
Name: warmknock
Version: 0.5.0
Summary: Warm, proof-first engineering briefs & draft-only startup outreach engine.
Project-URL: Homepage, https://github.com/Sreejesh06/warmknock
Project-URL: Repository, https://github.com/Sreejesh06/warmknock
Project-URL: Issues, https://github.com/Sreejesh06/warmknock/issues
Project-URL: Changelog, https://github.com/Sreejesh06/warmknock/blob/main/CHANGELOG.md
Project-URL: Sponsor, https://github.com/sponsors/Sreejesh06
Author: Sreejesh S
License-Expression: MIT
License-File: LICENSE
Keywords: cli,developer-tools,mcp,open-source,outreach,startups,typst
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Communications :: Email
Requires-Python: >=3.11
Requires-Dist: anthropic>=0.40
Requires-Dist: beautifulsoup4>=4.12
Requires-Dist: dnspython>=2.6
Requires-Dist: feedparser>=6.0
Requires-Dist: google-api-python-client>=2.130
Requires-Dist: google-auth-oauthlib>=1.2
Requires-Dist: google-auth>=2.30
Requires-Dist: google-genai<3,>=1.0
Requires-Dist: httpx>=0.27
Requires-Dist: mcp>=1.2
Requires-Dist: pydantic-settings>=2.3
Requires-Dist: pydantic>=2.7
Requires-Dist: pypdf>=5.0
Requires-Dist: rich>=13.7
Requires-Dist: typer>=0.12
Requires-Dist: typst>=0.12
Description-Content-Type: text/markdown

<div align="center">

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/Sreejesh06/warmknock/main/assets/banner-dark.svg">
  <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/Sreejesh06/warmknock/main/assets/banner-light.svg">
  <img alt="warmknock: warm engineering outreach grounded in open issues and docs" src="https://raw.githubusercontent.com/Sreejesh06/warmknock/main/assets/banner-light.svg" width="100%">
</picture>

<br>

[![CI](https://github.com/Sreejesh06/warmknock/actions/workflows/ci.yml/badge.svg)](https://github.com/Sreejesh06/warmknock/blob/main/.github/workflows/ci.yml)
[![Release v0.5.0](https://img.shields.io/badge/release-v0.5.0-C85A32.svg)](https://github.com/Sreejesh06/warmknock/blob/main/CHANGELOG.md)
[![PyPI](https://img.shields.io/pypi/v/warmknock?color=C85A32)](https://pypi.org/project/warmknock/)
[![npm](https://img.shields.io/npm/v/warmknock?color=6E655F)](https://www.npmjs.com/package/warmknock)
[![License: MIT](https://img.shields.io/badge/license-MIT-231E1C.svg)](https://github.com/Sreejesh06/warmknock/blob/main/LICENSE)
[![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-6E655F.svg)](https://github.com/Sreejesh06/warmknock/blob/main/pyproject.toml)
[![MCP Server](https://img.shields.io/badge/MCP-warmknock--mcp-C85A32.svg)](#mcp-setup)
[![Agent Skill](https://img.shields.io/badge/skill-npx_skills_add-6E655F.svg)](https://github.com/Sreejesh06/warmknock/blob/main/.agents/skills/warmknock/SKILL.md)
[![Sponsor](https://img.shields.io/badge/sponsor-GitHub_Sponsors-C85A32.svg)](https://github.com/sponsors/Sreejesh06)

<p>
  <a href="#install"><strong>Install</strong></a> ·
  <a href="#first-five-minutes"><strong>First 5 min</strong></a> ·
  <a href="#mcp-setup"><strong>MCP Setup</strong></a> ·
  <a href="#where-data-lives"><strong>Data Folder</strong></a> ·
  <a href="#safety-defaults"><strong>Safety</strong></a> ·
  <a href="https://github.com/Sreejesh06/warmknock/blob/main/docs/ARCHITECTURE.md"><strong>Architecture</strong></a> ·
  <a href="https://github.com/Sreejesh06/warmknock/blob/main/docs/DEPLOYMENT.md"><strong>Deploy</strong></a> ·
  <a href="https://github.com/Sreejesh06/warmknock/blob/main/docs/SPONSORING.md"><strong>Sponsor</strong></a>
</p>

</div>

`warmknock` is a local Python CLI and 7-tool MCP server (`warmknock-mcp`) for proof-first engineering outreach to under-25-person startups. It scans a company's open GitHub issues, `/docs`, `/changelog`, and Hacker News threads, compiles a 1-page Typst engineering brief locally in ~80ms, checks prose against 19 lint rules, and stages a 70-to-95-word plain-text draft in Gmail without ever sending mail automatically.

---

## Requirements

- **Runtime:** Install [uv](https://docs.astral.sh/uv/) (`curl -LsSf https://astral.sh/uv/install.sh | sh` on macOS/Linux, or `powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"` on Windows). `uv` fetches a standalone Python 3.11+ runtime automatically, so you do not need Python pre-installed. If you run via `npx`, install Node.js 18+ alongside `uv` or `pipx`.
- **API keys and Google OAuth are optional for core tools:**

| Commands / Workflow | LLM API Key (`GEMINI_API_KEY` or `ANTHROPIC_API_KEY`) | Google Cloud OAuth (`credentials.json`) |
| :--- | :--- | :--- |
| `init`, `doctor`, `tiny-fix`, `lint`, `prep`, `studio`, `status`, `mark`, `export`, `export-site` | None *(note: `doctor` checks whether an LLM key is set for CLI drafting)* | None |
| MCP server (`warmknock-mcp`) & Agent Skill (`npx skills add Sreejesh06/warmknock`) | None *(your coding agent does the reasoning)* | None *(returns 1-click Gmail Web Compose URLs)* |
| `research <url>`, `target <url> --compose-only`, `run --compose-only`, `--dry-run` | Required in `~/.warmknock/.env` *(free Gemini key at [aistudio.google.com/apikey](https://aistudio.google.com/apikey))* | None *(stages locally + prints a 1-click Gmail Web Compose link)* |
| `run`, `target <url>`, `track`, `followups`, `sync-sheet` | Required for drafting (`run`, `target`, `followups`, `brief`) | Required in `~/.warmknock/credentials.json` *(creates Gmail drafts or reads mailbox stages)* |

Setting `GITHUB_TOKEN` (optional) raises GitHub REST API rate limits from 60 to 5,000 requests/hour during `init` and `tiny-fix`.

---

## Install

Pick any launcher; all four run the same `warmknock` CLI and `warmknock-mcp` server:

| Launcher | Command | Notes |
| :--- | :--- | :--- |
| **uvx** *(zero install)* | `uvx warmknock --version` | Nothing to install globally; fetches Python 3.11+ and caches wheels |
| **npx** *(Node 18+)* | `npx warmknock --version` | Zero-dependency wrapper that delegates to `uvx` (or `pipx`) at the matching PyPI version |
| **uv tool** *(daily CLI)* | `uv tool install warmknock` | Puts `warmknock` and `warmknock-mcp` permanently on your `PATH` |
| **pipx** *(daily CLI)* | `pipx install warmknock` | Installs into an isolated `pipx` venv (requires Python 3.11+) |

Using Claude Code, Cursor, Codex, Windsurf, or Antigravity? Add the agent skill as well:

```bash
npx skills add Sreejesh06/warmknock
```

---

## First five minutes

Every command below works with `uvx warmknock ...`, `npx warmknock ...`, or bare `warmknock ...` (after `uv tool install warmknock` or `pipx install warmknock`).

### 1. Build your verified profile (no API keys needed)

Extract visible text and hidden LaTeX `/Annots` links from your resume PDF, cross-check your public GitHub repos and merged external PRs, and create `~/.warmknock/profile.json` plus `~/.warmknock/.env`:

```bash
uvx warmknock init --resume cv.pdf --github your-github-handle
```

### 2. Scan a startup for unclaimed issues and broken docs (no API keys needed)

Find open GitHub issues with `0` cross-referenced open pull requests, HTTP `404` links in `/docs`, and outdated PyPI/npm install pins:

```bash
uvx warmknock tiny-fix https://linear.app
```

Results save to `~/.warmknock/fixes/<slug>/PATCH_BRIEF.md`.

### 3. Lint prose offline or compile a 1-page Typst brief + draft

Run the 19-rule prose linter directly on any draft text or Markdown file with zero keys:

```bash
uvx warmknock lint "Hi Karri, I reproduced issue #142 in your Python SDK and have a 20-line fix ready."
```

To run live company signal collection, compile an ~80ms local Typst PDF brief, and stage a plain-text draft with a 1-click Gmail Web Compose link (still zero Google OAuth), add `GEMINI_API_KEY` or `ANTHROPIC_API_KEY` to `~/.warmknock/.env`:

```bash
# macOS / Linux
echo 'GEMINI_API_KEY=your_key_here' >> ~/.warmknock/.env

# Windows PowerShell
Add-Content -Path "$env:USERPROFILE\.warmknock\.env" -Value 'GEMINI_API_KEY=your_key_here'

# Verify data folder, profile.json, LLM key, Typst compiler, and SQLite database (exits 0 when ready)
uvx warmknock doctor

uvx warmknock research https://linear.app --mode internship --note "reproduced retry race in python sdk #142"
```

Running `uvx warmknock doctor` (or `uvx warmknock doctor --json`) before setting an API key exits `1` and prints exact recovery commands for any `[FAIL]` check while marking Google OAuth `[OPT]`.

### 4. Review in the localhost Studio (`http://127.0.0.1:7842`)

```bash
uvx warmknock studio
```

Preview your compiled Typst PDF, inspect live prose lint highlights, edit the subject or body, and click **Open in Gmail** to launch a pre-filled Gmail Web Compose tab (`mail.google.com/mail/?view=cm`) where you review and click Send yourself.

---

## Where data lives

`warmknock` never writes user data inside the installed Python or npm package. On every command, the active data folder resolves in this order:

1. **`$WARMKNOCK_HOME`** when set (`export WARMKNOCK_HOME=/path/to/folder` on macOS/Linux, or `$env:WARMKNOCK_HOME = "C:\path\to\folder"` in Windows PowerShell).
2. **Current working directory (`./`)** when `./profile.json` already exists there, so a cloned source checkout keeps working in place.
3. **`~/.warmknock/`** by default (`%USERPROFILE%\.warmknock\` on Windows).

| Path inside `~/.warmknock/` | Created by | What it holds |
| :--- | :--- | :--- |
| `profile.json` | `warmknock init` | Verified resume + GitHub URL and metric allowlist (`0600` permissions on POSIX) |
| `.env` | `warmknock init` | Optional `GEMINI_API_KEY` / `ANTHROPIC_API_KEY`, `--scraper` / `--search` keys, and pipeline settings (`0600` on POSIX) |
| `outreach.db` | First `research`, `run`, `status`, or `studio` | Local SQLite database tracking contacted domains, stages, drafts, and deduplication |
| `research/` | `research`, `run`, `target`, MCP | Compiled 1-page Typst briefs (`*.pdf`) and local company research Markdown (`*.md`) |
| `fixes/` | `warmknock tiny-fix`, MCP | Unclaimed-issue and broken-docs briefs (`fixes/<slug>/PATCH_BRIEF.md`) |
| `credentials.json` & `token.json` | User-supplied / OAuth login | Optional Google Cloud OAuth client secret and cached Gmail/Sheets token (`0600` on POSIX) |

Explicit path flags such as `warmknock export --csv ./out.csv` and `warmknock export-site --output-dir ./docs/site` write to the exact path you pass relative to your current directory.

---

## MCP setup

`warmknock-mcp` exposes 7 tools over `stdio` (`discover_startups`, `inspect_company_signals`, `find_tiny_fixes`, `generate_teardown_pdf`, `lint_draft`, `draft_outreach_email`, and `sync_crm`) with zero LLM API keys required.

### Claude Desktop, Cursor, and Antigravity

Add `warmknock` to your client config file:

- **Claude Desktop:** `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows)
- **Cursor:** `.cursor/mcp.json` (workspace) or `~/.cursor/mcp.json` (global)
- **Antigravity:** `~/.gemini/antigravity/mcp_config.json`

Using `uvx` (recommended):

```json
{
  "mcpServers": {
    "warmknock": {
      "command": "uvx",
      "args": ["--from", "warmknock", "warmknock-mcp"]
    }
  }
}
```

Using `npx` (requires Node.js 18+ plus `uv` or `pipx`):

```json
{
  "mcpServers": {
    "warmknock": {
      "command": "npx",
      "args": ["-y", "--package", "warmknock", "warmknock-mcp"]
    }
  }
}
```

> **macOS GUI `PATH` note:** Desktop apps like Claude Desktop do not always inherit `~/.local/bin` from your shell profile. If Claude Desktop reports `spawn uvx ENOENT`, run `which uvx` in Terminal (typically `$HOME/.local/bin/uvx` or `/opt/homebrew/bin/uvx`) and put that full path in `"command"`.

### VS Code (`.vscode/mcp.json`)

VS Code uses a top-level `"servers"` key in `.vscode/mcp.json`:

```json
{
  "servers": {
    "warmknock": {
      "type": "stdio",
      "command": "uvx",
      "args": ["--from", "warmknock", "warmknock-mcp"]
    }
  }
}
```

Or with `npx`: set `"command": "npx"` and `"args": ["-y", "--package", "warmknock", "warmknock-mcp"]`.

---

## Upgrade, pin, and uninstall

### Upgrade to the latest release

```bash
uv tool upgrade warmknock            # if installed via uv tool
pipx upgrade warmknock               # if installed via pipx
uvx --refresh warmknock --version    # refresh cached uvx environment
npx -y warmknock@latest --version    # pull latest npm launcher + matching PyPI version
```

### Pin an exact version

- **uvx CLI:** `uvx --from warmknock==0.5.0 warmknock --version`
- **uvx MCP:** `"args": ["--from", "warmknock==0.5.0", "warmknock-mcp"]`
- **npx CLI:** `npx -y --package warmknock@0.5.0 warmknock --version`
- **npx MCP:** `"args": ["-y", "--package", "warmknock@0.5.0", "warmknock-mcp"]`
- **uv tool / pipx:** `uv tool install warmknock==0.5.0` or `pipx install warmknock==0.5.0`

### Uninstall and remove local data

Uninstalling the CLI removes the executable shim while leaving `~/.warmknock/` untouched so you do not accidentally lose your database or PDFs:

```bash
uv tool uninstall warmknock
# or, if installed with pipx:
pipx uninstall warmknock
```

To delete your local profile, `.env`, SQLite database, and generated PDFs as well:

```bash
# macOS / Linux
rm -rf ~/.warmknock

# Windows PowerShell
Remove-Item -Recurse -Force "$env:USERPROFILE\.warmknock"
```

---

## Troubleshooting

- **Unsure which folder, key, or file is active:** Run `uvx warmknock doctor` (or `uvx warmknock doctor --json`) to inspect your resolved data folder (`~/.warmknock`, `$WARMKNOCK_HOME`, or local `./profile.json`), profile validity, configured LLM provider/key, local Typst compiler, SQLite writability, and optional Google OAuth files.
- **`uvx: command not found` (or `npx warmknock` says neither `uv` nor `pipx` is installed):** Install `uv` with `curl -LsSf https://astral.sh/uv/install.sh | sh` (macOS/Linux) or `powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"` (Windows). `npx warmknock` is a lightweight launcher that delegates execution to `uvx` or `pipx`.
- **`warmknock: command not found` right after `uv tool install` or `pipx install`:** Your user bin directory (`~/.local/bin` on macOS/Linux, `%USERPROFILE%\.local\bin` on Windows) is not on `PATH` yet. Run `uv tool update-shell` (or `pipx ensurepath`) and open a fresh terminal session.
- **First `uvx` or `npx` run takes several seconds:** On the very first invocation, `uv` downloads Python 3.11+ (if needed) and caches compiled wheels (`typst`, `pypdf`, `mcp`). Warm runs start in well under a second.
- **GitHub API `403 rate limit exceeded` during `init` or `tiny-fix`:** Unauthenticated GitHub API requests share a 60-request/hour IP quota. Set `export GITHUB_TOKEN="$(gh auth token)"` (or add `GITHUB_TOKEN=...` to `~/.warmknock/.env`) for 5,000 requests/hour and re-run.
- **`credentials.json not found` when running `run` or `target`:** Google Cloud OAuth is optional. Use `warmknock research <url>` or pass `--compose-only` (`warmknock target <url> --compose-only`, `warmknock run --compose-only`) to stage locally and get 1-click Gmail Web Compose links without `credentials.json`.

---

## How it works

<div align="center">
  <img src="https://raw.githubusercontent.com/Sreejesh06/warmknock/main/assets/architecture.svg" alt="warmknock pipeline: 01 Profile allowlist -> 02 Live engineering scan -> 03 Sandboxed Typst brief -> 04 Lint and Gmail draft" width="100%">
</div>

1. **Profile allowlist (`warmknock init`):** Extracts visible text and hidden LaTeX `/Annots` `/URI` links from `cv.pdf` via `pypdf`, queries GitHub REST for your public repositories, READMEs, and merged external pull requests, and writes an allowlist of verified URLs and metrics to `profile.json` (`0600` on POSIX). Claims or URLs absent from your resume and GitHub history are stripped.
2. **Unclaimed-issue and docs scan (`warmknock tiny-fix`):** Pulls `<25`-person teams from YC (`yc-oss`), Launch HN, Ask HN (*Who is Hiring?*), Product Hunt, and forwarded job-alert emails (LinkedIn, Naukri, Internshala). `tiny-fix` checks linked GitHub repos for open issues with `0` cross-referenced open PRs, broken `/docs` `404` links, and stale PyPI/npm install pins.
3. **SSRF-guarded scraping and stealth fallback:** Blocks private, loopback, link-local, and cloud-metadata IPs (`169.254.169.254`) on every HTTP hop and strips hidden HTML/CSS prompt-injection nodes (`display:none`, `visibility:hidden`, `opacity:0`, `aria-hidden="true"`, `<template>`, comments). When a stealth startup has almost no public docs or repos, `warmknock` skips guesswork and drafts a short 65-word builder intro.
4. **80ms sandboxed Typst PDF (`warmknock/pdf_renderer.py`):** Passes structured JSON via `typst.compile(..., sys_inputs={"payload": ...}, root=<empty_tmp_dir>)` into one of four `.typ` templates offline. Untrusted strings containing `#`, `$`, or `#include` are decoded strictly as JSON data with zero host filesystem read paths.
5. **Prose lint, Studio review, and CRM tracking:** Built-in `warmknock lint` checks drafts across 19 prose and formatting rules before staging. `warmknock studio` serves the pre-compiled React, TypeScript, GSAP, and Lenis interface from `warmknock/static/site/` (source in [`web/`](https://github.com/Sreejesh06/warmknock/tree/main/web)) on `127.0.0.1:7842` without needing Node at runtime, guarded by `Host`, `Origin`, CSRF, and nonce CSP headers to preview Typst PDFs, edit copy, open Gmail Web Compose (`mail.google.com/mail/?view=cm`), and sync stages to SQLite, Google Sheets (`sync-sheet`), or Streak (`sync-streak`).

---

## Modes and Typst layouts

### Outreach modes (`--mode`)

| Mode Flag | Audience | Signal Focus & Guardrails | Output |
| :--- | :--- | :--- | :--- |
| `--mode internship` *(default)* | CS students, new grads, and SWEs pitching `<25`-person teams | Open SDK/docs issues, Launch HN and YC stack signals, recipient timezone window | 30-day contribution brief PDF + `70-95` word founder email |
| `--mode freelance-audit` | Independent engineers pitching scoped weekend engagements | SDK retry/async bugs, missing MCP servers, docs friction, concrete 48-hour deliverables | Technical audit PDF + scoped deliverable note |
| `--mode oss-first-pr` | Contributors reaching out to CNCF, Linux Foundation, and OSS maintainers | Hard-gated behind `--pr-url`. Requires an existing submitted PR and appends a tool-usage disclosure line | Maintainer design context PDF linked to your PR |
| `--mode hackathon-sponsor` | University hackathon organizers and student engineering clubs | Developer API surface, workshop topics, and prize-track fit | Technical sponsorship and hacker-track brief PDF |

### Typst layouts (`--theme`)

`warmknock` compiles PDFs locally via the self-contained `typst` wheel in ~80ms and selects one of four layouts deterministically using `sha256(user:domain)` (or an explicit `--theme` flag):

| Theme ID | Layout Structure | Good Fit For |
| :--- | :--- | :--- |
| `stripe_rfc` | Technical RFC metadata table, left-bordered summary box, numbered headers, and timeline pills | API, fintech, infrastructure, and developer tools |
| `linear_minimal` | Warm umber two-column left-rail engineering brief with generous whitespace and hairline rules | Product SaaS, design engineering, and AI tools |
| `academic_systems` | Systems-paper typography (`Libertinus Serif` body with sans headers) and booktabs schedule table | ML research, data systems, compilers, and upstream OSS |
| `arch_matrix` | Two-column header cards paired with an `Open Gap -> First 30 Days -> Shipped Work` table | Scoped audits, SDK patches, and hackathon briefs |

> **Plain-text Touch #1 default:** Initial cold emails stay between `70` and `95` words of plain text with no unsolicited PDF attachments, keeping deliverability clean on Google Workspace. Pass `--attach-pdf` when attaching your Typst brief on warm intros or Touch #2 replies.

---

## CLI reference

```bash
# Build verified ~/.warmknock/profile.json from resume PDF + GitHub, then verify setup
warmknock init --resume cv.pdf --github Sreejesh06
warmknock doctor                                  # pass --json for machine-readable diagnostics

# Scan unclaimed 0-PR issues, compile research PDF, lint prose, or prep for a founder call
warmknock tiny-fix https://kestrel.dev
warmknock research https://kestrel.dev --mode internship --theme stripe_rfc --note "reproduced issue #88 locally"
warmknock lint draft.txt                          # check a draft or markdown file for filler phrases & clutter
warmknock prep kestrel.dev                        # 15-minute call battlecard with recent repo commits

# Single-company or batch discovery + drafting (pass --compose-only when running without Gmail OAuth)
warmknock target https://kestrel.dev --compose-only --note "tested local docker compose setup"
warmknock add-target https://kestrel.dev https://orbitdb.dev
warmknock run --limit 5 --source yc --compose-only   # all | yc | launchhn | hn | producthunt
warmknock run --limit 5 --scraper firecrawl --search tavily --dry-run

# Localhost review UI (127.0.0.1:7842) and static landing page export
warmknock studio
warmknock export-site

# Pipeline status, manual stage updates, LinkedIn copy notes, mailbox tracking, and CRM sync
warmknock status
warmknock mark kestrel.dev interview              # draft gone | sent | bounced | replied | interview | offer | closed
warmknock brief kestrel.dev
warmknock linkedin kestrel.dev
warmknock export --csv ./pipeline.csv
warmknock track
warmknock followups --dry-run
warmknock sync-sheet --dry-run
warmknock sync-streak --dry-run
```

| Flag | Values / Default | Purpose |
| :--- | :--- | :--- |
| `--mode` | `internship` *(default)* · `freelance-audit` · `oss-first-pr` · `hackathon-sponsor` | Outreach mode, word-count bounds, and gates |
| `--theme` | `auto` *(SHA-256)* · `stripe_rfc` · `linear_minimal` · `academic_systems` · `arch_matrix` | Typst PDF layout template |
| `--note` / `-m` | Free-text string | One-line observation from testing the target product or repo |
| `--pr-url` | `https://github.com/<org>/<repo>/pull/<n>` | Required pull request URL before `--mode oss-first-pr` runs |
| `--compose-only` | `false` *(default on `run`/`target`)* | Stage locally and emit 1-click Gmail Web Compose URLs without `credentials.json` |
| `--scraper` | `http` *(default, 0 keys)* · `firecrawl` · `jina` | Optional JS-rendering `/docs` scraper (`FIRECRAWL_API_KEY` / `JINA_API_KEY`) |
| `--search` | `default` / `hn` *(HN + RSS, 0 keys)* · `tavily` · `serpapi` | Optional search adapter (`TAVILY_API_KEY` / `SERPAPI_API_KEY`) |
| `--attach-pdf` | `false` *(default)* | Attaches compiled Typst PDF via `multipart/mixed` MIME in `GmailDraftClient` |
| `--lowercase` | `false` *(default: sentence case)* | Opt-in lowercase email style (preserves case inside URLs) |

---

## Safety defaults

1. **Draft-only by code:** `GmailDraftClient` contains zero `messages.send` or `drafts.send` calls, verified in CI. Default `research` and `--compose-only` runs open a pre-filled Gmail Web Compose URL (`mail.google.com/mail/?view=cm`) without requiring Gmail OAuth scopes.
2. **10-draft daily ceiling and `.edu` protection:** Enforces `MAX_DRAFTS_PER_DAY = 10`, verifies MX records before drafting, skips role addresses (`support@`, `billing@`, `noreply@`), and warns when a university `.edu` or `.ac.in` address is configured in `profile.json`.
3. **Zero browser-cookie scraping:** Never automates LinkedIn or reads browser cookies. All signals come from public feeds (`yc-oss`, HN Algolia, GitHub REST, RSS, public `/docs`) or job alerts forwarded to your own inbox.
4. **19-rule prose linter (`warmknock lint`):** Built-in linear-time linter catches filler phrases, puffery, weak verbs, binary contrasts, colon reveals, and formatting clutter before a draft is staged.
5. **SSRF and Typst sandbox isolation:** Rejects loopback, RFC1918, CGNAT, and cloud-metadata IPs on every redirect hop, and compiles Typst templates inside an empty temporary root directory.

---

## Static showcase hosting (`$0/month` Cloudflare Workers)

`warmknock export-site` outputs a self-contained static bundle in `docs/site/` (`index.html`, `_headers`, `/assets/*`, `/fonts/*`, `/logos/*`, `/mascot/*`, `/backdrops/*`). Root [`wrangler.jsonc`](https://github.com/Sreejesh06/warmknock/blob/main/wrangler.jsonc) deploys that directory to **Cloudflare Workers Static Assets** on the Workers Free plan with zero Worker script invocations, unlimited static asset requests, strict `Content-Security-Policy` and `! Cache-Control` immutable asset headers, and zero paid bindings:

```bash
# Local workerd runtime preview on http://127.0.0.1:8788
npm --prefix web ci && npm --prefix web run build && npm --prefix web run sync-site
warmknock export-site
npm --prefix web run cf:dev

# One-command live deploy to *.workers.dev (or automatic CI via CLOUDFLARE_API_TOKEN)
npm --prefix web exec -- wrangler login && npm --prefix web run cf:deploy
```

See [`docs/DEPLOYMENT.md`](https://github.com/Sreejesh06/warmknock/blob/main/docs/DEPLOYMENT.md) and [`.github/workflows/deploy-cloudflare.yml`](https://github.com/Sreejesh06/warmknock/blob/main/.github/workflows/deploy-cloudflare.yml) for GitHub Actions secrets and custom domain setup.

---

## Sponsors and ecosystem adapters

`warmknock` is MIT-licensed, local-first, and free to run. Sponsors support ongoing maintenance, test suites, and optional `--scraper` and `--search` provider adapters in [`warmknock/providers.py`](https://github.com/Sreejesh06/warmknock/blob/main/warmknock/providers.py) while keeping zero-key HTTP, HN Algolia, and RSS defaults built in. See [`docs/SPONSORING.md`](https://github.com/Sreejesh06/warmknock/blob/main/docs/SPONSORING.md), [`.github/FUNDING.yml`](https://github.com/Sreejesh06/warmknock/blob/main/.github/FUNDING.yml), or [GitHub Sponsors](https://github.com/sponsors/Sreejesh06).

---

## Development

```bash
git clone https://github.com/Sreejesh06/warmknock.git
cd warmknock
uv venv
source .venv/bin/activate            # Windows PowerShell: .venv\Scripts\Activate.ps1
uv pip install -e . --group dev
python -m pytest -q
(cd npm && npm test)                 # the npx launcher

# Optional: typecheck and rebuild the React + TypeScript + Vite Studio UI (Node 22+)
cd web && npm ci && npm run build
```

Tests run offline against deterministic fixtures (`profile.example.json`, `.env.example`), covering Typst sandbox isolation, SSRF and hidden-DOM stripping, prose lint ReDoS bounds, Studio CSRF/CSP headers, and draft-only Gmail invariants. See [`CONTRIBUTING.md`](https://github.com/Sreejesh06/warmknock/blob/main/CONTRIBUTING.md), [`docs/RELEASING.md`](https://github.com/Sreejesh06/warmknock/blob/main/docs/RELEASING.md), [`CODE_OF_CONDUCT.md`](https://github.com/Sreejesh06/warmknock/blob/main/CODE_OF_CONDUCT.md), and [`SECURITY.md`](https://github.com/Sreejesh06/warmknock/blob/main/SECURITY.md).

---

## License

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/Sreejesh06/warmknock/main/assets/logo-dark.svg">
  <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/Sreejesh06/warmknock/main/assets/logo-light.svg">
  <img alt="warmknock" src="https://raw.githubusercontent.com/Sreejesh06/warmknock/main/assets/logo-light.svg" height="28">
</picture>

Released under the [MIT License](https://github.com/Sreejesh06/warmknock/blob/main/LICENSE). Copyright (c) 2026 [Sreejesh S (`@Sreejesh06`)](https://github.com/Sreejesh06).
