@contextvm/ctxcn 1.0.10 → 1.0.12

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
@@ -115,6 +115,30 @@ For better security, you can use environment variables instead of storing privat
115
115
  export CTXCN_PRIVATE_KEY="your-private-key-here"
116
116
  ```
117
117
 
118
+ ### Logging
119
+
120
+ The CLI sets the ContextVM SDK logger to a minimal level by default to reduce noisy output during operations (for example when running [`src/commands/add.ts`](src/commands/add.ts:1)). By default the CLI will set `LOG_LEVEL=error` unless you explicitly provide a different value.
121
+
122
+ You can override the logging behavior with the following environment variables supported by the SDK:
123
+
124
+ - `LOG_LEVEL` — Minimum log level: `debug`, `info`, `warn`, `error`. Default used by the CLI: `error`.
125
+ - `LOG_DESTINATION` — Destination for logs: `stderr` (default), `stdout`, or `file`.
126
+ - `LOG_FILE` — Path to the log file when `LOG_DESTINATION=file`.
127
+ - `LOG_ENABLED` — Enable or disable logging: `true` (default) or `false`.
128
+
129
+ Examples:
130
+
131
+ ```bash
132
+ # Run the add command with verbose debug logs
133
+ LOG_LEVEL=debug npx @contextvm/ctxcn add <pubkey>
134
+
135
+ # Log to a file instead of the console
136
+ LOG_DESTINATION=file LOG_FILE=./app.log npx @contextvm/ctxcn add <pubkey>
137
+
138
+ # Disable SDK logging entirely
139
+ LOG_ENABLED=false npx @contextvm/ctxcn add <pubkey>
140
+ ```
141
+
118
142
  The generated clients use the following order of precedence for private keys:
119
143
 
120
144
  1. Private key passed directly in the constructor options
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- export {};
2
+ import "./src/env.js";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";AACA,OAAO,cAAc,CAAC"}
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ import "./src/env.js"; // Must be the first import to set up the environment
2
3
  import { handleInit } from "./src/commands/init.js";
3
4
  import { handleAdd } from "./src/commands/add.js";
4
5
  import { handleUpdate } from "./src/commands/update.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EACL,qBAAqB,EACrB,cAAc,GACf,MAAM,8BAA8B,CAAC;AAEtC,KAAK,UAAU,IAAI;IACjB,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACnC,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAExB,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,UAAU,EAAE,CAAC;YACb,OAAO;QACT,CAAC;QAED,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;QAE1B,QAAQ,OAAO,EAAE,CAAC;YAChB,KAAK,MAAM;gBACT,MAAM,UAAU,CAAC,GAAG,CAAC,CAAC;gBACtB,MAAM;YACR,KAAK,KAAK;gBACR,MAAM,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;gBACvB,IAAI,CAAC,MAAM,EAAE,CAAC;oBACZ,qBAAqB,CACnB,8DAA8D,CAC/D,CAAC;gBACJ,CAAC;gBACD,MAAM,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;gBAC7B,MAAM;YACR,KAAK,QAAQ;gBACX,MAAM,YAAY,GAAG,IA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C,MAAM,EAAE,CAAC;oBACZ,qBAAqB,CACnB,8DAA8D,CAC/D,CAAC;gBACJ,CAAC;gBACD,MAAM,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;gBAC7B,MAAM;YACR,KAAK,QAAQ;gBACX,MAAM,YAAY,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;gBAC7B,MAAM,YAAY,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;gBACtC,MAAM;YACR,KAAK,MAAM;gBACT,UAAU,EAAE,CAAC;gBACb,MAAM;YACR;gBACE,qBAAqB,CAAC,oBAAoB,OAAO,GAAG,CAAC,CAAC;gBACtD,MAAM;QACV,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,cAAc,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;IACxC,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=env.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/env.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ // Set a default log level for the SDK to reduce noise during CLI operations.
2
+ // This must be done before any SDK modules are imported.
3
+ // This can be overridden by the user by setting the LOG_LEVEL environment variable.
4
+ if (!process.env.LOG_LEVEL) {
5
+ process.env.LOG_LEVEL = "error";
6
+ }
7
+ export {};
8
+ //# sourceMappingURL=env.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/env.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,yDAAyD;AACzD,oFAAoF;AACpF,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC;IAC3B,OAAO,CAAC,GAAG,CAAC,SAAS,GAAG,OAAO,CAAC;AAClC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contextvm/ctxcn",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
4
4
  "description": "A command-line utility inspired by shadcn that streamlines the integration of ContextVM (CVM) servers into your TypeScript projects",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -36,7 +36,7 @@
36
36
  "devDependencies": {
37
37
  "@changesets/cli": "^2.29.7",
38
38
  "@types/bun": "latest",
39
- "@types/node": "^20.19.21",
39
+ "@types/node": "^20.19.23",
40
40
  "prettier": "^3.6.2",
41
41
  "typescript": "^5.9.3"
42
42
  },
@@ -44,8 +44,8 @@
44
44
  "typescript": "^5"
45
45
  },
46
46
  "dependencies": {
47
- "@contextvm/sdk": "^0.1.32",
48
- "@modelcontextprotocol/sdk": "^1.20.0",
47
+ "@contextvm/sdk": "^0.1.34",
48
+ "@modelcontextprotocol/sdk": "^1.20.1",
49
49
  "json-schema-to-typescript": "^15.0.4"
50
50
  }
51
51
  }