@dosu/cli 0.33.2 → 0.35.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.
Files changed (3) hide show
  1. package/README.md +12 -12
  2. package/bin/dosu.js +67 -51
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
  ## Quick Start
11
11
 
12
12
  ```bash
13
- npx @dosu/cli setup
13
+ curl -fsSL https://cli.dosu.dev/install | sh
14
14
  ```
15
15
 
16
16
  The interactive wizard authenticates you via browser OAuth, lets you pick a Dosu deployment (or OSS / public-library mode), mints an API key, detects which AI tools you have installed, and writes the Dosu MCP server entry into each one's config. Restart your AI tool and Dosu is available.
@@ -19,33 +19,33 @@ Run `dosu` with no arguments any time to open the interactive menu.
19
19
 
20
20
  ## Installation
21
21
 
22
- ### npx / npm (Recommended)
22
+ ### curl / install (macOS / Linux) (Recommended)
23
23
 
24
- Requires Node.js 22+.
24
+ Downloads and installs the latest stable release binary.
25
25
 
26
26
  ```bash
27
- npx @dosu/cli setup
27
+ curl -fsSL https://cli.dosu.dev/install | sh
28
28
  ```
29
29
 
30
- Or install globally:
30
+ To install a specific release tag:
31
31
 
32
32
  ```bash
33
- npm install -g @dosu/cli
34
- dosu setup
33
+ DOSU_INSTALL_VERSION=v0.2.0-rc1 curl -fsSL https://cli.dosu.dev/install | sh
35
34
  ```
36
35
 
37
- ### curl / install (macOS / Linux)
36
+ ### npx / npm
38
37
 
39
- Downloads and installs the latest stable release binary.
38
+ Requires Node.js 22+.
40
39
 
41
40
  ```bash
42
- curl -fsSL https://raw.githubusercontent.com/dosu-ai/dosu-cli/main/install.sh | sh
41
+ npx @dosu/cli setup
43
42
  ```
44
43
 
45
- To install a specific release tag:
44
+ Or install globally:
46
45
 
47
46
  ```bash
48
- DOSU_INSTALL_VERSION=v0.2.0-rc1 curl -fsSL https://raw.githubusercontent.com/dosu-ai/dosu-cli/main/install.sh | sh
47
+ npm install -g @dosu/cli
48
+ dosu setup
49
49
  ```
50
50
 
51
51
  ### Homebrew
package/bin/dosu.js CHANGED
@@ -4748,7 +4748,7 @@ var init_dist4 = __esm(() => {
4748
4748
  function getVersionString() {
4749
4749
  return `v${VERSION}`;
4750
4750
  }
4751
- var VERSION = "0.33.2", INSTALL_CHANNEL = "npm";
4751
+ var VERSION = "0.35.0", INSTALL_CHANNEL = "npm";
4752
4752
 
4753
4753
  // src/debug/logger.ts
4754
4754
  import {
@@ -4882,7 +4882,7 @@ var init_logger = __esm(() => {
4882
4882
  });
4883
4883
 
4884
4884
  // src/client/contract.ts
4885
- var CLI_CONTRACT_HASH = "f5c0727a7884";
4885
+ var CLI_CONTRACT_HASH = "a27c8fdd5baf";
4886
4886
 
4887
4887
  // src/client/trpc.ts
4888
4888
  var exports_trpc = {};
@@ -14506,7 +14506,7 @@ ${page.body}`);
14506
14506
  }
14507
14507
  console.log(import_picocolors11.default.green("Auto-tagging started."));
14508
14508
  });
14509
- cmd.command("import").description("Import documents from an external platform").argument("<platform>", "Platform: github, gitlab, confluence, notion, coda").requiredOption("--files <ids>", "Comma-separated file/page IDs to import").option("--json", "Output as JSON").action(async (platform2, opts) => {
14509
+ cmd.command("import").description("Import documents from an external platform").argument("<platform>", "Platform: github, gitlab, azure_devops, confluence, notion, coda").requiredOption("--files <ids>", "Comma-separated file/page IDs to import").option("--json", "Output as JSON").action(async (platform2, opts) => {
14510
14510
  const cfg = requireConfig5();
14511
14511
  const client = createTypedClient(cfg);
14512
14512
  const ksId = await getKnowledgeStoreId(client, cfg.active_account.target.space_id);
@@ -14514,13 +14514,14 @@ ${page.body}`);
14514
14514
  const importFn = {
14515
14515
  github: (input) => client.docImports.importGithubFiles.mutate(input),
14516
14516
  gitlab: (input) => client.docImports.importGitlabFiles.mutate(input),
14517
+ azure_devops: (input) => client.docImports.importAzureDevopsFiles.mutate(input),
14517
14518
  confluence: (input) => client.docImports.importConfluencePages.mutate(input),
14518
14519
  notion: (input) => client.docImports.importNotionPages.mutate(input),
14519
14520
  coda: (input) => client.docImports.importCodaPages.mutate(input)
14520
14521
  };
14521
14522
  const fn = importFn[platform2.toLowerCase()];
14522
14523
  if (!fn) {
14523
- console.error(import_picocolors11.default.red(`Unknown platform: ${platform2}. Use: github, gitlab, confluence, notion, coda`));
14524
+ console.error(import_picocolors11.default.red(`Unknown platform: ${platform2}. Use: github, gitlab, azure_devops, confluence, notion, coda`));
14524
14525
  process.exit(1);
14525
14526
  }
14526
14527
  const idField = ["confluence", "notion", "coda"].includes(platform2.toLowerCase()) ? "page_ids" : "file_ids";
@@ -14567,7 +14568,7 @@ ${page.body}`);
14567
14568
  }
14568
14569
  console.log(`Status: ${JSON.stringify(status)}`);
14569
14570
  });
14570
- cmd.command("publish").description("Publish a document to an external platform").argument("<id>", "Page ID").requiredOption("--to <platform>", "Target: github, gitlab, confluence, notion, coda").option("--repo-id <id>", "GitHub repository ID").option("--project-id <id>", "GitLab project ID").option("--parent-page-id <id>", "Parent page ID (Confluence/Notion)").option("--doc-id <id>", "Coda doc ID").option("--directory <path>", "Target directory (GitHub/GitLab)").option("--data-source-id <id>", "Data source ID").option("--json", "Output as JSON").action(async (id, opts) => {
14571
+ cmd.command("publish").description("Publish a document to an external platform").argument("<id>", "Page ID").requiredOption("--to <platform>", "Target: github, gitlab, azure_devops, confluence, notion, coda").option("--repo-id <id>", "GitHub repository ID").option("--project-id <id>", "GitLab project ID").option("--parent-page-id <id>", "Parent page ID (Confluence/Notion)").option("--doc-id <id>", "Coda doc ID").option("--directory <path>", "Target directory (GitHub/GitLab)").option("--data-source-id <id>", "Data source ID").option("--json", "Output as JSON").action(async (id, opts) => {
14571
14572
  const cfg = requireConfig5();
14572
14573
  const platform2 = opts.to.toLowerCase();
14573
14574
  const publishMap = {
@@ -14587,6 +14588,19 @@ ${page.body}`);
14587
14588
  target_data_source_id: opts.dataSourceId
14588
14589
  })
14589
14590
  },
14591
+ azure_devops: {
14592
+ path: `/sync-back/azure_devops/${id}/publish`,
14593
+ buildBody: () => {
14594
+ if (!opts.dataSourceId) {
14595
+ console.error(import_picocolors11.default.red("--data-source-id <id> is required when publishing to azure_devops"));
14596
+ process.exit(1);
14597
+ }
14598
+ return {
14599
+ target_directory: opts.directory ?? "/",
14600
+ target_data_source_id: opts.dataSourceId
14601
+ };
14602
+ }
14603
+ },
14590
14604
  confluence: {
14591
14605
  path: `/sync-back/confluence/${id}/publish`,
14592
14606
  buildBody: () => ({
@@ -15242,46 +15256,62 @@ function requireConfig6() {
15242
15256
  }
15243
15257
  return cfg;
15244
15258
  }
15245
- var NANGO_PLATFORMS = [
15246
- "confluence",
15247
- "notion",
15248
- "coda",
15249
- "gitlab",
15250
- "gitlab-pat",
15251
- "confluence-basic"
15252
- ];
15259
+ var NANGO_PROBES = {
15260
+ gitlab: [
15261
+ { provider: "gitlab", providerConfigKey: "gitlab" },
15262
+ { provider: "gitlab", providerConfigKey: "gitlab-pat" }
15263
+ ],
15264
+ "gitlab-pat": [{ provider: "gitlab", providerConfigKey: "gitlab-pat" }],
15265
+ confluence: [
15266
+ { provider: "confluence", providerConfigKey: "confluence" },
15267
+ { provider: "confluence", providerConfigKey: "confluence-basic" }
15268
+ ],
15269
+ "confluence-basic": [{ provider: "confluence", providerConfigKey: "confluence-basic" }],
15270
+ notion: [{ provider: "notion", providerConfigKey: "notion" }],
15271
+ coda: [{ provider: "coda", providerConfigKey: "coda" }],
15272
+ azure_devops: [
15273
+ { provider: "microsoft-entra-id", providerConfigKey: "microsoft-entra-id" },
15274
+ { provider: "azure_devops", providerConfigKey: "azure-devops" }
15275
+ ]
15276
+ };
15253
15277
  var DISPLAY_PLATFORMS = [
15254
15278
  "github",
15255
15279
  "gitlab",
15280
+ "azure_devops",
15256
15281
  "slack",
15257
15282
  "confluence",
15258
15283
  "notion",
15259
15284
  "coda",
15260
15285
  "teams"
15261
15286
  ];
15287
+ async function probeConnection(client, orgId, platform4) {
15288
+ const probes = NANGO_PROBES[platform4];
15289
+ if (!probes) {
15290
+ return { queryable: false, connected: false, connection: null };
15291
+ }
15292
+ for (const probe of probes) {
15293
+ try {
15294
+ const conn = await client.nango.getConnection.query({
15295
+ provider: probe.provider,
15296
+ providerConfigKey: probe.providerConfigKey,
15297
+ orgId
15298
+ });
15299
+ if (conn != null) {
15300
+ return { queryable: true, connected: true, connection: conn };
15301
+ }
15302
+ } catch {}
15303
+ }
15304
+ return { queryable: true, connected: false, connection: null };
15305
+ }
15262
15306
  function integrationsCommand() {
15263
15307
  const cmd = new Command("integrations").description("Manage integrations");
15264
15308
  cmd.command("list").description("List all integrations and their connection status").option("--json", "Output as JSON").action(async (opts) => {
15265
15309
  const cfg = requireConfig6();
15266
15310
  const client = createTypedClient(cfg);
15267
- const results = [];
15268
- for (const platform4 of DISPLAY_PLATFORMS) {
15269
- const nangoProvider = NANGO_PLATFORMS.find((p2) => p2 === platform4);
15270
- if (nangoProvider) {
15271
- try {
15272
- const conn = await client.nango.getConnection.query({
15273
- provider: nangoProvider,
15274
- providerConfigKey: nangoProvider,
15275
- orgId: cfg.active_account.target.org_id
15276
- });
15277
- results.push({ platform: platform4, connected: conn !== null });
15278
- } catch {
15279
- results.push({ platform: platform4, connected: false });
15280
- }
15281
- } else {
15282
- results.push({ platform: platform4, connected: false });
15283
- }
15284
- }
15311
+ const results = await Promise.all(DISPLAY_PLATFORMS.map(async (platform4) => {
15312
+ const { connected } = await probeConnection(client, cfg.active_account.target.org_id, platform4);
15313
+ return { platform: platform4, connected };
15314
+ }));
15285
15315
  if (opts.json) {
15286
15316
  printResult(results, opts);
15287
15317
  return;
@@ -15294,8 +15324,8 @@ function integrationsCommand() {
15294
15324
  cmd.command("status").description("Check connection status of a specific platform").argument("<platform>", `Platform: ${DISPLAY_PLATFORMS.join(", ")}`).option("--json", "Output as JSON").action(async (platform4, opts) => {
15295
15325
  const cfg = requireConfig6();
15296
15326
  const client = createTypedClient(cfg);
15297
- const nangoProvider = NANGO_PLATFORMS.find((p2) => p2 === platform4);
15298
- if (!nangoProvider) {
15327
+ const { queryable, connected, connection } = await probeConnection(client, cfg.active_account.target.org_id, platform4);
15328
+ if (!queryable) {
15299
15329
  if (opts.json) {
15300
15330
  printResult({ platform: platform4, connected: false, note: "not queryable via nango" }, opts);
15301
15331
  return;
@@ -15303,25 +15333,11 @@ function integrationsCommand() {
15303
15333
  console.log(`${platform4}: ${import_picocolors15.default.dim("not connected (not queryable)")}`);
15304
15334
  return;
15305
15335
  }
15306
- try {
15307
- const conn = await client.nango.getConnection.query({
15308
- provider: nangoProvider,
15309
- providerConfigKey: nangoProvider,
15310
- orgId: cfg.active_account.target.org_id
15311
- });
15312
- const connected = conn !== null;
15313
- if (opts.json) {
15314
- printResult({ platform: platform4, connected, connection: conn }, opts);
15315
- return;
15316
- }
15317
- console.log(`${platform4}: ${connected ? import_picocolors15.default.green("connected") : import_picocolors15.default.dim("not connected")}`);
15318
- } catch {
15319
- if (opts.json) {
15320
- printResult({ platform: platform4, connected: false }, opts);
15321
- return;
15322
- }
15323
- console.log(`${platform4}: ${import_picocolors15.default.dim("not connected")}`);
15336
+ if (opts.json) {
15337
+ printResult({ platform: platform4, connected, connection }, opts);
15338
+ return;
15324
15339
  }
15340
+ console.log(`${platform4}: ${connected ? import_picocolors15.default.green("connected") : import_picocolors15.default.dim("not connected")}`);
15325
15341
  });
15326
15342
  cmd.command("slack-channels").description("List Slack channels").option("--json", "Output as JSON").action(async (opts) => {
15327
15343
  const cfg = requireConfig6();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dosu/cli",
3
- "version": "0.33.2",
3
+ "version": "0.35.0",
4
4
  "type": "module",
5
5
  "description": "Dosu CLI - Manage MCP servers for AI tools",
6
6
  "license": "MIT",