nestornotes 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,37 @@
1
+ # nestornotes (npm)
2
+
3
+ Thin Node.js wrapper around the Python [`nestornotes`](https://pypi.org/project/nestornotes/) CLI. The wrapper proxies every invocation to the matching pinned PyPI wheel via [`uv`](https://astral.sh/uv), so `npm install -g nestornotes@X.Y.Z` always runs the same Python release.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ # Prerequisite: uv (one-liner installer)
9
+ curl -LsSf https://astral.sh/uv/install.sh | sh # macOS / Linux
10
+ # or: winget install astral-sh.uv # Windows
11
+
12
+ npm install -g nestornotes
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ ```bash
18
+ nestornotes --help
19
+ nestornotes call-tool list_collections
20
+ nestornotes call-tool semantic_search --query "rust async"
21
+ ```
22
+
23
+ By default the CLI talks to `https://mcp.nestornotes.com/mcp`. Override:
24
+
25
+ ```bash
26
+ NESTORNOTES_SERVER_URL=http://localhost:8000/mcp nestornotes call-tool list_collections
27
+ ```
28
+
29
+ ## Upgrade
30
+
31
+ ```bash
32
+ npm update -g nestornotes
33
+ ```
34
+
35
+ ## Why a wrapper?
36
+
37
+ The actual CLI is generated from the [NestorNotes MCP server](https://github.com/grumpy-miner-dev/nestornotes-mcp)'s tool registry by `fastmcp generate-cli`. The Python wheel on PyPI is the source of truth; this npm package exists so Node-first users can install with one command.
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/env node
2
+ // Thin Node.js wrapper that proxies to the Python `nestornotes` CLI on PyPI
3
+ // via `uvx`. The pinned version matches this npm package's version, so
4
+ // installing `nestornotes@<X.Y.Z>` from npm always runs the matching wheel.
5
+ //
6
+ // Requires: `uv` on PATH (https://astral.sh/uv).
7
+
8
+ "use strict";
9
+
10
+ const { spawn, spawnSync } = require("node:child_process");
11
+ const path = require("node:path");
12
+ const { version } = require(path.join(__dirname, "..", "package.json"));
13
+
14
+ function fail(msg) {
15
+ process.stderr.write(`nestornotes: ${msg}\n`);
16
+ process.exit(1);
17
+ }
18
+
19
+ // Verify uv is installed before invoking — gives a useful error rather than
20
+ // the cryptic "ENOENT" you'd get from spawn() on a missing binary.
21
+ const uvCheck = spawnSync("uv", ["--version"], { stdio: "ignore" });
22
+ if (uvCheck.error || uvCheck.status !== 0) {
23
+ fail(
24
+ "`uv` is not installed or not on PATH.\n" +
25
+ "Install it: https://astral.sh/uv (one-line curl on macOS / Linux / Windows).\n" +
26
+ "Then re-run this command."
27
+ );
28
+ }
29
+
30
+ const args = ["tool", "run", `nestornotes==${version}`, ...process.argv.slice(2)];
31
+ const child = spawn("uv", args, { stdio: "inherit" });
32
+
33
+ child.on("error", (err) => fail(`failed to spawn uv: ${err.message}`));
34
+ child.on("exit", (code, signal) => {
35
+ if (signal) {
36
+ process.kill(process.pid, signal);
37
+ } else {
38
+ process.exit(code ?? 1);
39
+ }
40
+ });
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "nestornotes",
3
+ "version": "0.1.0",
4
+ "description": "Command-line client for the NestorNotes knowledge base. Thin wrapper around the Python `nestornotes` CLI on PyPI; runs it via `uvx`.",
5
+ "keywords": [
6
+ "nestornotes",
7
+ "mcp",
8
+ "fastmcp",
9
+ "cli",
10
+ "knowledge-base"
11
+ ],
12
+ "homepage": "https://nestornotes.com",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "https://github.com/nestornotes/nestornotes-cli.git",
16
+ "directory": "npm"
17
+ },
18
+ "bugs": {
19
+ "url": "https://github.com/nestornotes/nestornotes-cli/issues"
20
+ },
21
+ "license": "MIT",
22
+ "bin": {
23
+ "nestornotes": "bin/nestornotes.js"
24
+ },
25
+ "files": [
26
+ "bin/nestornotes.js",
27
+ "README.md"
28
+ ],
29
+ "engines": {
30
+ "node": ">=18"
31
+ }
32
+ }