After install · Brain and LastSecrets · alpha

How to use it

This page assumes LastDB and the starter apps are installed. It covers daily use, for you and for your AI agent.

01 · Where this sits

Two apps on your own node.

Each person runs one LastDB on their own Mac. That is a node. Brain and LastSecrets are apps on your node. They read and write it over a local Unix socket, and each is a complete app for one person. Nothing on this page needs an account.

LastDB can also share a whole database with other people by invitation, and a developer can publish an app to the App Registry. This page does not cover either. To build or publish your own app, read the Developer guide: step 8 is sharing and step 9 is publishing.

02 · Daily use

Brain keeps notes and decisions. LastSecrets keeps credentials.

Write it once. Find it later.

  1. 01

    When a decision settles, write it to Brain.

    A note has a short name, a title, and a body. Say why, not only what.

    brain concept new caching --title "Cache layer" --body "chose LRU because the working set is small"
  2. 02

    Find it later by name, or ask in plain words.

    brain get reads the note by name. brain ask matches by keyword until LastSeek is installed, so use a word from the note.

    brain get caching
    brain ask "what did we decide about caching?"
  3. 03

    Change the note when the decision changes.

    One current note is better than many old ones. Write the same name again with --force to replace it.

    brain concept new caching --title "Cache layer" --body "moved to a size cap; LRU alone grew too large" --force
  4. 04

    Keep credentials in LastSecrets.

    The value goes in on stdin, never on the command line. lastsecrets ref prints a lastsecrets://… reference. Put only that reference in your notes.

    printf '%s' "$TOKEN" | lastsecrets put my-api-token \
      --label "My API token" \
      --provider example \
      --purpose demo \
      --env dev \
      --value-stdin
    lastsecrets ref my-api-token

See both apps and the install commands →

03 · For your agent

The agent runs on your Mac and uses the same apps you do.

Give your agent the same memory.

Point the agent at llms.txt. It is the plain-text version of this site. Then connect Brain through MCP, so the agent can read and write your notes.

Claude Code registers the server and adds the instructions to CLAUDE.md
brain mcp install
Any other client register this as a stdio MCP server
brain mcp

brain mcp install asks before it changes anything. It writes to CLAUDE.md and .claude/settings.json in the current folder, so run it in your project.

  1. 01

    A rule that helps.

    Ask the agent to search Brain before it starts, and to write each settled decision back. The context then survives the chat.

  2. 02

    A rule for secrets.

    The agent stores a credential with lastsecrets put, value on stdin. It keeps only the lastsecrets:// reference in notes, documents, and logs. It reads the value with lastsecrets get only at the point of use, and does not print it.

04 · If it’s not responding

Check the node before you restart it.

Two checks both read only
lastdb status
curl --fail --silent --show-error --unix-socket ~/.lastdb/data/folddb.sock http://localhost/health

The health check returns JSON with "status":"ok". If both commands succeed, the node is up. Restart only when both fail: brew services restart lastdb.

Install →   Apps →   About →   Developer guide →