fielmann-devkit 1.0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Fielmann AG
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,51 @@
1
+ # fielmann-devkit
2
+
3
+ Interactive CLI to set up the [Fielmann AI DevKit](https://github.com/fielmann-ag/ai-devkit) in your project with a single command.
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ npx fielmann-devkit
9
+ ```
10
+
11
+ The wizard will:
12
+
13
+ 1. Confirm you are in your project's root directory
14
+ 2. Verify you have access to the AI DevKit repository
15
+ 3. Add the AI DevKit as a Git submodule (`.ai-devkit/`)
16
+ 4. Run the setup script to copy Cursor rules, commands, and MCP configuration into your `.cursor/` directory
17
+
18
+ ## Prerequisites
19
+
20
+ - **Node.js** >= 18
21
+ - **Git** installed and available on your PATH
22
+ - **GitHub access** to [fielmann-ag/ai-devkit](https://github.com/fielmann-ag/ai-devkit) (request access from adam.zdrzalka@fielmann.com if needed)
23
+
24
+ ## What gets set up
25
+
26
+ After running the wizard, your project will have:
27
+
28
+ ```
29
+ your-project/
30
+ ├── .ai-devkit/ # Git submodule (AI DevKit source)
31
+ ├── .cursor/
32
+ │ ├── rules/general-use/ # Cursor rules from AI DevKit
33
+ │ ├── rules/project-specific/ # Your own project rules (untouched)
34
+ │ ├── commands/general-use/ # Commands from AI DevKit
35
+ │ ├── commands/project-specific/ # Your own project commands (untouched)
36
+ │ └── mcp.json # MCP server configuration (if not already present)
37
+ └── [your project files]
38
+ ```
39
+
40
+ ## Updating the AI DevKit
41
+
42
+ To pull the latest updates after initial setup:
43
+
44
+ ```bash
45
+ cd .ai-devkit
46
+ ./ai-devkit-update.sh
47
+ ```
48
+
49
+ ## License
50
+
51
+ MIT
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env node
2
+ import { runWizard } from "../src/index.js";
3
+ try {
4
+ await runWizard();
5
+ }
6
+ catch (error) {
7
+ const message = error instanceof Error ? error.message : String(error);
8
+ console.error(`\n${message}`);
9
+ process.exit(1);
10
+ }
11
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../bin/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,IAAI,CAAC;IACH,MAAM,SAAS,EAAE,CAAC;AACpB,CAAC;AAAC,OAAO,KAAc,EAAE,CAAC;IACxB,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvE,OAAO,CAAC,KAAK,CAAC,KAAK,OAAO,EAAE,CAAC,CAAC;IAC9B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC"}
@@ -0,0 +1 @@
1
+ export declare function runWizard(): Promise<void>;
@@ -0,0 +1,15 @@
1
+ import chalk from "chalk";
2
+ import { checkProjectRoot } from "./steps/checkProjectRoot.js";
3
+ import { checkRepoAccess } from "./steps/checkRepoAccess.js";
4
+ import { addSubmodule } from "./steps/addSubmodule.js";
5
+ import { runSetup } from "./steps/runSetup.js";
6
+ export async function runWizard() {
7
+ console.log(chalk.bold.blue("\n Fielmann AI DevKit Setup\n"));
8
+ await checkProjectRoot();
9
+ await checkRepoAccess();
10
+ await addSubmodule();
11
+ await runSetup();
12
+ console.log(chalk.bold.green("\nAll done! The AI DevKit is set up in your project."));
13
+ console.log(chalk.blue("Your Cursor rules, commands, and MCP config are ready.\n"));
14
+ }
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,MAAM,CAAC,KAAK,UAAU,SAAS;IAC7B,OAAO,CAAC,GAAG,CACT,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAClD,CAAC;IAEF,MAAM,gBAAgB,EAAE,CAAC;IACzB,MAAM,eAAe,EAAE,CAAC;IACxB,MAAM,YAAY,EAAE,CAAC;IACrB,MAAM,QAAQ,EAAE,CAAC;IAEjB,OAAO,CAAC,GAAG,CACT,KAAK,CAAC,IAAI,CAAC,KAAK,CACd,sDAAsD,CACvD,CACF,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,0DAA0D,CAAC,CAAC,CAAC;AACtF,CAAC"}
@@ -0,0 +1 @@
1
+ export declare function addSubmodule(): Promise<void>;
@@ -0,0 +1,35 @@
1
+ import { existsSync } from "node:fs";
2
+ import chalk from "chalk";
3
+ import ora from "ora";
4
+ import { execa } from "execa";
5
+ const REPO_URL = "https://github.com/fielmann-ag/ai-devkit.git";
6
+ const SUBMODULE_DIR = ".ai-devkit";
7
+ export async function addSubmodule() {
8
+ if (existsSync(SUBMODULE_DIR)) {
9
+ console.log(chalk.blue(`\n${SUBMODULE_DIR}/ already exists — skipping submodule add.`));
10
+ return;
11
+ }
12
+ const spinner = ora("Adding AI DevKit as a Git submodule…").start();
13
+ try {
14
+ await execa("git", ["submodule", "add", REPO_URL, SUBMODULE_DIR]);
15
+ spinner.succeed("AI DevKit submodule added successfully.");
16
+ }
17
+ catch (err) {
18
+ spinner.fail("Failed to add the AI DevKit submodule.");
19
+ const error = err;
20
+ if (error.stderr?.includes("not a git repository")) {
21
+ console.log(chalk.red("\nThis directory is not a Git repository. Initialize one first with:"));
22
+ console.log(chalk.cyan(" git init\n"));
23
+ }
24
+ else if (error.stderr?.includes("Authentication failed") ||
25
+ error.stderr?.includes("could not read Username")) {
26
+ console.log(chalk.red("\nAuthentication failed. Make sure you have access to the repo and that"));
27
+ console.log(chalk.red("your Git credentials (SSH key or personal access token) are configured.\n"));
28
+ }
29
+ else {
30
+ console.log(chalk.red(`\n${error.stderr || error.message}\n`));
31
+ }
32
+ process.exit(1);
33
+ }
34
+ }
35
+ //# sourceMappingURL=addSubmodule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addSubmodule.js","sourceRoot":"","sources":["../../../src/steps/addSubmodule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,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,2EAA2E,CAC5E,CACF,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC;QACjE,CAAC;QAED,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
@@ -0,0 +1 @@
1
+ export declare function checkProjectRoot(): Promise<void>;
@@ -0,0 +1,14 @@
1
+ import { confirm } from "@inquirer/prompts";
2
+ import chalk from "chalk";
3
+ export async function checkProjectRoot() {
4
+ const isRoot = await confirm({
5
+ message: "Are you in your project's root directory?",
6
+ default: true,
7
+ });
8
+ if (!isRoot) {
9
+ console.log(chalk.yellow("\nPlease navigate to your project's root directory and rerun:"));
10
+ console.log(chalk.cyan(" npx fielmann-devkit\n"));
11
+ process.exit(0);
12
+ }
13
+ }
14
+ //# sourceMappingURL=checkProjectRoot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkProjectRoot.js","sourceRoot":"","sources":["../../../src/steps/checkProjectRoot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC;QAC3B,OAAO,EAAE,2CAA2C;QACpD,OAAO,EAAE,IAAI;KACd,CAAC,CAAC;IAEH,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,CAAC,GAAG,CACT,KAAK,CAAC,MAAM,CACV,+DAA+D,CAChE,CACF,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC,CAAC;QACnD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
@@ -0,0 +1 @@
1
+ export declare function checkRepoAccess(): Promise<void>;
@@ -0,0 +1,16 @@
1
+ import { confirm } from "@inquirer/prompts";
2
+ import chalk from "chalk";
3
+ const REPO_URL = "https://github.com/fielmann-ag/ai-devkit";
4
+ export async function checkRepoAccess() {
5
+ const hasAccess = await confirm({
6
+ message: `Do you have access to the AI DevKit repo? (${REPO_URL})`,
7
+ default: true,
8
+ });
9
+ if (!hasAccess) {
10
+ console.log(chalk.yellow("\nYou need access to the AI DevKit repository to continue."));
11
+ console.log(chalk.yellow("Request access by contacting:"));
12
+ console.log(chalk.cyan(" Adam Zdrzalka — adam.zdrzalka@fielmann.com\n"));
13
+ process.exit(0);
14
+ }
15
+ }
16
+ //# sourceMappingURL=checkRepoAccess.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkRepoAccess.js","sourceRoot":"","sources":["../../../src/steps/checkRepoAccess.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,QAAQ,GAAG,0CAA0C,CAAC;AAE5D,MAAM,CAAC,KAAK,UAAU,eAAe;IACnC,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC;QAC9B,OAAO,EAAE,8CAA8C,QAAQ,GAAG;QAClE,OAAO,EAAE,IAAI;KACd,CAAC,CAAC;IAEH,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO,CAAC,GAAG,CACT,KAAK,CAAC,MAAM,CAAC,4DAA4D,CAAC,CAC3E,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,+BAA+B,CAAC,CAAC,CAAC;QAC3D,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,gDAAgD,CAAC,CAAC,CAAC;QAC1E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
@@ -0,0 +1 @@
1
+ export declare function runSetup(): Promise<void>;
@@ -0,0 +1,30 @@
1
+ import { existsSync } from "node:fs";
2
+ import { chmod } from "node:fs/promises";
3
+ import { join } from "node:path";
4
+ import chalk from "chalk";
5
+ import { execa } from "execa";
6
+ const SUBMODULE_DIR = ".ai-devkit";
7
+ const SETUP_SCRIPT = "ai-devkit-setup.sh";
8
+ export async function runSetup() {
9
+ const scriptPath = join(SUBMODULE_DIR, SETUP_SCRIPT);
10
+ if (!existsSync(scriptPath)) {
11
+ console.log(chalk.red(`\nSetup script not found at ${scriptPath}.`));
12
+ console.log(chalk.yellow("Try updating the submodule: git submodule update --remote .ai-devkit\n"));
13
+ process.exit(1);
14
+ }
15
+ await chmod(scriptPath, 0o755);
16
+ console.log(chalk.blue("\nRunning AI DevKit setup script…\n"));
17
+ try {
18
+ await execa(`./${SETUP_SCRIPT}`, {
19
+ cwd: SUBMODULE_DIR,
20
+ stdout: "inherit",
21
+ stderr: "inherit",
22
+ });
23
+ }
24
+ catch {
25
+ console.log(chalk.red("\nThe setup script failed. You can retry manually with:"));
26
+ console.log(chalk.cyan(` cd ${SUBMODULE_DIR} && ./${SETUP_SCRIPT}\n`));
27
+ process.exit(1);
28
+ }
29
+ }
30
+ //# sourceMappingURL=runSetup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runSetup.js","sourceRoot":"","sources":["../../../src/steps/runSetup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAE9B,MAAM,aAAa,GAAG,YAAY,CAAC;AACnC,MAAM,YAAY,GAAG,oBAAoB,CAAC;AAE1C,MAAM,CAAC,KAAK,UAAU,QAAQ;IAC5B,MAAM,UAAU,GAAG,IAAI,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC;IAErD,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC5B,OAAO,CAAC,GAAG,CACT,KAAK,CAAC,GAAG,CAAC,+BAA+B,UAAU,GAAG,CAAC,CACxD,CAAC;QACF,OAAO,CAAC,GAAG,CACT,KAAK,CAAC,MAAM,CACV,wEAAwE,CACzE,CACF,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,MAAM,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IAE/B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,qCAAqC,CAAC,CAAC,CAAC;IAE/D,IAAI,CAAC;QACH,MAAM,KAAK,CAAC,KAAK,YAAY,EAAE,EAAE;YAC/B,GAAG,EAAE,aAAa;YAClB,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,SAAS;SAClB,CAAC,CAAC;IACL,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,CAAC,GAAG,CACT,KAAK,CAAC,GAAG,CAAC,yDAAyD,CAAC,CACrE,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,aAAa,SAAS,YAAY,IAAI,CAAC,CAAC,CAAC;QACxE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "fielmann-devkit",
3
+ "version": "1.0.0",
4
+ "description": "CLI to set up the Fielmann AI DevKit in your project",
5
+ "bin": {
6
+ "fielmann-devkit": "./dist/bin/cli.js"
7
+ },
8
+ "type": "module",
9
+ "engines": {
10
+ "node": ">=18"
11
+ },
12
+ "scripts": {
13
+ "build": "tsc",
14
+ "prepublishOnly": "npm run build"
15
+ },
16
+ "files": [
17
+ "dist"
18
+ ],
19
+ "keywords": [
20
+ "fielmann",
21
+ "ai",
22
+ "devkit",
23
+ "cursor",
24
+ "development",
25
+ "cli"
26
+ ],
27
+ "author": "Adam Zdrzalka <adam.zdrzalka@fielmann.com>",
28
+ "license": "MIT",
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "https://github.com/fielmann-ag/fielmann-devkit-npm-pkg.git"
32
+ },
33
+ "dependencies": {
34
+ "@inquirer/prompts": "^8.3.0",
35
+ "chalk": "^5.4.1",
36
+ "execa": "^9.5.2",
37
+ "ora": "^8.2.0"
38
+ },
39
+ "devDependencies": {
40
+ "@types/node": "^25.3.1",
41
+ "typescript": "^5.9.3"
42
+ }
43
+ }