codelore|Documentation
← Back to app

Quickstart

Get up and running with CodeLore in under 5 minutes. Choose the mode that fits you.

Install the CLI

Download the latest codelore binary for your platform from the releases page, then add it to your PATH.

Verify the install:

codelore --help

Local mode — no account needed

Local mode stores everything in a .codelore/ folder inside your project, exactly like a .git/ directory. No signup required.

  1. 1

    Initialize a knowledge base

    Run this inside any project directory:

    cd my-project
    codelore init

    This creates .codelore/codelore.db — a local SQLite database that holds all your lessons.

  2. 2

    Add your first lesson

    Lessons are identified by a path. Paths can be anything — treat them like file paths in a tree:

    codelore add auth/jwt

    Your default editor opens. Write your lesson in Markdown, save, and close. Add a version note with -m:

    codelore add auth/jwt -m "initial write-up"

    Or skip the editor by passing content directly:

    codelore add auth/jwt -c "JWTs expire after 30 days. Secret is in env CODELORE_JWT_SECRET."
  3. 3

    View a lesson

    codelore show auth/jwt
  4. 4

    Browse all lessons

    codelore ls
  5. 5

    Export context for an AI prompt

    Search across all lessons and bundle the results into a markdown document:

    codelore context "authentication"
    codelore context "database migrations"

    Paste the output directly into your AI chat to give it instant codebase context.

💡
Commit .codelore/ to git to keep your knowledge base versioned with your code, or add it to .gitignore to keep it private.

Cloud mode — team collaboration

Cloud mode stores lessons on a shared server. Multiple people can work in the same workspace. The web UI lets you browse and edit from any browser.

  1. 1

    Create an account

    Sign up via the CLI:

    codelore signup

    Or visit the web app and click Sign up.

  2. 2

    Create a workspace

    A workspace is your shared knowledge base:

    codelore workspace create my-team

    Then select it as active:

    codelore workspace use my-team
  3. 3

    Add lessons — same commands as local mode

    codelore add auth/jwt -m "JWT auth overview"
    codelore add db/migrations -m "how we handle schema changes"

    Because you're logged in and have selected a workspace, all lessons go to the cloud automatically.

  4. 4

    Invite your team

    codelore workspace invite teammate@example.com

    Or invite from the web UI via the Workspaces page.

  5. 5

    Open the web UI

    Visit the app in your browser, log in, and you'll see the workspace tree with all lessons. Click any lesson to read it. Click Edit to update it with the split-pane Markdown editor.


Combining local and cloud

You can have a local knowledge base and a cloud workspace at the same time. Use push to upload local lessons to the cloud, and pull to bring cloud changes down.

# Upload everything local → cloud
codelore push

# Bring cloud changes → local
codelore pull

If the same lesson was changed in both places you'll see a side-by-side diff and be prompted to keep local, accept cloud, edit manually, or skip.

â„šī¸
Auto-detection: if you run a command inside a directory that has .codelore/, CodeLore uses local mode. Otherwise it uses the cloud workspace you selected with codelore workspace use.