keepjay Install

Alpha · free and open source

Keep what you learn
while you code.

Keepjay turns comments in your code into flashcards, quizzes you while your build runs, and tells you when the code under a card changes.

Local-first · macOS, Linux and Windows · a command-line tool today, VS Code next

~/keepjay-demo

demo $ kj source add . && kj scan

keepjay-demo: 4 cards in 3 files (4 new), 5 ms

Wrote 4 card ids into your files.

demo $ kj while -- cargo test

test result: ok. 5 passed; 0 failed; finished in 13.13s

`cargo test` exited with code 0 after 00:19 · reviewed 2 cards.

demo $ kj scan && kj stale

1 card is now stale: the code changed. stale

xsgfegt8 src/backoff.rs:33 Why does `delay` wait a random time up to the cap…

A terminal: scanning a repository finds 4 cards; reviewing two of them while cargo test runs; then changing the code under a card makes Keepjay flag it as stale.

You learned it once.
Then it faded.

You worked out why that lock deadlocked, how the deploy really works, why asyncio.gather doesn't cancel the other tasks. Three months later you're looking it up again.

Notes don't help much, because you never re-read them. Flashcard apps would, but your knowledge lives in code, and cards in another app drift away from the code they describe.

How it works

Write the card where you learned it.

  1. 1

    Add a @card comment next to the code.

    The question goes on the @card line, the answer on the comment lines below. Or keep cards in Markdown files in your repo. Over 30 languages, from Rust and Python to SQL and LaTeX.

    src/backoff.rs
    32    // @card Why does `delay` wait a random time up to the cap?
    33    // So clients that failed together don't retry together:
    34    // "full jitter" spreads the retries out.
    35    pub fn delay(&self, attempt: u32) -> Duration {
    36        let cap = self.base * self.factor.pow(attempt);
    37        Duration::from_millis(rng.random_range(0..=cap))
    38    }
  2. 2

    Scan your repo.

    Keepjay finds your cards, writes a short id into each so it keeps its history when you move it, and schedules them with FSRS, the modern spaced-repetition algorithm also used by Anki.

    terminal
    $ kj source add .
    $ kj scan
    keepjay-demo: 4 cards in 3 files (4 new), 5 ms
      Wrote 4 card ids into your files.
    
    // @card(3q42eycb) Why does `delay` wait…
  3. 3

    Review in the gaps.

    A few cards while your tests run, then back to work with the test output and its exit code. Or kj review --quick for a two-minute review, and kj status in your prompt.

    kj while -- cargo testrunning 00:07

    keepjay-demo

    Why does delay wait a random time up to the cap?


    So clients that failed together don't retry together: "full jitter" spreads the retries out.

    1 Again 1m2 Hard 14h3 Good 5d4 Easy 1.8mo

  4. 4

    Never study out-of-date answers.

    Each card is anchored to the code under it. When that code changes, the next scan flags the card as stale. Keep it, edit it, or retire it with kj stale retire, which keeps its review history.

    src/backoff.rs
        // @card(3q42eycb) Why does `delay` wait…
        pub fn delay(&self, attempt: u32) -> Duration {
    -       let cap = self.base * self.factor.pow(attempt);
    +       let cap = self.base * self.factor.pow(attempt + 1);
    
    $ kj scan
      1 card is now stale: the code changed. stale

Try it

Review three cards, right here.

Read the question, try to recall the answer, then reveal it and grade yourself. This is a review in Keepjay.

rust.cards.md

Why doesn't this compile?

let s = String::from("hi");
let t = s;
println!("{s}");

rust.cards.md

String isn't Copy, so let t = s moves it and s can't be used afterwards. Clone it (s.clone()) or borrow it (let t = &s).

Why it's different

Built for code, not copied from a flashcard app.

Your cards are plain text in Git.

Review them in pull requests, share them with your team, keep them forever.

+ // @card What does Arc::clone copy?
+ // Only the pointer; the count goes up.
  let shared = Arc::clone(&config);

Cards know where they came from.

Each one is anchored to the code it explains, so it can tell when that code changes.

It fits the gaps you already have.

Build waits, test runs, the minute before standup.

It's fast.

Re-scanning a 10,000-file repo takes under half a second.

0.3 s · 10,000 files

Code looks like code.

Code on cards is syntax-coloured in your terminal's own theme.

async def fetch(url: str):
    return await get(url, timeout=5)

Bring your Anki decks.

Import them with their full review history, so scheduling carries on.

Install

Install the alpha

macOS or Linux

curl -fsSL https://keepjay.com/install.sh | sh

Homebrew

brew install keepjay-dev/tap/keepjay

Windows

Download the .zip from the releases page and put keepjay.exe on your PATH.

Then follow Getting started, or try it on a small demo repo in two minutes.

Your notes stay on your machine.

Keepjay runs locally and works with no account. It makes no network calls unless you opt in to an anonymous weekly usage ping, which sends no content, paths or names. Every field is documented. Everything local is free forever. The code is open source under the AGPL.

Coming next

Join the waitlist to hear when each one ships.

Pricing

Free forever, locally. Pro for your phone.

Launch pricing

Billing period for Pro

Free

$0

Forever, for everything that runs on your machines.

  • Cards in code and Markdown
  • Reviews, stale cards, Anki import
  • Open source, no account
Install

Student Pro

$24/year

$2/month, billed yearly

Pro at half price, for students.

  • Hosted sync and the phone app
  • Hosted backups
  • AI card drafting (monthly quota)

Interview-season pass

$15 for 3 months

Pro for one interview season, no subscription.

  • Hosted sync and the phone app
  • Hosted backups
  • AI card drafting (monthly quota)

Or with a one-time supporter licence. No features, just thanks.

Questions

Is it really free?

Yes. Everything that runs on your own machines is free forever. Pro will charge only for things we host for you: sync, backups and AI drafting.

How is this different from Anki?

Anki is a great flashcard app, and Keepjay uses the same scheduling algorithm. The difference is that Keepjay's cards live in your code and your Git history, and it notices when the code they describe changes. You can import your Anki decks.

Does it change my files?

Only to write a short id into each card's comment on the first scan, so the card keeps its history when you move it. You can turn that off per repo. stale retire removes a card's lines only after you confirm.

Which languages?

Over 30 with line comments, including Rust, Python, TypeScript, JavaScript, Go, Java, C, C++, C#, Kotlin, Swift, Ruby, shell, SQL, Haskell, Lua and Clojure, plus Markdown card files. Block comments (/* … */) come later.

Which editors?

Any, today: it's a command-line tool. A VS Code extension is next.

Is it stable?

It's an alpha. The core features work and are tested on macOS, Linux and Windows, but expect rough edges, and back up anything precious.

Why "Keepjay"?

Food-caching jays remember what they hid, where and when. Keepjay keeps what you learned, where it lives in your code, and notices when it changes.

Pro isn't available yet

Thanks for clicking. We're finding out who'd pay for Pro before we build the hosted parts. Nothing has been charged and no card details are needed.

Leave your email and we'll tell you when Pro launches, with an early-supporter price.