@vibecodr/cli 0.1.8

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/LICENSE +201 -0
  3. package/README.md +66 -0
  4. package/dist/auth/official-client.js +10 -0
  5. package/dist/auth/token-manager.js +424 -0
  6. package/dist/bin/vibecodr-mcp.js +101 -0
  7. package/dist/cli/errors.js +38 -0
  8. package/dist/cli/output.js +52 -0
  9. package/dist/cli/parse.js +84 -0
  10. package/dist/clients/base.js +30 -0
  11. package/dist/clients/codex.js +136 -0
  12. package/dist/clients/cursor.js +91 -0
  13. package/dist/clients/vscode.js +138 -0
  14. package/dist/clients/windsurf.js +81 -0
  15. package/dist/commands/call.js +123 -0
  16. package/dist/commands/config.js +124 -0
  17. package/dist/commands/context.js +5 -0
  18. package/dist/commands/doctor.js +17 -0
  19. package/dist/commands/install.js +63 -0
  20. package/dist/commands/login.js +41 -0
  21. package/dist/commands/logout.js +26 -0
  22. package/dist/commands/pulse-setup.js +82 -0
  23. package/dist/commands/status.js +64 -0
  24. package/dist/commands/tools.js +82 -0
  25. package/dist/commands/uninstall.js +55 -0
  26. package/dist/core/interactive-input.js +114 -0
  27. package/dist/core/mcp-client.js +82 -0
  28. package/dist/core/renderers.js +34 -0
  29. package/dist/doctor/run.js +132 -0
  30. package/dist/platform/browser.js +79 -0
  31. package/dist/platform/exec.js +23 -0
  32. package/dist/platform/paths.js +36 -0
  33. package/dist/platform/prompt.js +19 -0
  34. package/dist/storage/config-store.js +72 -0
  35. package/dist/storage/file-lock.js +41 -0
  36. package/dist/storage/install-manifest.js +80 -0
  37. package/dist/storage/secret-store.js +301 -0
  38. package/dist/types/auth.js +1 -0
  39. package/dist/types/config.js +21 -0
  40. package/dist/types/install.js +1 -0
  41. package/docs/architecture.md +35 -0
  42. package/docs/auth.md +66 -0
  43. package/docs/clients.md +42 -0
  44. package/docs/commands.md +134 -0
  45. package/docs/contributors.md +68 -0
  46. package/docs/install.md +90 -0
  47. package/docs/licensing.md +20 -0
  48. package/docs/troubleshooting.md +97 -0
  49. package/package.json +40 -0
@@ -0,0 +1,68 @@
1
+ # Contributors
2
+
3
+ ## Runtime
4
+
5
+ - Node `>=22 <26`
6
+ - local development is currently exercised on Node 24
7
+
8
+ ## Core commands
9
+
10
+ ```bash
11
+ npm install
12
+ npm run check
13
+ npm test
14
+ npm run test:live-smoke
15
+ npm run build
16
+ npm run verify
17
+ node dist/bin/vibecodr-mcp.js help
18
+ ```
19
+
20
+ ## Useful smoke checks
21
+
22
+ ```bash
23
+ node dist/bin/vibecodr-mcp.js status --json
24
+ node dist/bin/vibecodr-mcp.js doctor --json --non-interactive
25
+ node dist/bin/vibecodr-mcp.js tools --json --non-interactive
26
+ node dist/bin/vibecodr-mcp.js call get_vibecodr_platform_overview --json --non-interactive
27
+ ```
28
+
29
+ `tools` does not force auth for public catalogs. Protected `call` flows will refresh or trigger login on challenge.
30
+
31
+ ## Profiles
32
+
33
+ Create a staging profile:
34
+
35
+ ```bash
36
+ node dist/bin/vibecodr-mcp.js config profile create staging --server-url https://staging-openai.vibecodr.space/mcp
37
+ node dist/bin/vibecodr-mcp.js config profile use staging
38
+ ```
39
+
40
+ ## Registration mode forcing
41
+
42
+ Examples:
43
+
44
+ ```bash
45
+ node dist/bin/vibecodr-mcp.js login --registration dcr
46
+ node dist/bin/vibecodr-mcp.js login --registration manual
47
+ ```
48
+
49
+ Current repo reality:
50
+
51
+ - the official production path uses the committed client metadata document URL `https://openai.vibecodr.space/.well-known/oauth-client/vibecodr-mcp.json`
52
+ - CIMD mode requires `VIBECDR_MCP_CIMD_CLIENT_ID`
53
+ - manual mode can use `VIBECDR_MCP_MANUAL_CLIENT_ID` or an interactive prompt
54
+
55
+ ## Mock fixtures and deeper integration
56
+
57
+ Automated coverage now includes:
58
+
59
+ - parser and renderer behavior
60
+ - interactive schema prompting for nested objects and arrays
61
+ - command-level install smoke for Codex, Cursor, VS Code workspace scope, and Windsurf
62
+ - a mock OAuth/MCP fixture that exercises DCR login, loopback callback handling, protected tools/list, protected tools/call, refresh, invalid_grant clearing, and logout revocation behavior
63
+ - a live smoke suite that validates the official first-party auth bootstrap and public tool discovery/call against `https://openai.vibecodr.space/mcp`
64
+
65
+ Still not covered in automation:
66
+
67
+ - real live browser login against the hosted service with account credentials
68
+ - real client-application installs across Codex/Cursor/VS Code/Windsurf on CI hosts
@@ -0,0 +1,90 @@
1
+ # Install
2
+
3
+ This repo now includes `install` and `uninstall` adapters, but the direct runtime core remains the primary product surface.
4
+
5
+ ## Current recommended use
6
+
7
+ One-shot install without publishing:
8
+
9
+ ```bash
10
+ npm install
11
+ npm run build
12
+ node dist/bin/vibecodr-mcp.js install codex --json
13
+ ```
14
+
15
+ After the package is published:
16
+
17
+ ```bash
18
+ npx -y -p @vibecodr/cli vibecodr install codex
19
+ ```
20
+
21
+ Direct CLI-only usage:
22
+
23
+ ```bash
24
+ npx -y -p @vibecodr/cli vibecodr login
25
+ npx -y -p @vibecodr/cli vibecodr tools --json
26
+ ```
27
+
28
+ ## Client commands
29
+
30
+ ### Codex
31
+
32
+ ```bash
33
+ vibecodr install codex
34
+ ```
35
+
36
+ Behavior now:
37
+
38
+ - prefers `codex mcp add <name> --url <server-url>`
39
+ - falls back to TOML merge in `~/.codex/config.toml`
40
+ - user scope only
41
+
42
+ ### Cursor
43
+
44
+ ```bash
45
+ vibecodr install cursor --scope user
46
+ vibecodr install cursor --scope project --path .
47
+ ```
48
+
49
+ Behavior now:
50
+
51
+ - writes `~/.cursor/mcp.json` for user scope
52
+ - writes `.cursor/mcp.json` for project scope
53
+ - `--open-client` also opens the current Cursor deeplink install URI
54
+
55
+ ### VS Code
56
+
57
+ ```bash
58
+ vibecodr install vscode --scope user
59
+ vibecodr install vscode --scope project --path .
60
+ ```
61
+
62
+ Behavior now:
63
+
64
+ - user scope prefers `code --add-mcp`
65
+ - if `code` is unavailable and `--open-client` is set, opens the documented `vscode:mcp/install?...` URI
66
+ - project scope writes `.vscode/mcp.json`
67
+
68
+ ### Windsurf
69
+
70
+ ```bash
71
+ vibecodr install windsurf
72
+ ```
73
+
74
+ Behavior now:
75
+
76
+ - writes `~/.codeium/windsurf/mcp_config.json`
77
+ - warns in docs about the legacy plugin path
78
+
79
+ ## Important split
80
+
81
+ Install config is not runtime auth.
82
+
83
+ - `install` configures the client
84
+ - `login` authenticates the CLI itself
85
+ - each editor still owns its own MCP OAuth state
86
+
87
+ ## Current limitations
88
+
89
+ - VS Code user-scope uninstall is not automated with a documented removal surface yet
90
+ - install adapters are implemented, but they are intentionally thin and never used for runtime `tools` or `call`
@@ -0,0 +1,20 @@
1
+ # Licensing
2
+
3
+ This repository is the public Vibecodr CLI surface.
4
+
5
+ - Package name: `@vibecodr/cli`
6
+ - Primary executable name: `vibecodr`
7
+ - Compatibility executable name: `vibecodr-mcp`
8
+ - Legacy package compatibility: `@vibecodr/mcp`
9
+ - Repo scope: direct CLI runtime, auth, diagnostics, and later thin installer adapters
10
+ - License: Apache-2.0
11
+
12
+ The hosted MCP gateway/server remains separate from this repo. That separation keeps hosted-service use distinct from any source-code reuse terms applied to the server implementation repo.
13
+
14
+ Practical split:
15
+
16
+ - this CLI repo governs distribution, modification, and reuse of the public client code
17
+ - the hosted Vibecodr MCP service remains governed by Vibecodr service terms for account holders
18
+ - the server implementation repo can carry different source-available terms without changing whether a commercial team may use the hosted service
19
+
20
+ See [`architecture.md`](./architecture.md) for the client/server boundary.
@@ -0,0 +1,97 @@
1
+ # Troubleshooting
2
+
3
+ ## Browser did not open
4
+
5
+ `login` now prints the authorization URL by default.
6
+
7
+ If you want the CLI to try opening the browser for you, use:
8
+
9
+ ```bash
10
+ vibecodr login --browser open
11
+ ```
12
+
13
+ If auto-open fails, rerun plain `login` and open the printed URL manually.
14
+
15
+ ## Callback timed out
16
+
17
+ The loopback listener waits on `127.0.0.1` and expires after the configured timeout.
18
+
19
+ Try:
20
+
21
+ - rerun `login`
22
+ - complete the browser flow before the timeout
23
+ - ensure local security software is not blocking loopback callbacks
24
+
25
+ ## Secure secret store unavailable
26
+
27
+ Run:
28
+
29
+ ```bash
30
+ vibecodr doctor --json
31
+ ```
32
+
33
+ If the `secret-store` check fails, the CLI cannot safely store tokens yet.
34
+
35
+ The plaintext file secret store is intentionally test-only. If `VIBECDR_MCP_INSECURE_SECRET_STORE_PATH` is set without `VIBECDR_MCP_ENABLE_INSECURE_SECRET_STORE=true`, the CLI refuses to start rather than silently storing tokens outside the OS credential store.
36
+
37
+ Platform notes:
38
+
39
+ - macOS uses Keychain. Unlock the login keychain and approve Terminal or Node access if prompted.
40
+ - Windows uses Credential Manager. Run from a normal signed-in desktop session with Credential Manager available.
41
+ - Linux uses Secret Service. Install libsecret support and run from a session with an unlocked GNOME Keyring or KWallet. Headless Linux needs an explicit Secret Service setup for persistent CLI login.
42
+
43
+ ## Proxy or TLS issues
44
+
45
+ The CLI uses normal outbound HTTPS fetches for discovery and token operations.
46
+
47
+ Use:
48
+
49
+ ```bash
50
+ vibecodr doctor --json
51
+ ```
52
+
53
+ If `server-reachability` fails, verify:
54
+
55
+ - proxy environment variables
56
+ - local TLS interception policy
57
+ - outbound access to `https://openai.vibecodr.space/mcp`
58
+
59
+ ## Client config conflict
60
+
61
+ If install fails with a conflict, the target config already contains an entry with the same name but a different URL.
62
+
63
+ Use either:
64
+
65
+ - a different `--name`
66
+ - `--overwrite` if the existing entry is meant to be replaced
67
+
68
+ ## Windsurf legacy path confusion
69
+
70
+ Current native path:
71
+
72
+ - `~/.codeium/windsurf/mcp_config.json`
73
+
74
+ Older plugin references may still mention:
75
+
76
+ - `~/.codeium/mcp_config.json`
77
+
78
+ The CLI writes the native path.
79
+
80
+ ## Codex auth-on-first-use caveat
81
+
82
+ Codex config install and CLI login are separate.
83
+
84
+ - `install codex` configures Codex
85
+ - `login` authenticates the Vibecodr CLI only
86
+ - Codex will still own its own OAuth behavior when you use the server inside Codex
87
+
88
+ ## VS Code CLI not found
89
+
90
+ If `code --add-mcp` is unavailable:
91
+
92
+ - use project scope with `.vscode/mcp.json`
93
+ - or retry user scope with `--open-client`
94
+
95
+ ## Step-up scope prompts
96
+
97
+ The repo does not yet have a dedicated step-up scope UX beyond the normal re-auth path. If a server requests a broader scope, rerun `login` with the needed `--scope`.
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "@vibecodr/cli",
3
+ "version": "0.1.8",
4
+ "description": "Vibecodr CLI for login, live MCP tool discovery, and live tool invocation.",
5
+ "license": "Apache-2.0",
6
+ "type": "module",
7
+ "bin": {
8
+ "vibecodr-mcp": "dist/bin/vibecodr-mcp.js",
9
+ "vibecodr": "dist/bin/vibecodr-mcp.js"
10
+ },
11
+ "files": [
12
+ "dist",
13
+ "README.md",
14
+ "LICENSE",
15
+ "CHANGELOG.md",
16
+ "docs"
17
+ ],
18
+ "engines": {
19
+ "node": ">=22 <26"
20
+ },
21
+ "scripts": {
22
+ "build": "tsc -p tsconfig.build.json",
23
+ "check": "tsc -p tsconfig.json --noEmit",
24
+ "test": "node --import tsx --test test/**/*.test.ts",
25
+ "test:live-smoke": "node --import tsx --test test/live-smoke.smoke.ts",
26
+ "test:integration:worker": "node --import tsx --test test/worker-gateway.integration.test.ts",
27
+ "verify:artifact": "node scripts/check-pack-artifact.mjs",
28
+ "verify": "npm run check && npm test && npm run build && npm run verify:artifact"
29
+ },
30
+ "dependencies": {
31
+ "@iarna/toml": "^2.2.5",
32
+ "@modelcontextprotocol/sdk": "^1.27.1",
33
+ "@napi-rs/keyring": "^1.2.0"
34
+ },
35
+ "devDependencies": {
36
+ "@types/node": "^24.7.2",
37
+ "tsx": "^4.20.6",
38
+ "typescript": "^5.9.3"
39
+ }
40
+ }