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
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,9 @@ jobs:
cpu: [cpuv],
files: ["bin"],
}, null, 2) + "\n");
' "$pkgdir" "@kimetsu/${key}" "$VERSION" "$osv" "$cpuv"
' "$pkgdir" "@kimetsu-ai/${key}" "$VERSION" "$osv" "$cpuv"

echo "publishing @kimetsu/${key}@${VERSION}"
echo "publishing @kimetsu-ai/${key}@${VERSION}"
( cd "$pkgdir" && npm publish --access public )
done

Expand All @@ -386,7 +386,7 @@ jobs:
}
fs.writeFileSync(p, JSON.stringify(j, null, 2) + "\n");
' "$VERSION"
echo "publishing kimetsu@${VERSION}"
echo "publishing kimetsu-ai@${VERSION}"
( cd npm/kimetsu && npm publish --access public )

- name: summary
Expand All @@ -396,13 +396,13 @@ jobs:
echo "" >> $GITHUB_STEP_SUMMARY
echo "Published the main package + 4 platform packages:" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "- [\`kimetsu\`](https://www.npmjs.com/package/kimetsu/v/${VERSION})" >> $GITHUB_STEP_SUMMARY
echo "- [\`kimetsu-ai\`](https://www.npmjs.com/package/kimetsu-ai/v/${VERSION})" >> $GITHUB_STEP_SUMMARY
for k in linux-x64 darwin-x64 darwin-arm64 win32-x64; do
echo "- [\`@kimetsu/${k}\`](https://www.npmjs.com/package/@kimetsu/${k}/v/${VERSION})" >> $GITHUB_STEP_SUMMARY
echo "- [\`@kimetsu-ai/${k}\`](https://www.npmjs.com/package/@kimetsu-ai/${k}/v/${VERSION})" >> $GITHUB_STEP_SUMMARY
done
echo "" >> $GITHUB_STEP_SUMMARY
echo "Users can now install with:" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
echo "npm install -g kimetsu # lean build" >> $GITHUB_STEP_SUMMARY
echo "KIMETSU_NPM_FLAVOR=embeddings npm install -g kimetsu # semantic build" >> $GITHUB_STEP_SUMMARY
echo "npm install -g kimetsu-ai # lean build" >> $GITHUB_STEP_SUMMARY
echo "KIMETSU_NPM_FLAVOR=embeddings npm install -g kimetsu-ai # semantic build" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
20 changes: 14 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,28 @@ follow [SemVer](https://semver.org/spec/v2.0.0.html) with the
caveat that pre-1.0 minor bumps may include breaking changes
(documented in the release notes).

## v0.8.1 — npm distribution
## v0.8.2 — npm distribution

ADDED
* **npm distribution.** Kimetsu now publishes to npm — `npm install -g kimetsu`
* **npm distribution.** Kimetsu now publishes to npm — `npm install -g kimetsu-ai`
installs the prebuilt native binary for your platform, no Rust toolchain
required. Uses the esbuild/turbo model: per-platform packages
(`@kimetsu/linux-x64`, `@kimetsu/darwin-x64`, `@kimetsu/darwin-arm64`,
`@kimetsu/win32-x64`) selected via `optionalDependencies`, with a thin
(`@kimetsu-ai/linux-x64`, `@kimetsu-ai/darwin-x64`, `@kimetsu-ai/darwin-arm64`,
`@kimetsu-ai/win32-x64`) selected via `optionalDependencies`, with a thin
`bin/cli.js` launcher that execs the matching binary. No postinstall, so it
works under `npm install --ignore-scripts`. The semantic build is fetched on
demand when `KIMETSU_NPM_FLAVOR=embeddings` is set. Published from the
existing release pipeline (new `publish-npm` job, gated on the `PUBLISH_NPM`
existing release pipeline (`publish-npm` job, gated on the `PUBLISH_NPM`
repo variable + `NPM_TOKEN` secret, mirroring the crates.io gate). Sources
live in [`npm/`](npm/).
live in [`npm/`](npm/). Installs the `kimetsu` command (also available as
`kimetsu-ai`).

## v0.8.1

Release-engineering release. The `publish-npm` pipeline first landed here, but
the npm packages themselves ship in v0.8.2 (npm registry naming: the project
lives under the `@kimetsu-ai` scope / `kimetsu-ai` package). crates.io and the
prebuilt binaries released as usual.

## v0.8.0 — proactive recall, selectable embedding model, full MCP control

Expand Down
12 changes: 6 additions & 6 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ resolver = "3"
# everything below except the per-crate `description`, `keywords`,
# and `categories` which live in each `[package]` block since
# crates.io enforces them per crate.
version = "0.8.1"
version = "0.8.2"
edition = "2024"
# Rust ecosystem dual-license (matches tokio, serde, fastembed-rs,
# etc.). UNLICENSED would block crates.io entirely.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ Prefer not to touch the Rust toolchain? Two options.
**npm** — installs the prebuilt binary for your platform, no Rust required:

```bash
npm install -g kimetsu # lean build
KIMETSU_NPM_FLAVOR=embeddings npm install -g kimetsu # opt into the semantic build
npm install -g kimetsu-ai # lean build
KIMETSU_NPM_FLAVOR=embeddings npm install -g kimetsu-ai # opt into the semantic build
```

npm pulls only the matching per-platform package (`@kimetsu/*`) via
npm pulls only the matching per-platform package (`@kimetsu-ai/*`) via
optionalDependencies — there's no postinstall download, so it works under
`npm install --ignore-scripts`. The embeddings build is fetched on first run and
is available where ONNX Runtime prebuilts exist (Linux x64, macOS Apple Silicon,
Expand Down
20 changes: 11 additions & 9 deletions npm/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# npm distribution

Kimetsu is also published to npm as the `kimetsu` package, so JS/TS users can
`npm install -g kimetsu` without a Rust toolchain. npm ships the **same prebuilt
native binary** as the GitHub Release — it is not a reimplementation.
Kimetsu is also published to npm as the `kimetsu-ai` package (the `kimetsu`
package name was taken; the project's npm scope is `@kimetsu-ai`), so JS/TS
users can `npm install -g kimetsu-ai` without a Rust toolchain. npm ships the
**same prebuilt native binary** as the GitHub Release — it is not a
reimplementation.

## Layout

Expand All @@ -11,7 +13,7 @@ npm/
kimetsu/ main package — committed source (launcher, no binaries)
bin/cli.js resolves the platform package and execs its binary
lib/embeddings.js on-demand embeddings download (KIMETSU_NPM_FLAVOR=embeddings)
package.json optionalDependencies -> the 4 @kimetsu/* platform packages
package.json optionalDependencies -> the 4 @kimetsu-ai/* platform packages
README.md
README.md this file
```
Expand All @@ -24,10 +26,10 @@ assembled and published entirely in CI (`.github/workflows/release.yml`, the
produces:

```
@kimetsu/linux-x64 os:[linux] cpu:[x64] x86_64-unknown-linux-gnu
@kimetsu/darwin-x64 os:[darwin] cpu:[x64] x86_64-apple-darwin
@kimetsu/darwin-arm64 os:[darwin] cpu:[arm64] aarch64-apple-darwin
@kimetsu/win32-x64 os:[win32] cpu:[x64] x86_64-pc-windows-msvc
@kimetsu-ai/linux-x64 os:[linux] cpu:[x64] x86_64-unknown-linux-gnu
@kimetsu-ai/darwin-x64 os:[darwin] cpu:[x64] x86_64-apple-darwin
@kimetsu-ai/darwin-arm64 os:[darwin] cpu:[arm64] aarch64-apple-darwin
@kimetsu-ai/win32-x64 os:[win32] cpu:[x64] x86_64-pc-windows-msvc
```

npm installs only the platform package whose `os`/`cpu` match the host; the
Expand All @@ -42,6 +44,6 @@ rather than shipped as a package.

The committed `kimetsu/package.json` carries a `0.0.0` sentinel. CI stamps the
real version (`${GITHUB_REF_NAME#v}`) into the main package and every
`@kimetsu/*` package + `optionalDependencies` entry at publish time, so npm
`@kimetsu-ai/*` package + `optionalDependencies` entry at publish time, so npm
always matches the crates.io / GitHub Release for the same tag. The single
source of truth remains `Cargo.toml` `[workspace.package] version`.
13 changes: 7 additions & 6 deletions npm/kimetsu/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# kimetsu
# kimetsu-ai

A persistent memory **brain** sidecar for Claude Code and Codex. It accumulates
generalizable knowledge across sessions and retrieves it on demand.
Expand All @@ -11,14 +11,15 @@ This npm package installs the prebuilt native `kimetsu` binary for your platform
## Install

```bash
npm install -g kimetsu
npm install -g kimetsu-ai
kimetsu --version
kimetsu doctor # checks paths, brain.db, embedder, MCP, bridge
```

npm downloads only the platform package that matches your OS/CPU
(`@kimetsu/linux-x64`, `@kimetsu/darwin-x64`, `@kimetsu/darwin-arm64`,
`@kimetsu/win32-x64`) via `optionalDependencies`. There is **no postinstall
Installs the `kimetsu` command (also available as `kimetsu-ai`). npm downloads
only the platform package that matches your OS/CPU
(`@kimetsu-ai/linux-x64`, `@kimetsu-ai/darwin-x64`, `@kimetsu-ai/darwin-arm64`,
`@kimetsu-ai/win32-x64`) via `optionalDependencies`. There is **no postinstall
download** — it works under `npm install --ignore-scripts`.

### Semantic (embeddings) build
Expand All @@ -28,7 +29,7 @@ download. To opt into the semantic build (fastembed + ONNX; first run downloads
BGE-small), set `KIMETSU_NPM_FLAVOR=embeddings`:

```bash
KIMETSU_NPM_FLAVOR=embeddings npm install -g kimetsu
KIMETSU_NPM_FLAVOR=embeddings npm install -g kimetsu-ai
```

With that env var set, the launcher fetches and caches the embeddings binary from
Expand Down
10 changes: 5 additions & 5 deletions npm/kimetsu/bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Launcher for the `kimetsu` npm package.
//
// Kimetsu is a native Rust binary. npm ships it through per-platform
// optionalDependencies (@kimetsu/<platform>-<arch>) — npm installs only the
// optionalDependencies (@kimetsu-ai/<platform>-<arch>) — npm installs only the
// one whose os/cpu match the host, and this launcher execs its binary,
// forwarding all args, stdio, and the exit code.
//
Expand All @@ -18,25 +18,25 @@ const { spawnSync } = require("child_process");
// key = `${process.platform}-${process.arch}`
const PLATFORMS = {
"linux-x64": {
pkg: "@kimetsu/linux-x64",
pkg: "@kimetsu-ai/linux-x64",
target: "x86_64-unknown-linux-gnu",
bin: "kimetsu",
embeddings: true,
},
"darwin-x64": {
pkg: "@kimetsu/darwin-x64",
pkg: "@kimetsu-ai/darwin-x64",
target: "x86_64-apple-darwin",
bin: "kimetsu",
embeddings: false, // ort ships no prebuilt ONNX Runtime for x86_64 macOS
},
"darwin-arm64": {
pkg: "@kimetsu/darwin-arm64",
pkg: "@kimetsu-ai/darwin-arm64",
target: "aarch64-apple-darwin",
bin: "kimetsu",
embeddings: true,
},
"win32-x64": {
pkg: "@kimetsu/win32-x64",
pkg: "@kimetsu-ai/win32-x64",
target: "x86_64-pc-windows-msvc",
bin: "kimetsu.exe",
embeddings: true,
Expand Down
13 changes: 7 additions & 6 deletions npm/kimetsu/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "kimetsu",
"name": "kimetsu-ai",
"version": "0.0.0",
"description": "Kimetsu — a persistent memory brain sidecar for Claude Code and Codex. Installs the prebuilt native binary for your platform.",
"keywords": [
Expand All @@ -23,7 +23,8 @@
"license": "MIT OR Apache-2.0",
"type": "commonjs",
"bin": {
"kimetsu": "bin/cli.js"
"kimetsu": "bin/cli.js",
"kimetsu-ai": "bin/cli.js"
},
"files": [
"bin/cli.js",
Expand All @@ -34,9 +35,9 @@
"node": ">=16"
},
"optionalDependencies": {
"@kimetsu/linux-x64": "0.0.0",
"@kimetsu/darwin-x64": "0.0.0",
"@kimetsu/darwin-arm64": "0.0.0",
"@kimetsu/win32-x64": "0.0.0"
"@kimetsu-ai/linux-x64": "0.0.0",
"@kimetsu-ai/darwin-x64": "0.0.0",
"@kimetsu-ai/darwin-arm64": "0.0.0",
"@kimetsu-ai/win32-x64": "0.0.0"
}
}
Loading