Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
environment files, or generated vector stores.
- Keep public branding centered on `Mimir`. Use JCode Labs and Jean-Baptiste Thery for
package scope, repository ownership, and copyright, not as the product name.
- Use `Mimir Core` only for the technical core package `@jcode.labs/mimir` and developer-facing
package metadata. User-facing product copy remains `Mimir`; companion packages are Mimir add-ons.
- The package is open source under the MIT License unless the user explicitly changes it.
- This package must stay reusable across repositories. Resolve project data from the
caller's working directory or explicit config, not from the package installation path.
Expand Down Expand Up @@ -104,8 +106,12 @@ General principles (KISS, DRY, YAGNI, SOLID) as applied in this codebase. Match
- `packages/mimir/skills/mimir-markdown-report/SKILL.md` is the optional bundled Markdown-report
skill.
- `kb setup` must keep generating agent-specific MCP helpers for easy local use:
`.mimir/claude-mcp-server.json` for `claude mcp add-json` and `.mimir/codex-mcp.toml` for Codex
config layers.
`.mimir/claude-mcp-server.json` for `claude mcp add-json`, `.mimir/codex-mcp.toml` for Codex
config layers, `.mimir/kimi-mcp.json` for Kimi, `.mimir/opencode.jsonc` for OpenCode, and
`.mimir/cline-mcp.json` for Cline.
- `kb install-agent` owns native skill discovery for the main supported coding agents. Keep
`--agents claude|codex|kimi|opencode|cline` targeted so a user can install only the agent they use,
with project scope by default and user scope available through `--scope user`.
- `packages/mimir/examples/sovereign-rag-demo` is the tracked synthetic test workspace for manual
and package validation.
- `.kb/`, `.mimir/`, and project `private/` folders are local user data or generated agent
Expand Down
78 changes: 73 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ installed in any Node.js repository. It indexes local files from the target repo
vectors locally with LanceDB, and can use either built-in local-hash retrieval or optional
Transformers.js semantic embeddings.

Mimir core returns cited retrieval context. Answer synthesis belongs to the AI agent, LLM, or local
Mimir Core returns cited retrieval context. Answer synthesis belongs to the AI agent, LLM, or local
model runtime you choose around it.

Created by Jean-Baptiste Thery and published under the JCode Labs npm scope.
Expand All @@ -25,8 +25,8 @@ This root README is the canonical product documentation for the public npm packa

| Package | Role |
| --- | --- |
| `@jcode.labs/mimir` | Core CLI, library, MCP server, bundled agent skills, and synthetic examples. |
| `@jcode.labs/mimir-tts` | Plug-and-play Edge-quality MP3 and offline Transformers.js WAV renderer used by `kb audio`. |
| `@jcode.labs/mimir` | Mimir Core: CLI, library, MCP server, bundled agent skills, and synthetic examples. |
| `@jcode.labs/mimir-tts` | Mimir add-on for Edge-quality MP3 and offline Transformers.js WAV rendering through `kb audio`. |

The package README files are intentionally short because npm displays each package README
separately. They point npm readers back to this GitHub documentation.
Expand Down Expand Up @@ -150,7 +150,11 @@ private/ # raw documents to ingest
.mimir/skills/mimir-markdown-report/SKILL.md
.mimir/mcp.json # generic MCP server config snippet
.mimir/claude-mcp-server.json # Claude Code add-json payload
.mimir/codex-mcp.toml # Codex config.toml snippet
.mimir/codex-mcp.toml # Codex config.toml snippet with MCP and skills.config
.mimir/kimi-mcp.json # Kimi Code CLI MCP config
.mimir/opencode.jsonc # OpenCode config snippet
.mimir/cline-mcp.json # Cline MCP config
.mimir/agent-setup.md # agent-specific setup guide
.gitignore # ignores private/**, .kb/, and .mimir/
```

Expand Down Expand Up @@ -303,6 +307,10 @@ This creates:
.mimir/mcp.json
.mimir/claude-mcp-server.json
.mimir/codex-mcp.toml
.mimir/kimi-mcp.json
.mimir/opencode.jsonc
.mimir/cline-mcp.json
.mimir/agent-setup.md
.mimir/README.md
```

Expand All @@ -312,6 +320,25 @@ Agents that support skill folders can load `.mimir/skills/mimir/` for deep local
audit memo, or planning note. Other agents can read the generated `.mimir/README.md` and use the MCP
config snippet.

For native discovery in a specific agent, install only the agent you use:

```bash
pnpm exec kb install-agent --agents claude
pnpm exec kb install-agent --agents kimi
pnpm exec kb install-agent --agents claude,codex,kimi,opencode,cline
```

By default, `install-agent` writes project-scope skill folders. Add `--scope user` for global
installations.

| Agent | Project skill directory | Main MCP helper |
| --- | --- | --- |
| Claude Code | `.claude/skills/` | `.mimir/claude-mcp-server.json` |
| Codex | `.codex/skills/` plus `skills.config` | `.mimir/codex-mcp.toml` |
| Kimi Code CLI | `.kimi/skills/` | `.mimir/kimi-mcp.json` |
| OpenCode | `.opencode/skills/` | `.mimir/opencode.jsonc` |
| Cline | `.cline/skills/` | `.mimir/cline-mcp.json` |

Start the MCP server from the repository root:

```bash
Expand All @@ -336,6 +363,7 @@ From the target repository root:

```bash
pnpm exec kb setup
pnpm exec kb install-agent --agents claude
claude mcp add-json --scope local mimir "$(cat .mimir/claude-mcp-server.json)"
```

Expand All @@ -350,11 +378,51 @@ From the target repository root:

```bash
pnpm exec kb setup
pnpm exec kb install-agent --agents codex
cat .mimir/codex-mcp.toml
```

Copy the printed TOML into `~/.codex/config.toml` or another trusted Codex config layer. The snippet
contains the repository `cwd`, so Codex can launch the Mimir MCP server from the right project.
contains the repository `cwd`, the Mimir MCP server, and `skills.config` entries for the bundled
skills.

### Kimi Code CLI

From the target repository root:

```bash
pnpm exec kb setup
pnpm exec kb install-agent --agents kimi
kimi --mcp-config-file .mimir/kimi-mcp.json
```

Kimi can discover project skills from `.kimi/skills/`. The MCP config can also be installed in
Kimi's global MCP file if you intentionally want a global setup.

### OpenCode

From the target repository root:

```bash
pnpm exec kb setup
pnpm exec kb install-agent --agents opencode
cat .mimir/opencode.jsonc
```

Copy or merge the generated snippet into the OpenCode config layer you use for the project.

### Cline

From the target repository root:

```bash
pnpm exec kb setup
pnpm exec kb install-agent --agents cline
cat .mimir/cline-mcp.json
```

Cline can discover project skills from `.cline/skills/`. Add the generated MCP JSON under
`mcpServers` in Cline's MCP configuration when tool access is needed.

For other MCP clients that cannot set `cwd`, set `MIMIR_PROJECT_ROOT=/absolute/path/to/repository`
when launching `kb serve-mcp`.
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "jcode-mimir",
"version": "0.4.8",
"version": "0.4.9",
"private": true,
"description": "Monorepo for the Mimir open-source local RAG packages.",
"description": "Monorepo for Mimir Core and open-source Mimir add-ons.",
"type": "module",
"license": "MIT",
"packageManager": "pnpm@11.9.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/mimir-tts/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Mimir TTS Package
# Mimir TTS Add-On

`@jcode.labs/mimir-tts` is the standalone text-to-speech package used by Mimir audio summaries.
`@jcode.labs/mimir-tts` is the standalone text-to-speech add-on used by Mimir audio summaries.
It gives Mimir a plug-and-play narration renderer without making audio generation part of the core
RAG pipeline.

Expand Down
4 changes: 2 additions & 2 deletions packages/mimir-tts/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@jcode.labs/mimir-tts",
"version": "0.4.8",
"description": "Plug-and-play Edge-quality and offline text-to-speech for Mimir audio summaries.",
"version": "0.4.9",
"description": "Mimir add-on for plug-and-play Edge-quality and offline text-to-speech audio summaries.",
"type": "module",
"license": "MIT",
"author": {
Expand Down
9 changes: 5 additions & 4 deletions packages/mimir/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Mimir Core Package

`@jcode.labs/mimir` is the core package for Mimir, an open-source sovereign local RAG toolkit for
`@jcode.labs/mimir` is Mimir Core, the technical core package for Mimir, an open-source sovereign local RAG toolkit for
confidential datasets and AI agents.

**Full documentation:** https://github.com/jcode-works/jcode-mimir#readme
Expand Down Expand Up @@ -59,9 +59,10 @@ Run `pnpm exec kb doctor --fix` later to repair missing setup or rebuild stale i

## Claude Code And Codex

After `pnpm exec kb setup`, use `.mimir/claude-mcp-server.json` with `claude mcp add-json`, or copy
`.mimir/codex-mcp.toml` into a trusted Codex config layer. See the canonical GitHub README for the
full agent demo.
After `pnpm exec kb setup`, use `pnpm exec kb install-agent --agents claude`, `--agents kimi`, or a
comma-separated list for native agent skill discovery. Mimir Core also generates MCP helpers for
Claude Code, Codex, Kimi, OpenCode, and Cline under `.mimir/`. See the canonical GitHub README for
the full agent demo.

## License

Expand Down
56 changes: 51 additions & 5 deletions packages/mimir/dist/cli.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/mimir/dist/cli.js.map

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions packages/mimir/dist/doctor.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading