@nudge-ai/cli 0.0.1-beta.3 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nudge-ai/cli",
3
- "version": "0.0.1-beta.3",
3
+ "version": "0.1.0",
4
4
  "description": "CLI for Nudge - generate type-safe prompt files for AI applications",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -19,7 +19,7 @@
19
19
  "codegen"
20
20
  ],
21
21
  "bin": {
22
- "nudge": "./dist/bin.cjs"
22
+ "nudge": "./dist/bin.mjs"
23
23
  },
24
24
  "scripts": {
25
25
  "build": "tsdown",
@@ -29,12 +29,19 @@
29
29
  "typecheck": "tsc --noEmit"
30
30
  },
31
31
  "dependencies": {
32
- "@nudge-ai/core": "^0.0.1-beta.0"
32
+ "ink": "^6.6.0",
33
+ "ink-select-input": "^6.2.0",
34
+ "ink-spinner": "^5.0.0",
35
+ "ink-text-input": "^6.0.0",
36
+ "react": "^19.2.4",
37
+ "pastel": "^4.0.0",
38
+ "@nudge-ai/core": "*"
33
39
  },
34
40
  "peerDependencies": {
35
41
  "zod": "^3.23.0 || ^4.0.0"
36
42
  },
37
43
  "devDependencies": {
44
+ "@types/react": "^19.2.10",
38
45
  "tsdown": "^0.19.0",
39
46
  "typescript": "^5.7.0",
40
47
  "zod": "^4.3.6"
@@ -43,18 +50,10 @@
43
50
  "dist",
44
51
  "README.md"
45
52
  ],
46
- "main": "./dist/index.cjs",
47
- "module": "./dist/index.mjs",
48
- "types": "./dist/index.d.cts",
53
+ "types": "./dist/index.d.mts",
49
54
  "exports": {
50
- ".": {
51
- "require": "./dist/index.cjs",
52
- "import": "./dist/index.mjs"
53
- },
54
- "./bin": {
55
- "require": "./dist/bin.cjs",
56
- "import": "./dist/bin.mjs"
57
- },
55
+ ".": "./dist/index.mjs",
56
+ "./bin": "./dist/bin.mjs",
58
57
  "./package.json": "./package.json"
59
58
  },
60
59
  "publishConfig": {
package/dist/bin.cjs DELETED
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env node
2
- const require_src = require('./src-6tjbSqai.cjs');
3
- let fs = require("fs");
4
- fs = require_src.__toESM(fs);
5
- let path = require("path");
6
- path = require_src.__toESM(path);
7
-
8
- //#region src/bin.ts
9
- const args = process.argv.slice(2);
10
- if (args[0] !== "generate") {
11
- console.error(`Usage: nudge generate [--no-cache]`);
12
- process.exit(1);
13
- }
14
- const noCache = args.includes("--no-cache");
15
- const cwd = process.cwd();
16
- const configPath = path.join(cwd, "nudge.config.json");
17
- let config = {};
18
- if (fs.existsSync(configPath)) config = JSON.parse(fs.readFileSync(configPath, "utf-8"));
19
- const outputPath = config.generatedFile ? path.join(cwd, config.generatedFile) : path.join(cwd, "src", "prompts.gen.ts");
20
- require_src.generate(path.dirname(outputPath), outputPath, {
21
- promptFilenamePattern: config.promptFilenamePattern,
22
- aiConfig: config.ai,
23
- noCache
24
- }).catch((error) => {
25
- console.error("Error generating prompts:", error);
26
- process.exit(1);
27
- });
28
-
29
- //#endregion
package/dist/bin.d.cts DELETED
@@ -1 +0,0 @@
1
- export { };
package/dist/index.cjs DELETED
@@ -1,4 +0,0 @@
1
- const require_src = require('./src-6tjbSqai.cjs');
2
-
3
- exports.discoverPrompts = require_src.discoverPrompts;
4
- exports.generate = require_src.generate;
package/dist/index.d.cts DELETED
@@ -1,27 +0,0 @@
1
- import { PromptBuilderState } from "@nudge-ai/core";
2
-
3
- //#region src/ai.d.ts
4
- type AIConfig = {
5
- provider: "openai" | "openrouter";
6
- apiKeyEnvVar: string;
7
- model: string;
8
- };
9
- //#endregion
10
- //#region src/discover.d.ts
11
- type DiscoveredPrompt = {
12
- id: string;
13
- state: PromptBuilderState;
14
- filePath: string;
15
- };
16
- declare function discoverPrompts(dir: string, pattern: string): Promise<DiscoveredPrompt[]>;
17
- //#endregion
18
- //#region src/index.d.ts
19
- type GenerateOptions = {
20
- promptFilenamePattern?: string;
21
- aiConfig?: AIConfig;
22
- noCache?: boolean;
23
- };
24
- declare function generate(targetDir: string, outputPath: string, options?: GenerateOptions): Promise<void>;
25
- //#endregion
26
- export { type DiscoveredPrompt, GenerateOptions, discoverPrompts, generate };
27
- //# sourceMappingURL=index.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/ai.ts","../src/discover.ts","../src/index.ts"],"sourcesContent":[],"mappings":";;;KAGY,QAAA;;EAAA,YAAQ,EAAA,MAAA;;;;;KCCR,gBAAA;;EDDA,KAAA,ECGH,kBDHW;;;iBCgBE,eAAA,gCAGnB,QAAQ;;;ADnBC,KEGA,eAAA,GFHQ;;aEKP;;ADJb,CAAA;AAeA,iBCPe,QAAA,CDOsB,SAG1B,EAAA,MAAA,EAAA,UAAR,EAAA,MAAO,EAAA,OAAA,CAAA,ECPC,eDOD,CAAA,ECPqB,ODOrB,CAAA,IAAA,CAAA"}