Website · Get started · CLI reference · API reference · Changelog
rentfree gives coding agents a memory that lasts between sessions. It captures what happens, turns it into memories, and hands back the right context for the next turn, within a token budget. This repository holds rf, its command line, and the TypeScript SDK rf is built on.
npm install -g @rentfree/cli
# Sign in through the browser; a first sign-in is a sign-up
rf init
# In your project: give Claude Code a memory of every session there
rf hooks installThat is all Claude Code needs. To try it by hand, write a memory and ask for the context a turn would get:
rf remember "Deploys go out from main, once CI is green." --type decision
rf context "how do we deploy?"The get started guide goes further, and the concepts explain collections, sessions, recap, and memories.
One command wires rentfree into Claude Code. Each session starts with what it remembers and is recapped when it ends, with no tokens spent on either.
$ rf hooks install
Installed 4 hooks in .claude/settings.json:
event command
SessionStart rf hooks run session-start
UserPromptSubmit rf hooks run prompt
Stop rf hooks run stop
SessionEnd rf hooks run session-endOne call returns what the next turn needs: the profile, then the memories and passages that bear on the question. Text for a model, JSON for a script.
$ rf context "how do we deploy?"
## Memories
- Deploys go out from main once CI is green.
- Migrations run before the api deploys.
## From your documents
### runbook.md · Deploying
Run the release workflow from main.Each memory keeps the words it came from and every change made to it, so you can see why your agent believes something, and correct it.
$ rf memories sources mem_8KfQ2
from quote
session ses_4tR event 9 deploy only from main
session ses_8Wm event 3 CI must pass first
source src_2Lk release from mainThe SDK is the same api, typed by the contract the api itself validates with:
import { createClient } from "@rentfree/sdk";
const rf = createClient({ apiKey: process.env.RF_API_KEY });
const { collections } = await rf.me.get();
const collectionId = collections.find((c) => c.isDefault)!.id;
// Text for the next turn's prompt, within a budget
const pack = await rf.context({
collectionId,
query: "how do we deploy?",
tokenBudget: 1500,
});
console.log(pack.text);| Path | What it is | On npm |
|---|---|---|
packages/cli |
rf, the command line |
@rentfree/cli |
packages/sdk |
The API's contract, its OpenAPI document, and the TypeScript client rf is built on |
@rentfree/sdk |
packages/eslint-config, packages/typescript-config |
The configs both build with |
The rentfree service itself is not in this repository.
- Get started: from nothing to an agent with its own key, in a few minutes
- Concepts: accounts, keys, agents, collections, and how memories come to be
- Claude Code hooks: what each hook does, its options, and what was captured
- CLI reference: every
rfcommand, with what it sends and what it prints. The@rentfree/clireadme has the same in brief - API reference: every endpoint, generated from the contract. The
@rentfree/sdkreadme covers the TypeScript client
Node.js 24 and pnpm, through Corepack:
corepack enable
pnpm install
pnpm build
pnpm testnode packages/cli/dist/rf.mjs --help runs the CLI you just built. It talks to https://api.rentfree.dev unless --api-url, RF_API_URL, or the address saved at login says otherwise.
The CLI and SDK are developed beside the service, in a private repository, and every change to them is copied here as one commit. Issues and pull requests are welcome here. A pull request is applied in the private repository and comes back with the next copy, credited to you, rather than merged here, where the next copy would replace it. CONTRIBUTING.md has the details.
Both packages are released together, at one version, from this repository. Each release's notes are on the releases page.