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.
@@ -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
- The CLI is the npm package `hirify-cli`; the command is `hirify`. It needs Node 18 or newer and
14
- network access to api.hirify.me. If `hirify` is not on PATH, run every command in this file as
15
- `npx -y hirify-cli <command>` instead: the same CLI, nothing installed. `npm install -g hirify-cli`
16
- puts `hirify` on PATH for good and keeps itself up to date; offer it, and run it only after the user
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
- ## What stays here, and what you fetch
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
- This installed file holds only stable rules. Fetch anything Hirify can change:
22
-
23
- | What you need | Ask for it |
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
- ```bash
48
- hirify account show
49
- hirify feed list
50
- hirify feed show <id>
51
- hirify vacancy search "senior go"
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 any criterion the site's filter form can express, passed as an
68
- option under its own name. `--limit` sets the page size and `--page` moves through pages; those two
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 a draft from the user's request or profile.
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 they are empty, broad or irrelevant.
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
- ## Telling Hirify something is broken
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
- ## When no command fits
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 api call <capability-id> --data '<json>'` runs a capability by its id and prints the answer
146
- as it comes back, so a job with no named command is a detour, not a dead end. `hirify --help` and
147
- the server's own catalogue name the capabilities.
117
+ `hirify doctor` and `--debug` provide sanitized local diagnostics. Exclude the login URL from reports.
118
+
119
+ ## When no command fits
148
120
 
149
- Reach for a named command first where one exists: it says what a call costs and what a refusal means,
150
- and this one cannot. It will spend a reveal or send a real application just as readily, so the same
151
- rule holds - ask the user before anything that sends, saves or configures.
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 verbatim instead of the text below.
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. Every failure also writes one line to stderr
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
- Set `HIRIFY_DEBUG=1` in front of a command to also get the server's own answer on stderr. Use it
27
- when you need to report a problem; the normal output never contains raw payloads.
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` opens a browser and needs a person. Never run it yourself: ask the user to run it.
59
- It stores access in `~/.config/hirify/auth.json` (mode 600) and renews it without asking again.
60
- `hirify logout` forgets it. On CI or a server: `hirify auth <key>`, or `HIRIFY_KEY` in the
61
- environment, which wins over a stored sign-in.
62
-
63
- Permissions are fixed when the user signs in and cannot be added afterwards. A 403 naming a missing
64
- permission means the user signed in before that permission existed: they have to run `hirify login`
65
- again.
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