trunkjet

Get started

Install the CLI and the desktop app

Pick your system. Each line installs tjet, the command line tool, and the background helper tjet-agent. The installers for macOS and Windows also install the desktop app. Nothing on your computer needs a database. The same page with download buttons is at /download on your server.

macOS (11 or later): download the .pkg from /download and open it. Or, without a password:

curl -fsSL https://trunkjet.io/install.sh | sh

Windows (10 or 11, 64-bit): download the .msi from /download and open it. Or in PowerShell:

powershell -ExecutionPolicy Bypass -c "irm https://trunkjet.io/install.ps1 | iex"

Linux (x86_64 or arm64, glibc 2.39 or later):

curl -fsSL https://trunkjet.io/install.sh | sh

Then sign in. It opens your browser:

tjet login --server https://trunkjet.io

Use your own server's address instead of https://trunkjet.io if your team runs one; its /install.sh downloads from that server. Next: What trunkjet is, and a first change.

The packages are not code-signed yet. macOS and Windows warn the first time you open them (see Unsigned packages). The scripts check every download against the server's SHA256SUMS and stop on a mismatch.

Details

What the install scripts do

install.sh (Linux, macOS):

  1. finds the system and processor (uname),
  2. downloads SHA256SUMS and the matching file from <server>/downloads/,
  3. checks the file's SHA-256 and stops if it differs,
  4. copies tjet and tjet-agent to ~/.local/bin (on macOS it unpacks them from the .pkg with pkgutil --expand-full, so no administrator password is needed and the desktop app is not installed),
  5. if ~/.local/bin is not on your PATH, adds one line to ~/.bashrc, ~/.zshrc, ~/.bash_profile (macOS bash), fish's conf.d/trunkjet.fish or ~/.profile, once.

Settings: TJET_INSTALL_DIR (another folder), TJET_NO_MODIFY_PATH=1 (leave startup files alone), TJET_INSTALL_BASE (another server), TJET_TOKEN (a token of that server, needed only while it keeps its downloads for signed-in users). It refuses plain http:// except for localhost. Read it before you run it: curl -fsSL https://trunkjet.io/install.sh | less.

install.ps1 (Windows) downloads the .msi, checks its SHA-256, runs it silently for your user (msiexec /i ... /qn, no administrator rights), adds its bin folder to the current window's PATH and runs tjet --version. New terminals get the PATH change from the installer.

Neither script registers a service. To start the helper at every login, run tjet daemon install.

Linux packages

/download also lists a .deb of the command line tool (trunkjet-cli, installs to /usr/bin) and a .deb of the desktop app (trunkjet-desktop), when the server offers them:

sudo apt install ./trunkjet-cli_<version>_amd64.deb ./trunkjet-desktop_<version>_amd64.deb

apt repository

When the owner of the server has published an apt repository, /download links here and its address is in the server's channels.json. Add it once, then updates come with apt upgrade:

curl -fsSL https://trunkjet.io/apt/trunkjet.gpg | sudo tee /usr/share/keyrings/trunkjet.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/trunkjet.gpg] https://trunkjet.io/apt stable main" | sudo tee /etc/apt/sources.list.d/trunkjet.list
sudo apt update && sudo apt install trunkjet-cli

The repository is not published yet (how it is built). An .rpm is not built yet.

Homebrew and winget

Prepared, not published yet. Once they are, /download shows them:

brew install --cask trunkjet/tap/trunkjet     # macOS: the .pkg, asks for your password
winget install Trunkjet.Trunkjet              # Windows: the per-user .msi

Checking a download yourself

Compare the SHA-256 with the line for the file in <server>/downloads/SHA256SUMS (also shown at the bottom of /download):

shasum -a 256 trunkjet-<version>-macos-universal.pkg     # macOS
sha256sum trunkjet-cli_<version>_amd64.deb               # Linux
Get-FileHash trunkjet-<version>-windows-x64.msi          # Windows PowerShell

This proves the file is the one the server lists. It does not prove who built it; that needs code signing, which we do not have yet.

Unsigned packages

  • macOS: Gatekeeper blocks an unsigned package on first open. Right-click it and choose Open, or allow it in System Settings > Privacy & Security.
  • Windows: SmartScreen shows "Windows protected your PC". Choose More info, then Run anyway.

The signing steps for the owner are under Signing and notarization and Signing (Windows).

macOS package

The macOS client ships as one installer package and one disk image, built and checked on a Mac by make package-macos:

FileContainsInstalls to
trunkjet-<version>-macos-universal.pkgtjet (CLI), tjet-agent (workspace daemon), trunkjet.app/usr/local/trunkjet, /Applications (admin password)
trunkjet-<version>-macos-universal.dmgtrunkjet.app onlydrag to /Applications or ~/Applications (no admin)

Both are universal (Apple silicon and Intel) and need macOS 11 or later.

Install. Double-click the .pkg, or sudo installer -pkg trunkjet-<version>-macos-universal.pkg -target /. The installer has two choices (both on): the command line and the desktop app. It writes

  • /usr/local/trunkjet/bin/tjet and /usr/local/trunkjet/bin/tjet-agent (side by side: tjet starts the daemon found beside it), /usr/local/trunkjet/BUILD-INFO.json (version, commit), /usr/local/trunkjet/share/uninstall.sh and /usr/local/trunkjet/share/launchd/io.trunkjet.agent.plist;
  • /etc/paths.d/trunkjet, which puts /usr/local/trunkjet/bin on PATH for new Terminal windows (as Go's installer does);
  • /Applications/trunkjet.app (bundle id io.trunkjet.desktop) with its own copy of tjet-agent and the sandboxed preview helper tjet-preview beside the app.

The package has no install scripts: it starts nothing and registers nothing. The daemon starts on demand when you first run tjet or open the app, as your user. To start it at every login, run tjet daemon install in Terminal, logged in at the Mac: it writes a per-user LaunchAgent ~/Library/LaunchAgents/io.trunkjet.agent.plist and loads it into your session (see "Starting the daemon at login" in user-config.md). The shipped /usr/local/trunkjet/share/launchd/io.trunkjet.agent.plist is a reference copy of it; nothing loads that copy. Check the install with tjet --version (it prints the version and the source commit).

Upgrade. Install the newer package over the old one. Only program files are replaced; your workspaces and ~/Library/Application Support/trunkjet (the daemon's state, local checkpoints, pending uploads) are not in the package and are never touched. A daemon still running the old binary is replaced by the next tjet command: a newer stamped build asks it to drain first (at most 120 s; in-flight operations finish or stop at a safe boundary, DB-17a).

Uninstall. sudo /usr/local/trunkjet/share/uninstall.sh (add --keep-desktop to keep the app). It stops your workspace daemon gracefully first and removes nothing if that fails (unless --force), then removes only /usr/local/trunkjet, /etc/paths.d/trunkjet and /Applications/trunkjet.app (each only if it is recognisably trunkjet's) and forgets the package receipts. It never deletes user data: no workspace, nothing in any home directory, nothing in ~/Library/Application Support/trunkjet. Other users' daemons keep running until they log out. To remove your data as well, first run tjet status in each workspace and make sure nothing is unsynchronized, then delete the folders yourself. If you installed only the .dmg, drag the app to the Trash; your data stays for the same reason. If you used install.sh, delete ~/.local/bin/tjet and ~/.local/bin/tjet-agent.

Signing and notarization (owner)

tools/release/macos_pkg.py has a signing stage that is skipped with the line SCM-MACOS-SIGN: SKIPPED: unsigned build until all three variables below are set on the Mac that builds (a partial set is refused: a release is fully signed and notarized or not at all). Without them the app is ad-hoc signed only. To make signed, notarized packages, the owner provides:

  1. An Apple Developer Program membership (organisation account; it gives the team id).
  2. A Developer ID Application certificate (signs tjet, tjet-agent, tjet-preview, trunkjet.app and the .dmg, with the hardened runtime and a secure timestamp) and a Developer ID Installer certificate (signs the .pkg), both with their private keys, imported into a keychain of the build user on the build Mac (a dedicated keychain is best: TJET_MACOS_SIGN_KEYCHAIN=<path>).
  3. notarytool credentials stored once as a keychain profile on that Mac: xcrun notarytool store-credentials trunkjet-notary --apple-id <id> --team-id <TEAMID> --password <app-specific password> (or an App Store Connect API key: --key AuthKey_<id>.p8 --key-id <id> --issuer <uuid>).
  4. Then build with TJET_MACOS_SIGN_APP="Developer ID Application: <Name> (<TEAMID>)", TJET_MACOS_SIGN_INSTALLER="Developer ID Installer: <Name> (<TEAMID>)" and TJET_MACOS_NOTARY_PROFILE=trunkjet-notary in the build user's environment on the Mac. The stage signs, submits the .pkg and .dmg to Apple's notary service, waits, and staples the tickets; make package-macos then checks the signatures instead of their absence.

The same team id unblocks the sandboxed Finder extension endpoint, which still needs its own qualification run. (tjet daemon install needs no team id: it registers a per-user LaunchAgent, not an SMAppService login item.)

Windows package

The Windows client ships as one Windows Installer package, built and checked on a Windows host by make package-windows:

FileContains
trunkjet-<version>-windows-x64.msitjet (CLI), tjet-agent (workspace daemon), the desktop app trunkjet (io.trunkjet.desktop: tjet-desktop.exe, its own tjet-agent.exe, the sandboxed preview helper tjet-preview.exe, WebView2Loader.dll)

It needs 64-bit Windows 10 or 11.

Per user or per machine. The package installs either way (a dual-purpose package):

Per user (default)Per machine
Commanddouble-click, or msiexec /i trunkjet-<version>-windows-x64.msimsiexec /i trunkjet-<version>-windows-x64.msi ALLUSERS=1 (administrator)
Programs%LOCALAPPDATA%\Programs\trunkjet\{bin,app}%ProgramFiles%\trunkjet\{bin,app} (writable only by administrators and SYSTEM)
PATH...\trunkjet\bin appended to your user PATHappended to the system PATH
Start menutrunkjet, your Start menutrunkjet, every user's Start menu

Add /qn for a silent install (/l*v install.log for a log). New terminals see the PATH change; tjet --version prints the version and the source commit.

What it writes, and what not. Program files, the shortcut, the PATH entry and one bookkeeping value under Software\trunkjet\Installer (HKCU per user, HKLM per machine). No service, no autostart, nothing in any workspace or in %LOCALAPPDATA%\trunkjet (the daemon's state, local checkpoints, pending uploads). The daemon starts on demand when you first run tjet or open the app, as your user. To start it at every login, run tjet daemon install from a normal (not elevated) terminal: it registers a per-user scheduled task (see "Starting the daemon at login" in user-config.md), as on macOS the installer itself registers nothing.

WebView2. The desktop app needs the Microsoft Edge WebView2 Runtime (Evergreen), which Windows 11 and current Windows 10 include. The package checks for it (machine-wide or per user) and, without it, installs the command line only and leaves the desktop app out: install the runtime from Microsoft (https://developer.microsoft.com/microsoft-edge/webview2/) and run the package again. The package does not carry or download Microsoft's bootstrapper (it is not version-pinned, so not a reproducible input).

Upgrade. Install the newer package over the old one (same per-user/per-machine choice). It replaces the program files in one transaction: it first stops your workspace daemon gracefully (tjet daemon stop: in-flight operations finish or stop at a safe boundary, at most 180 s), so no file is in use and no restart is needed. Workspaces and %LOCALAPPDATA%\trunkjet are not in the package and are never touched. An older package refuses to install over a newer one.

Uninstall. Settings > Apps > trunkjet > Uninstall, or msiexec /x trunkjet-<version>-windows-x64.msi (/qn silent; ALLUSERS=1 for a per-machine install). It stops your daemon gracefully first; if that fails, the uninstall stops and removes nothing (add TJET_FORCE_UNINSTALL=1 to go on regardless). It removes only the program files, the shortcut, its PATH entry and its bookkeeping value. It never deletes user data: no workspace, nothing in %LOCALAPPDATA%\trunkjet or %APPDATA%. Run tjet daemon uninstall first if you registered the login start (the uninstaller does not remove your scheduled task); other users' daemons of a per-machine install keep running until they log off. The desktop app's per-user sandbox profile for the preview helper (NativeSCM.Preview) also stays. To remove your data as well, run tjet status in each workspace, make sure nothing is unsynchronized, then delete the folders yourself.

Building it (make package-windows, tools/release/package_windows.py): Bazel cross-builds tjet.exe, tjet-agent.exe and the desktop app (tjet-desktop.exe with its page bundle, tjet-preview.exe, WebView2Loader.dll) here (--config=windows --config=release, stamped with the commit); on the Windows host (TJET_WIN11_SSH, the clone at HEAD) nothing is compiled: the package is built with the WiX Toolset v4 (4.0.6, a pinned dotnet tool; .NET SDK 8.0.428, SHA-512 pinned), from tools/release/windows/trunkjet.wxs. The same run verifies it (SCM-PKG-CHECK lines): silent install, versions, PATH, shortcut, the daemon and the app in the interactive session, upgrade in place, uninstall keeping user data, and the per-machine leg. Without a Windows host the target is BLOCKED. The inputs are pinned; the .msi is not bit-identical between builds (cabinet and summary timestamps). COMPONENTS=cli leaves the desktop app out.

Signing (Windows, owner)

tools/release/windows_msi.ps1 has an Authenticode stage that is skipped with the line SCM-WIN-SIGN: SKIPPED: unsigned build until all three variables below are set for the build user on the Windows build host (a partial set is refused: a release is fully signed or not at all). When set, it signs every .exe and .dll before packaging and then the .msi, with SHA-256 and an RFC 3161 timestamp, and verifies each signature (signtool verify /pa). The owner provides:

  1. A code-signing certificate issued to the publishing organisation by a public CA (OV, or EV for immediate SmartScreen reputation). Since 2023 its private key must live in hardware: a USB token or HSM with its CSP/KSP driver on the build host, or a cloud signing service that plugs into signtool (for example Azure Trusted Signing's dlib; then extend the stage's signtool arguments accordingly).
  2. signtool.exe from the Windows SDK ("Windows SDK Signing Tools for Desktop Apps") on the build host: TJET_WIN_SIGNTOOL=<path to signtool.exe>.
  3. The certificate in the build user's certificate store (Cert:\CurrentUser\My, as the token driver registers it): TJET_WIN_SIGN_THUMBPRINT=<its SHA-1 thumbprint>.
  4. The CA's RFC 3161 timestamp URL (for example http://timestamp.digicert.com or the one your CA names): TJET_WIN_SIGN_TIMESTAMP_URL=<url>, so signatures stay valid after the certificate expires.

Pass them to the host run with TJET_REMOTE_ENV="TJET_WIN_SIGNTOOL=...;TJET_WIN_SIGN_THUMBPRINT=...;TJET_WIN_SIGN_TIMESTAMP_URL=..." (no secret is in these values; the key never leaves the token). The signed path has not run yet: no certificate exists.

Start the helper at every login (optional)

tjet daemon install       # start tjet-agent at every login of your account
tjet daemon autostart     # show what is registered
tjet daemon uninstall     # stop it and remove the registration

Nothing is registered unless you run this (or turn it on in the desktop app). See User configuration for what each platform registers.

Shell completion

tjet completions bash > ~/.local/share/bash-completion/completions/tjet

tjet completions zsh, fish and the other shells work the same way.

Check that everything works

tjet --version
tjet doctor --server https://scm.example.com

tjet doctor checks the connection, your sign-in and the workspace you are in, and says what to fix.