Your computer. Your research.
Run the same chat interface with a local model and no model API fees.
Install Git, Node.js 20.20 or later, and Ollama. Then run:
git clone https://github.com/zacheidex/lex-raptor.git
cd lex-raptor/website
ollama pull qwen3:14b
npm ci
npm run build
npm run check:setup
npm run localOpen http://127.0.0.1:8787. The workbench binds to your computer’s loopback interface. It needs no account or OpenAI key.
The setup check confirms Node, local Ollama and the installed model, and reports whether the optional source token is present. It makes no paid API calls.
Choose your model
The tested model is Qwen3:14b. Its download is about 9.3 GB and it needs suitable memory and compute. Set OLLAMA_MODEL to use another installed model. Speed and quality depend on your hardware and model.
Connect public databases
eCFR and Federal Register work without keys. For CourtListener, save your token as COURTLISTENER_API_TOKEN in website/.env.local. Keep this file private. The twelve-case CAP library works offline.
Local AI keeps model inference on your computer. Online database searches still send queries to those providers, and their request limits apply.
Research from the terminal
The CLI reads file paths, folders, and piped text directly. It runs local Ollama, without uploading documents to this website or calling a paid model API.
# From lex-raptor/website
npm run cli -- ask "Summarize the termination terms" --file ./contract.pdf
npm run cli -- ask "Compare these agreements" --dir ./agreements --task compare
cat notes.txt | npm run cli -- ask "Build a timeline" --stdin --task timeline
npm run cli -- chat --file ./brief.docxUse npm run cli -- --help for all options. Add --json or --output result.md for scripts and exports. npm link optionally installs the lex-raptor command. The first CLI request builds the local runtime if needed.
With attachments, the default scope is documents only. Without attachments, it is the offline CAP collection. Opt into live data with --sources courtlistener, --sources ecfr, or another connected source. Questions then go to those providers; your full documents are not sent to them.
Attach documents in chat
Use Attach documents or drop files into the message box. PDF, DOCX, TXT and Markdown are supported: up to five files, 5 MB per file, 200 PDF pages and 300 KB of extracted text in total. PDF page references and document quotations make the selected excerpts inspectable.
Scanned PDFs need OCR first. DOCX formatting, original pagination, comments and tracked deletions are not retained. Long files are analyzed through selected excerpts; each answer reports its coverage. Files stay in the current tab and are cleared by New chat or a reload.
More local workflows
The repository also includes a separate matter workspace for private document workflows, with its own setup requirements. Follow the full setup guide to use it.