diff --git a/CHANGELOG.md b/CHANGELOG.md index 34d1c62..8582c12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.1.2] - 2026-06-07 + ### Added - npm package: `npx omnid` and `npm install -g omnid` download the native binary from GitHub releases @@ -37,5 +39,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - CLI commands: `init`, `add`, `check`, `sync`, `daemon`, `proxy`, `uninstall` - Cross-platform CI and GitHub Release binaries +[0.1.2]: https://github.com/xb3sox/omnid/releases/tag/v0.1.2 [0.1.1]: https://github.com/xb3sox/omnid/releases/tag/v0.1.1 [0.1.0]: https://github.com/xb3sox/omnid/releases/tag/v0.1.0 diff --git a/Cargo.lock b/Cargo.lock index 16d9894..b182394 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1034,7 +1034,7 @@ dependencies = [ [[package]] name = "omnid" -version = "0.1.1" +version = "0.1.2" dependencies = [ "anyhow", "assert_cmd", diff --git a/Cargo.toml b/Cargo.toml index ecc8dee..1a0a265 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "omnid" -version = "0.1.1" +version = "0.1.2" edition = "2021" description = "Stop copying MCP, rules, and skills into every AI agent. One folder syncs and tracks your whole setup across 20+ coding tools." authors = ["xb3sox"] diff --git a/README.md b/README.md index b3b247d..3a5049c 100644 --- a/README.md +++ b/README.md @@ -46,8 +46,6 @@ Want a tool inside your agent? Run `omnid add server`. Install for good: `npm install -g omnid` -> **Note:** `npx omnid` / `npm install -g omnid` work after the package is published to npm (starting with the next tagged release). Until then, use [GitHub Releases](#install) or `cargo install`. - ### Example (first run) ``` @@ -64,14 +62,14 @@ Next: open Cursor. omnid is ready. ## Install -**npm** (easiest if you have Node.js — available after first npm publish): +**npm** (easiest if you have Node.js): ```bash npx omnid # try without installing npm install -g omnid # install globally ``` -Requires the `omnid` package on [npm](https://www.npmjs.com/package/omnid). Not live until the next release; use binaries below until then. +See [omnid on npm](https://www.npmjs.com/package/omnid). **Binaries** — [GitHub Releases](https://github.com/xb3sox/omnid/releases) (SHA256 checksum sidecars included) diff --git a/npm/package.json b/npm/package.json index 3ed4468..ad431d3 100644 --- a/npm/package.json +++ b/npm/package.json @@ -1,6 +1,6 @@ { "name": "omnid", - "version": "0.1.1", + "version": "0.1.2", "description": "Sync MCP, rules, and skills across 20+ AI coding agents", "license": "MIT", "repository": { diff --git a/src/main.rs b/src/main.rs index 36fd6a0..eaf6f84 100644 --- a/src/main.rs +++ b/src/main.rs @@ -266,6 +266,9 @@ fn run_default_status(matrix: Option) -> Result<()> { fn resolve_matrix_path(matrix: Option) -> Result { Ok(matrix.unwrap_or_else(|| { + if let Ok(path) = std::env::var("OMNID_MATRIX") { + return PathBuf::from(path); + } omnid::config::MatrixPaths::discover() .map(|p| p.matrix) .unwrap_or_else(|_| PathBuf::from(".config/omni/matrix.yaml")) diff --git a/tests/first_run.rs b/tests/first_run.rs index 14732fe..601754f 100644 --- a/tests/first_run.rs +++ b/tests/first_run.rs @@ -1,5 +1,5 @@ use std::fs; -use std::path::PathBuf; +use std::path::{Path, PathBuf}; use assert_cmd::Command; use tempfile::TempDir; @@ -10,18 +10,24 @@ fn temp_home() -> (TempDir, PathBuf) { (dir, home) } +fn matrix_path(home: &Path) -> PathBuf { + home.join(".config/omni/matrix.yaml") +} + +fn omnid_cmd(home: &Path) -> Command { + let mut cmd = Command::cargo_bin("omnid").unwrap(); + cmd.env("OMNID_MATRIX", matrix_path(home)); + cmd.env("HOME", home); + cmd.env("USERPROFILE", home); + cmd +} + #[test] fn bare_omnid_scaffolds_on_first_run() { let (_dir, home) = temp_home(); - let config_dir = home.join(".config/omni"); - let matrix = config_dir.join("matrix.yaml"); + let matrix = matrix_path(&home); - Command::cargo_bin("omnid") - .unwrap() - .env("HOME", &home) - .env("USERPROFILE", &home) - .assert() - .success(); + omnid_cmd(&home).assert().success(); assert!(matrix.exists(), "matrix.yaml should be created"); let content = fs::read_to_string(&matrix).unwrap(); @@ -32,23 +38,15 @@ fn bare_omnid_scaffolds_on_first_run() { fn add_server_preset_noninteractive() { let (_dir, home) = temp_home(); - Command::cargo_bin("omnid") - .unwrap() - .env("HOME", &home) - .env("USERPROFILE", &home) - .assert() - .success(); + omnid_cmd(&home).assert().success(); - Command::cargo_bin("omnid") - .unwrap() - .env("HOME", &home) - .env("USERPROFILE", &home) + omnid_cmd(&home) .env("OMNID_NONINTERACTIVE", "1") .args(["add", "server", "--preset", "everything", "--write"]) .assert() .success(); - let matrix = home.join(".config/omni/matrix.yaml"); + let matrix = matrix_path(&home); let content = fs::read_to_string(&matrix).unwrap(); assert!(content.contains("everything:")); assert!(content.contains("server-everything"));