Quickstart
Quickstart
Section titled “Quickstart”Get your first MindFry instance running and create your first memory.
Installation
Section titled “Installation”Docker (Recommended)
Section titled “Docker (Recommended)”docker run -d -p 9527:9527 ghcr.io/laphilosophia/mindfry:latestFrom Source
Section titled “From Source”git clone https://github.com/laphilosophia/mindfry.gitcd mindfrycargo run --release --bin mindfry-serverVia Cargo
Section titled “Via Cargo”cargo install mindfrymindfry-serverVerify Installation
Section titled “Verify Installation”Use the CLI to verify the server is running:
# Using cargocargo run --bin mfcli -- ping
# Or if installed globallymfcli pingExpected output:
PONG (server uptime: 0.5s)Create Your First Memory
Section titled “Create Your First Memory”-
Create a lineage (memory unit)
Terminal window mfcli create fire 0.9This creates a memory called “fire” with initial energy of 0.9.
-
Check the database stats
Terminal window mfcli statsYou should see
lineage_count: 1. -
Stimulate the memory
Terminal window mfcli stimulate fire 0.5This adds energy to the memory. Watch it propagate to connected memories!
-
Retrieve the memory
Terminal window mfcli get fire
Using the TypeScript SDK
Section titled “Using the TypeScript SDK”Install the SDK:
npm install @mindfry/clientConnect and interact:
import { MindFry } from '@mindfry/client'
const brain = new MindFry({ host: 'localhost', port: 9527 })await brain.connect()
// Create a memoryawait brain.lineage.create({ key: 'hello', energy: 0.8 })
// Create a bond (synergy)await brain.bond.connect({ from: 'hello', to: 'world', strength: 0.7, polarity: 1, // +1 = synergy, -1 = antagonism})
// Stimulate and watch propagationawait brain.lineage.stimulate({ key: 'hello', delta: 1.0 })
// The 'world' memory now has increased energy due to synaptic propagation!const world = await brain.lineage.get('world')console.log(world.energy) // Increased by ~0.35 (damped propagation)
await brain.disconnect()Next Steps
Section titled “Next Steps”- Concepts — Understand decay, bonds, and mood
- First Memory Tutorial — Detailed walkthrough
- Recipes — Real-world usage patterns