mirror of
https://github.com/Dvorinka/Devour.git
synced 2026-07-28 23:23:48 +00:00
898a3c303f859ea475fc6241969fe54af26cdfd1
Devour
Feed your AI real docs so it stops repeating the same mistakes.
Why Devour exists
I built Devour because AI tools kept drifting away from official docs, then repeating wrong patterns in later prompts.
Devour fixes that loop with a local-first workflow:
- scrape official docs,
- keep them in your project,
- search and ask against that local corpus,
- sync updates when sources change.
What works today
devour initcreates a complete local workspacedevour scrapesupports URL, language-specific docs, local files, GitHub repos, OpenAPI specs, and--sourcesdevour getsupports language/framework shortcuts (now including Next.js, Svelte, Angular, Remix, SolidJS, Express)devour queryis now functional (local lexical index)devour askis hybrid local-first with live fallback when local relevance is weakdevour syncupdates configured sources and reindexesdevour statusreports real local health/statisticsdevour push <path>imports local docs into the workspace and reindexesdevour servelocal mode runs JSON-RPC over stdio (devour_query,devour_status,devour_scrape,devour_ask,devour_sync)devour autoroutes natural-language intent to the right commanddevour verify smokeruns opt-in live checks and writes reports
Experimental
devour serve --remoteis available as an experimental HTTP RPC mode- remote push workflows are intentionally not enabled as stable behavior yet
Quick start
1) Build
go mod download
go build -o devour ./cmd/devour
2) Initialize
./devour init
3) Get docs fast
./devour get go net/http --format markdown
./devour get nextjs routing
./devour get express middleware
4) Search locally
./devour query "json unmarshal"
5) Ask a docs-grounded question
./devour ask --lang go "how to parse json" --format text
6) Let Devour route intent automatically
./devour auto "how to use useEffect in react"
./devour auto "https://pkg.go.dev/net/http"
Core commands
| Command | Purpose |
|---|---|
devour init [path] |
Create config + local storage directories |
devour get <language> <keyword> |
Shortcut fetch from curated official docs |
devour scrape <source> |
Scrape one source directly |
devour scrape --sources sources.yaml |
Scrape multiple configured sources |
devour query <text> |
Search local indexed docs |
devour ask --lang <lang> <question> |
Structured answer using local-first + live fallback |
devour sync |
Sync configured sources and rebuild index |
devour status |
Show docs/index/source health |
devour push <path> |
Import local docs into workspace |
devour serve |
Start local stdio JSON-RPC server |
devour auto "<intent>" |
Auto-route intent to command |
devour verify smoke |
Live smoke verification report |
devour quality ... |
Code quality scan/triage/fixes |
Supported get / ask languages and frameworks
- Go (
go,golang) - Rust (
rust) - Python (
python,py) - Java (
java) - Spring (
spring) - TypeScript (
typescript,ts) - React (
react) - Vue (
vue) - Nuxt (
nuxt) - Docker (
docker) - Cloudflare (
cloudflare,cf) - Astro (
astro) - C# (
csharp,cs) - Kotlin (
kotlin,kt) - PHP (
php) - Ruby (
ruby,rb) - Elixir (
elixir,ex) - Next.js (
next,nextjs) - Svelte (
svelte) - Angular (
angular,ng) - Remix (
remix) - Solid (
solid,solidjs) viagithub.com/solidjs/solid-docs - Express (
express,expressjs)
Run devour languages for examples, or devour languages --format json for automation.
Config
Devour reads devour.yaml (or --config).
New additive sections:
indexing: local lexical index defaultsverification: live smoke timeout defaults
Starter config: devour.example.yaml.
Real-world verification
Run live smoke checks (opt-in):
./devour verify smoke
Reports are saved to devour_data/verify/smoke-<timestamp>.json.
JSON-RPC local server
devour serve (local mode) accepts JSON-RPC 2.0 methods:
devour_querydevour_statusdevour_scrapedevour_askdevour_sync
Development
Test
go test ./...
Typical integration loop
./devour init
./devour scrape https://pkg.go.dev/net/http --type godocs
./devour query "http client"
./devour ask --lang go "timeout example"
./devour sync
./devour status
License
MIT (LICENSE).
Languages
Go
79.1%
Python
10.7%
TypeScript
8.6%
CSS
0.7%
JavaScript
0.4%
Other
0.4%