hirify-cli 0.4.6 → 0.5.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.
- package/README.md +167 -51
- package/bin/hirify.js +3 -1886
- package/bin/lib/api.js +130 -0
- package/bin/lib/auth.js +113 -0
- package/bin/lib/browser.js +34 -0
- package/bin/lib/cli.js +126 -0
- package/bin/lib/commands.js +827 -0
- package/bin/lib/config.js +27 -0
- package/bin/lib/errors.js +20 -0
- package/bin/lib/http.js +113 -0
- package/bin/lib/input.js +39 -0
- package/bin/lib/loopback.js +65 -0
- package/bin/lib/main.js +103 -0
- package/bin/lib/messages.js +62 -0
- package/bin/lib/store.js +118 -0
- package/bin/lib/update.js +171 -0
- package/bin/open-browser.js +2 -0
- package/npm-shrinkwrap.json +349 -0
- package/package.json +17 -4
- package/skills/hirify/SKILL.md +51 -76
- package/skills/hirify/reference.md +20 -13
package/README.md
CHANGED
|
@@ -1,70 +1,186 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Hirify CLI
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Search jobs, read your feeds and work with your Hirify account from a terminal or an AI agent.
|
|
4
|
+
The npm package is **hirify-cli**; the executable is **hirify**.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
## Install
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
the
|
|
8
|
+
Node 18 or newer is required. Node 22 and 24 are the primary test lanes; 18 and 20 remain compatibility lanes.
|
|
9
|
+
Windows, macOS and Linux use the same npm artifact. Native desktop browser acceptance is a separate release check.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
npx hirify-cli login
|
|
11
|
+
```sh
|
|
12
|
+
npm install -g hirify-cli
|
|
13
|
+
hirify --help
|
|
14
|
+
npx skills add hirifyme/hirify-cli
|
|
18
15
|
```
|
|
19
16
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
`
|
|
17
|
+
For a one-off sign-in, run `npx hirify-cli login`.
|
|
18
|
+
Without a global install, use `npx -y hirify-cli <command>`. npm may cache the package;
|
|
19
|
+
use `npx -y hirify-cli@<version>` when the version must be reproducible.
|
|
20
|
+
The skill supplies the agent's working rules; it does not install the executable.
|
|
23
21
|
|
|
24
|
-
|
|
25
|
-
npx hirify-cli intro
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
This is the guide: what the CLI can do, in what order to do it, and which three commands use an
|
|
29
|
-
allowance. Commands are a noun and a verb, like `hirify vacancy read` or `hirify feed list`:
|
|
30
|
-
`hirify --help` lists them all, and `hirify <noun>` lists the verbs one noun takes.
|
|
22
|
+
## Sign in
|
|
31
23
|
|
|
32
|
-
```
|
|
33
|
-
|
|
24
|
+
```sh
|
|
25
|
+
hirify login
|
|
26
|
+
hirify auth status --json
|
|
34
27
|
```
|
|
35
28
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
29
|
+
Login prints a link first and tries the default browser when the terminal and environment permit it.
|
|
30
|
+
A launcher result does not prove that a browser opened. Confirm access yourself; agents should ask
|
|
31
|
+
you to do this. The callback listens only on a loopback IP, on a temporary port. PKCE and state
|
|
32
|
+
protect the exchange. The CLI reports success after access has been saved, independently of the account summary.
|
|
33
|
+
|
|
34
|
+
| Environment | Behavior |
|
|
35
|
+
|---|---|
|
|
36
|
+
| Local desktop terminal | Prints the link, tries the browser, waits for confirmation |
|
|
37
|
+
| Linux without a display | Prints the link; does not promise or try a graphical browser |
|
|
38
|
+
| Non-interactive terminal, CI, agent pipe | Fails promptly if a new browser sign-in is needed; use a key or explicit manual login |
|
|
39
|
+
| SSH | Requires explicit manual login and a forwarded fixed callback port, or a key |
|
|
40
|
+
| Container | Use a key, or manual login only if the browser can reach the container's loopback callback |
|
|
41
|
+
| WSL | Uses the maintained browser launcher when local and interactive; verify Windows-to-WSL loopback on your setup |
|
|
42
|
+
|
|
43
|
+
`hirify login --no-browser` prints the link without launching anything. It still needs a reachable
|
|
44
|
+
callback; it is not device authorization. For SSH, open a local terminal and run:
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
ssh -L 8765:127.0.0.1:8765 your-host
|
|
48
|
+
hirify login --no-browser --callback-port 8765
|
|
49
|
+
```
|
|
42
50
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
51
|
+
Open the printed link on the computer that owns the tunnel. Confirm access within five minutes;
|
|
52
|
+
a reminder appears every 30 seconds. Ctrl+C cancels and closes the listener. Start a fresh login
|
|
53
|
+
after cancellation. `hirify login --force` replaces an existing or unusable sign-in.
|
|
54
|
+
|
|
55
|
+
For unattended work, obtain a key at [API access](https://hirify.me/account/api-access), supply it
|
|
56
|
+
as `HIRIFY_KEY`, or pipe it to `hirify auth --stdin`. Avoid putting keys in shell history with
|
|
57
|
+
`hirify auth <key>`; that legacy form is still accepted. Never put a real key in a support report.
|
|
58
|
+
`HIRIFY_KEY` takes precedence over the saved sign-in. `hirify logout` removes local access only;
|
|
59
|
+
it neither clears your environment nor revokes access on the server.
|
|
60
|
+
|
|
61
|
+
## Work with jobs
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
hirify account show
|
|
65
|
+
hirify feed list
|
|
66
|
+
hirify feed show <id>
|
|
67
|
+
hirify filter guide
|
|
68
|
+
hirify vacancy search "senior go"
|
|
69
|
+
hirify vacancy read <slug>
|
|
70
|
+
hirify vacancy reveal <slug>
|
|
71
|
+
hirify profile list
|
|
72
|
+
hirify vacancy apply <slug> --profile <id> --cover-file cover.txt
|
|
46
73
|
```
|
|
47
74
|
|
|
48
|
-
|
|
49
|
-
|
|
75
|
+
Lists and searches are free. Reading a vacancy in full, revealing its contact, and applying each
|
|
76
|
+
have a separate allowance. `hirify account show` supplies the current values. Shortlist from cards,
|
|
77
|
+
read to assess fit, then reveal what fits. Applying sends a real application and cannot be recalled:
|
|
78
|
+
get the person's approval first. External vacancies are applied to through the destination from `reveal`.
|
|
50
79
|
|
|
51
|
-
|
|
80
|
+
The server defines search filters. Read `hirify filter guide`, preview with `filters.preview`, refine,
|
|
81
|
+
and then run the final search. Do not infer filter names from an old example.
|
|
52
82
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
83
|
+
More commands: `hirify feed create`, `hirify feed deliver`, `hirify webhook list`,
|
|
84
|
+
`hirify webhook create`, `hirify feedback send`. Use each command's `--help` for arguments.
|
|
85
|
+
Webhook creation returns a secret once; save it securely. Feedback can be received or queued;
|
|
86
|
+
retain its reference and do not promise a reply or a fix.
|
|
57
87
|
|
|
58
|
-
|
|
59
|
-
`hirify feed deliver <id> --telegram` after the user approves notifications.
|
|
88
|
+
## Scripts and agents
|
|
60
89
|
|
|
61
|
-
|
|
62
|
-
`--fields a,b` narrows
|
|
63
|
-
|
|
90
|
+
Successful `--json` data envelopes are preserved. Human text may change; parse JSON instead.
|
|
91
|
+
`--fields a,b` narrows human output. Use `--error-format=json` for a versioned error object on stderr.
|
|
92
|
+
Progress and diagnostic events also go to stderr; omit `--debug` when stderr must contain only errors.
|
|
93
|
+
Default generic `api call` still prints a server error body on stdout; structured-error mode suppresses it.
|
|
64
94
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
95
|
+
```sh
|
|
96
|
+
hirify capabilities list --json
|
|
97
|
+
hirify capabilities show <capability> --json
|
|
98
|
+
hirify api call <capability> --data-file request.json --json --error-format=json
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
`--data-file -` and `--cover-file -` read stdin. Files preserve quotes and Unicode without shell
|
|
102
|
+
escaping; JSON input must be an object. These inputs are limited to 1 MiB. Use a file for a
|
|
103
|
+
server-requested recovery action; never paste a server string into shell code.
|
|
104
|
+
|
|
105
|
+
Options support `--name value`, `--name=value`, and `--` before literal positional arguments.
|
|
106
|
+
Unknown options are rejected except server-owned search filters. Conflicting options and missing
|
|
107
|
+
values fail before requests. `--help` and `version` do not authenticate or update.
|
|
108
|
+
|
|
109
|
+
| Exit | Meaning |
|
|
110
|
+
|---|---|
|
|
111
|
+
| 0 | Success |
|
|
112
|
+
| 1 | Invalid arguments, authentication, network, server or local state error; inspect the error code |
|
|
113
|
+
| 2 | Server manifest version unsupported; update the CLI |
|
|
114
|
+
| 130 / 143 | SIGINT / SIGTERM cancellation on platforms delivering these signals |
|
|
115
|
+
|
|
116
|
+
Common error codes include `interaction_required`, `auth_required`, `state_corrupt`,
|
|
117
|
+
`issuer_mismatch`, `network_timeout`, `tls_error`, `command_timeout`, and `outcome_unknown`.
|
|
118
|
+
For `outcome_unknown`, check the account/server result before retrying: an application or change
|
|
119
|
+
may already have happened. Metered reads and mutations are never retried automatically.
|
|
120
|
+
Explicitly safe reads get bounded retries for transient network errors and 429/502/503/504.
|
|
121
|
+
Feedback accepts `--idempotency-key` when the server advertises caller-keyed deduplication;
|
|
122
|
+
keep the same key for a deliberate retry. The CLI prints a generated request reference otherwise.
|
|
123
|
+
|
|
124
|
+
## Configuration and diagnostics
|
|
125
|
+
|
|
126
|
+
Access is stored in `auth.json` under `$XDG_CONFIG_HOME/hirify` when XDG_CONFIG_HOME is absolute,
|
|
127
|
+
otherwise `~/.config/hirify`, including Windows. POSIX directories/files use 0700/0600;
|
|
128
|
+
Windows uses a DACL for the current user. The file is not encrypted. Atomic writes and a shared
|
|
129
|
+
lock protect new CLI processes. Credentials are bound to the server that issued them.
|
|
130
|
+
A malformed file does not silently fall back to another identity. `login --force`, `auth --stdin`,
|
|
131
|
+
or `logout` can recover local state. Uncertain refresh rotation requires a new login.
|
|
132
|
+
|
|
133
|
+
| Setting | Purpose |
|
|
134
|
+
|---|---|
|
|
135
|
+
| `HIRIFY_KEY` | Credential for this process; overrides the saved sign-in |
|
|
136
|
+
| `HIRIFY_API` | Trusted server origin; HTTPS required except literal loopback HTTP for development |
|
|
137
|
+
| `XDG_CONFIG_HOME` | Absolute configuration base directory |
|
|
138
|
+
| `HTTP_PROXY`, `HTTPS_PROXY`, `ALL_PROXY`, `NO_PROXY` | Proxy selection; lowercase variants are supported |
|
|
139
|
+
| `NODE_EXTRA_CA_CERTS` | Additional trusted CA PEM file, set before starting Node |
|
|
140
|
+
| `BROWSER` | Explicit browser executable path, without shell arguments |
|
|
141
|
+
| `HIRIFY_NO_AUTO_UPDATE=1` | Disable automatic checking/installing, retaining an already active version |
|
|
142
|
+
| `HIRIFY_VERSION_PIN` | Exact version selection; disables automatic updates |
|
|
143
|
+
| `HIRIFY_DEBUG=1` / `--debug` | Sanitized local phase/reason events, never raw HTTP bodies |
|
|
144
|
+
|
|
145
|
+
TLS verification remains enabled. Redirects are rejected rather than forwarding credentials.
|
|
146
|
+
The usual command deadline is 30 seconds; login allows six minutes including network work,
|
|
147
|
+
and explicit update five minutes. `--timeout <seconds>` overrides it up to 3600 seconds.
|
|
148
|
+
|
|
149
|
+
Run `hirify doctor` for local platform, runtime, sign-in source and install-owner information.
|
|
150
|
+
It does not contact the API or expose token values. It may run `npm root --global` locally.
|
|
151
|
+
Attach its output and a sanitized `--debug` trace to a support request. There is no remote telemetry.
|
|
152
|
+
The login URL is sensitive and intentionally printed for the person; omit it from reports.
|
|
153
|
+
|
|
154
|
+
## Updates and rollback
|
|
155
|
+
|
|
156
|
+
Verified npm-global installations retain automatic updates before API commands. Local installs,
|
|
157
|
+
checkouts and npx executions do not update themselves. Failed checks are distinguishable from
|
|
158
|
+
"up to date" and the existing CLI remains usable. To make automation reproducible, set
|
|
159
|
+
`HIRIFY_NO_AUTO_UPDATE=1` and install an exact version.
|
|
160
|
+
|
|
161
|
+
```sh
|
|
162
|
+
hirify update --check
|
|
163
|
+
hirify update <version>
|
|
164
|
+
hirify update --rollback
|
|
165
|
+
hirify version
|
|
166
|
+
```
|
|
68
167
|
|
|
69
|
-
|
|
70
|
-
|
|
168
|
+
Updates install an exact version into a private per-user directory, verify the artifact and switch
|
|
169
|
+
an atomic pointer. They never overwrite executing global files. Exact versions and rollback are
|
|
170
|
+
pinned. An unavailable HIRIFY_VERSION_PIN fails explicitly; it never silently runs another version.
|
|
171
|
+
Unset that environment pin before selecting a different version or rolling back. `hirify update` without a version checks latest and removes the pin when it changes version.
|
|
172
|
+
The global npm package remains the bootstrap, so `npm list -g` can report its older version;
|
|
173
|
+
`hirify version` reports the active CLI. Replacing the bootstrap with npm invalidates its old pointer.
|
|
174
|
+
Old managed artifacts are retained for rollback. A checked version must support this update protocol.
|
|
175
|
+
|
|
176
|
+
Checks and installs use the same configured HTTPS npm registry. Registries requiring credentials
|
|
177
|
+
for metadata requests are currently unsupported by the CLI checker; use npm directly for them.
|
|
178
|
+
The updater respects Node compatibility and disables npm lifecycle scripts during staging.
|
|
179
|
+
|
|
180
|
+
Before migrating, finish processes running older CLI versions: they do not honor the new lock.
|
|
181
|
+
The existing credential path and legacy key import are retained, with additive schema metadata.
|
|
182
|
+
For downgrade outside this generation, use an exact npm version with auto-update disabled and
|
|
183
|
+
sign in again if needed. A copied refresh token cannot undo token rotation. Never run old and new
|
|
184
|
+
writers concurrently. A failed update before pointer activation leaves the prior version active.
|
|
185
|
+
|
|
186
|
+
See [the agent reference](skills/hirify/reference.md) and [release checks](scripts/RELEASE.md).
|