slice-memory-cli
v0.1.29
Published
CLI-first runtime for slice-based memory repositories.
Readme
slice
slice is a CLI-first memory runtime for coding agents.
It gives agents:
- repo-local memory in plain files
- dated source memories called slices
- stable entities and collected stories
- bootstrap files for Codex, Claude, and Gemini
- plugin and connector hooks
The runtime keeps memory inspectable and versioned instead of hiding it inside chat history.
Demo
Start
Create a memory repo:
npx --yes slice-memory-cli@latest init my-memory
cd my-memoryThen open Codex, Claude, or Gemini in that directory and start talking. The generated agent bootstrap loads the current Slice briefing automatically.
First Run
On an empty repo, Slice treats the first session as a lightweight setup conversation.
The agent should ask whether to collect basic user context, then continue naturally until the durable context has enough shape:
Agent: Want to do a short setup so I can remember the basics for future sessions?
User: sure.
Agent: What should I know about the demo user and current work?
User: I work on Prototype App. I prefer concise summaries. I am improving onboarding for beta users.
Agent: Which recurring projects or references should I recognize later?
User: Prototype App, Onboarding Flow, Setup Screen, Example Labs, and Weekly Review.That becomes stories/user-context.md:
# User Context
## About Me
- User works on Prototype App.
- User prefers concise summaries.
## Life And Work
- User is improving onboarding for beta users.
- User's memory often references Prototype App, Onboarding Flow, Setup Screen, Example Labs, and Weekly Review.Capture Example
Later, the user can just talk:
User: I met a prototype user after lunch. They got confused by the setup screen, so I decided to simplify onboarding.The agent captures durable memory through the Slice capture engine. Slice writes a source memory like:
---
at: "2026-05-20"
subject: "Prototype user onboarding confusion"
capture_pipeline: "[email protected]"
source_refs:
- kind: "session"
ref: "codex:session"
entities:
- "user"
- "prototype-user"
- "setup-screen"
- "onboarding"
---
# Prototype user onboarding confusion
- User met a prototype user after lunch.
- Prototype user got confused by setup screen.
- User decided to simplify onboarding.The file lands under:
slices/2026/05/slice-2026-05-20-prototype-user-onboarding-confusion.mdSlice also keeps reusable names in entities/registry.yaml:
entities:
- id: "prototype-user"
label: "prototype user"
slices:
- "slices/2026/05/slice-2026-05-20-prototype-user-onboarding-confusion.md"
- id: "setup-screen"
label: "setup screen"
slices:
- "slices/2026/05/slice-2026-05-20-prototype-user-onboarding-confusion.md"What Happens
slice init creates a plain file memory repo:
slices/
stories/
user-context.md
entities/
registry.yaml
.slice/
config.json
surfaces.json
plugins/During agent sessions, Slice writes source memory into slices/, updates entities/registry.yaml, maintains stories/user-context.md, and records where the memory came from.
validate checks the runtime contract and blocks direct slice/entity writes outside the capture pipeline.
Plugins live under .slice/plugins/<plugin-id>/PLUGIN.md. Connectors install plugin folders and local tool files into the memory repo.
Inspect Memory
Use the CLI directly when you want to inspect or debug the repo:
npx --yes slice-memory-cli@latest briefing codex
npx --yes slice-memory-cli@latest retrieve recent 10
npx --yes slice-memory-cli@latest retrieve search "onboarding"
npx --yes slice-memory-cli@latest query entity setup-screen
npx --yes slice-memory-cli@latest validate
npx --yes slice-memory-cli@latest thought-mapInstall connectors through the same runtime:
npx --yes slice-memory-cli@latest connectors list
npx --yes slice-memory-cli@latest connectors install gmailDevelopment
npm install
npm run check
npm test
npm run build
node dist/cli.js --helpLicense
MIT
