@inkeep/agents-cli 0.8.6 → 0.8.7

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 CHANGED
@@ -188,7 +188,7 @@ inkeep pull --project my-project-id --config ./my-config.ts
188
188
 
189
189
  ### `inkeep dev`
190
190
 
191
- Start the Inkeep dashboard server or build for production.
191
+ Start the Inkeep dashboard server, build for production, or export the Next.js project.
192
192
 
193
193
  ```bash
194
194
  # Start development server
@@ -197,9 +197,12 @@ inkeep dev
197
197
  # Start on custom port and host
198
198
  inkeep dev --port 3001 --host 0.0.0.0
199
199
 
200
- # Build for production
200
+ # Build for production (packages standalone build)
201
201
  inkeep dev --build --output-dir ./build
202
202
 
203
+ # Export Next.js project source files
204
+ inkeep dev --export --output-dir ./my-dashboard
205
+
203
206
  # Get dashboard path for deployment
204
207
  DASHBOARD_PATH=$(inkeep dev --path)
205
208
  echo "Dashboard built at: $DASHBOARD_PATH"
package/dist/index.js CHANGED
@@ -21641,13 +21641,107 @@ Make sure to set these in your Vercel project settings:
21641
21641
  throw error;
21642
21642
  }
21643
21643
  }
21644
+ async function exportNextApp({ outputDir }) {
21645
+ console.log("");
21646
+ const spinner = ora2("Exporting Next.js project...").start();
21647
+ try {
21648
+ const pkg = require2.resolve("@inkeep/agents-manage-ui/package.json");
21649
+ const root = dirname(pkg);
21650
+ if (!existsSync2(root)) {
21651
+ spinner.fail("Source project not found");
21652
+ console.error(chalk3.red("The @inkeep/agents-manage-ui package was not found."));
21653
+ process.exit(1);
21654
+ }
21655
+ if (existsSync2(outputDir)) {
21656
+ await fs4.remove(outputDir);
21657
+ }
21658
+ await fs4.ensureDir(outputDir);
21659
+ const items = await fs4.readdir(root);
21660
+ for (const item of items) {
21661
+ const srcPath = join2(root, item);
21662
+ const destPath = join2(outputDir, item);
21663
+ if (item === ".next" || item === "node_modules" || item === "dist") {
21664
+ continue;
21665
+ }
21666
+ const stat = await fs4.stat(srcPath);
21667
+ if (stat.isDirectory()) {
21668
+ await fs4.copy(srcPath, destPath);
21669
+ } else {
21670
+ await fs4.copy(srcPath, destPath);
21671
+ }
21672
+ }
21673
+ const readme = `# Inkeep Dashboard
21674
+
21675
+ This is an exported copy of the Inkeep Dashboard UI.
21676
+
21677
+ ## Getting Started
21678
+
21679
+ 1. Install dependencies:
21680
+ \`\`\`bash
21681
+ npm install
21682
+ # or
21683
+ pnpm install
21684
+ \`\`\`
21685
+
21686
+ 2. Start the development server:
21687
+ \`\`\`bash
21688
+ npm run dev
21689
+ # or
21690
+ pnpm dev
21691
+ \`\`\`
21692
+
21693
+ 3. Build for production:
21694
+ \`\`\`bash
21695
+ npm run build
21696
+ # or
21697
+ pnpm build
21698
+ \`\`\`
21699
+
21700
+ ## Environment Variables
21701
+
21702
+ Make sure to set these environment variables:
21703
+ - \`INKEEP_API_URL\` - Your Inkeep API URL
21704
+ - \`INKEEP_TENANT_ID\` - Your tenant ID
21705
+ - Any other variables from your .env file
21706
+
21707
+ ## Deployment
21708
+
21709
+ This project can be deployed to any platform that supports Next.js:
21710
+ - Vercel
21711
+ - Netlify
21712
+ - AWS Amplify
21713
+ - Railway
21714
+ - And more...
21715
+ `;
21716
+ await fs4.writeFile(join2(outputDir, "README.md"), readme);
21717
+ spinner.succeed(`Project exported to ${outputDir}/`);
21718
+ console.log("");
21719
+ console.log(chalk3.green("\u2705 Export completed successfully!"));
21720
+ console.log("");
21721
+ console.log(chalk3.blue("\u{1F4C1} To get started:"));
21722
+ console.log(chalk3.gray(" cd"), chalk3.white(outputDir));
21723
+ console.log(chalk3.gray(" npm install"));
21724
+ console.log(chalk3.gray(" npm run dev"));
21725
+ console.log("");
21726
+ console.log(chalk3.yellow("\u{1F4D6} See README.md for more instructions"));
21727
+ console.log("");
21728
+ } catch (error) {
21729
+ spinner.fail("Failed to export project");
21730
+ console.error(chalk3.red("Error:"), error instanceof Error ? error.message : "Unknown error");
21731
+ throw error;
21732
+ }
21733
+ }
21644
21734
  async function devCommand(options) {
21645
- const { port, host, build, outputDir, path: path3 } = options;
21735
+ const { port, host, build, outputDir, path: path3, export: exportFlag } = options;
21646
21736
  if (path3) {
21647
21737
  const rt = resolveWebRuntime(true);
21648
21738
  console.log(rt);
21649
21739
  return;
21650
21740
  }
21741
+ if (exportFlag) {
21742
+ await exportNextApp({ outputDir });
21743
+ return;
21744
+ }
21651
21745
  if (build) {
21652
21746
  await buildNextApp({ outputDir });
21653
21747
  return;
@@ -23501,13 +23595,14 @@ program.command("list-graphs").description("List all available graphs for a spec
23501
23595
  const config = options.config || options.configFilePath;
23502
23596
  await listGraphsCommand({ ...options, config });
23503
23597
  });
23504
- program.command("dev").description("Start the Inkeep dashboard server").option("--port <port>", "Port to run the server on", "3000").option("--host <host>", "Host to bind the server to", "localhost").option("--build", "Build the Dashboard UI for production", false).option("--output-dir <dir>", "Output directory for build files", "./vercel-build").option("--path", "Output the path to the Dashboard UI", false).action(async (options) => {
23598
+ program.command("dev").description("Start the Inkeep dashboard server").option("--port <port>", "Port to run the server on", "3000").option("--host <host>", "Host to bind the server to", "localhost").option("--build", "Build the Dashboard UI for production", false).option("--export", "Export the Next.js project source files", false).option("--output-dir <dir>", "Output directory for build files", "./inkeep-dev").option("--path", "Output the path to the Dashboard UI", false).action(async (options) => {
23505
23599
  await devCommand({
23506
23600
  port: parseInt(options.port, 10),
23507
23601
  host: options.host,
23508
23602
  build: options.build,
23509
23603
  outputDir: options.outputDir,
23510
- path: options.path
23604
+ path: options.path,
23605
+ export: options.export
23511
23606
  });
23512
23607
  });
23513
23608
  program.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/agents-cli",
3
- "version": "0.8.6",
3
+ "version": "0.8.7",
4
4
  "description": "Inkeep CLI tool",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -45,8 +45,8 @@
45
45
  "recast": "^0.23.0",
46
46
  "ts-morph": "^26.0.0",
47
47
  "tsx": "^4.20.5",
48
- "@inkeep/agents-manage-ui": "^0.8.6",
49
- "@inkeep/agents-core": "^0.8.6"
48
+ "@inkeep/agents-core": "^0.8.7",
49
+ "@inkeep/agents-manage-ui": "^0.8.7"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@types/degit": "^2.8.6",