Quickstart
This guide provisions a MemForks tree on mainnet, verifies your local configuration, and shows the first memory operations. No SUI required — gas is sponsored by MemForks.
Requirements
- Node.js 20 or newer
- npm
- A terminal
For app integrations you will also need a model provider key such as OPENAI_API_KEY.
1. Install The CLI
npm install -g @memfork/cliYou can also run one-off commands with npx @memfork/cli, but installing globally makes the rest of the workflow simpler.
2. Provision A Tree
memfork init --quickSelect mainnet — gas sponsored by MemForks (recommended) when prompted.
--quick performs the full automated setup:
- Generates a fresh Sui Ed25519 keypair.
- Requests a gas drip from the MemForks sponsor service (covers MemWal setup).
- Provisions a MemWal account on-chain.
- Generates and registers a MemWal delegate key.
- Creates a MemForks
MemoryTreeon Sui (gas sponsored). - Saves credentials to
~/.memfork/credentials.json. - Writes project config to
.memfork/config.json.
Nothing to copy-paste or fund manually.
3. Verify Setup
memfork doctordoctor checks config files, credential permissions, Sui RPC, relayer connectivity, and the MemoryTree object.
For environment-based apps, print .env-style values:
memfork doctor --env4. Make Your First Branch Commit
memfork branch experiment/readme --from main
memfork commit \
--branch experiment/readme \
-m "documented quickstart decision" \
--facts "MemForks quickstart provisions on mainnet with zero-friction gas sponsorship"Then recall it:
memfork recall "how does quickstart provision credentials?" \
--branch experiment/readme5. Add An Adapter
For a chat or generation app:
npm install @memfork/vercel-ai @memfork/core aiContinue to Vercel AI SDK.
For a LangGraph workflow:
npm install @memfork/langgraph @memfork/core @langchain/langgraphContinue to LangGraph.
6. Install IDE Memory
Cursor:
memfork install cursorCodex:
memfork install codex
codex plugin add .codex-pluginRestart the IDE after installation so MCP tools and rules are loaded.
Next Steps
- Learn the MemWal vs MemForks distinction.
- Read the configuration guide.
- Build the branch-aware chat example.