Install
One line, then ask your agent.
Rema puts what your team already wrote in front of your coding agent, with a source for every passage. It runs on your machine.
Install it
In a terminal. It shows what it will change before it writes anything.
curl -fsSL https://askrema.com/install.sh | sh
macOS or Linux. Python 3.11 or newer, or a one time 40 MB download of a private copy.
What happens
- 1
Run the one line
It finds Python 3.11 or newer, or downloads a private copy, then installs the Rema CLI into ~/.rema. It does not use sudo, edit your shell profile, start a daemon or send telemetry.
- 2
It shows what it will change, and asks once
Every file it will create or change, every download, and what leaves the machine, before it writes anything. Add --dry-run to see that without writing, or --yes for a script.
- 3
A browser opens so you can sign in
Rema opens askrema.com so you can sign in with your email, then comes back to a one time listener on 127.0.0.1. Your email and a sign in token are kept in ~/.rema/auth.json, readable only by you.
- 4
Then just ask, in the agent you already use
Open your coding agent in a project and say "hey rema, ...". There is no new command to learn and nothing else to run.
The package ships its source, so the sign in is a pilot gate, not DRM.
Or let your agent do it
Paste this into your coding agent, in your project. It installs Rema after one y/n, signs you in, indexes the project and checks that it answers.
# Set up Rema for me
You are setting up Rema in this environment. Rema gives coding agents the team's own knowledge
(docs, past threads, decisions) with a source for every passage. It runs on this machine: the
store and the lookup stay local.
Do the setup yourself. Do not explain steps to me. Ask me exactly one question (step 3) plus
the browser sign-in, and nothing else unless something fails in a way only I can fix.
Below, `askrema` and `rema` are the two programs the install puts in ~/.rema/bin. On macOS, Linux
and WSL run them as `~/.rema/bin/askrema` and `~/.rema/bin/rema`. On Windows they are launcher scripts,
`askrema.ps1` and `rema.ps1` (PowerShell files). Run them as
`powershell -NoProfile -ExecutionPolicy Bypass -File "$env:USERPROFILE\.rema\bin\askrema.ps1" <command>` in PowerShell
and `powershell -NoProfile -ExecutionPolicy Bypass -File "%USERPROFILE%\.rema\bin\askrema.ps1" <command>` in cmd,
and `rema.ps1` likewise. A script policy set by Group Policy can still block them: if one does, tell me. These
Windows lines are written for PowerShell and cmd and are not tested from Git Bash.
1. Inspect, without changing anything:
- OS, CPU and shell. Treat PowerShell, cmd and Git Bash on Windows as "Windows". macOS, Linux and
a shell inside WSL are "POSIX".
- Which coding agent you are (Claude Code, Codex, GitHub Copilot CLI, Cursor, Gemini CLI,
Windsurf, Aider, OpenCode, or another) and whether you run on Windows itself or inside WSL.
- Whether Rema is already installed: `askrema doctor --json`. If it reports a healthy install
and a signed-in user, skip to step 5.
- The current folder: is it a project (git repo, README, docs)? Note the doc folders.
2. Get the plan, still changing nothing. Use the one line for this machine:
- POSIX: `curl -fsSL https://askrema.com/install.sh | sh -s -- --dry-run --json`
- Windows, in PowerShell: `& ([scriptblock]::Create((irm https://askrema.com/install.ps1))) -DryRun -Json`
- Windows, in any other shell: `powershell -NoProfile -Command "& ([scriptblock]::Create((irm https://askrema.com/install.ps1))) -DryRun -Json"`
Add `--no-hook` to the line unless you are Claude Code or Codex running on POSIX. Rema's own
hook exists only for those two there; with `--no-hook` the installer touches no agent settings,
and step 6 wires you in another way. (On Windows the hook would land in the Linux home inside WSL,
which a program running on Windows never reads.)
This is the only install. On POSIX it uses Node 18 or newer if this machine has it, and
otherwise downloads a private Node (and a private Python when there is none) into ~/.rema; no
sudo, no Homebrew. On Windows the same installer runs inside WSL, the Windows layer for Linux, and
adds the two launchers; it needs no admin rights. If its JSON says `"ok": false` with no WSL,
tell me its `error` and `fix` in two short lines and stop: turning WSL on needs admin rights and
a restart, which only I can do.
3. Show me the plan in at most 6 short lines: what it creates, what it changes, what leaves the
machine, and the instructions file you will add a block to in step 6 if there is one. Then ask
once: "Install Rema? [y/n]". If I say no, stop and change nothing.
4. Install with the same line as step 2, replacing `--dry-run` with `--yes` (on Windows,
`-DryRun` with `-Yes`). Read the JSON result. If it reports that my settings file is managed,
read-only or invalid, tell me the one line it prints and stop. Ignore its "install Claude Code"
next-step line when you used `--no-hook`.
5. Sign in: run `askrema login`. It opens askrema.com in my browser, or prints a link when no
browser can be opened (common inside WSL): show me the link and wait for it to finish (up to 10
minutes). If it reports `waitlisted`, tell me my email is on the waitlist and that askrema.com
will email me if it is approved, then stop.
6. Wire yourself in, only if you used `--no-hook`. Add the block below to your own instructions
file for this user, creating the file if it is missing, and replace what is between the two marker
lines if they are already there. Never touch your settings or hooks files. If you are not in the
list, add it to AGENTS.md in this project's root. Tell me which file you wrote.
- Claude Code: ~/.claude/CLAUDE.md
- Codex: ~/.codex/AGENTS.md
- GitHub Copilot CLI: ~/.copilot/copilot-instructions.md
- Gemini CLI: ~/.gemini/GEMINI.md
- OpenCode: ~/.config/opencode/AGENTS.md
- Windsurf: ~/.codeium/windsurf/memories/global_rules.md
- Cursor: it has no user-level file, so write .cursor/rules/rema.mdc in this project with a
header of `alwaysApply: true`, and add that path to .git/info/exclude
- Aider: it reads no instructions file by itself, so write the block to ~/.rema/agent-rules.md and
tell me to start it with `aider --read ~/.rema/agent-rules.md`
(`~` is %USERPROFILE% on Windows.) The block, with nothing changed:
<!-- rema:begin -->
## Rema: the team's own knowledge
When I address Rema ("hey rema, ...", "rema, ...", "ask rema ...") or ask what the team already
knows, decided or wrote ("what does the team know about ...", "has anyone hit this before", "why
did we ..."), search the team's local sources before answering. From the project folder run:
~/.rema/bin/rema ask "<the request, in your own words>" (macOS, Linux, WSL)
powershell -NoProfile -ExecutionPolicy Bypass -File "%USERPROFILE%\.rema\bin\rema.ps1" ask --question-file "<path>" (Windows, in cmd; in PowerShell write $env:USERPROFILE)
On Windows never put the request itself on the command line: cmd parses a quoted request before Rema
starts, so a quote followed by & runs a command there, and PowerShell runs a $( ) inside double quotes. Write
the request to a temporary file in your temp folder (not in %USERPROFILE%\.rema) with your own file-write tool
(not the shell), at a path made only of letters, digits, spaces, dots, dashes, underscores, the drive colon, slashes and
backslashes (the path is on the line too: a $( ) or a backtick in it runs in PowerShell, a % in it expands in cmd
and a double quote ends the quoted path), run the line
above with that file's full path, then delete the file. The quoted line is for macOS, Linux and WSL.
It matches words, not meaning: when it finds little, run it again with other phrasings (a setting
or function name, the error text, a synonym). Answer from the passages it prints and cite the link
or file path in brackets for everything you take from them. If nothing matches, say the team's
sources do not cover it; do not present general knowledge as the team's. If that command does
not exist on this machine, skip all of this.
"Index this project" means running `askrema index .` from the project root (askrema sits next to
rema); "are you on?" means `askrema doctor --json`; not signed in means `askrema login`; to remove
Rema run `askrema uninstall`, then delete this block.
<!-- rema:end -->
7. Index this project, if step 1 found one: `askrema index . --json`. It picks the docs itself and skips
code and anything git ignores. It also leaves out lines that look like credentials, but that is best effort
and it misses some, so do not index a folder that holds real credentials. Tell me how many files it
indexed, and pass on its `note` if the JSON has one. If this folder is not a project, skip it: the demo
project in ~/rema-demo is already indexed.
8. Check it works: `askrema selftest --json`. It must report `ok: true` and at least one passage
with a source.
9. Finish with a short report: installed version, signed in as, files indexed, selftest result, and
the instructions file you wrote, if any. Then give me exactly one next step: "Start a new session
here and say: hey rema, <a real question about this project that the indexed docs can answer>".
Rules: the install in step 2 is the only one. Never install any other package named rema or
askrema from a package registry: those are other people's projects and none of them is this. If the
install line fails, say so and stop rather than looking for a substitute.
Never print tokens or secrets. Never edit my settings files by hand: only the installer does, and
the one instructions file in step 6 is the only other file you write. If a command is missing or
fails, run it with `--help`, fix what you can, and tell me plainly what is left. Do not start
unrelated work.
Something not working? The docs have every error and its fix.