@opennous/cli 0.7.1 → 0.7.2

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 CHANGED
@@ -4,18 +4,14 @@ Nous CLI — set Nous up, connect it to your coding agent, and read the Context
4
4
 
5
5
  ## Get started
6
6
 
7
- ```bash
8
- curl -fsSL https://api.opennous.cloud/install | sh
9
- ```
10
-
11
- That installs the CLI and runs `nous init`, which signs you in (creating your account if you don't have one), registers the Nous MCP server with the agent on your machine, and hands off. Then tell your agent *"set up my Nous workspace"* — it reads your project, finds your ICP (or drafts one), and syncs it.
12
-
13
- Prefer to run it yourself:
7
+ One command. It signs you in (creating your account if you don't have one), registers the Nous MCP server with the agent on your machine, and hands off. The same command on macOS, Linux, and Windows (needs [Node 18+](https://nodejs.org)):
14
8
 
15
9
  ```bash
16
- npx -y @opennous/cli@latest init
10
+ npx @opennous/cli@latest init
17
11
  ```
18
12
 
13
+ Then tell your agent *"set up my Nous workspace"* — it reads your project, finds your ICP (or drafts one), and syncs it. On self-host, add `--url https://api.yourdomain.com`.
14
+
19
15
  ## Event tracking
20
16
 
21
17
  `nous track init` detects your stack (Next.js, Node, Python), writes a small `nous.js` (or `nous.py`) module with three helpers, and updates your `.env`:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opennous/cli",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "description": "Nous CLI — set up Nous, connect it to your coding agent, and read the Context API from your terminal",
5
5
  "type": "module",
6
6
  "bin": {
package/src/index.js CHANGED
@@ -8,7 +8,7 @@
8
8
  import { program, Command } from "commander";
9
9
  import { readFileSync, writeFileSync, existsSync, mkdirSync, appendFileSync } from "fs";
10
10
  import { homedir } from "os";
11
- import { join, resolve } from "path";
11
+ import { join, resolve, dirname } from "path";
12
12
  import { createInterface } from "readline";
13
13
  import { spawn, spawnSync } from "child_process";
14
14
 
@@ -831,7 +831,7 @@ program
831
831
  // ---------------------------------------------------------------------------
832
832
  // Browser sign-in (device authorization). Opens the browser, you approve, and a
833
833
  // freshly minted API key is saved to ~/.nous/config.json. No copy-paste. Shared
834
- // by `nous login`, `nous init`, and the plugin's /nous-login command.
834
+ // by `nous login` and `nous init`.
835
835
  // ---------------------------------------------------------------------------
836
836
  async function browserLogin(url) {
837
837
  const apiUrl = url || process.env.NOUS_API_URL || readConfig().apiUrl || "https://api.opennous.cloud";
@@ -894,10 +894,11 @@ program
894
894
  // ---------------------------------------------------------------------------
895
895
  // MCP registration — connect Nous to whatever agent is on this machine.
896
896
  //
897
- // We deliberately DO NOT use the Claude Code plugin/marketplace here. Two commands
898
- // (`/plugin marketplace add`, `/plugin install`), Claude-Code-only, with a marketplace
899
- // standing between a new user and the product — it's too much for a first run. The MCP
900
- // server is the whole integration, and `claude mcp add` registers it in one line.
897
+ // There is deliberately no Claude Code plugin/marketplace. A plugin would be Claude-Code-only
898
+ // and put a marketplace between a new user and the product — too much for a first run, and it
899
+ // wouldn't work for Cursor, Codex, or any other host. The MCP server is the whole integration,
900
+ // so registration is one cross-platform step: `claude mcp add` if the Claude CLI is here, else
901
+ // a `.mcp.json` any MCP host reads.
901
902
  //
902
903
  // The MCP resolves its key from ~/.nous/config.json on every call, so we never bake the
903
904
  // key into any of these configs — sign-in already wrote it there.
@@ -927,7 +928,7 @@ function writeJsonMcp(path, apiUrl) {
927
928
  // Only pin a non-default API URL (self-host). Cloud reads the key from the config file.
928
929
  ...(apiUrl && apiUrl !== "https://api.opennous.cloud" ? { env: { NOUS_API_URL: apiUrl } } : {}),
929
930
  };
930
- const dir = path.slice(0, path.lastIndexOf("/"));
931
+ const dir = dirname(path);
931
932
  if (dir && !existsSync(dir)) mkdirSync(dir, { recursive: true });
932
933
  writeFileSync(path, JSON.stringify(cfg, null, 2) + "\n");
933
934
  }