gherkin-ai 1.1.2 → 1.2.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/README.md +7 -7
- package/dist/index.js +23 -1
- package/dist/index.js.map +1 -1
- package/package.json +7 -3
package/README.md
CHANGED
|
@@ -22,26 +22,26 @@ While simple AI prompt generators produce generic text instructions, AI agents o
|
|
|
22
22
|
|
|
23
23
|
---
|
|
24
24
|
|
|
25
|
-
## 🚀 Quick Start
|
|
25
|
+
## 🚀 Quick Start & Short Aliases
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
You can use the short command alias **`ghk`** (or `gherkin-cli` / `gherkin-ia`) for fast typing:
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
30
|
# 1. Initialize project configuration interactively
|
|
31
|
-
npx
|
|
31
|
+
ghk init # (or: npx ghk init)
|
|
32
32
|
|
|
33
33
|
# 2. Generate contracts, OpenAPI, fixtures, and AI agent prompts from your feature file
|
|
34
|
-
|
|
34
|
+
ghk generate --feature ./specs/auth.feature # (or short alias: ghk g)
|
|
35
35
|
|
|
36
36
|
# 3. Perform deep architectural linting and layer boundary checks
|
|
37
|
-
|
|
37
|
+
ghk validate --feature ./specs/auth.feature # (or short alias: ghk v)
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
Or install globally:
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
43
|
npm install -g gherkin-ai
|
|
44
|
-
|
|
44
|
+
ghk --help
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
---
|
|
@@ -59,7 +59,7 @@ gherkin-ai --help
|
|
|
59
59
|
|
|
60
60
|
## 📦 Generated Artifacts Structure
|
|
61
61
|
|
|
62
|
-
Running `gherkin-ai generate` produces the following folder structure:
|
|
62
|
+
Running `gherkin-ai generate` (or `ghk g`) produces the following folder structure:
|
|
63
63
|
|
|
64
64
|
```text
|
|
65
65
|
generated-specs/
|
package/dist/index.js
CHANGED
|
@@ -14,15 +14,20 @@ const program = new commander_1.Command();
|
|
|
14
14
|
program
|
|
15
15
|
.name('gherkin-ai')
|
|
16
16
|
.description('CLI tool & contract engine translating Gherkin specs into executable prompts, TypeScript contracts, and seed fixtures for AI Agents.')
|
|
17
|
-
.version(pkg.version || '1.
|
|
17
|
+
.version(pkg.version || '1.2.0')
|
|
18
|
+
.option('--init', 'Alias for init command')
|
|
19
|
+
.option('--generate', 'Alias for generate command')
|
|
20
|
+
.option('--validate', 'Alias for validate command');
|
|
18
21
|
program
|
|
19
22
|
.command('init')
|
|
23
|
+
.alias('i')
|
|
20
24
|
.description('Initialize interactive gherkin-ai project configuration (gherkin-ai.config.json)')
|
|
21
25
|
.action(async () => {
|
|
22
26
|
await (0, init_1.handleInitCommand)();
|
|
23
27
|
});
|
|
24
28
|
program
|
|
25
29
|
.command('generate')
|
|
30
|
+
.alias('g')
|
|
26
31
|
.description('Generate TypeScript contracts, DTO schemas, test fixtures, docker-compose, and agent prompts from Gherkin feature spec')
|
|
27
32
|
.option('-f, --feature <file>', 'Path to Gherkin .feature file')
|
|
28
33
|
.option('-c, --config <file>', 'Path to custom gherkin-ai.config.json file')
|
|
@@ -31,6 +36,7 @@ program
|
|
|
31
36
|
});
|
|
32
37
|
program
|
|
33
38
|
.command('validate')
|
|
39
|
+
.alias('v')
|
|
34
40
|
.description('Validate Gherkin specification and architecture rules compliance')
|
|
35
41
|
.option('-f, --feature <file>', 'Path to Gherkin .feature file')
|
|
36
42
|
.option('-c, --config <file>', 'Path to custom gherkin-ai.config.json file')
|
|
@@ -39,6 +45,7 @@ program
|
|
|
39
45
|
});
|
|
40
46
|
program
|
|
41
47
|
.command('export')
|
|
48
|
+
.alias('e')
|
|
42
49
|
.description('Export single AI Agent context bundle (Markdown or JSON)')
|
|
43
50
|
.option('-f, --feature <file>', 'Path to Gherkin .feature file')
|
|
44
51
|
.option('--format <type>', 'Export format (json or md)', 'md')
|
|
@@ -46,5 +53,20 @@ program
|
|
|
46
53
|
.action(async (options) => {
|
|
47
54
|
await (0, export_1.handleExportCommand)(options);
|
|
48
55
|
});
|
|
56
|
+
// Action fallback for root flags (--init, --generate, --validate)
|
|
57
|
+
program.action(async (options) => {
|
|
58
|
+
if (options.init) {
|
|
59
|
+
await (0, init_1.handleInitCommand)();
|
|
60
|
+
}
|
|
61
|
+
else if (options.generate) {
|
|
62
|
+
await (0, generate_1.handleGenerateCommand)({});
|
|
63
|
+
}
|
|
64
|
+
else if (options.validate) {
|
|
65
|
+
await (0, validate_1.handleValidateCommand)({});
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
program.help();
|
|
69
|
+
}
|
|
70
|
+
});
|
|
49
71
|
program.parse(process.argv);
|
|
50
72
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;gFAEgF;;AAEhF,yCAAoC;AACpC,0CAAoD;AACpD,kDAA4D;AAC5D,kDAA4D;AAC5D,8CAAwD;AAExD,oCAAoC;AACpC,MAAM,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAEvC,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,YAAY,CAAC;KAClB,WAAW,CAAC,sIAAsI,CAAC;KACnJ,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;gFAEgF;;AAEhF,yCAAoC;AACpC,0CAAoD;AACpD,kDAA4D;AAC5D,kDAA4D;AAC5D,8CAAwD;AAExD,oCAAoC;AACpC,MAAM,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAEvC,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,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BAA+B,CAAC;KAC/D,MAAM,CAAC,iBAAiB,EAAE,4BAA4B,EAAE,IAAI,CAAC;KAC7D,MAAM,CAAC,qBAAqB,EAAE,8BAA8B,CAAC;KAC7D,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;IACxB,MAAM,IAAA,4BAAmB,EAAC,OAAO,CAAC,CAAC;AACrC,CAAC,CAAC,CAAC;AAEL,kEAAkE;AAClE,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;IAC/B,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;QACjB,MAAM,IAAA,wBAAiB,GAAE,CAAC;IAC5B,CAAC;SAAM,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;QAC5B,MAAM,IAAA,gCAAqB,EAAC,EAAE,CAAC,CAAC;IAClC,CAAC;SAAM,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;QAC5B,MAAM,IAAA,gCAAqB,EAAC,EAAE,CAAC,CAAC;IAClC,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,IAAI,EAAE,CAAC;IACjB,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gherkin-ai",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "CLI tool & contract engine translating Gherkin specs into production-grade executable prompts, TypeScript contracts, and seed fixtures for AI Coding Agents.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"bin": {
|
|
8
|
-
"gherkin-ai": "./bin/gherkin-ai.js"
|
|
8
|
+
"gherkin-ai": "./bin/gherkin-ai.js",
|
|
9
|
+
"ghk": "./bin/gherkin-ai.js",
|
|
10
|
+
"gherkin-cli": "./bin/gherkin-ai.js",
|
|
11
|
+
"gherkin-ia": "./bin/gherkin-ai.js"
|
|
9
12
|
},
|
|
10
13
|
"readmeFilename": "README.md",
|
|
11
14
|
"files": [
|
|
@@ -27,7 +30,8 @@
|
|
|
27
30
|
"hexagonal-architecture",
|
|
28
31
|
"claude-code",
|
|
29
32
|
"cursor",
|
|
30
|
-
"antigravity"
|
|
33
|
+
"antigravity",
|
|
34
|
+
"ghk"
|
|
31
35
|
],
|
|
32
36
|
"author": "Fenner Eduardo <contact@fennereduardo.com> (https://fennereduardo.com)",
|
|
33
37
|
"license": "MIT",
|