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/skills/hirify/SKILL.md
CHANGED
|
@@ -8,24 +8,23 @@ description: Job search through Hirify - vacancies from the user's saved feeds,
|
|
|
8
8
|
Use the Hirify job board through the `hirify` CLI. This file gives the working order; `reference.md`
|
|
9
9
|
has every command in full, and `hirify intro` is the server's guide.
|
|
10
10
|
|
|
11
|
-
## Setup
|
|
11
|
+
## Setup and automation
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
`
|
|
16
|
-
|
|
17
|
-
says yes.
|
|
13
|
+
Package: `hirify-cli`; command: `hirify`; Node >=18. Prefer Node 22 or 24.
|
|
14
|
+
Without a global install use `npx -y hirify-cli <command>` (npm may cache it).
|
|
15
|
+
Offer `npm install -g hirify-cli` only with permission. Global installs can update automatically;
|
|
16
|
+
for reproducible work use an exact version and `HIRIFY_NO_AUTO_UPDATE=1`.
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
A person runs `hirify login` and confirms the printed link. The CLI tries a browser only when
|
|
19
|
+
appropriate. Do not run login for them. `--no-browser` is manual callback login, not device flow.
|
|
20
|
+
SSH needs `--callback-port` with a matching SSH local port forward. For agents, CI and containers,
|
|
21
|
+
use `HIRIFY_KEY` or pipe a key to `hirify auth --stdin`; never put a key in a command, log or chat.
|
|
22
|
+
`hirify auth status --json` identifies the local source. Environment keys override saved access;
|
|
23
|
+
logout is local and does not unset them. Use `hirify login --force` to replace expired access.
|
|
20
24
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|---|---|
|
|
25
|
-
| Filter names and their values | `hirify filter guide` |
|
|
26
|
-
| Reveals, vacancy opens and applies left | `hirify account show` |
|
|
27
|
-
| Rate limits, plan, abilities | `hirify account show --json` |
|
|
28
|
-
| The commands that exist | `hirify --help`, `hirify <noun>` |
|
|
25
|
+
Fetch mutable facts: `filter guide` for filter names/values, `account show --json` for current
|
|
26
|
+
allowances and permissions, `--help` for commands, `capabilities show <id> --json` for inputs,
|
|
27
|
+
effects and metering. This file supplies working rules, not a snapshot of server policy.
|
|
29
28
|
|
|
30
29
|
## Two rules before anything else
|
|
31
30
|
|
|
@@ -44,40 +43,24 @@ no permission. Sending, saving and configuring do.
|
|
|
44
43
|
|
|
45
44
|
## Working order
|
|
46
45
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
hirify vacancy read <slug>
|
|
53
|
-
hirify vacancy reveal <slug>
|
|
54
|
-
hirify vacancy apply <slug>
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
1. `hirify account show` before revealing anything.
|
|
58
|
-
2. Feeds first, search second. A feed is a filter the user built, so it already says what they want.
|
|
59
|
-
3. Shortlist **from the cards**. They carry no contacts, and that is normal.
|
|
60
|
-
4. `hirify vacancy read` the shortlist. The card is a headline; the text is where fit is decided, and
|
|
61
|
-
reading is cheap. Judging fit without reading is guessing.
|
|
62
|
-
5. `hirify vacancy reveal` only what still fits after reading. A reveal spent at random is spent.
|
|
63
|
-
6. Apply only after the user says yes, and read the rules below first.
|
|
46
|
+
1. `hirify account show` before spending; use `feed list` and `feed show <id>` first.
|
|
47
|
+
2. Search when no saved feed fits. Shortlist from cards; missing contacts are normal.
|
|
48
|
+
3. `vacancy read <slug>` to assess fit from the full text rather than a headline.
|
|
49
|
+
4. `vacancy reveal <slug>` only for vacancies that still fit after reading.
|
|
50
|
+
5. Apply only after the person's approval and the rules below.
|
|
64
51
|
|
|
65
52
|
## Searching
|
|
66
53
|
|
|
67
|
-
`vacancy search` takes a phrase and
|
|
68
|
-
|
|
69
|
-
are the CLI's own, not filters.
|
|
70
|
-
|
|
71
|
-
**`hirify filter guide` is the method and vocabulary, and the only source for either.** Do not guess
|
|
72
|
-
criterion names or values. The final search refuses an unknown criterion, while a misspelt value
|
|
73
|
-
can return an empty list that looks like an honest "nothing matches". If a server does not serve
|
|
74
|
-
the guide, it says so; then ask the user what to filter on.
|
|
54
|
+
`vacancy search` takes a phrase and server-defined filter options; `--limit` and `--page` control
|
|
55
|
+
pagination. Never guess criterion names or values. An empty result can mean a misspelt value.
|
|
75
56
|
|
|
76
|
-
1. Read `hirify filter guide` and build
|
|
57
|
+
1. Read `hirify filter guide` and build criteria from the user's request or profile.
|
|
77
58
|
2. Run `hirify api call filters.preview --data '{"filters":{...},"mode":"compact","per_page":20}'`.
|
|
78
|
-
3. Inspect cards and `meta.total`; refine and preview again if
|
|
59
|
+
3. Inspect cards and `meta.total`; refine and preview again if empty, broad or irrelevant.
|
|
79
60
|
4. Run `hirify vacancy search` with the validated criteria.
|
|
80
61
|
|
|
62
|
+
If the guide is unavailable, ask the user about criteria rather than guessing.
|
|
63
|
+
|
|
81
64
|
## Applying
|
|
82
65
|
|
|
83
66
|
Two cases, two commands:
|
|
@@ -112,40 +95,32 @@ hirify webhook create "<name>" <url>
|
|
|
112
95
|
Creating a delivery endpoint returns a **secret shown once**: give it to the user immediately to
|
|
113
96
|
store, because it signs every delivery and cannot be shown again.
|
|
114
97
|
|
|
115
|
-
##
|
|
116
|
-
|
|
117
|
-
`hirify feedback send <bug|feature> "<title>" --body "<text>" [--vacancy <slug>]` sends a report,
|
|
118
|
-
free. Ask first, send the user's words rather than your own, and report that it was passed on: it
|
|
119
|
-
gives a ticket number or says there is none yet, nothing writes back, and no fix or date is promised.
|
|
120
|
-
|
|
121
|
-
## When something goes wrong
|
|
122
|
-
|
|
123
|
-
**The message you were given is the truth; this is a map of the kinds, not strings to match.** Every
|
|
124
|
-
failure exits non-zero and writes one line to stderr. Read that line and tell the user what it says.
|
|
125
|
-
|
|
126
|
-
- **`hirify: command not found`**: run the command as `npx -y hirify-cli <command>`; see Setup.
|
|
127
|
-
- **"the network seems to be unavailable"**: api.hirify.me is unreachable. Sandboxed agents often run
|
|
128
|
-
with network off (Codex CLI does by default); ask the user to allow it for the session, then retry.
|
|
129
|
-
- **Not signed in**: ask the user to run `hirify login` (it opens a browser and needs a person -
|
|
130
|
-
never run it yourself). On a server with no browser: `hirify auth <key>`, key from
|
|
131
|
-
hirify.me/account/api-access.
|
|
132
|
-
- **Sign-in no longer good** (401): expired or revoked. Ask the user to run `hirify login` again.
|
|
133
|
-
- **No access** (403): the sign-in is missing an ability, or the plan does not cover agent access.
|
|
134
|
-
Abilities are fixed at sign-in, so a user who signed in before an ability existed signs in again.
|
|
135
|
-
- **A budget or the pace** (429): a metered action is used up - reveals, vacancy opens, or applies -
|
|
136
|
-
or commands came too fast. The message names which; feeds and search keep working. What is left:
|
|
137
|
-
`hirify account show`.
|
|
138
|
-
- **A refusal naming a length or a value** comes from the server: shorten what it named and send
|
|
139
|
-
again, do not argue with it or assume a bound.
|
|
140
|
-
- **`hirify <noun> has no verb "..."`**: the name does not exist and the message lists the verbs that
|
|
141
|
-
noun takes. Read the list rather than guessing again.
|
|
98
|
+
## Feedback and failures
|
|
142
99
|
|
|
143
|
-
|
|
100
|
+
`hirify feedback send <bug|feature> "<title>" --body "<text>" [--vacancy <slug>]` is free.
|
|
101
|
+
Ask first and send the user's words. Report the actual received/queued status and retain the
|
|
102
|
+
reference; do not promise a reply or a fix. Keep an explicit `--idempotency-key` for deliberate
|
|
103
|
+
retries when the server supports it.
|
|
104
|
+
|
|
105
|
+
Parse `--json` success output, never human text. Use `--error-format=json` for structured stderr
|
|
106
|
+
errors; do not combine it with debug if expecting one object. Exit 0 means success, 1 failure,
|
|
107
|
+
2 unsupported server manifest, 130/143 interruption. Read the stable error code and message.
|
|
108
|
+
|
|
109
|
+
- `interaction_required`: ask the person to sign in or configure a key; do not wait on browser login.
|
|
110
|
+
- Authentication failure: inspect `auth status`, then ask for `login --force`. Never expose a token.
|
|
111
|
+
- 403: permission or plan restriction. 429: pace or a named allowance; inspect `account show`.
|
|
112
|
+
- Network/TLS/proxy failure: fix connectivity or trust configuration; never disable TLS verification.
|
|
113
|
+
- `outcome_unknown`: a metered action or mutation may have succeeded. Check before repeating;
|
|
114
|
+
the CLI does not automatically retry it. Do not blindly repeat apply, reveal or feedback.
|
|
115
|
+
- Server validation names the bound or value to correct; use its message rather than inventing one.
|
|
144
116
|
|
|
145
|
-
`hirify
|
|
146
|
-
|
|
147
|
-
|
|
117
|
+
`hirify doctor` and `--debug` provide sanitized local diagnostics. Exclude the login URL from reports.
|
|
118
|
+
|
|
119
|
+
## When no command fits
|
|
148
120
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
121
|
+
Read `hirify capabilities list --json`, then `hirify capabilities show <id> --json`.
|
|
122
|
+
Prefer a named command where available. Otherwise use
|
|
123
|
+
`hirify api call <id> --data-file request.json --json --error-format=json`.
|
|
124
|
+
JSON files avoid shell quoting errors; `--data-file -` reads stdin. `--cover-file` does the same for
|
|
125
|
+
application text. Use `--` before literal positional values starting with a hyphen.
|
|
126
|
+
Generic calls can spend allowances or mutate the account: the same consent rules apply.
|
|
@@ -15,16 +15,23 @@ come from commands: `hirify filter guide` for filters, `hirify account show` for
|
|
|
15
15
|
`hirify account show --json` for the plan and the limits. Where this file would have quoted one, it
|
|
16
16
|
names the command instead.
|
|
17
17
|
|
|
18
|
-
Add `--json` to any command to get the server's payload
|
|
18
|
+
Add `--json` to any command to get the server's payload with credentials redacted instead of the text below.
|
|
19
19
|
`--fields a,b` narrows a compact answer to the fields you name and never adds one the answer did not
|
|
20
20
|
carry. Parse `--json`; do not parse the text, it is written for a person to read.
|
|
21
21
|
|
|
22
22
|
**Exit codes are stable.** `0` is success, `1` an ordinary error, and `2` means this Hirify speaks a
|
|
23
|
-
newer manifest than your CLI can read - update the CLI.
|
|
24
|
-
beginning with `hirify: `. Branch on the code rather than on the message text.
|
|
23
|
+
newer manifest than your CLI can read - update the CLI. Default errors write a diagnostic to stderr beginning with `hirify: `. Branch on the code rather than on the message text.
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
Use `--error-format=json` for a versioned error object on stderr. Interruptions return 130/143.
|
|
26
|
+
`HIRIFY_DEBUG=1` or `--debug` emits sanitized phase/reason events, not raw server bodies.
|
|
27
|
+
Use `hirify doctor` for local diagnostics. Never include a sign-in URL or credential in a report.
|
|
28
|
+
|
|
29
|
+
Additional commands: `auth status --json`, `doctor`, `capabilities list --json`,
|
|
30
|
+
`capabilities show <id> --json`, `update --check`, `update <version>`, `update --rollback`.
|
|
31
|
+
`--help` is offline and does not change access. `--timeout <seconds>` controls the command deadline.
|
|
32
|
+
`--data-file <file|->`, `--cover-file <file|->` and `auth --stdin` avoid shell/history exposure.
|
|
33
|
+
Files preserve quotes and Unicode. Generic mutations are never automatically retried;
|
|
34
|
+
`outcome_unknown` requires checking whether the action happened before repeating it.
|
|
28
35
|
|
|
29
36
|
## Cost model
|
|
30
37
|
|
|
@@ -55,14 +62,14 @@ outlives every change to them.
|
|
|
55
62
|
|
|
56
63
|
## Signing in
|
|
57
64
|
|
|
58
|
-
`hirify login
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
A person runs `hirify login`, opens the printed link and confirms access. The CLI tries a browser
|
|
66
|
+
only where appropriate. `--no-browser` disables launching but still needs a reachable callback;
|
|
67
|
+
SSH requires `--callback-port` and a matching port forward. CI/agents should use `HIRIFY_KEY` or
|
|
68
|
+
`hirify auth --stdin`. A new non-interactive browser login fails promptly unless manual mode was explicit.
|
|
69
|
+
Access is stored under an absolute XDG_CONFIG_HOME or `~/.config/hirify`, with private file permissions
|
|
70
|
+
and atomic writes. `auth status --json` shows its source. `logout` clears local access, not server
|
|
71
|
+
access or environment keys. `HIRIFY_KEY` wins over the saved sign-in. Use `login --force` to replace
|
|
72
|
+
access, including when new permissions require consent. Finish older CLI processes before migrating.
|
|
66
73
|
|
|
67
74
|
## Reading
|
|
68
75
|
|