{"id":49269452,"url":"https://github.com/prodnull/llmwiki-capture","last_synced_at":"2026-04-25T12:36:51.818Z","repository":{"id":349571203,"uuid":"1202934695","full_name":"prodnull/llmwiki-capture","owner":"prodnull","description":"Minimal HTTP inbox for llm-wiki — capture URLs and notes from mobile share sheets","archived":false,"fork":false,"pushed_at":"2026-04-06T14:55:40.000Z","size":27,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-06T16:29:05.246Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prodnull.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-06T14:53:37.000Z","updated_at":"2026-04-06T14:54:59.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/prodnull/llmwiki-capture","commit_stats":null,"previous_names":["prodnull/llmwiki-capture"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/prodnull/llmwiki-capture","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prodnull%2Fllmwiki-capture","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prodnull%2Fllmwiki-capture/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prodnull%2Fllmwiki-capture/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prodnull%2Fllmwiki-capture/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prodnull","download_url":"https://codeload.github.com/prodnull/llmwiki-capture/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prodnull%2Fllmwiki-capture/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32262801,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T09:15:33.318Z","status":"ssl_error","status_checked_at":"2026-04-25T09:15:31.997Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-25T12:36:50.747Z","updated_at":"2026-04-25T12:36:51.788Z","avatar_url":"https://github.com/prodnull.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# llmwiki-capture\n\nA lightweight capture service for [llm-wiki](https://github.com/nvk/llm-wiki). Send URLs and notes from your phone's share sheet to your wiki inbox — two taps, any platform.\n\n```\nPhone (iOS/Android)              Your machine                llm-wiki\n───────────────────              ────────────                ────────\nShare sheet                       POST /inbox                 /wiki:ingest --inbox\n  → \"Wiki Inbox\"                    → validate                  → fetch content\n    → HTTP POST                       → write inbox file          → compile article\n      → done                            → done                      → wiki\n```\n\nThe capture service is a dumb pipe. It writes files. The wiki plugin does the thinking.\n\n## Requirements\n\n- Python 3.11+\n- An [llm-wiki](https://github.com/nvk/llm-wiki) setup (the `~/wiki/` directory structure)\n- [Tailscale](https://tailscale.com/) (or another way for your phone to reach the service)\n\n## Quick start\n\n```bash\n# Clone and install\ngit clone https://github.com/prodnull/llmwiki-capture.git\ncd llmwiki-capture\npython -m venv .venv \u0026\u0026 source .venv/bin/activate\npip install .\n\n# Configure\ncp config.example.yml config.yml\n# Edit config.yml — set wiki_path at minimum\n\n# Run\nllmwiki-capture\n```\n\nOn first run, a bearer token is generated and printed. Save it — you need it for the mobile setup.\n\nThen set up your phone: **[iOS](docs/setup-ios.md)** or **[Android](docs/setup-android.md)**.\n\n### iOS share sheet in action\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/images/share-sheet.png\" alt=\"iOS share sheet showing Wiki Inbox action\" width=\"300\"\u003e\n  \u003cimg src=\"docs/images/shortcut-editor.png\" alt=\"iOS Shortcut editor for Wiki Inbox\" width=\"300\"\u003e\n\u003c/p\u003e\n\nTap **Wiki Inbox** in the share sheet (left) and the two-step Shortcut sends it to your capture service (right).\n\n## Configuration\n\nAll settings can be provided via `config.yml`, environment variables, or both (env vars take precedence).\n\n| Setting | Env var | Config key | Default | Description |\n|---------|---------|------------|---------|-------------|\n| Wiki path | `WIKI_PATH` | `wiki_path` | `~/wiki` | Root of your llm-wiki directory |\n| Wiki name | `CAPTURE_WIKI_NAME` | `wiki_name` | _(none)_ | Subdirectory under wiki path for inbox |\n| Token | `CAPTURE_TOKEN` | `token` | _(generated)_ | Bearer token for authentication |\n| Port | `CAPTURE_PORT` | `port` | `7199` | Listen port |\n| Host | `CAPTURE_HOST` | `host` | `0.0.0.0` | Listen address |\n| Rate limit | `CAPTURE_RATE_LIMIT` | `rate_limit` | `60` | Max requests per minute per client |\n\n**Example:** To capture into a `cybersecurity` wiki subdirectory:\n\n```yaml\nwiki_path: ~/wiki\nwiki_name: cybersecurity\n```\n\nThis writes inbox files to `~/wiki/cybersecurity/inbox/`.\n\n## API\n\nTwo endpoints.\n\n### `POST /inbox`\n\nCapture a URL or text note.\n\n```bash\ncurl -X POST http://your-machine:7199/inbox \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"url\": \"https://example.com/article\"}'\n```\n\n**Request body:**\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `url` | string | url or text | URL to capture |\n| `text` | string | url or text | Text content to capture |\n| `title` | string | no | Override the title (defaults to the URL) |\n| `device` | string | no | Source device (e.g., `ios`, `android`) |\n\n**Responses:**\n\n| Status | Meaning |\n|--------|---------|\n| `201` | Captured. Returns `{\"id\": \"...\", \"file\": \"inbox/...\"}` |\n| `401` | Missing or invalid bearer token |\n| `409` | URL already in inbox (duplicate) |\n| `422` | Validation error (e.g., neither url nor text provided) |\n| `429` | Rate limited |\n\n### `GET /health`\n\n```bash\ncurl http://your-machine:7199/health\n# {\"status\": \"ok\", \"inbox_path\": \"...\", \"inbox_count\": 5}\n```\n\n## Inbox file format\n\nEach captured item becomes a markdown file compatible with llm-wiki's inbox processing:\n\n```yaml\n---\ntitle: \"Article title or URL\"\nsource: \"https://example.com/article\"\ntype: inbox\ncaptured: 2026-04-06T14:30:22+00:00\ndevice: ios\n---\n```\n\nText captures include the body below the frontmatter. Filenames are timestamp + UUID (`20260406-143022-a1b2c3d4.md`) — no user input in filenames.\n\n## Deployment\n\nThe service runs anywhere Python does.\n\n| Method | Platform | Details |\n|--------|----------|---------|\n| Direct | Any | `llmwiki-capture` or `python -m capture.server` |\n| [Docker](docs/deploy-docker.md) | Any | Best for NAS, Pi, VPS |\n| [launchd](docs/deploy-macos.md) | macOS | Auto-start on login |\n| [systemd](docs/deploy-linux.md) | Linux | Auto-start on boot |\n\n## Networking\n\nYour phone needs to reach the service. Two options:\n\n**[Tailscale](https://tailscale.com/) (recommended):** Both devices join the same tailnet. The service is reachable at `http://your-machine-name:7199`. Free, no domain required.\n\n**[Cloudflare Tunnel](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/) (alternative):** Exposes the service as a public HTTPS URL behind Cloudflare Access. No VPN on the phone. Requires a domain on Cloudflare. See [networking docs](docs/networking.md).\n\n## What if the service is down?\n\nThe mobile shortcut's HTTP request fails. On iOS, the recommended Shortcut setup includes a fallback that saves the URL to Apple Notes if the POST fails. On Android, HTTP Shortcuts supports retry-on-failure; see the [Android setup guide](docs/setup-android.md) for options.\n\nFor always-on availability, deploy to a Raspberry Pi, NAS, or VPS using Docker.\n\n## Security\n\nThis is designed for personal use behind a private network. The security model assumes Tailscale (or equivalent) as the network boundary.\n\n- Bearer token authentication with constant-time comparison\n- No user input in filenames (path traversal prevention)\n- YAML frontmatter sanitization (injection prevention)\n- Rate limiting per client IP (default 60/min)\n- Request body size capped at 1MB\n\nFor details, see [SECURITY.md](SECURITY.md).\n\n## Development\n\n```bash\npython -m venv .venv \u0026\u0026 source .venv/bin/activate\npip install -e \".[dev]\"\n\npytest tests/ -v          # run tests\nruff check capture/ tests/  # lint\nruff format capture/ tests/ # format\n```\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprodnull%2Fllmwiki-capture","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprodnull%2Fllmwiki-capture","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprodnull%2Fllmwiki-capture/lists"}