trunkjet

Get started

On this page

User configuration of tjet

The tjet client reads one optional TOML file with named server profiles (spec 09 §7). This page is the schema. It is derived from client/cli/src/config.rs, and the test client/cli/tests/user_config_doc.rs fails when that code has a key, or the client reads an environment variable, that this page does not document (or this page documents a key the code does not have).

Where the file is

The first of these that is set:

  1. TJET_CONFIG (any path).
  2. Linux and other Unix: $XDG_CONFIG_HOME/trunkjet/config.toml, else ~/.config/trunkjet/config.toml.
  3. macOS: ~/Library/Application Support/trunkjet/config.toml (compiled, not platform-qualified).
  4. Windows: %APPDATA%\trunkjet\config.toml (compiled, not platform-qualified).

A missing file is an empty configuration. A file that cannot be read or parsed stops every command with exit 1 and INVALID_ARGUMENT, naming the file and the problem.

Example

The test loads this block with the real tjet binary.

default_profile = "work"

[profiles.work]
server = "https://scm.example.com"
timeout = 120
progress = true
non_interactive = false
credential_store = "keyring"

[profiles.ci]
server = "https://scm.example.com"
progress = false
non_interactive = true

Keys

Every key is optional. Unknown keys are refused, at the top level and inside a profile, so a mistyped key never silently changes behaviour.

KeyTypeDefault when absentFlag / environment that overrides itMeaning
default_profilestringno profile--profile, TJET_PROFILEProfile used when neither the flag nor the variable names one. It must name a [profiles.<name>] table, or every command fails with profile "<name>" is not defined.
profilestable of tablesno profilesnoneOne [profiles.<name>] table per profile. The name is any TOML key.
profiles.<name>.serverstring (URL)https://trunkjet.io--server, TJET_SERVERServer for commands that run outside a workspace. When no configuration file exists, the first tjet login to another server writes one with that server as the default profile's; an existing file is never changed. Inside a workspace, the server bound in .tjet/workspace.json is used (see workspace binding).
profiles.<name>.timeoutinteger, seconds, at least 1no deadline--timeout, TJET_TIMEOUTWhole-command deadline. On expiry the command stops with OUTCOME_UNKNOWN; a mutating command exits 8, because the remote request may already have completed. 0 is refused.
profiles.<name>.progressbooleantrue--no-progress, TJET_NO_PROGRESSProgress lines on stderr. --no-progress (or the variable) can only turn progress off. JSON mode never writes ANSI escapes either way.
profiles.<name>.non_interactivebooleanfalse--non-interactive (no environment variable)Never prompt; return structured errors instead. The flag can only turn it on.
profiles.<name>.credential_store"keyring" or "file""keyring"tjet login --store (no environment variable)Where tjet login keeps the session: the OS credential store or the private file. Unset, on a computer with no OS credential store (no keyring service: a server, a container, WSL), tjet login uses the file and says so. Any other value fails every command with INVALID_ARGUMENT. Reading a session does not depend on it: it tries the OS store, then the file store.

Secrets are never configuration. A profile cannot hold a token or password (token = ... is an unknown key and is refused). Sessions from tjet login live in the OS credential store (Secret Service, Keychain, Credential Manager), or with tjet login --store file (or credential_store = "file" in the profile) in $XDG_CONFIG_HOME/trunkjet/credentials.json (mode 600). Scoped tokens are passed with TJET_TOKEN, --token-fd or --token-stdin, never as a command-line value. A GitHub token for tjet import github (only needed for a private repository) comes from TJET_GITHUB_TOKEN or --github-token-stdin the same way; the server uses it for that one import and does not keep it.

A stored session is refreshed one process at a time: every tjet command and the workspace daemon take an exclusive lock file, refresh-<hash>.lock, in a private lock directory that is fixed per OS user whatever the environment says (~/.config/trunkjet/locks under the home directory of the user's passwd entry on Linux and macOS, %LOCALAPPDATA%\trunkjet\locks resolved from the user's profile on Windows; never under TJET_AGENT_DIR, never from XDG_CONFIG_HOME), read the session again under it, and refresh only if no other process did. A waiter gives up after 30 s with RETRY_LATER; the refresh request itself gives up after 20 s (5 s to connect). Before a refresh is sent, a marker for that refresh token (refresh-<hash>.inflight/<token hash>: the account, the time, the token's expiry; never the token) is flushed to disk. A success, a refusal by the server (4xx), a connection that never opened (a connect timeout included) or the server's "not applied" (503 RETRY_LATER or STORAGE_DEGRADED) removes it. A timeout after connecting, a connection cut after sending, any other server error (OUTCOME_UNKNOWN included) or a crash leaves it, and every later command answers AUTH_REQUIRED ("the last refresh of this login was interrupted ... run tjet login") without sending the possibly used refresh token again: the server treats a reused refresh token as theft and revokes every session of the login. tjet login stores a new session (its token has no marker) and removes every other entry of the same login for that server in both stores; the old token's marker stays until that token's own refresh lifetime has ended, then it is removed. Every change of credentials.json holds locks/credentials-file.lock beside it and is flushed with its directory; the OS credential stores keep their own durability. These files never need to be deleted by hand.

A login kept in the file store also takes the same refresh lock in locks/ beside credentials.json when that directory differs from the per-user one, so processes that share one credential file but resolve different per-user directories (sudo -E, a redirected Roaming AppData) still refresh one at a time. Without a usable home directory in the passwd database (an arbitrary-uid container, a home of / or /nonexistent) the per-user directory falls back to locks/ beside the credential file, with a warning in the log; a failed lookup (an unreachable directory service) refuses with RETRY_LATER instead. A file-store login is never refreshed when the locks/ beside its file cannot be used by this process (for example under sudo -E, which keeps the user's HOME but is not the owner of that directory). Waits for credentials-file.lock are logged and counted like refresh waits ("waited for another process's refresh of the stored login").

Known limitation: the lock is per machine. Credential Manager entries that roam between Windows machines (a roaming profile) can be refreshed on two machines at once; the server then sees a reuse and revokes the login, and tjet login is needed on one of them.

Several accounts per server

Each login is one account, stored under the key <server>#<principal id> (one entry per account, in the OS store or the file store). Logging in as someone else to the same server adds an account instead of replacing the one you had; the last login is the server's default account, which every tjet command and the workspace daemon's background sync use for that server (until DB-22 binds each workspace to an account). For one account per server nothing changes: tjet login, tjet logout, tjet whoami and background sync behave as before.

  • tjet accounts lists the stored accounts without any secret: server, principal id, display name, store, default, the server origin pinned at login, and the local state (ok, auth_required with the reason, or credential_store_locked).
  • tjet login --account <name> signs in and requires that identity: a sign-in as anyone else is refused (ACCESS_DENIED), its new server session is revoked, and nothing is stored. The name is a principal id, or the display name of an account already stored (tjet accounts); a display name the server reports for a new session is not enough. The account becomes the default.
  • tjet logout logs out of the default account; tjet logout --account <name> out of another. The other accounts stay, and none of them becomes the default by itself (no other identity is chosen silently): log in again, or name the account.
  • A login stored by an older tjet (under the key <server> alone) keeps working: it is read as the server's default and listed as legacy. The next login to that server moves it to its own key (written, then the old entry deleted, under the account's refresh lock; never copied, so a refresh token is never held twice). If the OS credential store is locked at login (it may hold an older copy that the new login could not replace), the login is refused with RETRY_LATER and nothing is stored: unlock it and log in again.
  • Older versions of tjet and tjet-agent (before DB-11) know only the key <server>:
    • they do not see logins stored per account, so an older tjet says "not logged in" and an older daemon still running publishes nothing until it is restarted with this version;
    • an older tjet logout removes only the <server> entry: logins stored per account stay (log out with this version, tjet logout --account, to remove them);
    • an older tjet login writes the <server> entry again; this version reads it as the server's default only when no account of the server is the default, and the next login with this version moves it to its own key.

The list of accounts (accounts.json, never a token) is kept in a private directory beside the per-user lock directory (~/.config/trunkjet/accounts/ under the passwd home on Linux and macOS, %LOCALAPPDATA%\trunkjet\accounts\ on Windows), one per OS user like the credential stores. A list this build cannot read is refused, never rewritten.

A Linux login keyring that is still locked (for example after an automatic desktop login) is reported as credential_store_locked: tjet commands answer RETRY_LATER ("unlock it ... no new login is needed") instead of "not logged in", and the daemon, which never asks the keyring to unlock, reports it in tjet accounts-equivalent accounts answers and account_state events and tries again every 60 s.

When the server cannot be reached (no connection at all), the daemon stops sending background publications to it and reports the server offline (and its logins offline in accounts); it sends one unauthenticated probe at a time instead, after a delay that doubles from 2 s to 5 minutes (jittered), and only while a checkpoint marked for publishing waits. Your checkpoints stay saved locally; publishing resumes once the server answers. The desktop app reads each workspace's state (sync_state, sync_queue events: idle, publishing, waiting, paused, offline, auth_required, credential_store_locked, with what to do) and, per file, whether its saved content is synchronized, queued, failed or saved locally only.

Through the daemon (protocol 4), tjet save --remote sends the stored access token of the workspace's server's default account (or TJET_TOKEN), naming that server, with the request: a checkpoint marked for background publishing must be marked by someone who holds that login . Through the daemon, --server/TJET_SERVER naming another server than the workspace's is refused for a remote mark (INVALID_ARGUMENT, nothing saved, no token sent): one server's token is never sent to another. (Without a daemon, tjet save --remote --server publishes to the named server with its own login, as before.) The daemon records which account each mark was verified for, and background sync publishes it only with that account's login, never with another account that became the default meanwhile . A mark the daemon could not verify (no login stored and the server unreachable) is saved but not published by background sync: an interactive tjet sync publishes it, or a later mark that background sync publishes supersedes it (its content is included, checkpoints being cumulative), and tjet status says "checkpoint X was superseded by Y (published by background sync as P)". Background sync publishes one mark at a time, oldest first, each with its own account; a mark of one account is never published with another account's login. Without a stored login or a token the daemon refuses the remote mark (AUTH_REQUIRED); save without --remote and run tjet sync, or log in first. A pause of background publishing for a refused or unusable login ends as soon as you log in again. Protocol 3 clients (an older tjet) are still accepted unless the daemon setting refuse_protocol3_remote_marks = true is in settings.toml of the daemon's state directory (or tjet-agent --refuse-protocol3-remote-marks).

Precedence

For each option separately (spec 09 §7):

  1. an explicit flag,
  2. its environment variable,
  3. the selected profile (--profile, else TJET_PROFILE, else default_profile),
  4. the installation default in the table above.

Inside a workspace, the workspace's own binding wins over the profile's server. Repository content (anything under the working tree, including .tjet/) cannot override credentials, server trust, executable paths or authorization.

Workspace binding

tjet workspace open writes .tjet/workspace.json. It binds the server URL to the repository UUID, so a server whose name now resolves to a different repository is refused instead of being attached silently. This file is local state written by tjet, not user configuration; edit it only through tjet workspace commands.

Environment variables

Read by tjet, tjet-agent and the client crates they use. TJET_SERVER, TJET_PROFILE, TJET_TIMEOUT and TJET_NO_PROGRESS are covered under Keys.

VariableDefaultEffect
TJET_CONFIGplatform path aboveLocation of this file.
TJET_SERVERprofile, then https://trunkjet.ioSame as --server.
TJET_PROFILEdefault_profileSame as --profile.
TJET_TIMEOUTprofile, then noneSame as --timeout (seconds).
TJET_NO_PROGRESSunsetSame as --no-progress.
TJET_TOKENunsetBearer credential (session or scoped token). --token-fd and --token-stdin take precedence over it, and it takes precedence over a stored session.
TJET_TOKEN_FILEunsetA file holding the token: an agent token file written by tjet agent connect <agent> (JSON with token) or one bare token; readable only by you (else refused). Used after --token-fd/--token-stdin, before TJET_TOKEN; unreadable fails the command, never falling back to a stored session.
TJET_DEV_IDENTITYunsetDevelopment subject (for example alice), sent as Bearer dev:<subject> to a tjetd --dev server on loopback; production servers refuse it. Used after --token-fd/--token-stdin and TJET_TOKEN, before a stored session.
TJET_AGENT_ENROLMENTunsetThe enrolment secret tjet agent connect asks an agent's owner for access with (from tjet agent enrol); --enrolment-file takes precedence. Never put it on the command line.
TJET_CACHE_DIR$XDG_CACHE_HOME/trunkjet (~/.cache/trunkjet; macOS ~/Library/Caches/trunkjet; Windows %LOCALAPPDATA%\trunkjet\cache)Root of the shared local content cache.
TJET_CACHE_BUDGET_BYTES21474836480 (20 GiB)Per-partition cache budget used by tjet cache gc. Dirty or unsynchronized content is never evicted to meet it.
TJET_VFS_CACHE_BUDGET_BYTES21474836480 (20 GiB)Budget of the local content of all virtual workspaces together, enforced by tjet-agent's maintenance pass. Only clean content of the server-confirmed base that is not pinned, open or being hydrated is removed; dirty bytes count but are never removed; an unmet budget is reported as cache in tjet status (virtual).
TJET_TREE_SNAPSHOT_RECHECK_SECS300Seconds tjet-agent relies on a confirmed authorization of a virtual workspace's held tree snapshot before it asks the server again; a revoked view stops serving directories from the snapshot within this time.
TJET_VFS_PREFETCHonLinux: off stops tjet-agent from loading the whole metadata of a lazily opened virtual workspace in the background; every directory is then listed when first needed (metered links, tests that count listings). Save and update of such a workspace do not need the whole view while its directory records allow; otherwise they load it first.
TJET_TREE_SNAPSHOT_RECHECK_SECS300Seconds tjet-agent relies on a confirmed authorization of a held tree snapshot of a lazy virtual workspace before asking the server again; a revoked whole view stops serving directories from the snapshot within this time.
TJET_VFS_WINDOWS_BACKENDcfapiWindows: the backend tjet-agent uses for new virtual workspaces. cfapi (Cloud Files, the default) or projfs (ProjFS: experimental, outside the V1 virtual-workspace scope: if the daemon dies while a file is being read, the reader can get zeros instead of the file's bytes (open defect W-D4); every tjet command on such a workspace prints a hint saying so); any other value is refused. A workspace keeps the backend it was opened with; a ProjFS workspace is served only while this is projfs.
TJET_CACHE_MISSING_WORKSPACE_DAYS30Days a registered workspace that is missing (deleted or moved) keeps its offline-pinned objects in the cache before an eviction pass drops its pins. A missing workspace that pins nothing in the cache is dropped at once, and a partition left without any workspace is removed. Re-opening the moved workspace re-registers it.
TJET_DIFF_SPLIT_RECORDSunsetTesting only: the number of diff records tjet workspace update accepts in one response before it splits the request by path. Unset uses the client's response-size bound.
TJET_TREE_LISTINGunsetDiagnostics only: per-directory makes tjet clone/workspace open, workspace new and workspace include list one directory per request as before D-1886 instead of in bulk (comparison runs). Any other value: bulk.
TJET_TREE_PAGE5000Testing only: entries per bulk tree-listing page of those commands (1 to 20,000), so a small tree is listed over many pages.
TJET_SNAPSHOT_DIR$XDG_CACHE_HOME/trunkjet/snapshotsWhere tjet snapshot / tjet exec keep read-only snapshots.
TJET_PRESUBMIT_CACHE_TOKENunsettjet presubmit run: the bearer token Bazel sends to the REAPI cache in trusted runs (a service principal that may write the action cache). Written to a private rc file, never on a command line.
TJET_PRESUBMIT_CACHE_READ_TOKENunsettjet presubmit run: the token for untrusted runs (read only; uploads are off). Unset: untrusted runs use no remote cache.
TJET_SHOWCASE_TOKENunsettjet showcase run: the bearer token Bazel sends to the REAPI cache and executor (the runner's own service principal). Written to a private 0600 rc file per run, never on a command line.
TJET_PRESUBMIT_UNTRUSTED_EXEC_TOKENunsettjet presubmit run --remote-executor: an agent principal's token with which untrusted runs execute on the server's untrusted executor pool (never cached). Unset: untrusted runs only read the cache and build in the runner's sandbox.
TJET_SNAPSHOT_MAX_BYTES53687091200 (50 GiB)Snapshot cache size budget.
TJET_SNAPSHOT_MAX_AGE_DAYS30Snapshot cache age budget.
TJET_NO_DAEMONunsetAny value other than 0: do not use the workspace daemon (tjet-agent).
TJET_AGENT_AUTOSTARTunset1: start tjet-agent when a command finds none running.
TJET_AGENT_BINtjet-agent next to tjet, else on PATHDaemon executable to start.
TJET_AGENT_DIRruntime $XDG_RUNTIME_DIR/trunkjet, state $XDG_STATE_HOME/trunkjet/agentAbsolute directory that replaces both daemon locations (<dir>/run, <dir>/state). The badge library libtjet_badge (file-manager extensions, DB-18) reads it too when its handle names no agent_dir, so it talks to the same daemon.
TJET_AGENT_LOGinfoDaemon log filter (tracing syntax).
TJET_AGENT_IDLE_TIMEOUT1800Seconds without requests after which the daemon exits (0: never); the same as tjet-agent --idle-timeout, and inherited by a daemon tjet starts on demand (DB-09).
TJET_AGENT_SWEEP_SECS600How often the daemon runs its maintenance pass in the background: keeps the object cache within its budget and closes expired agent forks that hold nothing unique. The pass never delays requests and stops promptly when the daemon stops.
TJET_COMPACT_PACKS_ABOVE32The maintenance pass merges the small local object packs of a served workspace holding more packs than this (at most 128 MiB per pass, only while no request runs; tjet workspace compact does it by hand). A crash at any point loses nothing.
TJET_AGENT_GENERATION_TTL_MS30000How long the daemon keeps a superseded status snapshot generation for status_tree cursors (at least 100). For tests and diagnostics, but honoured in every build, release included; shortening it only makes cursors answer restart sooner (DB-08).
TJET_AGENT_TREE_PAGE_BYTES4194304A lower byte bound for a status_tree page as encoded (256 KiB to 4 MiB). For tests and diagnostics, but honoured in every build; lowering it only makes pages end earlier, each with a cursor after its last entry.
TJET_AGENT_HEARTBEAT_MS15000How long a protocol 4 event stream may stay silent before the daemon sends a heartbeat (at least 100). For tests and diagnostics, but honoured in every build, release included; clients read the value from the subscribe answer and must ack at least every 2 intervals (DB-04).
TJET_AGENT_SYNC_SECS30Background synchronization interval of --remote checkpoints; 0 disables it.
TJET_AGENT_WATCHERunsetmacOS/Windows only: none turns the native file watcher (FSEvents, ReadDirectoryChangesW) off; every status is then a full scan.
TJET_KEYRING_SERVICEnscmCredential-store service name. Tests set it so they never touch a real login.
TJET_TEST_ONLY_LOCK_ROOTunsetTest only: the base of the per-user refresh lock directory. Honoured only when TJET_KEYRING_SERVICE names a test service; with the production service nscm it is ignored.
TJET_AGENT_TEST_PRODUCER_PANICunsetTest hook: the daemon's event producer panics once, in its n-th poll with a watched workspace; every event stream then ends with reset {reason: producer} (DB-04). Not for normal use.
TJET_AGENT_LOG_MAX_BYTES10485760A smaller largest file for the daemon's rotated log (agent.log, five files; at least 4096). It only ever lowers the 10 MiB bound; for tests and diagnostics (DB-23).
TJET_AGENT_TEST_PANICunsetTest hook, debug builds only: op:<name> makes the daemon panic answering each <name> request, startup on its main thread once it holds its lock; each leaves a local crash record (DB-23). Not for normal use.
TJET_TEST_PANICunsetTest hook, debug builds only: tjet panics at start with the value in its message, leaving a local crash record (DB-23). Not for normal use.
TJET_AGENT_TEST_REJECT_ALL_PEERSunsetTest hook: the daemon refuses every IPC peer. Not for normal use.
TJET_AGENT_TEST_DROP_ANSWERunsetTest hook (DB-05): the daemon does not send the first answer of the named operation (save, sync) and closes the connection instead, as a lost connection would. Not for normal use.
TJET_AGENT_TEST_RESOLVE_EXIT_AFTERunsetTest hook (DB-14): seal or resolve makes the daemon exit, as a crash would, right after that step of a conflict_resolve (once per process). Not for normal use.
TJET_AGENT_DRAIN_MS120000How long a stopping daemon drains (D-1119, DB-17a): reads and running operations are served, new ones refused; at the end a running operation is cancelled at its next safe boundary. Only ever shortens the bound (tests, diagnostics).
TJET_AGENT_DRAIN_CANCEL_MS30000After the drain, how long a cancelled operation may take to reach a safe boundary before the daemon stops as after a crash (exit code 4). Only ever shortens the bound.
TJET_TEST_ONLY_AUTOSTART_JOURNALunsetIntegration-test child only: private path for DB-17b installer process-kill recovery tests. Not read by shipped binaries.
TJET_TEST_ONLY_AUTOSTART_NAMEunsetTest isolation only (DB-17b): `tjet daemon install
TJET_TEST_ONLY_AUTOSTART_HALTunsetTest only, honoured only with TJET_TEST_ONLY_AUTOSTART_NAME: the installer exits with status 86 at its n-th step boundary, as a killed installer would.
TJET_D1473_FD_MEASUREMENT_CHILDunsetUnit-test harness only: marks the isolated descriptor measurement child. Not read by shipped client binaries.
TJET_TEST_ONLY_BUILDunsetTest only: a JSON object (version, build_number, commit, dirty) overriding the build identity tjet-agent --build-info reports and the daemon uses to decide whether it replaces a running one. Honoured by debug builds only; a release build ignores it and logs that it did.
TJET_TEST_DIFF_BULKunsetUnit tests of tjet-workspace only: set, the local diff takes its bulk paths (one row query, the head tree listed once) whatever the number of paths, so the DB-07 tests also cover them. Compiled into test builds only; shipped binaries never read it.
TJET_BUILD_NUMBER, TJET_BUILD_COMMIT, TJET_BUILD_DIRTY, TJET_BUILD_TARGETunsetBuild time only, not read at run time: the release pipeline's build number, source commit and clean-tree assertion (TJET_BUILD_DIRTY=0) compiled into tjet and tjet-agent; TJET_BUILD_TARGET is set by the build script. A build without a commit and the assertion is dirty and never replaces a running daemon automatically.
TJET_TEST_NO_OWNER_ADOPTIONunsetWindows test hook (only stricter): 1 makes an elevated tjet skip making its new files the user's, so it falls back to refusing workspace changes. Not for normal use.
TJET_TEST_CLOCK_OFFSET_MSunsetFault-testing clock skew of this process.
TJET_TEST_DENY_SYMLINKSunsetTest hook: 1 makes every symlink creation fail as in a Windows session that cannot create links (Developer Mode off, no symlink privilege), so operations that must create links fail with PATH_NOT_MATERIALIZABLE naming them. It can only make the client refuse; not for normal use.

Set by tjet exec for the command it runs (outputs, not configuration):

VariableValue
TJET_SNAPSHOT_REVISIONThe revision the snapshot was taken from.
TJET_SNAPSHOT_REAPI_DIGESTThe snapshot's REAPI root directory digest.

Workspace daemon settings

The private daemon state directory's settings.toml accepts idle_timeout and verify_interval in seconds (zero disables the respective timer), alongside refuse_protocol3_remote_marks. Command-line flags override these defaults; TJET_AGENT_IDLE_TIMEOUT also overrides the file. Without a setting, idle shutdown is 1800 seconds and verification is 300 seconds. A daemon started with --managed never exits for idleness and writes its existing bounded, redacted file log. Unknown settings fail closed; elevation and managed startup cannot be enabled through this file. OS autostart registration is a separate explicit action.

tjet-agent --agent-dir /absolute/path overrides TJET_AGENT_DIR for that daemon (including settings, log and panic-record locations). Relative values are refused. Clients must use the matching TJET_AGENT_DIR to reach that private daemon. This option alone does not register or enable login startup.

Starting the daemon at login

tjet daemon install registers the workspace daemon to start at every login of your account, and starts it now; tjet daemon uninstall stops it and removes the registration; tjet daemon autostart shows what is registered. Nothing is registered unless you run install or turn on "Start the background service at login" in the app (off by default; the app asks for a native confirmation).

  • Linux: a systemd user unit tjet-agent.service in the user manager's configuration directory (~/.config/systemd/user), enabled for default.target, Restart=on-failure. Without a systemd user manager: an XDG autostart entry ~/.config/autostart/tjet-agent.desktop (no restart after a crash).
  • Windows: a Scheduled Task \trunkjet-nscm-agent-<your SID> of your account only: logon trigger, interactive token, RunLevel LeastPrivilege, no execution time limit, runs on battery, one instance, restarted after a failure. Nothing under HKLM.
  • macOS: a LaunchAgent ~/Library/LaunchAgents/io.trunkjet.agent.plist of your account (io.trunkjet.agent.tjet-agent-<hash> with TJET_AGENT_DIR), loaded into your GUI session (launchctl bootstrap gui/<uid>) and enabled in launchd's override database: Aqua sessions only, restarted after a crash (not after an ordinary exit), 180 s to drain on stop, umask 077. Run it in Terminal while logged in at the Mac: over SSH without a GUI login it is refused and nothing is written. macOS 13 and later show a "Background Items Added" notice; turning the item off in System Settings > General > Login Items stops it at login, which tjet daemon autostart cannot see.

The registered command is the tjet-agent beside tjet, with --managed (no idle shutdown) and --agent-dir when TJET_AGENT_DIR was set; never --allow-elevated. install is refused in an elevated (administrator) or root shell. Running install again changes nothing; after an interrupted install or uninstall, the next one completes it. A registration with the same name that install did not write is never changed: remove it yourself. On Linux the unit carries the nonsecret environment present at install time (HOME, PATH, XDG and D-Bus locations); install again after changing them.