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 CHANGED
@@ -1,70 +1,186 @@
1
- # hirify
1
+ # Hirify CLI
2
2
 
3
- Job search for AI agents. The [Hirify](https://hirify.me) board from the terminal: the feeds an
4
- account already has, search across the board, a vacancy in full, and the contact to apply to.
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
- Node 18 or newer. No dependencies.
6
+ ## Install
7
7
 
8
- A global installation checks for a new release when it starts and updates itself before running
9
- the command. Set `HIRIFY_NO_AUTO_UPDATE=1` only when the installed version must stay fixed.
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
- Install it globally with `npm install -g hirify-cli`, or run it without installing through `npx`
12
- as shown below. In either case, the command is `hirify` after a global install.
13
-
14
- ## Getting started
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
- Your browser opens, you confirm access on hirify.me, and the terminal continues on its own.
21
- Nothing to copy back. Running `hirify login` again keeps the current sign-in; use
22
- `hirify login --force` only when you need to switch accounts or approve changed permissions.
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
- ```bash
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
- ```bash
33
- npx skills add hirifyme/hirify-cli
24
+ ```sh
25
+ hirify login
26
+ hirify auth status --json
34
27
  ```
35
28
 
36
- This installs the rules your agent follows when it uses Hirify. It lands where your agent reads
37
- them, including Claude Code, Codex, Cursor and OpenCode. See [skills.sh](https://skills.sh).
38
-
39
- ## Without a browser
40
-
41
- On CI or a server, use a key from [your account](https://hirify.me/account/api-access):
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
- ```bash
44
- hirify auth <key> # stores it in ~/.config/hirify/auth.json, mode 0600
45
- HIRIFY_KEY=<key> hirify account show # or pass it in the environment, which takes priority
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
- You can revoke the key from your account at any time. `hirify logout` forgets a sign-in on this
49
- computer.
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
- ## Everything else
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
- `hirify filter guide` explains how to turn a request into a search filter and which criteria and
54
- values are available. It comes from the server, so it stays current as search changes. The guide
55
- requires a compact preview before the final search, so the agent can correct an empty or irrelevant
56
- filter before relying on it.
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
- New saved searches start with delivery off. Enable Telegram explicitly with
59
- `hirify feed deliver <id> --telegram` after the user approves notifications.
88
+ ## Scripts and agents
60
89
 
61
- Add `--json` to any command for the server's answer as JSON instead of the text a person reads.
62
- `--fields a,b` narrows a compact answer to the fields you name. Put `HIRIFY_DEBUG=1` in front of a
63
- command when you need the server's own reply to attach to a bug report.
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
- When no command fits, `hirify api call <capability>` invokes any capability Hirify lists in its
66
- manifest and prints the answer, so a gap here is a detour, not a dead end. Inputs go in `--data` as a
67
- JSON object; `--json` gives the raw answer.
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
- The same API is available as an MCP server at `https://api.hirify.me/api/mcp`, with the same
70
- account. Use whichever your agent supports.
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).