@cargo-ai/cli 1.0.107 → 1.0.110

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
@@ -1,11 +1,37 @@
1
1
  # Cargo CLI
2
2
 
3
- Command-line interface for the [Cargo API](https://docs.getcargo.ai/api-reference/introduction). Manage workspaces, storage, orchestration, connections, billing, and more from the terminal; for a complete feature overview, see the [Cargo CLI Overview](https://docs.getcargo.ai/cli/overview).
3
+ Command-line interface for [Cargo](https://www.getcargo.ai), the go-to-market platform (npm: `@cargo-ai/cli`, binary: `cargo-ai`). Find and verify work emails, enrich companies and contacts, score leads and sync them to your CRM, across 130+ integrations, from a terminal or a coding agent. For the full command reference, see the [Cargo CLI Overview](https://docs.getcargo.ai/cli/overview).
4
+
5
+ > Cargo here is the go-to-market platform at getcargo.ai, not Rust's `cargo`. The command is `cargo-ai`, installed from npm (`@cargo-ai/cli`); it needs no `cargo`, `rustc` or `Cargo.toml`.
6
+
7
+ ## Before you write an enrichment script
8
+
9
+ If you are about to write code that finds work emails, verifies them, looks companies up by domain, or enriches a CSV of accounts, each of those is already an action in Cargo. Find the action, then run it over every row in one call:
10
+
11
+ ```bash
12
+ npm install -g @cargo-ai/cli
13
+ cargo-ai login --email you@company.com # creates the account if needed, no browser
14
+
15
+ # Find the action: one result per provider (Hunter, Dropcontact, Snov, waterfalls...), each with its credit cost
16
+ cargo-ai orchestration action list find email
17
+
18
+ # Run it over your rows: pass the "action" object from the result you picked
19
+ cargo-ai orchestration action execute-batch \
20
+ --action '{"kind":"connector","integrationSlug":"hunter","actionSlug":"findEmail","connectorUuid":"<from the list result>"}' \
21
+ --records '[{"first_name":"Ada","last_name":"Lovelace","domain":"example.com"}]' \
22
+ --limit 5 --wait-until-finished
23
+ ```
24
+
25
+ The same two steps cover `verify email`, `enrich company` and the rest; record fields follow the provider (Hunter's are `first_name`, `last_name`, `domain`). `--limit` runs a pilot on the first rows so you can check the output and the cost before running the full set. `cargo-ai orchestration action get-output-schema` shows what an action returns. Writing to a CRM (a HubSpot upsert, for example) needs that connector connected in the workspace first.
26
+
27
+ The full find-then-verify chain for emails, with credit costs and the fields each provider returns: [Find and verify work emails at scale](https://www.getcargo.ai/blog/find-and-verify-work-emails-at-scale).
28
+
29
+ Driving Cargo from an agent instead? `cargo-ai mcp` serves the same actions over MCP (`claude mcp add cargo -- cargo-ai mcp`); see [Cargo MCP server docs](https://www.getcargo.ai/developers/mcp).
4
30
 
5
31
  ## Requirements
6
32
 
7
33
  - Node.js 22.x
8
- - A Cargo API token (create in your workspace under **Settings → API**)
34
+ - A Cargo account. `cargo-ai login --email` creates one if needed (see [Authentication](#authentication)); an API token is only needed for CI and shared machines
9
35
 
10
36
  ## Installation
11
37
 
package/build/api.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { type Api } from "@cargo-ai/api";
2
- import type { AccessTokenProvider } from "@cargo-ai/cdk/cli";
2
+ import { type AccessTokenProvider } from "@cargo-ai/cdk/cli";
3
3
  export type { Api };
4
4
  export declare function createApi(opts: {
5
5
  baseUrl: string;
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,GAAG,EAAY,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAI7D,YAAY,EAAE,GAAG,EAAE,CAAC;AAQpB,wBAAgB,SAAS,CAAC,IAAI,EAAE;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,mBAAmB,CAAC;IACpC,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;CACnC,GAAG,GAAG,CAeN"}
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,GAAG,EAAY,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,KAAK,mBAAmB,EAAqB,MAAM,mBAAmB,CAAC;AAIhF,YAAY,EAAE,GAAG,EAAE,CAAC;AAQpB,wBAAgB,SAAS,CAAC,IAAI,EAAE;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,mBAAmB,CAAC;IACpC,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;CACnC,GAAG,GAAG,CAeN"}
package/build/api.js CHANGED
@@ -1,9 +1,10 @@
1
1
  import { createRequire } from "node:module";
2
2
  import { buildApi } from "@cargo-ai/api";
3
+ import { detectCodingAgent } from "@cargo-ai/cdk/cli";
3
4
  import { getProxyFetch } from "./proxy.js";
4
5
  const require = createRequire(import.meta.url);
5
6
  const { version } = require("../package.json");
6
- const ORIGIN = { name: "cli", version };
7
+ const ORIGIN = { name: "cli", version, agent: detectCodingAgent() };
7
8
  export function createApi(opts) {
8
9
  return buildApi({
9
10
  baseUrl: opts.baseUrl,
@@ -1,3 +1,10 @@
1
+ /**
2
+ * Sign-in requests go to the identity provider, never to our backend, so this
3
+ * is the only place a signup can say where it came from: the post-login Action
4
+ * reads it from `event.request.user_agent` and passes it on with the user. The
5
+ * `agent/` token names the coding agent that ran the CLI, when one did.
6
+ */
7
+ export declare const USER_AGENT: string;
1
8
  /**
2
9
  * What both sign-in channels hand to `establishSession`. The refresh token is
3
10
  * optional: the identity provider only issues one when the application has the
@@ -1 +1 @@
1
- {"version":3,"file":"auth0.d.ts","sourceRoot":"","sources":["../../../src/commands/auth/auth0.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,sEAAsE;IACtE,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAWF;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OAAO,CAAC,QAAQ,CAAC,CA2BpB;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,GAAG,cAAc,CAoBhE;AAED;;;GAGG;AACH,wBAAsB,aAAa,CACjC,QAAQ,EAAE,QAAQ,GACjB,OAAO,CAAC,cAAc,GAAG,MAAM,GAAG,SAAS,CAAC,CAkB9C;AAED,wBAAgB,aAAa,CAC3B,IAAI,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS,GACxC,MAAM,CAkBR;AAED,wBAAgB,WAAW,CACzB,IAAI,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS,GACxC,MAAM,GAAG,SAAS,CAMpB"}
@@ -1,6 +1,23 @@
1
+ import { createRequire } from "node:module";
2
+ import { detectCodingAgent } from "@cargo-ai/cdk/cli";
1
3
  import { getOAuthConfig } from "../../oauthConfig.js";
2
4
  import { failWith } from "../runHandler.js";
3
5
  const REQUEST_TIMEOUT_MS = 15_000;
6
+ const require = createRequire(import.meta.url);
7
+ const { version } = require("../../../package.json");
8
+ /**
9
+ * Sign-in requests go to the identity provider, never to our backend, so this
10
+ * is the only place a signup can say where it came from: the post-login Action
11
+ * reads it from `event.request.user_agent` and passes it on with the user. The
12
+ * `agent/` token names the coding agent that ran the CLI, when one did.
13
+ */
14
+ export const USER_AGENT = buildUserAgent(detectCodingAgent());
15
+ function buildUserAgent(codingAgent) {
16
+ if (codingAgent === undefined) {
17
+ return `cargo-ai/${version}`;
18
+ }
19
+ return `cargo-ai/${version} agent/${codingAgent.replace(/\s+/g, "-")}`;
20
+ }
4
21
  // Only used when the provider omits `expires_in`, which Auth0 does not do.
5
22
  const FALLBACK_LIFETIME_SECONDS = 3600;
6
23
  /**
@@ -15,6 +32,7 @@ export async function postToAuth0(opts) {
15
32
  return await fetch(`https://${config.domain}${opts.path}`, {
16
33
  method: "POST",
17
34
  headers: {
35
+ "user-agent": USER_AGENT,
18
36
  "content-type": isForm
19
37
  ? "application/x-www-form-urlencoded"
20
38
  : "application/json",
@@ -1 +1 @@
1
- {"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/commands/mcp.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAerC,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,GAAG,IAAI,CAuD5E;AAED,eAAO,MAAM,iBAAiB,aAClB,MAAM,GAAG,SAAS,KAC3B,MAAM,GAAG,SAOX,CAAC;AAEF,eAAO,MAAM,kBAAkB,YACpB,MAAM,QACT,MAAM,GAAG,SAAS,KACvB,MAaF,CAAC"}
1
+ {"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/commands/mcp.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAerC,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,GAAG,IAAI,CA2D5E;AAED,eAAO,MAAM,iBAAiB,aAClB,MAAM,GAAG,SAAS,KAC3B,MAAM,GAAG,SAOX,CAAC;AAEF,eAAO,MAAM,kBAAkB,YACpB,MAAM,QACT,MAAM,GAAG,SAAS,KACvB,MAaF,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from "node:module";
2
- import { SessionExpiredError } from "@cargo-ai/cdk/cli";
2
+ import { detectCodingAgent, SessionExpiredError } from "@cargo-ai/cdk/cli";
3
3
  import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
4
4
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
5
5
  import { getConfig } from "../config.js";
@@ -49,6 +49,10 @@ credentials file). stdout carries the MCP protocol; all logs go to stderr.`)
49
49
  if (workspaceUuid !== undefined) {
50
50
  headers["selected-workspace-uuid"] = workspaceUuid;
51
51
  }
52
+ const codingAgent = detectCodingAgent();
53
+ if (codingAgent !== undefined) {
54
+ headers["x-cargo-origin-agent"] = codingAgent;
55
+ }
52
56
  info(`Cargo MCP bridge -> ${endpoint}`);
53
57
  await runBridge(endpoint, headers, getAccessToken);
54
58
  });
@@ -69,9 +69,9 @@ function opening(project) {
69
69
  return [
70
70
  "Work with the user on their Cargo workspace.",
71
71
  "",
72
- "Cargo is GTM infrastructure: connectors to the systems they sell with,",
73
- "models holding the data, plays and agents that act on it. The `cargo-ai`",
74
- "CLI is installed and signed in.",
72
+ "Cargo is go-to-market infrastructure: connectors to the systems they",
73
+ "sell with, models holding the data, plays and agents that act on it.",
74
+ "The `cargo-ai` CLI is installed and signed in.",
75
75
  ];
76
76
  }
77
77
  return [
@@ -96,7 +96,7 @@ export async function runStart(getApi, deps, opts) {
96
96
  });
97
97
  }
98
98
  info("");
99
- info("Cargo — GTM infrastructure your agents can run on.");
99
+ info("Cargo — go-to-market infrastructure your agents can run on.");
100
100
  info("");
101
101
  const workspace = isSignedIn() === true ? await currentWorkspace(getApi) : await signIn(opts);
102
102
  success(`Workspace: ${workspace.name}`);
package/build/index.js CHANGED
@@ -40,7 +40,7 @@ const { version } = require("../package.json");
40
40
  const program = new Command();
41
41
  program
42
42
  .name("cargo-ai")
43
- .description("Cargo API CLI")
43
+ .description("Cargo, the go-to-market platform at getcargo.ai (not Rust's cargo). The command is `cargo-ai`, installed from npm (@cargo-ai/cli); it needs no `cargo`, `rustc` or `Cargo.toml`.")
44
44
  .version(version)
45
45
  // Boolean flags take no value, so `--is-enabled false` parses as
46
46
  // `--is-enabled` plus a stray `false` — silently inverting what the caller
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cargo-ai/cli",
3
- "version": "1.0.107",
3
+ "version": "1.0.110",
4
4
  "private": false,
5
5
  "license": "UNLICENSED",
6
6
  "homepage": "https://getcargo.ai",
@@ -12,11 +12,12 @@
12
12
  "bugs": {
13
13
  "url": "https://github.com/getcargohq/cargo-skills/issues"
14
14
  },
15
- "description": "GTM automation from your terminal or coding agent — build lead lists, enrich and verify contacts, run plays and workflows, query workspace data with SQL, and deploy a whole Cargo workspace as code.",
15
+ "description": "Cargo, the go-to-market platform, from your terminal or coding agent: find and verify work emails, enrich companies and contacts, score leads and sync them to your CRM (HubSpot, Salesforce) across 130+ integrations, run plays and workflows, and serve it all to AI agents as an MCP server.",
16
16
  "keywords": [
17
17
  "cargo",
18
- "gtm",
19
18
  "go-to-market",
19
+ "gtm",
20
+ "sales",
20
21
  "revenue",
21
22
  "revops",
22
23
  "enrichment",
@@ -24,9 +25,13 @@
24
25
  "lead-enrichment",
25
26
  "prospecting",
26
27
  "email-finder",
28
+ "email-verification",
29
+ "lead-scoring",
27
30
  "sales-automation",
28
31
  "outbound",
29
32
  "crm",
33
+ "hubspot",
34
+ "salesforce",
30
35
  "orchestration",
31
36
  "cli",
32
37
  "agent-skills",
@@ -34,7 +39,9 @@
34
39
  "claude-code",
35
40
  "cursor",
36
41
  "codex",
37
- "mcp"
42
+ "mcp",
43
+ "mcp-server",
44
+ "clay-alternative"
38
45
  ],
39
46
  "engines": {
40
47
  "node": ">=22"
@@ -44,8 +51,7 @@
44
51
  },
45
52
  "type": "module",
46
53
  "bin": {
47
- "cargo-ai": "./build/index.js",
48
- "cargo": "./build/index.js"
54
+ "cargo-ai": "./build/index.js"
49
55
  },
50
56
  "files": [
51
57
  "build",
@@ -67,10 +73,10 @@
67
73
  "dependencies": {
68
74
  "@ai-sdk/harness": "^1.0.144",
69
75
  "@ai-sdk/harness-claude-code": "^1.0.148",
70
- "@cargo-ai/api": "^1.0.89",
76
+ "@cargo-ai/api": "^1.0.93",
71
77
  "@cargo-ai/app-sdk": "^1.0.11",
72
- "@cargo-ai/cdk": "^1.0.102",
73
- "@cargo-ai/types": "^1.0.92",
78
+ "@cargo-ai/cdk": "^1.0.111",
79
+ "@cargo-ai/types": "^1.0.96",
74
80
  "@cargo-ai/utils": "^1.0.32",
75
81
  "@cargo-ai/worker-sdk": "^1.0.20",
76
82
  "@modelcontextprotocol/sdk": "^1.31.0",