Nix flake packaging for the upstream T3 Code desktop application, with the upstream t3 CLI exposed as an optional secondary package.
Upstream currently ships a Linux AppImage, macOS desktop archives, and the CLI through npm. This repository packages those artifacts directly in Nix so users can install pinned versions without ad hoc runtime downloads.
The desktop application is the primary output of this flake.
The repository structure and update automation approach are inspired by sadjow/codex-cli-nix.
t3code/t3code-desktop: desktop application packaged from the upstream Linux AppImage or macOS zip archive, depending on platformt3code-cli/t3: optional CLI packaged from the upstream npm tarballdefault: desktop application
Run the desktop application directly:
nix run github:Sawrz/t3code-nixRun the CLI directly:
nix run github:Sawrz/t3code-nix#t3Install the desktop app into your profile:
nix profile install github:Sawrz/t3code-nix#t3codeInstall the CLI into your profile:
nix profile install github:Sawrz/t3code-nix#t3Use as a flake input:
{
inputs.t3code-nix.url = "github:Sawrz/t3code-nix";
outputs = { self, nixpkgs, t3code-nix, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
overlays = [ t3code-nix.overlays.default ];
};
in
{
packages.${system}.default = pkgs.t3code;
};
}Desktop package:
x86_64-linux: fetches the upstream AppImage from GitHub releases and wraps it withappimageTools.wrapType2x86_64-darwinandaarch64-darwin: fetches the matching upstream zip archive and installs the.appbundle into the Nix store with at3codelauncher
CLI package:
- fetches the upstream
t3npm tarball - vendors the locked Node dependency graph in the Nix store
- runs the packaged entrypoint with the packaged Node interpreter
The GitHub Actions update workflow checks upstream releases every six hours.
An update is valid only when all of these exist for the same version:
- a GitHub release in
pingdotgg/t3codewith anx86_64AppImage asset - the matching GitHub release also includes
x64.zipandarm64.zipmacOS desktop assets - a matching npm package version
t3@<version>
When a new version is found, the updater:
- refreshes
package.nixfor the Linux AppImage and macOS desktop archives - refreshes
package-cli.nixfor the CLI package - regenerates
npm/package.json - regenerates
npm/package-lock.json - runs
nix flake check - evaluates the Darwin desktop and CLI derivations
- builds
.#t3code - builds
.#t3code-cli - opens a pull request
Pull requests and pushes are validated separately by CI on:
ubuntu-latestforx86_64-linuxmacos-15foraarch64-darwinmacos-15-intelforx86_64-darwin
Merged updates are released automatically on main by tagging the repository with v<version> and publishing a matching GitHub release.
For the automation to work cleanly, configure these repository settings:
- Actions > General > Workflow permissions:
Read and write permissions - Actions > General > Allow GitHub Actions to create and approve pull requests: enabled
- Pull Requests: auto-merge enabled
- Branches: protect
mainand require the three CI jobs fromCI - Branches: automatically delete head branches enabled
Recommended secret:
GH_TOKEN_FOR_UPDATES: a fine-grained personal access token withContents: Read and writeandPull requests: Read and write
The updater falls back to GITHUB_TOKEN if the secret is absent, but in that mode the bot-created PR will not trigger pull_request CI.
- Desktop support is currently
x86_64-linux,x86_64-darwin, andaarch64-darwin. - The desktop package is built from upstream binary artifacts.
- The CLI package is optional and follows upstream npm publication.
- GitHub Actions is configured to build the flake on
x86_64-linux,x86_64-darwin, andaarch64-darwin.
Update to the latest upstream release:
nix develop -c ./scripts/update.shCheck whether an update is available:
nix develop -c ./scripts/update.sh --checkUpdate to a specific version:
nix develop -c ./scripts/update.sh --version 0.0.4