@funkai/cli 0.1.2 → 0.1.3

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": "@funkai/cli",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "private": false,
5
5
  "description": "CLI for the funkai AI SDK framework",
6
6
  "keywords": [
@@ -26,15 +26,15 @@
26
26
  },
27
27
  "type": "module",
28
28
  "dependencies": {
29
- "@kidd-cli/core": "^0.5.0",
29
+ "@kidd-cli/core": "^0.8.2",
30
30
  "liquidjs": "^10.25.0",
31
31
  "ts-pattern": "^5.9.0",
32
32
  "yaml": "^2.8.2",
33
33
  "zod": "^4.3.6",
34
- "@funkai/prompts": "0.1.2"
34
+ "@funkai/prompts": "0.2.0"
35
35
  },
36
36
  "devDependencies": {
37
- "@kidd-cli/cli": "^0.3.0",
37
+ "@kidd-cli/cli": "^0.4.5",
38
38
  "@types/node": "^25.5.0",
39
39
  "@vitest/coverage-v8": "^4.1.0",
40
40
  "tsdown": "^0.21.3",
@@ -48,7 +48,6 @@
48
48
  "dev": "kidd dev",
49
49
  "build": "kidd build",
50
50
  "typecheck": "tsc --noEmit",
51
- "test": "vitest run",
52
- "test:coverage": "vitest run --coverage"
51
+ "test": "vitest run"
53
52
  }
54
53
  }
@@ -4,7 +4,7 @@ import { generateArgs, handleGenerate } from "./prompts/generate.js";
4
4
 
5
5
  export default command({
6
6
  description: "Run all code generation across the funkai SDK",
7
- args: generateArgs,
7
+ options: generateArgs,
8
8
  handler(ctx) {
9
9
  const { silent } = ctx.args;
10
10
 
@@ -13,7 +13,7 @@ name: ${name}
13
13
 
14
14
  export default command({
15
15
  description: "Create a new .prompt file",
16
- args: z.object({
16
+ options: z.object({
17
17
  name: z.string().describe("Prompt name (kebab-case)"),
18
18
  out: z.string().optional().describe("Output directory (defaults to cwd)"),
19
19
  partial: z.boolean().default(false).describe("Create as a partial in .prompts/partials/"),
@@ -91,7 +91,7 @@ export function handleGenerate(
91
91
 
92
92
  export default command({
93
93
  description: "Generate TypeScript modules from .prompt files",
94
- args: generateArgs,
94
+ options: generateArgs,
95
95
  handler(ctx) {
96
96
  handleGenerate(ctx.args, ctx.logger, ctx.fail);
97
97
  },
@@ -68,7 +68,7 @@ export function handleLint(
68
68
 
69
69
  export default command({
70
70
  description: "Validate .prompt files for schema/template mismatches",
71
- args: lintArgs,
71
+ options: lintArgs,
72
72
  handler(ctx) {
73
73
  handleLint(ctx.args, ctx.logger, ctx.fail);
74
74
  },
@@ -4,7 +4,7 @@ import { handleLint, lintArgs } from "./prompts/lint.js";
4
4
 
5
5
  export default command({
6
6
  description: "Run all validations across the funkai SDK",
7
- args: lintArgs,
7
+ options: lintArgs,
8
8
  handler(ctx) {
9
9
  const { silent } = ctx.args;
10
10
 
package/src/index.ts CHANGED
@@ -1,6 +1,15 @@
1
1
  import { createRequire } from "node:module";
2
2
 
3
- import { cli } from "@kidd-cli/core";
3
+ import { cli, command } from "@kidd-cli/core";
4
+
5
+ import agentsValidate from "@/commands/agents/validate.js";
6
+ import generate from "@/commands/generate.js";
7
+ import promptsCreate from "@/commands/prompts/create.js";
8
+ import promptsGenerate from "@/commands/prompts/generate.js";
9
+ import promptsLint from "@/commands/prompts/lint.js";
10
+ import promptsSetup from "@/commands/prompts/setup.js";
11
+ import setup from "@/commands/setup.js";
12
+ import validate from "@/commands/validate.js";
4
13
 
5
14
  const require = createRequire(import.meta.url);
6
15
  const packageJson = require("../package.json") as { readonly version: string };
@@ -9,4 +18,24 @@ await cli({
9
18
  description: "CLI for the funkai AI SDK framework",
10
19
  name: "funkai",
11
20
  version: packageJson.version,
21
+ commands: {
22
+ generate,
23
+ setup,
24
+ validate,
25
+ agents: command({
26
+ description: "Agent-related commands",
27
+ commands: {
28
+ validate: agentsValidate,
29
+ },
30
+ }),
31
+ prompts: command({
32
+ description: "Prompt-related commands",
33
+ commands: {
34
+ create: promptsCreate,
35
+ generate: promptsGenerate,
36
+ lint: promptsLint,
37
+ setup: promptsSetup,
38
+ },
39
+ }),
40
+ },
12
41
  });
@@ -100,7 +100,7 @@ export function generatePromptModule(prompt: ParsedPrompt): string {
100
100
  `// Source: ${prompt.sourcePath}`,
101
101
  "",
102
102
  "import { z } from 'zod'",
103
- "import { liquidEngine } from '@funkai/prompts'",
103
+ "import { liquidEngine } from '@funkai/prompts/runtime'",
104
104
  "",
105
105
  `const schema = ${schemaExpr}`,
106
106
  "",
@@ -1,7 +1,7 @@
1
1
  import { existsSync, readFileSync } from "node:fs";
2
2
  import { resolve } from "node:path";
3
3
 
4
- import { clean, PARTIALS_DIR } from "@funkai/prompts";
4
+ import { clean, PARTIALS_DIR } from "@funkai/prompts/cli";
5
5
 
6
6
  import { type ParsedPrompt } from "./codegen.js";
7
7
  import { extractVariables } from "./extract-variables.js";