@dashai/cli 0.18.2 → 0.18.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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 DashWise
3
+ Copyright (c) 2026 Dashwise
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @dashai/cli
2
2
 
3
- `dashwise` — the DashWise command-line tool. Log in, author modules, publish to the marketplace.
3
+ `dashwise` — the Dashwise command-line tool. Log in, author modules, publish to the marketplace.
4
4
 
5
5
  > **New here?** Start with the [building modules walk-through](../../docs/building-modules.md) — covers the full first-module flow (login → scaffold → dev → publish) with diagrams of the auth flow and an annotated manifest. This file is the per-command reference; the walk-through is the tutorial.
6
6
 
@@ -107,7 +107,7 @@ Requires `dashwise login` first — the command refuses to start if no token is
107
107
 
108
108
  ### `dashwise init [slug]` / `dashwise module init [slug]`
109
109
 
110
- Scaffold a new DashWise module in a fresh directory. `dashwise init` is a top-level alias for `dashwise module init` — both accept the same flags. Two flavors:
110
+ Scaffold a new Dashwise module in a fresh directory. `dashwise init` is a top-level alias for `dashwise module init` — both accept the same flags. Two flavors:
111
111
 
112
112
  **Custom** (default since 2026-05-18) — full Next.js App Router app with SDK auth wired in (machine runtime, lands on Fly Machines once P7 ships). Files: `module.json`, `package.json`, `tsconfig.json`, `next.config.mjs`, `next-env.d.ts`, `middleware.ts` (uses `@dashai/sdk/auth/middleware`), `app/layout.tsx`, `app/page.tsx`, `app/dashboard/page.tsx` (auth-gated Server Component example), three `app/api/auth/*` route handlers, shadcn primitives + a `globals.css`, plus `CLAUDE.md` / `spec.md` / `agent-log.md` agent-facing docs. `module.json` carries `module_kind: 'custom'` + `runtime.kind: 'machine'`.
113
113
 
package/dist/bin.js CHANGED
@@ -1194,7 +1194,7 @@ async function resolveTargetWorkspace(apiUrl, apiToken, flag) {
1194
1194
  );
1195
1195
  if (workspaces.length === 0) {
1196
1196
  throw new Error(
1197
- "No workspaces found for your account. Create a workspace at the DashWise dashboard first."
1197
+ "No workspaces found for your account. Create a workspace at the Dashwise dashboard first."
1198
1198
  );
1199
1199
  }
1200
1200
  if (flag === void 0) {
@@ -3761,7 +3761,7 @@ async function selectWorkspace(opts) {
3761
3761
  );
3762
3762
  if (workspaces.length === 0) {
3763
3763
  throw new Error(
3764
- "No workspaces found for your account. Create a workspace at the DashWise dashboard first."
3764
+ "No workspaces found for your account. Create a workspace at the Dashwise dashboard first."
3765
3765
  );
3766
3766
  }
3767
3767
  if (opts.flag !== void 0) {
@@ -3811,7 +3811,7 @@ var init_workspaces = __esm({
3811
3811
  }
3812
3812
  });
3813
3813
  async function moduleInitCommand(slugArg, options) {
3814
- intro("Scaffolding a new DashWise module");
3814
+ intro("Scaffolding a new Dashwise module");
3815
3815
  let slug = slugArg;
3816
3816
  if (!slug && process.stdout.isTTY) {
3817
3817
  const answer = await text({
@@ -4148,7 +4148,7 @@ function surfaceProvisionApiError(err, slug) {
4148
4148
  return;
4149
4149
  case "FORBIDDEN":
4150
4150
  warn(
4151
- `Not authorized to create a module in that workspace. Confirm you're a member at the DashWise dashboard.`
4151
+ `Not authorized to create a module in that workspace. Confirm you're a member at the Dashwise dashboard.`
4152
4152
  );
4153
4153
  return;
4154
4154
  case "DEV_INSTALL_ALREADY_EXISTS": {
@@ -6138,7 +6138,7 @@ async function moduleConvertCommand(opts) {
6138
6138
  ...opts.name !== void 0 ? { name: opts.name } : {},
6139
6139
  ...opts.git !== void 0 ? { repositoryUrl: opts.git } : {}
6140
6140
  });
6141
- console.log(`Converted "${result.name}" (slug: ${result.slug}) to a DashWise module.
6141
+ console.log(`Converted "${result.name}" (slug: ${result.slug}) to a Dashwise module.
6142
6142
  `);
6143
6143
  if (result.created.length) {
6144
6144
  console.log(" Created:");
@@ -6161,7 +6161,7 @@ async function moduleConvertCommand(opts) {
6161
6161
  for (const w of result.warnings) console.log(` ! ${w}`);
6162
6162
  }
6163
6163
  console.log(
6164
- "\nNext: `npm install`, then `dashwise dev` to run it against DashWise, or `dashwise module publish` to deploy."
6164
+ "\nNext: `npm install`, then `dashwise dev` to run it against Dashwise, or `dashwise module publish` to deploy."
6165
6165
  );
6166
6166
  return 0;
6167
6167
  } catch (err) {
@@ -6423,7 +6423,7 @@ ${issues}
6423
6423
  );
6424
6424
  }
6425
6425
  info(
6426
- `Next: ${code("dashwise dev")} to run it against DashWise, or ${code("dashwise module publish")} to deploy.${tablesApplied === 0 ? ` Add tables with ${code("dashwise table create")}.` : ""}`
6426
+ `Next: ${code("dashwise dev")} to run it against Dashwise, or ${code("dashwise module publish")} to deploy.${tablesApplied === 0 ? ` Add tables with ${code("dashwise table create")}.` : ""}`
6427
6427
  );
6428
6428
  return 0;
6429
6429
  }
@@ -10497,7 +10497,7 @@ async function envExportCommand(options) {
10497
10497
  {
10498
10498
  key: "DASHWISE_API_URL",
10499
10499
  value: apiUrl,
10500
- comment: "# DashWise backend URL \u2014 same value the CLI is logged into."
10500
+ comment: "# Dashwise backend URL \u2014 same value the CLI is logged into."
10501
10501
  },
10502
10502
  {
10503
10503
  key: "DASHWISE_API_KEY",
@@ -11451,9 +11451,9 @@ async function sleep4(ms, aborted) {
11451
11451
  // src/program.ts
11452
11452
  init_output();
11453
11453
  var program = new Command();
11454
- program.name("dashwise").description("DashWise CLI \u2014 log in, author modules, publish to the marketplace.").version(getVersion(), "-v, --version", "Show the CLI version + exit").option(
11454
+ program.name("dashwise").description("Dashwise CLI \u2014 log in, author modules, publish to the marketplace.").version(getVersion(), "-v, --version", "Show the CLI version + exit").option(
11455
11455
  "--api-url <url>",
11456
- "Override DashWise backend URL (default: $DASHWISE_API_URL or saved config or http://localhost:3000)"
11456
+ "Override Dashwise backend URL (default: $DASHWISE_API_URL or saved config or http://localhost:3000)"
11457
11457
  );
11458
11458
  program.hook("preAction", () => {
11459
11459
  const apiUrl = program.opts().apiUrl?.trim();
@@ -11489,7 +11489,7 @@ workspace.command("use <slug>").description("Set the default workspace for subse
11489
11489
  process.exitCode = await workspaceUseCommand(slug);
11490
11490
  });
11491
11491
  program.command("dev").description(
11492
- "One-command local dev loop: runs the manifest watcher + Next.js dev server together. Registers a dev-mode SSO session with the backend so workspace members can sign into your locally-running module via DashWise SSO (no installation_id required). Auth + dev-session env auto-injected into both child processes from your saved CLI config. Run `dashwise login` first."
11492
+ "One-command local dev loop: runs the manifest watcher + Next.js dev server together. Registers a dev-mode SSO session with the backend so workspace members can sign into your locally-running module via Dashwise SSO (no installation_id required). Auth + dev-session env auto-injected into both child processes from your saved CLI config. Run `dashwise login` first."
11493
11493
  ).option("--dir <path>", "Project root containing `module.json` (default: current directory).").option(
11494
11494
  "--installation-id <id>",
11495
11495
  "Use prod-mode SSO with this installation id instead of registering a dev session. The installation must already exist in the target workspace."
@@ -11566,13 +11566,13 @@ var initAction = async (slugArg, cmdOpts) => {
11566
11566
  };
11567
11567
  initOptions(
11568
11568
  program.command("init [slug]").description(
11569
- "Scaffold a new DashWise module \u2014 full Next.js app with auth wiring + SSO callback + protected dashboard. Pass --simple for the legacy minimal scaffold (no auth). Top-level alias for `dashwise module init`."
11569
+ "Scaffold a new Dashwise module \u2014 full Next.js app with auth wiring + SSO callback + protected dashboard. Pass --simple for the legacy minimal scaffold (no auth). Top-level alias for `dashwise module init`."
11570
11570
  )
11571
11571
  ).action(initAction);
11572
11572
  var moduleCmd = program.command("module").description("Module authoring commands.");
11573
11573
  initOptions(
11574
11574
  moduleCmd.command("init [slug]").description(
11575
- "Scaffold a new DashWise module \u2014 full Next.js app with auth wiring + SSO callback + protected dashboard. Pass --simple for the legacy minimal scaffold (no auth)."
11575
+ "Scaffold a new Dashwise module \u2014 full Next.js app with auth wiring + SSO callback + protected dashboard. Pass --simple for the legacy minimal scaffold (no auth)."
11576
11576
  )
11577
11577
  ).action(initAction);
11578
11578
  moduleCmd.command("connect-git <repo-url>").description("Link the local module to a Git repository (writes module.json#repository).").option("--dir <path>", "Project root (default: current directory).").option("--branch <name>", "Default branch to publish from (e.g. `main`).").action(
@@ -11584,7 +11584,7 @@ moduleCmd.command("connect-git <repo-url>").description("Link the local module t
11584
11584
  }
11585
11585
  );
11586
11586
  moduleCmd.command("convert [dir]").description(
11587
- "Convert an EXISTING Next.js app into a DashWise module \u2014 idempotently inject module.json, auth wiring, the SDK dep, and output:standalone. Creates missing files; warns (never overwrites) for an existing layout/next.config/module.json."
11587
+ "Convert an EXISTING Next.js app into a Dashwise module \u2014 idempotently inject module.json, auth wiring, the SDK dep, and output:standalone. Creates missing files; warns (never overwrites) for an existing layout/next.config/module.json."
11588
11588
  ).option("--slug <slug>", "Module slug (default: derived from package.json name / dir).").option("--name <name>", "Human-readable module name (default: package.json name).").option("--git <url>", "Git repository URL \u2014 written to module.json#repository.url.").action(
11589
11589
  async (dir, cmdOpts) => {
11590
11590
  process.exitCode = await moduleConvertCommand({
@@ -11596,7 +11596,7 @@ moduleCmd.command("convert [dir]").description(
11596
11596
  }
11597
11597
  );
11598
11598
  moduleCmd.command("register [dir]").description(
11599
- "Link an existing local module (a directory with module.json \u2014 e.g. after `module convert`) to DashWise: creates the backend module record + a dev install and caches the runtime token, so `dashwise dev` / `publish` work. Requires login."
11599
+ "Link an existing local module (a directory with module.json \u2014 e.g. after `module convert`) to Dashwise: creates the backend module record + a dev install and caches the runtime token, so `dashwise dev` / `publish` work. Requires login."
11600
11600
  ).option("--workspace <slug-or-id>", "Target workspace (default: interactive picker).").option("--name <name>", "Override the module name (default: module.json name).").action(
11601
11601
  async (dir, cmdOpts) => {
11602
11602
  process.exitCode = await moduleRegisterCommand({
@@ -11811,7 +11811,7 @@ program.command("query").description(
11811
11811
  }
11812
11812
  );
11813
11813
  program.command("run [cmd...]").description(
11814
- "Run a command with the module's DashWise env injected \u2014 resolves DASHWISE_API_URL + DASHWISE_API_KEY through the same chain as `dashwise query` (explicit env \u2192 .env.local \u2192 the cached dwk_ key) and spawns the command with them overlaid, inheriting stdio and propagating the exit code. Example: `dashwise run -- node seed.mjs`."
11814
+ "Run a command with the module's Dashwise env injected \u2014 resolves DASHWISE_API_URL + DASHWISE_API_KEY through the same chain as `dashwise query` (explicit env \u2192 .env.local \u2192 the cached dwk_ key) and spawns the command with them overlaid, inheriting stdio and propagating the exit code. Example: `dashwise run -- node seed.mjs`."
11815
11815
  ).option("--dir <path>", "Project root containing `module.json` (default: current directory).").action(async (cmdArgs, cmdOpts) => {
11816
11816
  const { runCommand: runCommand2 } = await Promise.resolve().then(() => (init_run(), run_exports));
11817
11817
  process.exitCode = await runCommand2(cmdArgs ?? [], {
@@ -11932,7 +11932,7 @@ originsCmd.command("remove <url>").description("Remove an SSO callback origin fr
11932
11932
  });
11933
11933
  var envCmd = program.command("env").description("Environment-variable helpers for deploying a module.");
11934
11934
  envCmd.command("export").description(
11935
- "Emit the env vars a deployed module needs to authenticate against DashWise. By default emits .env-style KEY=value lines; --format = env | json | railway | vercel | fly to wrap in platform-native syntax. Use --new-key <name> to mint + inline an API key in one step."
11935
+ "Emit the env vars a deployed module needs to authenticate against Dashwise. By default emits .env-style KEY=value lines; --format = env | json | railway | vercel | fly to wrap in platform-native syntax. Use --new-key <name> to mint + inline an API key in one step."
11936
11936
  ).option("--dir <path>", "Project root (default: current directory).").option(
11937
11937
  "--format <fmt>",
11938
11938
  "Output format: env | json | railway | vercel | fly (default: env)."
@@ -12226,7 +12226,7 @@ fieldCmd.command("set-type <table-slug> <field-slug> <new-type>").description(
12226
12226
  }
12227
12227
  );
12228
12228
  function getVersion() {
12229
- return "0.18.2";
12229
+ return "0.18.3";
12230
12230
  }
12231
12231
  function parseIntOption(value) {
12232
12232
  const n = Number.parseInt(value, 10);