Skip to content

alexisbouchez/wikistral

Repository files navigation

Wikistral

An AI-powered encyclopedia using web search and LLMs. Alternative to Grokipedia.

Warning

This is a prototype. The code is rough and there's plenty of room for improvement. Feedback, criticism, and contributions are welcome.

What it does

  • Searches the web for information about a given subject
  • Generates structured, cited articles using LLMs (via OpenRouter)
  • Supports multiple languages and article categories
  • Serves content statically from JSON files -- no database needed

Getting started

Prerequisites

Setup

git clone https://github.com/alexisbouchez/wikistral.com.git
cd wikistral.com
bun install
cp .env.example .env
# Fill in your API keys

Run the dev server

bun run dev

Open http://localhost:3000 to browse articles.

Generate an article

bun run generate "Alan Turing" --lang en --category people

This searches the web, generates a structured article, and saves it to content/articles/en/alan-turing.json.

List existing articles

bun run list --lang en
bun run list --lang en --category bands

API keys

Variable Purpose Required Get one at
OPENROUTER_API_KEY LLM generation Yes openrouter.ai
SERPER_API_KEY Web search Recommended serper.dev
EXA_API_KEY AI-powered search Optional exa.ai
FIRECRAWL_API_KEY Content extraction Optional firecrawl.dev

At minimum you need OPENROUTER_API_KEY and one search provider.

Article categories

people companies events countries cities bands memes discourses programming-languages

Languages

en fr -- more can be added via content/messages/

Project structure

packages/ui         Shared UI components (shadcn/ui)
packages/agent      Article generation engine (search + LLM)
apps/web            Next.js frontend (App Router, React 19)
apps/cli            CLI for article generation
content/
  articles/         Article JSON files (source of truth)
  images/           Article images
  messages/         i18n translations (next-intl)

Scripts

Command Description
bun run dev Start the Next.js dev server
bun run build Build all packages
bun run lint Lint all packages
bun run typecheck Type-check all packages
bun run generate "Subject" --lang en --category people Generate an article
bun run list --lang en List articles

Editing articles

Articles are plain JSON in content/articles/{lang}/{slug}.json:

{
  "slug": "alan-turing",
  "title": "Alan Turing",
  "language": "en",
  "content": "Markdown content with [1] citation references...",
  "references": [{ "title": "Source title", "url": "https://..." }],
  "category": "people",
  "tldr": "One-sentence summary",
  "createdAt": "2025-01-01T00:00:00.000Z",
  "updatedAt": "2025-01-01T00:00:00.000Z"
}

Delete the JSON file and re-run generate to regenerate with fresh sources.

Contributing

See CONTRIBUTING.md for development setup and guidelines.

The easiest way to contribute is to generate articles on topics you care about and submit a PR.

License

MIT

About

An AI-powered encyclopedia using web search and LLMs. Alternative to Grokipedia.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages