salesprompter-cli 0.1.7 → 0.1.9
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 +12 -1
- package/dist/auth.js +13 -3
- package/dist/cli.js +22 -10
- package/package.json +7 -3
package/README.md
CHANGED
|
@@ -42,6 +42,7 @@ salesprompter --help
|
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
Bare `salesprompter` now opens a guided wizard in an interactive terminal. Keep using explicit subcommands for agents, CI, and copy-paste docs.
|
|
45
|
+
If your Salesprompter user belongs to multiple organizations, browser login asks which organization the CLI session should use.
|
|
45
46
|
|
|
46
47
|
## Prompt To Command
|
|
47
48
|
|
|
@@ -79,7 +80,9 @@ salesprompter --json leads:lookup:bq --icp ./data/deel-icp.json --limit 100 --le
|
|
|
79
80
|
|
|
80
81
|
## Documentation
|
|
81
82
|
|
|
82
|
-
This repository now includes
|
|
83
|
+
This repository now includes the public Salesprompter docs site for the wider Salesprompter universe, including the app contract, CLI surface, Chrome extension contract, and the main warehouse-backed workflows.
|
|
84
|
+
|
|
85
|
+
- Live docs: `https://salesprompter-cli.vercel.app`
|
|
83
86
|
|
|
84
87
|
- Docs home: `./index.mdx`
|
|
85
88
|
- Quickstart: `./quickstart.mdx`
|
|
@@ -98,6 +101,12 @@ Run the docs locally with:
|
|
|
98
101
|
npm run docs:dev
|
|
99
102
|
```
|
|
100
103
|
|
|
104
|
+
Build the deployable static docs site with:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
npm run build:docs:site
|
|
108
|
+
```
|
|
109
|
+
|
|
101
110
|
## Integration Contract
|
|
102
111
|
|
|
103
112
|
This CLI is not a standalone toy. It is a production integration surface for the Salesprompter app.
|
|
@@ -138,6 +147,8 @@ salesprompter auth:whoami --verify
|
|
|
138
147
|
salesprompter auth:logout
|
|
139
148
|
```
|
|
140
149
|
|
|
150
|
+
If your user belongs to multiple organizations, the browser flow asks you to choose the organization for that CLI session before returning to the terminal.
|
|
151
|
+
|
|
141
152
|
Environment variables:
|
|
142
153
|
|
|
143
154
|
- `SALESPROMPTER_API_BASE_URL`: override backend URL (default `https://salesprompter.ai`)
|
package/dist/auth.js
CHANGED
|
@@ -8,10 +8,14 @@ const DEFAULT_API_BASE_URL = "https://salesprompter.ai";
|
|
|
8
8
|
const CLIENT_HEADER = "salesprompter-cli/0.2";
|
|
9
9
|
const DEFAULT_DEVICE_POLL_INTERVAL_SECONDS = 3;
|
|
10
10
|
const DEFAULT_DEVICE_TIMEOUT_SECONDS = 180;
|
|
11
|
+
const nullableOptionalString = z.string().min(1).nullish().transform((value) => value ?? undefined);
|
|
11
12
|
const UserSchema = z.object({
|
|
12
13
|
id: z.string().min(1),
|
|
13
14
|
email: z.string().email(),
|
|
14
|
-
name:
|
|
15
|
+
name: nullableOptionalString,
|
|
16
|
+
orgId: nullableOptionalString,
|
|
17
|
+
orgName: nullableOptionalString,
|
|
18
|
+
orgSlug: nullableOptionalString
|
|
15
19
|
});
|
|
16
20
|
const AuthSessionSchema = z.object({
|
|
17
21
|
accessToken: z.string().min(1),
|
|
@@ -56,7 +60,10 @@ const WhoAmIResponseSchema = z
|
|
|
56
60
|
z.object({
|
|
57
61
|
id: z.string().min(1),
|
|
58
62
|
email: z.string().email(),
|
|
59
|
-
name:
|
|
63
|
+
name: nullableOptionalString,
|
|
64
|
+
orgId: nullableOptionalString,
|
|
65
|
+
orgName: nullableOptionalString,
|
|
66
|
+
orgSlug: nullableOptionalString,
|
|
60
67
|
expiresAt: z.string().datetime().optional()
|
|
61
68
|
}),
|
|
62
69
|
z.object({
|
|
@@ -77,7 +84,10 @@ const WhoAmIResponseSchema = z
|
|
|
77
84
|
user: {
|
|
78
85
|
id: value.id,
|
|
79
86
|
email: value.email,
|
|
80
|
-
name: value.name
|
|
87
|
+
name: value.name,
|
|
88
|
+
orgId: value.orgId,
|
|
89
|
+
orgName: value.orgName,
|
|
90
|
+
orgSlug: value.orgSlug
|
|
81
91
|
},
|
|
82
92
|
expiresAt: value.expiresAt
|
|
83
93
|
};
|
package/dist/cli.js
CHANGED
|
@@ -175,6 +175,18 @@ function deriveCompanyNameFromDomain(domain) {
|
|
|
175
175
|
function writeWizardLine(message = "") {
|
|
176
176
|
process.stdout.write(`${message}\n`);
|
|
177
177
|
}
|
|
178
|
+
function getOrgLabel(session) {
|
|
179
|
+
return session.user.orgName ?? session.user.orgSlug ?? session.user.orgId ?? null;
|
|
180
|
+
}
|
|
181
|
+
function writeSessionSummary(session) {
|
|
182
|
+
const orgLabel = getOrgLabel(session);
|
|
183
|
+
if (orgLabel) {
|
|
184
|
+
writeWizardLine(`Signed in as ${session.user.email} for ${orgLabel}.`);
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
writeWizardLine(`Signed in as ${session.user.email}.`);
|
|
188
|
+
writeWizardLine("No organization is attached to this CLI session.");
|
|
189
|
+
}
|
|
178
190
|
async function promptChoice(rl, prompt, options, defaultValue) {
|
|
179
191
|
const defaultIndex = options.findIndex((option) => option.value === defaultValue);
|
|
180
192
|
if (defaultIndex === -1) {
|
|
@@ -243,7 +255,7 @@ async function ensureWizardSession(options) {
|
|
|
243
255
|
}
|
|
244
256
|
try {
|
|
245
257
|
const session = await requireAuthSession();
|
|
246
|
-
|
|
258
|
+
writeSessionSummary(session);
|
|
247
259
|
writeWizardLine();
|
|
248
260
|
return session;
|
|
249
261
|
}
|
|
@@ -259,14 +271,14 @@ async function ensureWizardSession(options) {
|
|
|
259
271
|
apiUrl: options?.apiUrl,
|
|
260
272
|
timeoutSeconds: options?.timeoutSeconds ?? 180
|
|
261
273
|
});
|
|
262
|
-
|
|
274
|
+
writeSessionSummary(result.session);
|
|
263
275
|
writeWizardLine();
|
|
264
276
|
return result.session;
|
|
265
277
|
}
|
|
266
278
|
async function runVendorIcpWizard(rl) {
|
|
267
|
-
const vendor = await promptChoice(rl, "Which
|
|
279
|
+
const vendor = await promptChoice(rl, "Which product are you selling?", [{ value: "deel", label: "Deel", description: "Use Deel's built-in ICP template" }], "deel");
|
|
268
280
|
writeWizardLine();
|
|
269
|
-
const market = await promptChoice(rl, "Which market
|
|
281
|
+
const market = await promptChoice(rl, "Which market do you want to target?", [
|
|
270
282
|
{ value: "dach", label: "DACH", description: "Germany, Austria, Switzerland" },
|
|
271
283
|
{ value: "europe", label: "Europe" },
|
|
272
284
|
{ value: "global", label: "Global" }
|
|
@@ -298,7 +310,7 @@ async function runVendorIcpWizard(rl) {
|
|
|
298
310
|
])}`);
|
|
299
311
|
}
|
|
300
312
|
async function runTargetAccountWizard(rl) {
|
|
301
|
-
const domain = normalizeDomainInput(await promptText(rl, "Which company
|
|
313
|
+
const domain = normalizeDomainInput(await promptText(rl, "Which company are you targeting? Enter the domain", { required: true }));
|
|
302
314
|
writeWizardLine();
|
|
303
315
|
const companyName = await promptText(rl, "Company name override (optional)");
|
|
304
316
|
const displayName = companyName || deriveCompanyNameFromDomain(domain);
|
|
@@ -358,7 +370,7 @@ async function runTargetAccountWizard(rl) {
|
|
|
358
370
|
writeWizardLine(` ${buildCommandLine(leadArgs)}`);
|
|
359
371
|
}
|
|
360
372
|
async function runVendorLookupWizard(rl) {
|
|
361
|
-
const vendor = await promptChoice(rl, "Which
|
|
373
|
+
const vendor = await promptChoice(rl, "Which product are you selling?", [{ value: "deel", label: "Deel", description: "Use Deel's built-in ICP template" }], "deel");
|
|
362
374
|
writeWizardLine();
|
|
363
375
|
const market = await promptChoice(rl, "Which market should the BigQuery lookup target?", [
|
|
364
376
|
{ value: "dach", label: "DACH", description: "Germany, Austria, Switzerland" },
|
|
@@ -439,7 +451,7 @@ async function runWizard(options) {
|
|
|
439
451
|
throw new Error("wizard does not support --json or --quiet.");
|
|
440
452
|
}
|
|
441
453
|
writeWizardLine("Salesprompter Wizard");
|
|
442
|
-
writeWizardLine("Choose
|
|
454
|
+
writeWizardLine("Choose the outcome you want. I will ask a few questions and run the matching CLI workflow.");
|
|
443
455
|
writeWizardLine();
|
|
444
456
|
await ensureWizardSession(options);
|
|
445
457
|
const rl = createInterface({
|
|
@@ -448,9 +460,9 @@ async function runWizard(options) {
|
|
|
448
460
|
});
|
|
449
461
|
try {
|
|
450
462
|
const flow = await promptChoice(rl, "What do you want to do?", [
|
|
451
|
-
{ value: "vendor-icp", label: "
|
|
452
|
-
{ value: "target-account", label: "
|
|
453
|
-
{ value: "vendor-lookup", label: "
|
|
463
|
+
{ value: "vendor-icp", label: "Build ICP for the product I sell", description: "Example: I sell for Deel and want Deel's ideal customer profile" },
|
|
464
|
+
{ value: "target-account", label: "Find contacts at one company", description: "Example: find people at deel.com" },
|
|
465
|
+
{ value: "vendor-lookup", label: "Prepare a warehouse lead lookup", description: "Build a product ICP, then generate BigQuery SQL or leads" }
|
|
454
466
|
], "vendor-icp");
|
|
455
467
|
writeWizardLine();
|
|
456
468
|
if (flow === "vendor-icp") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "salesprompter-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "JSON-first sales prospecting CLI for ICP definition, lead generation, enrichment, scoring, and CRM/outreach sync.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -12,12 +12,14 @@
|
|
|
12
12
|
],
|
|
13
13
|
"scripts": {
|
|
14
14
|
"build": "tsc -p tsconfig.json",
|
|
15
|
+
"build:docs:site": "node ./scripts/build-docs-site.mjs",
|
|
15
16
|
"check": "tsc --noEmit -p tsconfig.json",
|
|
16
17
|
"docs:dev": "mint dev",
|
|
17
18
|
"docs:broken-links": "mint broken-links",
|
|
18
19
|
"docs:a11y": "mint a11y",
|
|
19
20
|
"start": "node ./dist/cli.js",
|
|
20
|
-
"test": "npm run build && tsc -p tsconfig.test.json && node --test dist-tests/tests/**/*.test.js"
|
|
21
|
+
"test": "npm run build && tsc -p tsconfig.test.json && node --test dist-tests/tests/**/*.test.js",
|
|
22
|
+
"vercel-build": "npm run build:docs:site"
|
|
21
23
|
},
|
|
22
24
|
"keywords": [
|
|
23
25
|
"sales",
|
|
@@ -38,7 +40,7 @@
|
|
|
38
40
|
"ai-agent",
|
|
39
41
|
"codex"
|
|
40
42
|
],
|
|
41
|
-
"homepage": "https://salesprompter.
|
|
43
|
+
"homepage": "https://salesprompter-cli.vercel.app",
|
|
42
44
|
"repository": {
|
|
43
45
|
"type": "git",
|
|
44
46
|
"url": "git+https://github.com/danielsinewe/salesprompter-cli.git"
|
|
@@ -53,6 +55,8 @@
|
|
|
53
55
|
},
|
|
54
56
|
"devDependencies": {
|
|
55
57
|
"@types/node": "^24.3.0",
|
|
58
|
+
"gray-matter": "^4.0.3",
|
|
59
|
+
"marked": "^16.3.0",
|
|
56
60
|
"mint": "^4.2.420",
|
|
57
61
|
"typescript": "^5.9.2"
|
|
58
62
|
}
|