@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 +4 -8
- package/package.json +1 -1
- package/src/index.js +8 -7
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
|
-
|
|
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
|
|
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
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
|
|
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
|
-
//
|
|
898
|
-
//
|
|
899
|
-
//
|
|
900
|
-
//
|
|
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 =
|
|
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
|
}
|