Mofu docs

Everything you need to use Mofu in your browser and in your terminal.

Getting started

In your browser

  1. Open the app. There's no account.
  2. Pick a mode at the top: General, Data Analyst, Study Buddy or Dev Tools.
  3. Ask a question or load a file. Before your first message there's a quick bot check (Cloudflare Turnstile).

You get 10 free messages a day. Add your own OpenRouter key in Settings for more.

In your terminal

You need Node.js 22 or newer and an OpenRouter key from openrouter.ai/keys.

npx mofu-cli auth     # save your key once (~/.mofu/config.json)
npx mofu-cli          # chat in the current folder

Or set OPENROUTER_API_KEY for the current shell; it takes priority over the saved key.

The web app

Each mode gives Mofu different tools. Switching modes keeps your memory and settings.

General
Questions and explanations. Mofu can look things up on Wikipedia, define words and remember facts you ask it to (stored in your browser; see Memory at the top).
Data Analyst
Analyze a spreadsheet with real calculations. More below.
Study Buddy
Summaries, flashcards and quizzes from a PDF, notes or an article. More below.
Dev Tools
Explain a GitHub repository, scan dependencies, work with an API spec. More below.

The LED badge next to the logo shows what Mofu is doing: READY, THINKING, ANALYZING, STUDYING, SCANNING, DONE or ERROR.

Data Analyst

Drop a CSV, TSV, Excel (.xlsx) or JSON file, up to 20 MB. Your file is opened in your browser and never uploaded. Mofu profiles it first: columns and types, missing values, duplicates, mixed formats and outliers.

Then ask in plain English. Mofu answers by running Python (pandas, matplotlib) in a sandbox in your browser, so every number comes from real code. Charts appear in the chat with a download link.

It can join your data with public sources:

  • daily exchange rates (Frankfurter, from the European Central Bank)
  • public holidays (Nager.Date)
  • historical weather (Open-Meteo, non-commercial use)
  • country facts and indicators like GDP or inflation (World Bank)

Generate report writes up the analysis, and Download report saves it as Markdown with the charts. The first time you use this mode, the browser downloads the Python runtime (Pyodide), which takes a moment.

Study Buddy

Upload a PDF, .txt or .md file, or paste a link to an article. Use the page range for long PDFs: 30 pages at a time on the free tier, 300 with your own key. Scanned PDFs (images of pages) have no text to read and aren't supported yet.

  • Summary, Detailed summary, Explain like I'm 12: three levels, with page citations.
  • Flashcards: flip a card, mark whether you knew it, and it comes back on a schedule (1, 3, 7, 14 days). Export for Anki downloads a file Anki imports.
  • Quiz me: multiple choice is graded instantly; short answers are checked by Mofu against the document. Ask for Harder or Easier.

Mofu reads only the pages it needs and cites them, like "(page 4)". It can also look things up on Wikipedia, find papers on arXiv and books on Open Library, and format citations from a DOI.

Dev Tools

Explain a repo

Paste a public GitHub URL. Your browser reads the file tree, manifests, README and a few entry points, and Mofu explains how the project works. It's read-only; to change code, use the CLI.

Scan dependencies

Upload package.json with package-lock.json, requirements.txt or pyproject.toml, or paste a GitHub URL. Every package is checked against OSV for known vulnerabilities and against deps.dev for deprecated or unmaintained releases, right in your browser. Then ask for an upgrade plan. Any vulnerability ID or version Mofu mentions that isn't in the scan is flagged.

API spec

Load an OpenAPI 3 or Swagger 2 spec (JSON or YAML) by upload, paste or link. It's validated in your browser, with the exact path of any error. Then:

  • Generate tests: test cases checked against the spec, downloadable as JSON, a Vitest file or an .http file.
  • Generate docs: Markdown docs with parameter and response tables and examples.
  • Compare with another version: breaking and non-breaking changes, decided by Mofu's rules, not by AI.

The web app never sends requests to your API. To run the tests, use npx mofu-cli api test.

The CLI

Run Mofu inside a project folder. It can only read and change files inside that folder, and it asks before it edits a file (showing you the diff), runs a command or touches git.

Install it once with npm install -g mofu-cli and the command is mofu. Without installing, write npx mofu-cli wherever the table says mofu.

Command What it does
mofu Interactive chat in the current folder
mofu "question" One answer, then exit
mofu task "instruction" A coding task on a branch, with your tests
mofu explain Explain the repository you're in
mofu tests <path> Write and run unit tests for a file or folder
mofu analyze <file> Data Analyst on a CSV, Excel or JSON file
mofu study <file-or-url> Study Buddy; --pages 40-90 for long PDFs
mofu deps Scan dependencies; --json for raw data, --fix to upgrade
mofu api docs|tests|test|diff Docs, test cases, test runs and diffs from an API spec
mofu auth Save your OpenRouter key
-m, --model <id> Use another model for this run

In a chat, type /help for commands:

/model [id] Show or switch the model
/clear Start a fresh conversation
/memory, /forget Show or clear what Mofu remembers (~/.mofu/memory.md)
/exit Quit. Ctrl+C stops a reply that's running.

Coding tasks

mofu task "add a --verbose flag" works like a careful colleague:

  1. Maps the repository and reads only what it needs.
  2. Shows a short plan and waits for you to accept or change it.
  3. Creates a mofu/<task> branch, makes the edits and adds tests.
  4. Runs your tests and fixes failures, at most three times, then explains.
  5. Commits only the files it changed, and opens a pull request only if you say yes (needs the GitHub CLI).

It never commits on your default branch and never force-pushes. Those rules are enforced in code, not just asked of the model.

Study, data, deps and APIs in the terminal

  • mofu study notes.pdf: /summary short|detailed|eli12, /flashcards, /review (practice due cards), /quiz, /export deck.tsv (for Anki).
  • mofu analyze sales.csv: charts are saved to ./mofu-output/. The first run downloads the Python packages (about 30 MB) once.
  • mofu deps --fix: pick upgrades, apply them on a branch with your package manager, run the tests and commit.
  • mofu api test openapi.yaml --base-url http://localhost:3000: shows the host and request count and asks first; warns if the host isn't local. Add --auth-header "Authorization: Bearer …" (never printed) and --yes for CI. Reports go to ./mofu-output/.

Your key and models

In the web app, open Settings and paste an OpenRouter key. It's checked, then kept in your browser and sent with each message only to call the model. With your own key there's no daily limit, and you can pick any OpenRouter model that supports tool calling.

The default model is Claude Haiku: fast, cheap and reliable with tools. In the CLI the model comes from --model, then the MOFU_MODEL variable, then "model" in ~/.mofu/config.json, then the default. Each CLI reply ends with a token count.

Limits

Free (web) Your key (web) CLI
Messages 10 a day per IP No daily cap No cap
PDF pages at a time 30 300 300
Data files 20 MB 20 MB 200 MB
API specs 2 MB 2 MB 2 MB
Python run time 30 s per run 30 s per run 30 s per run

The free daily count resets at midnight UTC.

Privacy and data

  • Files are read in your browser. Only what's needed to answer (a data profile, the pages being read, package names, an endpoint list) is sent to the model.
  • Python runs on your device in a sandbox with no network access.
  • Messages pass through Mofu's server to the model provider via OpenRouter, whose own policies apply. Mofu's server doesn't store chats, files or keys.
  • The server keeps one thing: a daily message count per IP address, deleted after the day resets.
  • Your browser keeps your settings, your key (if you add one), memory and flashcard progress. Use Remove key in Settings, Clear all in Memory, or clear your browser's site data.
  • In the terminal, everything runs on your machine. Your key and memory live in ~/.mofu/.

Troubleshooting

"You've used all 10 free messages for today"
Wait for the reset (midnight UTC) or add your own key in Settings.
"This PDF looks scanned"
The PDF is images of pages with no text layer. Try a PDF with selectable text.
GitHub rate limit
GitHub allows 60 anonymous requests an hour per IP. The app shows when the limit resets.
A spec or page link is refused
Mofu only fetches public addresses. For a spec on a local server, save it first (curl -o openapi.json http://localhost:3000/openapi.json) and load the file.
"No OpenRouter API key" in the CLI
Run npx mofu-cli auth or set OPENROUTER_API_KEY.