@agiflowai/aicode-toolkit 1.0.3 → 1.0.5
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/dist/cli.cjs +8 -111
- package/dist/{cli.js → cli.mjs} +12 -110
- package/dist/index.cjs +1 -1
- package/dist/{index.d.ts → index.d.mts} +1 -1
- package/dist/index.mjs +4 -0
- package/dist/mcp-BgNkvV6h.mjs +3 -0
- package/dist/{mcp-BmhiAfeF.js → mcp-C3HR_ZNF.mjs} +1 -1
- package/dist/{services-zrdafWTg.js → services-BvnOGCDG.mjs} +296 -207
- package/dist/{services-C6lqyioO.cjs → services-DIUrmi_K.cjs} +294 -210
- package/package.json +7 -9
- package/dist/index.js +0 -4
- package/dist/mcp-CZIiB-6Y.js +0 -3
- /package/dist/{cli.d.ts → cli.d.mts} +0 -0
package/dist/cli.cjs
CHANGED
|
@@ -1,120 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const require_services = require('./services-
|
|
2
|
+
const require_services = require('./services-DIUrmi_K.cjs');
|
|
3
3
|
const require_mcp = require('./mcp-Dwt8nYQV.cjs');
|
|
4
|
-
let
|
|
5
|
-
commander = require_services.__toESM(commander);
|
|
4
|
+
let __agiflowai_aicode_utils = require("@agiflowai/aicode-utils");
|
|
6
5
|
let node_path = require("node:path");
|
|
7
6
|
node_path = require_services.__toESM(node_path);
|
|
8
|
-
let
|
|
9
|
-
__agiflowai_aicode_utils = require_services.__toESM(__agiflowai_aicode_utils);
|
|
10
|
-
let fs_extra = require("fs-extra");
|
|
11
|
-
fs_extra = require_services.__toESM(fs_extra);
|
|
7
|
+
let commander = require("commander");
|
|
12
8
|
let __inquirer_prompts = require("@inquirer/prompts");
|
|
13
|
-
__inquirer_prompts = require_services.__toESM(__inquirer_prompts);
|
|
14
9
|
let ora = require("ora");
|
|
15
10
|
ora = require_services.__toESM(ora);
|
|
16
11
|
let xstate = require("xstate");
|
|
17
|
-
xstate = require_services.__toESM(xstate);
|
|
18
12
|
|
|
19
13
|
//#region package.json
|
|
20
|
-
var
|
|
21
|
-
var description = "AI-powered code toolkit CLI for scaffolding, architecture management, and development workflows";
|
|
22
|
-
var version = "1.0.2";
|
|
23
|
-
var license = "AGPL-3.0";
|
|
24
|
-
var author = "AgiflowIO";
|
|
25
|
-
var repository = {
|
|
26
|
-
"type": "git",
|
|
27
|
-
"url": "https://github.com/AgiFlow/aicode-toolkit.git",
|
|
28
|
-
"directory": "apps/aicode-toolkit"
|
|
29
|
-
};
|
|
30
|
-
var homepage = "https://github.com/AgiFlow/aicode-toolkit#readme";
|
|
31
|
-
var bugs = { "url": "https://github.com/AgiFlow/aicode-toolkit/issues" };
|
|
32
|
-
var keywords = [
|
|
33
|
-
"mcp",
|
|
34
|
-
"model-context-protocol",
|
|
35
|
-
"scaffold",
|
|
36
|
-
"boilerplate",
|
|
37
|
-
"template",
|
|
38
|
-
"code-generation",
|
|
39
|
-
"nextjs",
|
|
40
|
-
"react",
|
|
41
|
-
"vite"
|
|
42
|
-
];
|
|
43
|
-
var bin = { "aicode": "./dist/cli.cjs" };
|
|
44
|
-
var main$1 = "./dist/index.cjs";
|
|
45
|
-
var types = "./dist/index.d.cts";
|
|
46
|
-
var module$1 = "./dist/index.js";
|
|
47
|
-
var files = ["dist", "README.md"];
|
|
48
|
-
var scripts = {
|
|
49
|
-
"dev": "node --loader ts-node/esm src/cli.ts",
|
|
50
|
-
"build": "tsdown",
|
|
51
|
-
"test": "vitest --run",
|
|
52
|
-
"typecheck": "tsc --noEmit"
|
|
53
|
-
};
|
|
54
|
-
var dependencies = {
|
|
55
|
-
"@agiflowai/aicode-utils": "workspace:*",
|
|
56
|
-
"@agiflowai/coding-agent-bridge": "workspace:*",
|
|
57
|
-
"@composio/json-schema-to-zod": "0.1.15",
|
|
58
|
-
"@inquirer/prompts": "^7.8.6",
|
|
59
|
-
"@modelcontextprotocol/sdk": "1.19.1",
|
|
60
|
-
"chalk": "5.6.2",
|
|
61
|
-
"commander": "14.0.1",
|
|
62
|
-
"execa": "^9.5.2",
|
|
63
|
-
"express": "^4.21.2",
|
|
64
|
-
"fs-extra": "11.3.2",
|
|
65
|
-
"gradient-string": "^3.0.0",
|
|
66
|
-
"js-yaml": "4.1.0",
|
|
67
|
-
"liquidjs": "10.21.1",
|
|
68
|
-
"ora": "^9.0.0",
|
|
69
|
-
"pino": "^10.0.0",
|
|
70
|
-
"pino-pretty": "^13.1.1",
|
|
71
|
-
"xstate": "^5.23.0",
|
|
72
|
-
"zod": "3.25.76"
|
|
73
|
-
};
|
|
74
|
-
var devDependencies = {
|
|
75
|
-
"@types/express": "^5.0.0",
|
|
76
|
-
"@types/fs-extra": "^11.0.4",
|
|
77
|
-
"@types/js-yaml": "^4.0.9",
|
|
78
|
-
"@types/node": "^22.0.0",
|
|
79
|
-
"tsdown": "^0.15.6",
|
|
80
|
-
"typescript": "5.9.3",
|
|
81
|
-
"unplugin-raw": "^0.6.3"
|
|
82
|
-
};
|
|
83
|
-
var publishConfig = { "access": "public" };
|
|
84
|
-
var type = "module";
|
|
85
|
-
var exports$1 = {
|
|
86
|
-
".": {
|
|
87
|
-
"import": "./dist/index.js",
|
|
88
|
-
"require": "./dist/index.cjs"
|
|
89
|
-
},
|
|
90
|
-
"./cli": {
|
|
91
|
-
"import": "./dist/cli.js",
|
|
92
|
-
"require": "./dist/cli.cjs"
|
|
93
|
-
},
|
|
94
|
-
"./package.json": "./package.json"
|
|
95
|
-
};
|
|
96
|
-
var package_default = {
|
|
97
|
-
name,
|
|
98
|
-
description,
|
|
99
|
-
version,
|
|
100
|
-
license,
|
|
101
|
-
author,
|
|
102
|
-
repository,
|
|
103
|
-
homepage,
|
|
104
|
-
bugs,
|
|
105
|
-
keywords,
|
|
106
|
-
bin,
|
|
107
|
-
main: main$1,
|
|
108
|
-
types,
|
|
109
|
-
module: module$1,
|
|
110
|
-
files,
|
|
111
|
-
scripts,
|
|
112
|
-
dependencies,
|
|
113
|
-
devDependencies,
|
|
114
|
-
publishConfig,
|
|
115
|
-
type,
|
|
116
|
-
exports: exports$1
|
|
117
|
-
};
|
|
14
|
+
var version = "1.0.5";
|
|
118
15
|
|
|
119
16
|
//#endregion
|
|
120
17
|
//#region src/commands/add.ts
|
|
@@ -132,12 +29,12 @@ const addCommand = new commander.Command("add").description("Add a template to t
|
|
|
132
29
|
process.exit(1);
|
|
133
30
|
}
|
|
134
31
|
const targetFolder = node_path.default.join(templatesPath, `${templateType}s`, templateName);
|
|
135
|
-
if (await
|
|
32
|
+
if (await (0, __agiflowai_aicode_utils.pathExists)(targetFolder)) {
|
|
136
33
|
__agiflowai_aicode_utils.messages.error(`Template '${templateName}' already exists at ${targetFolder}`);
|
|
137
34
|
process.exit(1);
|
|
138
35
|
}
|
|
139
36
|
__agiflowai_aicode_utils.print.info(`${__agiflowai_aicode_utils.icons.download} Downloading template '${templateName}' from ${templateUrl}...`);
|
|
140
|
-
await
|
|
37
|
+
await (0, __agiflowai_aicode_utils.ensureDir)(node_path.default.dirname(targetFolder));
|
|
141
38
|
const parsedUrl = require_services.parseGitHubUrl(templateUrl);
|
|
142
39
|
try {
|
|
143
40
|
if (parsedUrl.isSubdirectory && parsedUrl.branch && parsedUrl.subdirectory) {
|
|
@@ -149,7 +46,7 @@ const addCommand = new commander.Command("add").description("Add a template to t
|
|
|
149
46
|
__agiflowai_aicode_utils.print.indent(targetFolder);
|
|
150
47
|
const configFiles = [node_path.default.join(targetFolder, "boilerplate.yaml"), node_path.default.join(targetFolder, "scaffold.yaml")];
|
|
151
48
|
let hasConfig = false;
|
|
152
|
-
for (const configFile of configFiles) if (await
|
|
49
|
+
for (const configFile of configFiles) if (await (0, __agiflowai_aicode_utils.pathExists)(configFile)) {
|
|
153
50
|
__agiflowai_aicode_utils.print.header(`\n${__agiflowai_aicode_utils.icons.config} Configuration file found:`);
|
|
154
51
|
__agiflowai_aicode_utils.print.indent(node_path.default.basename(configFile));
|
|
155
52
|
hasConfig = true;
|
|
@@ -1000,7 +897,7 @@ const initCommand = new commander.Command("init").description("Initialize projec
|
|
|
1000
897
|
*/
|
|
1001
898
|
async function main() {
|
|
1002
899
|
const program = new commander.Command();
|
|
1003
|
-
program.name("aicode").description("AI-powered code toolkit CLI for scaffolding, architecture management, and development workflows").version(
|
|
900
|
+
program.name("aicode").description("AI-powered code toolkit CLI for scaffolding, architecture management, and development workflows").version(version);
|
|
1004
901
|
program.addCommand(initCommand);
|
|
1005
902
|
program.addCommand(addCommand);
|
|
1006
903
|
await program.parseAsync(process.argv);
|
package/dist/{cli.js → cli.mjs}
RENAMED
|
@@ -1,113 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { r as MCP_SERVER_INFO, t as MCPServer } from "./mcp-C3HR_ZNF.mjs";
|
|
3
|
+
import { a as SpecToolService, c as cloneSubdirectory, f as parseGitHubUrl, h as CodingAgentService, i as SpecTool, n as TemplateSelectionService, o as NewProjectService, p as displayBanner, r as SPEC_TOOL_INFO, s as cloneRepository, u as findWorkspaceRoot } from "./services-BvnOGCDG.mjs";
|
|
4
|
+
import { ProjectType, TemplatesManagerService, detectProjectType, ensureDir, icons, messages, pathExists, print, sections } from "@agiflowai/aicode-utils";
|
|
5
5
|
import path from "node:path";
|
|
6
|
-
import {
|
|
7
|
-
import * as fs from "fs-extra";
|
|
6
|
+
import { Command } from "commander";
|
|
8
7
|
import { confirm, input, select } from "@inquirer/prompts";
|
|
9
8
|
import ora from "ora";
|
|
10
9
|
import { assign, createActor, createMachine, fromPromise } from "xstate";
|
|
11
10
|
|
|
12
11
|
//#region package.json
|
|
13
|
-
var
|
|
14
|
-
var description = "AI-powered code toolkit CLI for scaffolding, architecture management, and development workflows";
|
|
15
|
-
var version = "1.0.2";
|
|
16
|
-
var license = "AGPL-3.0";
|
|
17
|
-
var author = "AgiflowIO";
|
|
18
|
-
var repository = {
|
|
19
|
-
"type": "git",
|
|
20
|
-
"url": "https://github.com/AgiFlow/aicode-toolkit.git",
|
|
21
|
-
"directory": "apps/aicode-toolkit"
|
|
22
|
-
};
|
|
23
|
-
var homepage = "https://github.com/AgiFlow/aicode-toolkit#readme";
|
|
24
|
-
var bugs = { "url": "https://github.com/AgiFlow/aicode-toolkit/issues" };
|
|
25
|
-
var keywords = [
|
|
26
|
-
"mcp",
|
|
27
|
-
"model-context-protocol",
|
|
28
|
-
"scaffold",
|
|
29
|
-
"boilerplate",
|
|
30
|
-
"template",
|
|
31
|
-
"code-generation",
|
|
32
|
-
"nextjs",
|
|
33
|
-
"react",
|
|
34
|
-
"vite"
|
|
35
|
-
];
|
|
36
|
-
var bin = { "aicode": "./dist/cli.cjs" };
|
|
37
|
-
var main$1 = "./dist/index.cjs";
|
|
38
|
-
var types = "./dist/index.d.cts";
|
|
39
|
-
var module = "./dist/index.js";
|
|
40
|
-
var files = ["dist", "README.md"];
|
|
41
|
-
var scripts = {
|
|
42
|
-
"dev": "node --loader ts-node/esm src/cli.ts",
|
|
43
|
-
"build": "tsdown",
|
|
44
|
-
"test": "vitest --run",
|
|
45
|
-
"typecheck": "tsc --noEmit"
|
|
46
|
-
};
|
|
47
|
-
var dependencies = {
|
|
48
|
-
"@agiflowai/aicode-utils": "workspace:*",
|
|
49
|
-
"@agiflowai/coding-agent-bridge": "workspace:*",
|
|
50
|
-
"@composio/json-schema-to-zod": "0.1.15",
|
|
51
|
-
"@inquirer/prompts": "^7.8.6",
|
|
52
|
-
"@modelcontextprotocol/sdk": "1.19.1",
|
|
53
|
-
"chalk": "5.6.2",
|
|
54
|
-
"commander": "14.0.1",
|
|
55
|
-
"execa": "^9.5.2",
|
|
56
|
-
"express": "^4.21.2",
|
|
57
|
-
"fs-extra": "11.3.2",
|
|
58
|
-
"gradient-string": "^3.0.0",
|
|
59
|
-
"js-yaml": "4.1.0",
|
|
60
|
-
"liquidjs": "10.21.1",
|
|
61
|
-
"ora": "^9.0.0",
|
|
62
|
-
"pino": "^10.0.0",
|
|
63
|
-
"pino-pretty": "^13.1.1",
|
|
64
|
-
"xstate": "^5.23.0",
|
|
65
|
-
"zod": "3.25.76"
|
|
66
|
-
};
|
|
67
|
-
var devDependencies = {
|
|
68
|
-
"@types/express": "^5.0.0",
|
|
69
|
-
"@types/fs-extra": "^11.0.4",
|
|
70
|
-
"@types/js-yaml": "^4.0.9",
|
|
71
|
-
"@types/node": "^22.0.0",
|
|
72
|
-
"tsdown": "^0.15.6",
|
|
73
|
-
"typescript": "5.9.3",
|
|
74
|
-
"unplugin-raw": "^0.6.3"
|
|
75
|
-
};
|
|
76
|
-
var publishConfig = { "access": "public" };
|
|
77
|
-
var type = "module";
|
|
78
|
-
var exports = {
|
|
79
|
-
".": {
|
|
80
|
-
"import": "./dist/index.js",
|
|
81
|
-
"require": "./dist/index.cjs"
|
|
82
|
-
},
|
|
83
|
-
"./cli": {
|
|
84
|
-
"import": "./dist/cli.js",
|
|
85
|
-
"require": "./dist/cli.cjs"
|
|
86
|
-
},
|
|
87
|
-
"./package.json": "./package.json"
|
|
88
|
-
};
|
|
89
|
-
var package_default = {
|
|
90
|
-
name,
|
|
91
|
-
description,
|
|
92
|
-
version,
|
|
93
|
-
license,
|
|
94
|
-
author,
|
|
95
|
-
repository,
|
|
96
|
-
homepage,
|
|
97
|
-
bugs,
|
|
98
|
-
keywords,
|
|
99
|
-
bin,
|
|
100
|
-
main: main$1,
|
|
101
|
-
types,
|
|
102
|
-
module,
|
|
103
|
-
files,
|
|
104
|
-
scripts,
|
|
105
|
-
dependencies,
|
|
106
|
-
devDependencies,
|
|
107
|
-
publishConfig,
|
|
108
|
-
type,
|
|
109
|
-
exports
|
|
110
|
-
};
|
|
12
|
+
var version = "1.0.5";
|
|
111
13
|
|
|
112
14
|
//#endregion
|
|
113
15
|
//#region src/commands/add.ts
|
|
@@ -125,12 +27,12 @@ const addCommand = new Command("add").description("Add a template to templates f
|
|
|
125
27
|
process.exit(1);
|
|
126
28
|
}
|
|
127
29
|
const targetFolder = path.join(templatesPath, `${templateType}s`, templateName);
|
|
128
|
-
if (await
|
|
30
|
+
if (await pathExists(targetFolder)) {
|
|
129
31
|
messages.error(`Template '${templateName}' already exists at ${targetFolder}`);
|
|
130
32
|
process.exit(1);
|
|
131
33
|
}
|
|
132
34
|
print.info(`${icons.download} Downloading template '${templateName}' from ${templateUrl}...`);
|
|
133
|
-
await
|
|
35
|
+
await ensureDir(path.dirname(targetFolder));
|
|
134
36
|
const parsedUrl = parseGitHubUrl(templateUrl);
|
|
135
37
|
try {
|
|
136
38
|
if (parsedUrl.isSubdirectory && parsedUrl.branch && parsedUrl.subdirectory) {
|
|
@@ -142,7 +44,7 @@ const addCommand = new Command("add").description("Add a template to templates f
|
|
|
142
44
|
print.indent(targetFolder);
|
|
143
45
|
const configFiles = [path.join(targetFolder, "boilerplate.yaml"), path.join(targetFolder, "scaffold.yaml")];
|
|
144
46
|
let hasConfig = false;
|
|
145
|
-
for (const configFile of configFiles) if (await
|
|
47
|
+
for (const configFile of configFiles) if (await pathExists(configFile)) {
|
|
146
48
|
print.header(`\n${icons.config} Configuration file found:`);
|
|
147
49
|
print.indent(path.basename(configFile));
|
|
148
50
|
hasConfig = true;
|
|
@@ -690,11 +592,11 @@ const initActors = {
|
|
|
690
592
|
}),
|
|
691
593
|
checkTemplatesFolder: fromPromise(async ({ input: actorInput }) => {
|
|
692
594
|
try {
|
|
693
|
-
const fs
|
|
595
|
+
const fs = await import("node:fs/promises");
|
|
694
596
|
const defaultTemplatesPath = path.join(actorInput.workspaceRoot, "templates");
|
|
695
597
|
let templatesExists = false;
|
|
696
598
|
try {
|
|
697
|
-
await fs
|
|
599
|
+
await fs.access(defaultTemplatesPath);
|
|
698
600
|
templatesExists = true;
|
|
699
601
|
} catch {
|
|
700
602
|
templatesExists = false;
|
|
@@ -722,7 +624,7 @@ const initActors = {
|
|
|
722
624
|
print.info("");
|
|
723
625
|
finalTemplatesPath = path.join(actorInput.workspaceRoot, customDir.trim());
|
|
724
626
|
try {
|
|
725
|
-
await fs
|
|
627
|
+
await fs.mkdir(finalTemplatesPath, { recursive: true });
|
|
726
628
|
print.success(`Created templates directory at: ${finalTemplatesPath}`);
|
|
727
629
|
} catch (error) {
|
|
728
630
|
throw new Error(`Failed to create templates directory at ${finalTemplatesPath}: ${error.message}`);
|
|
@@ -993,7 +895,7 @@ const initCommand = new Command("init").description("Initialize project with tem
|
|
|
993
895
|
*/
|
|
994
896
|
async function main() {
|
|
995
897
|
const program = new Command();
|
|
996
|
-
program.name("aicode").description("AI-powered code toolkit CLI for scaffolding, architecture management, and development workflows").version(
|
|
898
|
+
program.name("aicode").description("AI-powered code toolkit CLI for scaffolding, architecture management, and development workflows").version(version);
|
|
997
899
|
program.addCommand(initCommand);
|
|
998
900
|
program.addCommand(addCommand);
|
|
999
901
|
await program.parseAsync(process.argv);
|
package/dist/index.cjs
CHANGED
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import "./mcp-C3HR_ZNF.mjs";
|
|
2
|
+
import { _ as THEME, c as cloneSubdirectory, d as gitInit, f as parseGitHubUrl, g as BANNER_GRADIENT, h as CodingAgentService, l as fetchGitHubDirectoryContents, m as displayCompactBanner, n as TemplateSelectionService, o as NewProjectService, p as displayBanner, s as cloneRepository, t as TemplatesService, u as findWorkspaceRoot } from "./services-BvnOGCDG.mjs";
|
|
3
|
+
|
|
4
|
+
export { BANNER_GRADIENT, CodingAgentService, NewProjectService, THEME, TemplateSelectionService, TemplatesService, cloneRepository, cloneSubdirectory, displayBanner, displayCompactBanner, fetchGitHubDirectoryContents, findWorkspaceRoot, gitInit, parseGitHubUrl };
|