Local ticket memory for agentic coding CLIs.
Flarex is a local-first ticket memory system for Claude Code and Codex. It stores ticket context inside the current repository, exposes that context through an MCP server, and ships a shared skill bundle so agents can resume work by ticket with compact memory instead of replaying entire conversations.
Agentic coding work is often ticket-shaped, but session memory is usually client-specific and temporary. Flarex makes ticket memory repo-local and portable, so a developer can:
- initialize memory once in a repo
- open
CON2-202 - persist important progress locally
- resume the same ticket later from Claude Code or Codex
- local-first storage under
.knowledge/ - append-only NDJSON ticket transcripts
- deterministic JSON summaries
- local STDIO MCP server
- shared
SKILL.mdworkflow for Claude Code and Codex - repo-scoped install flow with generated MCP config snippets
- safe defaults with no network access for core behavior
- Node.js 20+
- npm
Replace these placeholders with your own paths:
export FLAREX_REPO=/absolute/path/to/flarex
export TARGET_REPO=/absolute/path/to/your/projectcd "$FLAREX_REPO"
npm install
npm run buildcd "$TARGET_REPO"
node "$FLAREX_REPO/dist/cli.js" init
node "$FLAREX_REPO/dist/cli.js" install --localIf you want one command that initializes the repo, installs the local skills, and configures MCP for any available clients on your machine, run:
bash "$FLAREX_REPO/scripts/setup-clients.sh" "$TARGET_REPO"What it does:
- runs
flarex initin the target repo - runs
flarex install --local - if
claudeis available, adds theflarexMCP server to Claude Code - if
claudeis available, installs Claude hooks for automatic Markdown memory capture - if
codexis available, adds theflarexMCP server to Codex - prints the next commands to run in Claude Code and Codex
After running bash "$FLAREX_REPO/scripts/setup-clients.sh" "$TARGET_REPO", open Claude Code in the repo and run:
/fx CON2-202
Continue the task.
If CON2-202 does not exist yet, the agent should create it through Flarex MCP, then load memory first and continue the work.
Example repo-local layout:
.claude/
skills/
fx/
SKILL.md
After running bash "$FLAREX_REPO/scripts/setup-clients.sh" "$TARGET_REPO", open Codex in the repo and run:
$fx CON2-202
Continue the task.
Or open /skills and select fx.
Example repo-local layout:
.agents/
skills/
fx/
SKILL.md
flarex init
flarex install --local
flarex status
flarex list
flarex context CON2-202
flarex open CON2-202
flarex doctorThe normal ticket workflow in a repo is:
- Initialize Flarex once:
node "$FLAREX_REPO/dist/cli.js" init- Install the local skills once:
node "$FLAREX_REPO/dist/cli.js" install --local-
Start your client in that same repo.
-
In Claude Code run:
/fx CON2-202
Continue the task.
- In Codex run:
$fx CON2-202
Continue the task.
- Keep working normally. Flarex will use:
.knowledge/tickets/CON2-202.memory.mdas the rich handoff memory.knowledge/tickets/CON2-202.summary.jsonas compact structured memory.knowledge/tickets/CON2-202.ndjsonas the append-only transcript
- Check stored context any time with:
node "$FLAREX_REPO/dist/cli.js" status
node "$FLAREX_REPO/dist/cli.js" context CON2-202If you want to create or switch tickets from the CLI instead of the agent, you can still run:
node "$FLAREX_REPO/dist/cli.js" open CON2-202/fx
$fx/skills
.knowledge/
active-ticket.json
config.json
tickets/
CON2-202.ndjson
CON2-202.summary.json
CON2-202.memory.md
active-ticket.jsontracks the currently active ticket in this repo.*.ndjsonstores append-only transcript entries.*.summary.jsonstores compact deterministic summaries for token-efficient resumption.*.memory.mdstores richer Markdown memory for plan requests, assistant updates, and completed code-change summaries.
Claude Code and Codex start the Flarex MCP server through their MCP configuration. Flarex exposes these MCP tools:
knowledge_initknowledge_open_ticketknowledge_set_active_ticketknowledge_get_contextknowledge_append_turnknowledge_update_summaryknowledge_list_ticketsknowledge_read_ticketknowledge_read_memory
Flarex also exposes these resources:
knowledge://active-ticketknowledge://ticketsknowledge://ticket/{ticketId}knowledge://ticket/{ticketId}/summaryknowledge://ticket/{ticketId}/memory
And these prompts:
resume-ticketstart-ticket-session
- Flarex stores data locally in the current repository.
- Flarex does not upload ticket data or use the network for core workflows.
.knowledge/is added to.gitignoreby default.- likely secrets are redacted before transcript append by default
- logs and summaries remain human-inspectable files
flarex/
README.md
LICENSE
package.json
tsconfig.json
src/
cli.ts
mcp/
prompts.ts
resources.ts
server.ts
tools.ts
core/
config.ts
paths.ts
store.ts
summary.ts
ticket.ts
validate.ts
install/
claude.ts
codex.ts
install.ts
util/
fs.ts
log.ts
time.ts
skills/
fx/
SKILL.md
examples/
claude-mcp-config.json
codex-mcp-config.toml
test/
core/
install/
mcp/
- Run
bash "$FLAREX_REPO/scripts/setup-clients.sh" "$TARGET_REPO". - Ensure
.claude/skills/fx/SKILL.mdexists. - Start Claude Code in the repo.
- Run:
/fx CON2-202
Continue the task.
- Run
bash "$FLAREX_REPO/scripts/setup-clients.sh" "$TARGET_REPO". - Ensure
.agents/skills/fx/SKILL.mdexists. - Start Codex in the repo.
- Run:
$fx CON2-202
Continue the task.
- Jira sync
- GitHub issue mapping
- better summarization
- multi-repo indexing
- v1 uses per-process write serialization and atomic JSON writes, not cross-process file locking
- summary updates are deterministic only; there is no model-assisted summarization yet
- installer writes repo-local skills and config snippets, but does not fully manage every client config surface automatically
- full transcript replay is available, but compact context is the default and preferred path
- automatic Markdown memory capture is optional and currently targets Claude Code hooks; Codex does not yet have an equivalent Flarex hook flow
npm installnpm run buildnpm test- verify
flarex initin a fresh repo - verify
flarex open CON2-202 - verify MCP connection works in Claude Code and Codex
- verify
.claude/skills/fxinstall - verify
.agents/skills/fxinstall - verify example MCP configs
- review README for public open-source clarity