hiresquire-cli 1.0.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 +318 -0
  2. package/bin/hiresquire +26 -0
  3. package/package.json +59 -0
package/README.md ADDED
@@ -0,0 +1,318 @@
1
+ # HireSquire CLI
2
+
3
+ > AI-powered candidate screening from the command line
4
+
5
+ [![npm version](https://img.shields.io/npm/v/hiresquire-cli)](https://www.npmjs.com/package/hiresquire-cli)
6
+ [![License: MIT](https://img.shields.io/npm/l/hiresquire-cli)](https://opensource.org/licenses/MIT)
7
+
8
+ HireSquire CLI enables AI agents and developers to screen candidates directly from the terminal. Built for integration with Claude Code, OpenCode, OpenClaw, Codex, and any CLI-capable agent.
9
+
10
+ ## Features
11
+
12
+ - 🤖 **Agent-Ready**: Works with Claude Code, OpenCode, OpenClaw, Codex, and more
13
+ - 📋 **Full Workflow**: Submit jobs, check status, get results, generate emails
14
+ - 🔄 **Watch Mode**: Poll for completion with progress updates
15
+ - 📄 **JSON Output**: Machine-readable output for automation
16
+ - ⚙️ **Config Management**: Easy API token setup and storage
17
+ - 🔗 **Webhook Support**: Conditional webhooks for automated workflows
18
+
19
+ ## Installation
20
+
21
+ ### Global Installation
22
+
23
+ ```bash
24
+ npm install -g hiresquire-cli
25
+ ```
26
+
27
+ ### Using npx (No Installation)
28
+
29
+ ```bash
30
+ npx hiresquire-cli --version
31
+ ```
32
+
33
+ ### Development Installation
34
+
35
+ ```bash
36
+ git clone https://github.com/hiresquire/hiresquire-cli.git
37
+ cd hiresquire-cli
38
+ npm install
39
+ npm run build
40
+ ```
41
+
42
+ ## Quick Start
43
+
44
+ ### 1. Configure API Token
45
+
46
+ ```bash
47
+ hiresquire init --token YOUR_API_TOKEN
48
+ ```
49
+
50
+ Or set via environment variable:
51
+
52
+ ```bash
53
+ export HIRESQUIRE_API_TOKEN=your_token_here
54
+ ```
55
+
56
+ ### 2. Submit a Screening Job
57
+
58
+ ```bash
59
+ hiresquire screen \
60
+ --job "We are looking for a Senior Python Developer..." \
61
+ --resumes ./resumes/
62
+ ```
63
+
64
+ ### 3. Check Results
65
+
66
+ ```bash
67
+ hiresquire results --job 123
68
+ ```
69
+
70
+ ## Commands
71
+
72
+ | Command | Description |
73
+ |---------|-------------|
74
+ | [`init`](#init) | Initialize configuration with API token |
75
+ | [`screen`](#screen) | Submit a candidate screening job |
76
+ | [`jobs`](#jobs) | List all screening jobs |
77
+ | [`results`](#results) | Get results for a job |
78
+ | [`status`](#status) | Check job status |
79
+ | [`email`](#email) | Generate an email for a candidate |
80
+ | [`configure`](#configure) | Update configuration settings |
81
+
82
+ ### init
83
+
84
+ Initialize configuration with your API token:
85
+
86
+ ```bash
87
+ hiresquire init --token YOUR_API_TOKEN
88
+ ```
89
+
90
+ Options:
91
+ - `-t, --token <token>` - API token from HireSquire dashboard (required)
92
+ - `-u, --base-url <url>` - API base URL (default: https://api.hiresquireai.com/api/v1)
93
+ - `-w, --webhook <url>` - Default webhook URL
94
+ - `-y, --yes` - Skip confirmation
95
+
96
+ ### screen
97
+
98
+ Submit a candidate screening job:
99
+
100
+ ```bash
101
+ hiresquire screen --job "Job description..." --resumes ./resumes/
102
+ ```
103
+
104
+ Options:
105
+ - `-j, --job <description>` - Job description (string or @file)
106
+ - `-r, --resumes <paths>` - Resume files or directory (comma-separated or @file)
107
+ - `-l, --leniency <1-10>` - Screening leniency (1=strict, 10=loose), default: 5
108
+ - `-w, --webhook <url>` - Webhook URL for notifications
109
+ - `--watch` - Poll for completion and show results
110
+ - `--min-score <number>` - Minimum score threshold (0-100)
111
+ - `--only-top-n <number>` - Only return top N candidates
112
+
113
+ ### jobs
114
+
115
+ List all screening jobs:
116
+
117
+ ```bash
118
+ hiresquire jobs
119
+ hiresquire jobs --status completed
120
+ hiresquire jobs --page 2 --limit 20
121
+ ```
122
+
123
+ Options:
124
+ - `-s, --status <status>` - Filter by status (pending, processing, completed, failed)
125
+ - `-p, --page <number>` - Page number
126
+ - `-l, --limit <number>` - Results per page
127
+
128
+ ### results
129
+
130
+ Get results for a screening job:
131
+
132
+ ```bash
133
+ hiresquire results --job 123
134
+ hiresquire results --job 123 --min-score 80
135
+ hiresquire results --job 123 --only-top-n 5
136
+ ```
137
+
138
+ Options:
139
+ - `-j, --job <id>` - Job ID (required)
140
+ - `--min-score <number>` - Filter by minimum score
141
+ - `--only-top-n <number>` - Only return top N candidates
142
+
143
+ ### status
144
+
145
+ Check status of a screening job:
146
+
147
+ ```bash
148
+ hiresquire status --job 123
149
+ hiresquire status --job 123 --watch
150
+ ```
151
+
152
+ Options:
153
+ - `-j, --job <id>` - Job ID (required)
154
+ - `-w, --watch` - Watch for status changes
155
+
156
+ ### email
157
+
158
+ Generate an email for a candidate:
159
+
160
+ ```bash
161
+ hiresquire email --job 123 --candidate 1 --type invite
162
+ hiresquire email --job 123 --candidate 2 --type rejection --message "We decided to move forward with another candidate"
163
+ ```
164
+
165
+ Options:
166
+ - `-j, --job <id>` - Job ID (required)
167
+ - `-c, --candidate <id>` - Candidate ID (required)
168
+ - `-t, --type <type>` - Email type: invite, rejection, followup (required)
169
+ - `-m, --message <text>` - Custom message to include
170
+
171
+ ### configure
172
+
173
+ Update configuration settings:
174
+
175
+ ```bash
176
+ hiresquire configure --token NEW_TOKEN
177
+ hiresquire configure --webhook https://your-webhook.com
178
+ hiresquire configure --clear
179
+ ```
180
+
181
+ Options:
182
+ - `-t, --token <token>` - API token
183
+ - `-u, --base-url <url>` - API base URL
184
+ - `-w, --webhook <url>` - Default webhook URL
185
+ - `-l, --leniency <number>` - Default leniency level
186
+ - `--clear` - Clear all configuration
187
+
188
+ ## Agent Integration Examples
189
+
190
+ ### OpenClaw
191
+
192
+ OpenClaw (`https://openclaw.ai/`) can execute CLI commands directly:
193
+
194
+ ```javascript
195
+ // Add to your OpenClaw tools
196
+ {
197
+ name: "screen_candidates",
198
+ description: "Screen candidates for a job using HireSquire AI",
199
+ parameters: {
200
+ type: "object",
201
+ properties: {
202
+ job_description: { type: "string" },
203
+ resumes_path: { type: "string" },
204
+ min_score: { type: "number", minimum: 0, maximum: 100 }
205
+ },
206
+ required: ["job_description", "resumes_path"]
207
+ },
208
+ execute: async (params) => {
209
+ const { stdout } = await exec(`npx hiresquire-cli screen
210
+ --job "${params.job_description}"
211
+ --resumes ${params.resumes_path}
212
+ --json`);
213
+ return JSON.parse(stdout);
214
+ }
215
+ }
216
+ ```
217
+
218
+ ### Claude Code
219
+
220
+ ```bash
221
+ # Screen candidates
222
+ npx hiresquire-cli screen \
223
+ --job "Senior Developer" \
224
+ --resumes ./resumes/ \
225
+ --json
226
+ ```
227
+
228
+ ### Custom Scripts
229
+
230
+ ```javascript
231
+ const { spawn } = require('child_process');
232
+
233
+ function screenCandidates(jobDescription, resumePath) {
234
+ return new Promise((resolve, reject) => {
235
+ const process = spawn('npx', [
236
+ 'hiresquire-cli',
237
+ 'screen',
238
+ '--job', jobDescription,
239
+ '--resumes', resumePath,
240
+ '--json'
241
+ ]);
242
+
243
+ let output = '';
244
+ process.stdout.on('data', (data) => output += data);
245
+ process.on('close', (code) => {
246
+ if (code === 0) {
247
+ resolve(JSON.parse(output));
248
+ } else {
249
+ reject(new Error(output));
250
+ }
251
+ });
252
+ });
253
+ }
254
+ ```
255
+
256
+ ## Environment Variables
257
+
258
+ | Variable | Description |
259
+ |----------|-------------|
260
+ | `HIRESQUIRE_API_TOKEN` | API token for authentication |
261
+ | `HIRESQUIRE_BASE_URL` | API base URL (default: https://api.hiresquireai.com/api/v1) |
262
+ | `HIRESQUIRE_WEBHOOK_URL` | Default webhook URL |
263
+
264
+ ## JSON Output
265
+
266
+ All commands support `--json` flag for machine-readable output:
267
+
268
+ ```bash
269
+ hiresquire screen --job "..." --resumes ./resumes/ --json
270
+ ```
271
+
272
+ ```json
273
+ {
274
+ "success": true,
275
+ "job_id": 123,
276
+ "status": "processing",
277
+ "status_url": "https://api.hiresquireai.com/api/v1/jobs/123"
278
+ }
279
+ ```
280
+
281
+ ## Configuration File
282
+
283
+ Configuration is stored in `~/.hiresquire/config.json`:
284
+
285
+ ```json
286
+ {
287
+ "apiToken": "your_api_token",
288
+ "baseUrl": "https://api.hiresquireai.com/api/v1",
289
+ "webhookUrl": "https://your-webhook.com",
290
+ "defaultLeniency": 5
291
+ }
292
+ ```
293
+
294
+ ## Development
295
+
296
+ ```bash
297
+ # Install dependencies
298
+ npm install
299
+
300
+ # Build TypeScript
301
+ npm run build
302
+
303
+ # Run in development mode
304
+ npm run dev -- screen --job "..." --resumes ./resumes/
305
+
306
+ # Run tests
307
+ npm test
308
+ ```
309
+
310
+ ## License
311
+
312
+ MIT License - see [LICENSE](LICENSE) for details.
313
+
314
+ ## Support
315
+
316
+ - Email: info@hiresquireai.com
317
+ - Website: https://hiresquireai.com
318
+ - Docs: https://hiresquireai.com/docs/agents
package/bin/hiresquire ADDED
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * HireSquire CLI Entry Point
5
+ *
6
+ * Usage:
7
+ * hiresquire <command> [options]
8
+ * npx hiresquire <command> [options]
9
+ *
10
+ * Commands:
11
+ * init Initialize configuration with API token
12
+ * screen Submit a candidate screening job
13
+ * jobs List all jobs
14
+ * results Get results for a job
15
+ * status Check job status
16
+ * email Generate an email for a candidate
17
+ * configure Update configuration settings
18
+ *
19
+ * Options:
20
+ * --json Output as JSON
21
+ * --verbose Enable verbose logging
22
+ * --version Show version number
23
+ * --help Show help
24
+ */
25
+
26
+ require('../dist/index');
package/package.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "hiresquire-cli",
3
+ "version": "1.0.0",
4
+ "description": "HireSquire CLI - AI-powered candidate screening from the command line",
5
+ "license": "MIT",
6
+ "author": "HireSquire <info@hiresquireai.com>",
7
+ "homepage": "https://hiresquireai.com",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/hiresquire/hiresquire-cli"
11
+ },
12
+ "keywords": [
13
+ "hiresquire",
14
+ "ai",
15
+ "hiring",
16
+ "recruitment",
17
+ "cli",
18
+ "agent",
19
+ "openclaw",
20
+ "claude",
21
+ "opencode",
22
+ "codex",
23
+ "screening",
24
+ "resume",
25
+ "candidate"
26
+ ],
27
+ "bin": {
28
+ "hiresquire": "./bin/hiresquire"
29
+ },
30
+ "scripts": {
31
+ "build": "tsc",
32
+ "start": "node ./bin/hiresquire",
33
+ "dev": "ts-node ./src/index.ts",
34
+ "prepublishOnly": "npm run build",
35
+ "prepack": "npm run build"
36
+ },
37
+ "dependencies": {
38
+ "axios": "^1.7.9",
39
+ "chalk": "^4.1.2",
40
+ "commander": "^11.1.0",
41
+ "dotenv": "^16.4.7",
42
+ "inquirer": "^9.0.0",
43
+ "ora": "^6.0.0"
44
+ },
45
+ "devDependencies": {
46
+ "@types/inquirer": "^9.0.0",
47
+ "@types/node": "^22.0.0",
48
+ "ts-node": "^10.9.2",
49
+ "typescript": "^5.3.3"
50
+ },
51
+ "engines": {
52
+ "node": ">=18.0.0"
53
+ },
54
+ "bugs": {
55
+ "url": "https://github.com/hiresquire/hiresquire-cli/issues"
56
+ },
57
+ "main": "./dist/index.js",
58
+ "types": "./dist/index.d.ts"
59
+ }