needs-you

Guides

Configuration

Every setting needs-you reads, on one page: the sender's env file and environment variables, the files that hold keys and tokens, a server hub's hub.json and hub-update.json, and the installers' flags. Each table gives the default, what the setting takes and what reads it; the linked guide explains when you'd change it. needs-you doctor checks all of it on a sender (below).

A value a setting doesn't take is never silently ignored: the CLI and the pollers name the variable on stderr with what it takes and use the default, the hub refuses to start and names the key, and the installers stop before changing anything. None of them prints the value itself, since a token pasted onto the wrong line would be shown.

Where settings live #

Accepted values, used in the tables: on/off is 1, true, yes or on, and 0, false, no or off (any case); a context is work or personal; a priority is urgent, normal or low.

Sender settings #

The CLI #

Read by needs-you itself, so by everything that runs it (hooks, pollers, CI, needs-you run). Add a sender.

VariableDefaultTakes
NEEDS_YOU_URLSnone (required)Hub URLs, http(s)://host:port, comma-separated, tried in order (failover)
NEEDS_YOU_URLnoneThe same, used when NEEDS_YOU_URLS is unset
NEEDS_YOU_TOKENnone (required)This machine's sender token. Never printed: doctor shows only its length
NEEDS_YOU_TIMEOUT3Seconds to wait for each hub, a number of at least 0.1
NEEDS_YOU_HOSTthe short hostnameThe machine name on cards: letters, digits, ., _, @ or -
NEEDS_YOU_DEFAULT_CONTEXTworkA context: the one used when a sender doesn't give one
NEEDS_YOU_OUTBOX_MAX500How many queued requests the outbox keeps, a whole number of at least 1
NEEDS_YOU_OUTBOX_MAX_DAYS7Queued requests older than this many days are dropped
NEEDS_YOU_CONFIG~/.config/needs-you/envEnv only. Another env file, for the CLI, the hooks, the pollers and the installers
NEEDS_YOU_ENV_FILENEEDS_YOU_CONFIGEnv only. Another env file for the agent hooks, their installers and the usage helper only; doctor warns when it isn't the CLI's
NEEDS_YOU_OUTBOX~/.local/state/needs-you/outboxEnv only. Where queued requests are kept

Updates #

needs-you update and the daily automatic update the 5-minute flush runs. Keeping up to date.

VariableDefaultTakes
NEEDS_YOU_AUTO_UPDATEoff; the installers write 1on/off: the flush runs needs-you update once a day. needs-you update --enable-auto / --disable-auto set it
NEEDS_YOU_UPDATE_HUBthe first hub in NEEDS_YOU_URLSThe one hub updates come from: an http(s):// URL
NEEDS_YOU_UPDATE_REQUIRE_RELEASE_MATCHon for automatic updates, off by handon/off: refuse an update that can't be checked against the GitHub release
NEEDS_YOU_GHgh on PATHEnv only. The gh to check releases with, or none (no check, as the tests do). The server hub's updater and install-hub.sh read it too

Agent hooks #

The hook every agent shares (needs-you-hook.sh: Claude Code, Codex, Gemini, Copilot, Kimi, Grok, Cursor, Cline, Aider) and the opencode plugin. Claude Code, Claude Code everywhere, and each agent's guide.

VariableDefaultTakes
NEEDS_YOU_AGENT_ALERTSunset: on in Orca terminals onlyon/off, lowercase: agent cards from every session on this machine
NEEDS_YOU_AGENT_CONTEXTNEEDS_YOU_DEFAULT_CONTEXT, else workA context, lowercase
NEEDS_YOU_AGENT_PRIORITYnormalA priority, lowercase
NEEDS_YOU_AGENT_LINKautomatic editor linksnone, or one link Label=url-template ({handle}, {session}, {cwd}, {host})
NEEDS_YOU_AGENT_EXPIRY_HOURS48Hours a card lives after its last post; 0 never expires
NEEDS_YOU_AIDER_EXPIRY_HOURS1The same for Aider's cards
NEEDS_YOU_AGENT_TURN_CARDSonon/off: "finished its turn" cards (Codex, Gemini, opencode, Copilot, Grok, Kimi, Cursor, Cline; for Aider, its only card)
NEEDS_YOU_TURN_TEXTonon/off: a turn card names the session and shows the question the turn ended on; off keeps the plain card
NEEDS_YOU_AGENT_QUESTIONSonon/off: questions answerable from the card
NEEDS_YOU_ANSWER_TIMEOUT600Seconds a hook waits for an answer from the Mac, 30 to 3600; 0 or off: don't wait
NEEDS_YOU_CONTEXT_ALERT_PCT80Percent of the context window that posts a card; 0 or off: never
NEEDS_YOU_CONTEXT_WINDOW200000 (1000000 for [1m] models)The context window in tokens, a whole number
NEEDS_YOU_SSH_ALIASunsetThis host's name in the Mac's ~/.ssh/config: letters, digits, ., _, @ or -
NEEDS_YOU_ORCA_ENVIRONMENTunsetOn a paired Orca server: its name in orca environment list on the Mac
NEEDS_YOU_BINneeds-you on PATH, else ~/.local/bin/needs-youThe CLI's path (the pollers and run-or-alert.sh read it too)
NEEDS_YOU_HOOK_LOGunsetEnv only. Append one debug line per hook call to this file
NEEDS_YOU_OPENCODE_HOOKnext to the pluginEnv only. The hook the opencode plugin runs (opencode)
LC_NEEDS_YOU_TERMunsetEnv only, set in the Mac's shell and forwarded by ssh: which Mac terminal tab holds an SSH session (Claude Code everywhere)

Usage meters #

Claude Code's status line helper (needs-you-usage) and Codex's hooks. Claude Code.

VariableDefaultTakes
NEEDS_YOU_USAGE_ALERT_PCToffPercent of the 5-hour limit that posts a card, 0 to 100
NEEDS_YOU_USAGE_WEEKLY_ALERT_PCTthe 5-hour valueThe same for the weekly limit; 0 turns it off
NEEDS_YOU_USAGE_ACCOUNTnoneA label for one of several logins: up to 40 letters, digits, ., _ or -
NEEDS_YOU_USAGE_METERonon/off: send the usage meter to the Mac

Orca #

Orca.

VariableDefaultTakes
NEEDS_YOU_ORCA_USAGEoffon/off: the 5-minute flush sends a usage meter per Orca account. needs-you orca usage --enable / --disable set it
NEEDS_YOU_ORCA_BINorca on PATH, else where Orca installs itThe Orca CLI's path
NEEDS_YOU_ORCA_TIMEOUT15Seconds orca account list may take, 1 to 60

MCP server #

MCP server.

VariableDefaultTakes
NEEDS_YOU_CLInext to the server, then the repo, then PATH, then ~/.local/binEnv only (set in the agent's MCP config): the CLI's path

GitHub poller #

needs-you-github. GitHub.

VariableDefaultTakes
NEEDS_YOU_GITHUB_INCLUDEevery repoowner or owner/repo, comma-separated
NEEDS_YOU_GITHUB_EXCLUDEnoneThe same; wins over include
NEEDS_YOU_GITHUB_CONTEXTSNEEDS_YOU_DEFAULT_CONTEXTowner=work or owner=personal, comma-separated
NEEDS_YOU_GITHUB_REASONSallReasons to post (review, deploy, ci, mention, assign, merge, changes, conflict, checks, merged), or only -reason items to turn some off
NEEDS_YOU_GITHUB_INTERVAL5Minutes between runs, at least 1; cards expire after 3 times this
NEEDS_YOU_GITHUB_PR_DAYS14Only your PRs updated in this many days, a whole number of at least 1
NEEDS_YOU_GITHUB_MAX_CARDS20Cards open at once, a whole number of at least 1
NEEDS_YOU_GITHUB_PROJECT_STATUSESoffName or Name=priority, comma-separated (no priority: normal)
NEEDS_YOU_GITHUB_PROJECT_FIELDStatusThe single-select field to watch
NEEDS_YOU_GITHUB_SECURITYoffon/off: cards for open Dependabot alerts
NEEDS_YOU_GITHUB_SECURITY_SEVERITIEScriticalcritical, high, medium, low, comma-separated
NEEDS_YOU_GITHUB_SECURITY_PRIORITYlowA priority
NEEDS_YOU_GITHUB_GHgh on PATHThe gh it runs

Linear poller #

needs-you-linear. Linear.

VariableDefaultTakes
NEEDS_YOU_LINEAR_KEY_FILElinear-key next to the env fileThe key file
NEEDS_YOU_LINEAR_KEYnoneEnv only, and only when there's no key file: the key itself. Prefer the file
NEEDS_YOU_LINEAR_CATEGORIESallassigned, status, comment, mention, comma-separated, or only -category items
NEEDS_YOU_LINEAR_STATUSES*=lowName=priority or Name=off, comma-separated; * is every other status
NEEDS_YOU_LINEAR_TEAMSevery team, default context, lowKEY=context:priority, comma-separated
NEEDS_YOU_LINEAR_INTERVAL5Minutes between runs, at least 1
NEEDS_YOU_LINEAR_MAX_CARDS20Cards open at once, a whole number of at least 1
NEEDS_YOU_LINEAR_MAX_AGE_H24Notifications older than this many hours are skipped, at least 1
NEEDS_YOU_LINEAR_APIhttps://api.linear.app/graphqlAn https URL (or http to loopback, for tests)

Jira poller #

needs-you-jira. A bad Jira setting stops the run with a message rather than guessing. Jira.

VariableDefaultTakes
NEEDS_YOU_JIRA_SITEunset: offhttps://host[/path]
NEEDS_YOU_JIRA_AUTHcloud for *.atlassian.net, else dccloud or dc
NEEDS_YOU_JIRA_EMAILnoneYour Atlassian account email (Cloud)
NEEDS_YOU_JIRA_TOKEN_FILE~/.config/needs-you/jira-tokenThe token file
NEEDS_YOU_JIRA_CA_FILEthe system CAsA CA bundle file (Data Center with a private CA)
NEEDS_YOU_JIRA_EVENTSallstatus, comment, assigned, mention, comma-separated, or only -event items
NEEDS_YOU_JIRA_STATUSESevery status, lowName=priority or Name=off, comma-separated; * is every other status
NEEDS_YOU_JIRA_PROJECTSevery project, default context, lowKEY=context[:priority], comma-separated
NEEDS_YOU_JIRA_JQL_EXTRAnoneA JQL clause ANDed on, up to 500 characters, no ORDER BY
NEEDS_YOU_JIRA_WATCHINGoffon/off: issues you watch too
NEEDS_YOU_JIRA_INTERVAL5Minutes between runs, at least 1
NEEDS_YOU_JIRA_MAX_CARDS20Cards open at once, a whole number of at least 1

Expiry poller #

needs-you-expiry. What it watches is in expiry.conf (Expiry dates).

VariableDefaultTakes
NEEDS_YOU_EXPIRY_CONFIGexpiry.conf next to the env fileThe list of certificates, domains and keys
NEEDS_YOU_EXPIRY_DAYS30=low,7=normal,1=urgentdays=priority, comma-separated
NEEDS_YOU_EXPIRY_CONTEXTNEEDS_YOU_DEFAULT_CONTEXT, else workA context
NEEDS_YOU_EXPIRY_FAILS2Failed runs in a row before a "checks failing" card, a whole number of at least 1
NEEDS_YOU_EXPIRY_INTERVAL24Hours between runs, at least 1
NEEDS_YOU_EXPIRY_MAX_CARDS20Cards open at once, a whole number of at least 1
NEEDS_YOU_EXPIRY_TIMEOUT10Seconds per network check, 1 to 60
NEEDS_YOU_EXPIRY_RDAP_BOOTSTRAPhttps://data.iana.org/rdap/dns.jsonAn https URL

The invite installer #

The curl one-liner from an invite link (/join/<code>/install.sh). Its flags are in Add a sender; it writes the env file with NEEDS_YOU_CONFIG honoured.

VariableDefaultTakes
NEEDS_YOU_BIN_DIR~/.local/binEnv only. Where it installs needs-you (no quotes, $, backticks, backslashes or newlines)

Key and token files #

The pollers that need a secret read it from a file of its own, never from the env file. Each refuses a file that is a symlink, isn't yours, or that others can read or write; needs-you doctor names the problem and the fix.

FileDefaultHoldsMode
Linear key~/.config/needs-you/linear-key (next to the env file; NEEDS_YOU_LINEAR_KEY_FILE)A Linear personal API key, one line600
Jira token~/.config/needs-you/jira-token (NEEDS_YOU_JIRA_TOKEN_FILE)A Jira API token (Cloud) or personal access token (Data Center), one line600
Env file~/.config/needs-you/envThe sender token600
hub.json~/.config/needs-you/hub.json (--user), /etc/needs-you/hub.jsonA server hub's config, with the peer secret600 (--user), 640 root:needs-you
peer_secret_filenoneA hub's peer secret, one line600: the hub won't start otherwise

Hub: hub.json #

A server hub's config: plain JSON (see deploy/hub.example.json), written by install-hub.sh. Every key can also be set by a flag on needs_you_hub.py, so no file is required: the flags named below, or --set KEY=VALUE for anything else (VALUE is parsed as JSON when it can be). null means unset. Numbers may also be given as strings ("30"). The hub refuses to start with a value of the wrong type or out of range, naming each bad key, and warns about a key it doesn't know (with "did you mean"). Check a config without starting anything:

python3 ~/.local/share/needs-you/hub/needs_you_hub.py --check-config --config ~/.config/needs-you/hub.json

Restart after editing: systemctl --user restart needs-you-hub (or sudo systemctl restart needs-you-hub). Server hubs.

KeyFlagDefaultTakes, and what it does
bind--bind (repeatable, or commas)127.0.0.1An address or a list. Listen addresses; 0.0.0.0/:: need allow_any_interface
port--port8765A whole number, 0 to 65535
public_url--public-urlfirst bind addressA string: the URL others use. Put the MagicDNS name here
db--dbneeds-you-hub.dbA string: the SQLite path
hub_id--hub-idshort hostname1-64 letters, digits, ., _ or -. Unique per hub; LWW tie-break and self-peer detection
peers--peer (repeatable)[]A list of strings: peer public URLs, used for replication and handed to senders as hub_urls
peer_secretA string of 16+ characters, required when peers is set. Also $NEEDS_YOU_PEER_SECRET
peer_secret_file--peer-secret-fileA string: a file holding the peer secret, mode 600 (the hub won't start if group or others can read or write it)
owner_token_file--owner-token-fileA string or null. On start, make sure an owner token with the secret in this file exists (the Mac app uses this)
owner_token_name--owner-token-namethis-macA string: its name. A changed secret replaces the old one
parent_pid--parent-pidA whole number or null. Exit cleanly when that process is gone (checked every 2 s)
install_dir--install-dirthe directory above hub/A string: where /dl/ files are read from
text_retention_hours24A number. A closed or expired item's text is purged this long after it closed; a tombstone stays. 0 keeps the text until the item is deleted
retention_days--retention-days30A number. Closed and expired items older than this are deleted. 0 keeps them forever
freebind--freebindfalsetrue or false. Linux: bind before tailscaled has the address. The installer sets it
allow_any_interface--allow-any-interfacefalsetrue or false. Allow 0.0.0.0 / ::
allowed_hosts--allowed-host (repeatable)[]A list of strings (or one comma-separated string). Extra Host names the hub answers to, besides IP literals, localhost, bind names, public_url, and this machine's host and MagicDNS names. Anything else is a 421 (DNS-rebinding protection, API). Also $NEEDS_YOU_HUB_ALLOWED_HOSTS (comma-separated), which is how to set it for the Mac app's hub (launchctl setenv NEEDS_YOU_HUB_ALLOWED_HOSTS name, then restart the app). * turns the check off
self_update_dirthe config file's directoryA string or null: where the updater's hub-update.json and hub-update-status.json are, for /v1/hub/update. Without a config file (the Mac app's hub) there is none and the hub can't be asked to update
update_request_interval_seconds900A number. At most one accepted POST /v1/hub/update per this many seconds (429 with Retry-After otherwise)
quiet--quietfalsetrue or false. No access log
access_logtruetrue or false. One stderr line per request. Invite codes in /join/ paths (and anything shaped like a code or token) are replaced with <code>/<redacted>, and control characters are escaped
max_open_per_token60A whole number. Volume guard
max_connections128A whole number. Connections served at once, across all binds (kept 64 under the file descriptor limit)
request_read_seconds10A number. When max_connections is reached, a connection open longer than this (a slow request, or an answer its client stopped reading; never a reader's /v1/stream) is closed to make room; otherwise new ones are closed at once
sse_heartbeat_seconds15A number of at least 0.1. How often /v1/stream sends a keep-alive
default_expiry_hours24A number. Expiry for done/info items without expires_at
maintenance_seconds600A number. Purge, WAL checkpoint and incremental vacuum interval
vacuum_hours24A number. How often a full VACUUM may run (only when over 25% is free)
redeem_fail_limit10A whole number. Failed invite redeems per client IP per window before 429
redeem_fail_window_seconds600A number
answer_rate_limit30A whole number. Answers (POST /v1/items/{id}/answer, counted whether taken or not) per token per window before 429
answer_rate_window_seconds60A number
answer_read_rate_limit120A whole number. Reads of an answer (GET /v1/items/answer) per token per answer_rate_window_seconds before 429
answer_waits_per_token4A whole number. Long polls for an answer one token may hold open
post_rate_limit120A whole number. Posts (POST /v1/items, re-posts included) per token per window before 429 rate_limited with Retry-After: a sender stuck in a loop (ADR 0010). Status sets and clears get a limit of the same size, counted apart. 0 is off
post_rate_window_seconds60A number
anti_entropy_seconds60A number. How often each peer is pulled
outbox_poll_seconds2A number. Replication outbox check interval
retry_base_seconds1A number. Push backoff, first wait
retry_max_seconds300A number. Push backoff, longest wait
peer_timeout_seconds5A number of at least 0.1. Per request to a peer

Every number above is at least 0 unless it says otherwise.

Hub: hub-update.json #

The server hub's automatic updates, next to hub.json; install-hub.sh writes it and its flags change it (Automatic updates). A file that can't be read, or a value it doesn't take, turns automatic updates off, and the updater's log and --check-config name the key.

KeyFlagDefaultTakes
auto_update--auto-update / --no-auto-updatetrue (new installs)true or false
channel--update-channelstablestable or prerelease
soak_hours--update-soak-hours24Hours to wait after a release is published, 0 to 720
gh--update-gh"" (gh on PATH)"" or an absolute path

Hub environment variables #

VariableRead byTakes
NEEDS_YOU_PEER_SECRETthe hubThe peer secret, when neither peer_secret nor peer_secret_file is set
NEEDS_YOU_HUB_ALLOWED_HOSTSthe hubExtra Host names, comma-separated (how the Mac app's hub gets them: launchctl setenv)
NEEDS_YOU_HUB_CONFIGneeds-you-adminThe hub.json it reads (default: the one install-hub.sh wrote)

Installer flags #

scripts/install-hub.sh (a server hub) checks every flag's value before installing anything, and runs the new hub.json through --check-config before it replaces the old one. --help lists them; Server hubs explains them.

FlagSetsTakes
--userinstall under your home directory, as a systemd --user service
--bind ADDRbindAn address, repeatable or comma-separated (never 0.0.0.0/::)
--port Nport1 to 65535
--hub-id IDhub_id1-64 letters, digits, ., _ or -
--public-url URLpublic_urlhttp(s)://host:port
--peer URLpeersA hub's http(s)://host:port, repeatable
--peer-secret-file F, --peer-secret S, --generate-peer-secretpeer_secretA secret of 16+ characters
--join -a peer linkA peer invite link, http(s)://<hub>/join/nyi_..., on stdin
--reconfigure, --no-start, --no-invite
--auto-update, --no-auto-update, --update-channel, --update-soak-hours, --update-ghhub-update.jsonas in hub-update.json

scripts/setup-sender.sh (a sender, from a checkout) writes the same env file as the invite installer; --help lists its flags. It checks --url (http(s)://), --test-context (a context), --context-alert (0 to 100), --ssh-alias, --orca-environment and --agent-link the same way the hook does, and exits 2 with what each takes.

Set by needs-you itself #

These are set by needs-you for its own child processes, or are seams for the tests. Never set them yourself; a line for one in the env file gets a doctor warning.

VariableSet by
NEEDS_YOU_AGENT_SESSIONthe opencode plugin (and any connector), for the agent's commands
NEEDS_YOU_WATCH_PIDthe hook, for needs-you answer-wait
NEEDS_YOU_INSTALLERthe invite installer and needs-you install-*, for the agent installers they run
NEEDS_YOU_HOOK_PLATFORM, NEEDS_YOU_HOOK_TTYtests: the hook's platform and terminal
NEEDS_YOU_HUB_UPDATE_NOWtests: the hub updater's clock
NEEDS_YOU_INSTALL_CHECK_OWNERSHIP, NEEDS_YOU_RELEASE_OFFLINEtests: install-hub.sh's root-only checks, and no GitHub

Development and release #

Read by the scripts that build, release and check needs-you (CONTRIBUTING), never by a sender or a hub.

VariableRead byTakes
NEEDS_YOU_SKIP_APPscripts/build-release.sh1: skip the Mac app
NEEDS_YOU_TAGscripts/build-release.shvX.Y.Z: fail unless it matches VERSION
NEEDS_YOU_TESTS_RESULTscripts/build-release.shThe test job's result, recorded in the manifest
NEEDS_YOU_VERSION, NEEDS_YOU_DISTmac/scripts/bundle.sh, from build-release.shThe version and output directory
NEEDS_YOU_PYTHON39scripts/check.shA Python 3.9 to run the suite on as well
NEEDS_YOU_LINT_BASEscripts/lint_repo.py, scripts/check.shThe base commit for the commit checks (default origin/main)
NEEDS_YOU_LEAK_PATTERNSscripts/lint_repo.pyA file of extra leak patterns

Checking it: needs-you doctor #

needs-you doctor (Troubleshooting) checks, besides the hubs and hooks:

This page is docs/guides/configuration.md in the repo. View or edit it on GitHub.