argorant 0.4.0 → 0.5.1

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 +126 -10
  2. package/bin/argorant.js +1064 -51
  3. package/package.json +10 -4
package/README.md CHANGED
@@ -1,14 +1,15 @@
1
1
  # argorant
2
2
 
3
- Search, count, reveal, and export verified B2B contacts from the Argorant
3
+ Search, count, reveal, export, and verify B2B contacts from the Argorant
4
4
  database — from your terminal, scripts, or coding agent. No install required.
5
5
 
6
6
  ```sh
7
7
  npx argorant count "fintech CFOs in germany"
8
8
  ```
9
9
 
10
- Counts and searches are **free**. Reveals and exports draw on your Argorant
11
- workspace quota/credits the same pool as the app, API, and MCP server.
10
+ Company lookups, counts, and masked searches spend **zero contact credits on
11
+ an active plan**. Reveals and exports draw on your Argorant workspace
12
+ quota/credits — the same pool as the app, API, and MCP server.
12
13
 
13
14
  ## Authenticate
14
15
 
@@ -26,30 +27,145 @@ CI, and agents.
26
27
  | Command | What it does | Cost |
27
28
  | --- | --- | --- |
28
29
  | `login [key]` | Save an API key | — |
30
+ | `logout` | Forget the saved key and base (`~/.argorant/config.json`) | — |
29
31
  | `whoami` | Account, scopes, daily quota | free |
30
32
  | `count "<query>"` | Count matching contacts | free |
31
- | `search "<query>" -n 10` | Preview matches (details redacted) | free |
32
- | `reveal "<query>" -n 25` | Reveal full contact details | quota |
33
+ | `company <company.com> -n 5` | Count people at a company, split business-email coverage, preview masked roles | free |
34
+ | `search "<query>" -n 10` | Preview matches (masked identity, details redacted) | free |
35
+ | `sample <company.com> [-o sample.csv]` | Read a website and build 25 distinct, live-valid company leads from it | free sample |
36
+ | `reveal "<query>" -n 25` | Reveal full contact details (name, email, phone, LinkedIn) | quota |
33
37
  | `export "<query>" -n 1000 -o leads.csv` | Verified CSV export, polled until ready | quota |
38
+ | `export status <job_id> [--batch]` | Status of an export you already created | free |
39
+ | `export download <job_id> [--batch] -o leads.csv` | Re-download a finished export | free |
40
+ | `list create --name "<n>" [filters]` | Save a reusable filtered list (server counts it) | free |
41
+ | `list status <id>` | A saved list's size and mode | free |
42
+ | `verify <email>` / `verify --file emails.csv -o out.csv` | Verify your own addresses (verification pool; recent re-checks free) | pool |
43
+ | `campaigns …` | Live outbound campaigns — **operator keys only**, see below | — |
44
+
45
+ Exports above 50,000 rows are created as a multi-chunk batch: the CLI polls
46
+ `export status --batch` for you and writes one file per chunk
47
+ (`leads-part1.csv`, `leads-part2.csv`, …). The batch id is printed so you can
48
+ re-download any time with `export download <batch_id> --batch`.
34
49
 
35
50
  ## Filters
36
51
 
37
52
  Combine free text with structured filters:
38
53
 
39
54
  ```
40
- --title --seniority --department --industry
41
- --country --state --city --company --domain
42
- --verify-status --has-phone --has-linkedin --has-email
55
+ --keywords --title --exclude-title --seniority --department --industry
56
+ --country --geography --state --city --company --domain
57
+ --has-phone --has-linkedin --has-email --verified-only
43
58
  ```
44
59
 
45
- Options: `-n/--limit`, `-o/--output`, `--json`, `-y/--yes`, `--base`.
60
+ `--keywords` is the widest, most reliable filter (comma = OR) — prefer it over
61
+ `--industry`. `--country`/`--geography` accept regions (Europe, EMEA, DACH,
62
+ Nordics, APAC, LATAM, GCC…).
63
+
64
+ `--exclude-title` currently applies fully to `export` and `list create`; on
65
+ `count`/`search`/`reveal` it's a platform-side gap and the CLI prints a note
66
+ to stderr rather than silently dropping your filter.
67
+
68
+ Options: `-n/--limit`, `-o/--output`, `--json`, `-y/--yes`, `--base`,
69
+ `--grade <valid|valid-plus-catchall>`.
70
+
71
+ `--grade` is the one deliverability distinction exposed anywhere - you only
72
+ ever pay for deliverable contacts, and this picks between the strict set
73
+ (`valid`, the default) and the wider set that also includes catch-all
74
+ addresses. It's wired end to end on `reveal`/`export` but the platform
75
+ doesn't yet honor it (coming soon) - the CLI warns rather than pretending it
76
+ narrowed anything.
46
77
 
47
78
  ## Built for agents
48
79
 
49
80
  ```sh
50
81
  export ARGORANT_API_KEY=ag_live_...
51
- npx argorant count --industry logistics --country "United States" --seniority vp --json
82
+ npx argorant count --keywords logistics --country "United States" --seniority vp --json
83
+ npx argorant company stripe.com --json
52
84
  npx argorant reveal "heads of procurement" --country Germany -n 25 --json --yes
53
85
  ```
54
86
 
87
+ ### Non-interactive behaviour — read this before scripting `reveal`/`export`
88
+
89
+ `reveal`, `export`, and `verify --file` ask for confirmation **only** when
90
+ stdin is a TTY and neither `-y/--yes` nor `--json` was passed. In CI, in a
91
+ pipe, or inside an agent loop there is **no prompt at all** — these commands
92
+ spend credits immediately. The prompt is a convenience for humans at a
93
+ terminal, never a safety net. Check your `-n` before you run them.
94
+
95
+ Related guardrails, so a mistake stays cheap:
96
+
97
+ - a non-numeric `-n` aborts instead of falling back to the default limit
98
+ - a value flag followed by another flag (`--title --base …`) aborts instead of
99
+ swallowing it
100
+ - `export` verifies the output path is writable **before** creating the job,
101
+ and prints an `export download <job_id>` recovery command if anything fails
102
+ after the job was billed
103
+
104
+ ### Exit codes
105
+
106
+ | Code | Meaning |
107
+ | --- | --- |
108
+ | `0` | success |
109
+ | `1` | generic error (bad usage, network, failed job) |
110
+ | `2` | not authenticated (no key, or the key was rejected) |
111
+ | `3` | forbidden — the key lacks the required scope |
112
+ | `4` | rate limit or daily quota reached |
113
+ | `5` | plan upgrade required (HTTP 402); the message carries the upgrade URL |
114
+
115
+ Exit `5` is deliberately distinct from `1`: an agent can tell "this account
116
+ needs a paid plan" apart from "something broke".
117
+
118
+ ### Base URL and stored credentials
119
+
120
+ `argorant login` stores the key (and a non-default `--base`) in
121
+ `~/.argorant/config.json` at mode `0600`. An explicit `--base` on any later
122
+ command always wins over the stored one, `ARGORANT_API_BASE` overrides both,
123
+ and `argorant logout` removes the file.
124
+
125
+ ## Campaigns — operator keys only
126
+
127
+ `argorant campaigns ...` drives live outbound campaigns end to end from the
128
+ terminal (create → copy → inboxes → leads → start), in about two minutes.
129
+ This group talks to a different, internal surface than everything above and
130
+ only works for an `ag_live_` key that belongs to an **owner/admin** account
131
+ and carries the `argorant:operator` scope — a normal customer key gets a
132
+ 401/403, same as a browser session would without outbound access.
133
+
134
+ ```sh
135
+ npx argorant campaigns create --name "Q3 CFO outreach" --brand argorant \
136
+ --timezone America/New_York --window 08:00-17:00 --skip-weekends
137
+ npx argorant campaigns steps set "Q3 CFO outreach" --step 1 \
138
+ --subject "Quick question" --body-file ./copy/step1.txt --approve
139
+ npx argorant campaigns inboxes attach "Q3 CFO outreach" --count 5 --pool argorant
140
+ npx argorant campaigns leads add "Q3 CFO outreach" --query "CFO" --industry fintech --country Germany
141
+ npx argorant campaigns start "Q3 CFO outreach"
142
+ ```
143
+
144
+ | Command | What it does |
145
+ | --- | --- |
146
+ | `campaigns list [--brand <key>]` | Name, status, contacted, replies, reply rate |
147
+ | `campaigns create --name "<n>" [--brand] [--timezone] [--window HH:MM-HH:MM] [--skip-weekends]` | New native campaign |
148
+ | `campaigns steps set <campaign> --step <n> --subject "..." (--body-file <path> \| --body <text\|->) [--approve]` | Upsert one sequence step's copy. The CLI never writes copy for you. |
149
+ | `campaigns inboxes attach <campaign> --count <n> [--pool <brand>]` | Attach N healthy, unattached sending inboxes (explicit fleet change; prints exactly which ones) |
150
+ | `campaigns leads add <campaign> --csv <file>` | Import leads from a CSV (email + optional first_name/last_name/company/title/...) |
151
+ | `campaigns leads add <campaign> --query "..." [filters]` | Enroll leads straight from a server-side search (same filters as above) |
152
+ | `campaigns start <campaign>` / `pause <campaign>` | Start (auto-approves draft copy + campaign, background-schedules sends) / pause |
153
+ | `campaigns status <campaign>` | Setup completeness (steps/inboxes/leads) + launch blockers |
154
+
155
+ `<campaign>` accepts a raw id or an unambiguous case-insensitive name prefix;
156
+ an ambiguous prefix lists every match instead of guessing.
157
+
158
+ **Known gap:** `campaigns leads add --query` has no server-side row cap yet —
159
+ `-n/--limit` is accepted for a familiar CLI surface but not forwarded/honored
160
+ (it enrolls every valid match up to the platform's own cap). The CLI warns
161
+ when you pass it. See `cli/GODMODE-PLAN.md`.
162
+
163
+ ## Releasing
164
+
165
+ `npm publish` runs `scripts/prepublish-guard.js` first, which refuses to
166
+ publish when the git working tree is dirty (so the tarball always matches a
167
+ real commit) or when the version in `package.json` already exists on npm (a
168
+ published version is never re-published or re-tagged). Bump the version,
169
+ commit, then publish.
170
+
55
171
  Full docs: https://argorant.com/docs/cli