{"id":50461159,"url":"https://github.com/bradsec/ghostty-deb","last_synced_at":"2026-06-01T04:32:11.471Z","repository":{"id":355623009,"uuid":"1226176368","full_name":"bradsec/ghostty-deb","owner":"bradsec","description":"A script for Debian based Linux distributions to build, package, install, and manage the Ghostty terminal emulator","archived":false,"fork":false,"pushed_at":"2026-05-04T13:25:49.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-04T15:30:49.998Z","etag":null,"topics":["debian","debian-linux","ghostty","shell-script","terminal"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bradsec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-01T04:05:18.000Z","updated_at":"2026-05-04T13:25:53.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/bradsec/ghostty-deb","commit_stats":null,"previous_names":["bradsec/ghostty-deb"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/bradsec/ghostty-deb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradsec%2Fghostty-deb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradsec%2Fghostty-deb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradsec%2Fghostty-deb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradsec%2Fghostty-deb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bradsec","download_url":"https://codeload.github.com/bradsec/ghostty-deb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradsec%2Fghostty-deb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33760645,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-01T02:00:06.963Z","response_time":115,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["debian","debian-linux","ghostty","shell-script","terminal"],"created_at":"2026-06-01T04:32:09.788Z","updated_at":"2026-06-01T04:32:11.462Z","avatar_url":"https://github.com/bradsec.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ghostty-deb\n\nA script to build, package, and manage [Ghostty](https://github.com/ghostty-org/ghostty) — a GPU-accelerated terminal emulator — as a Debian `.deb` package on Debian/Ubuntu-based Linux distributions.\n\nThe script handles everything: cloning the Ghostty source, detecting and installing the required Zig compiler, building with release optimisations, packaging as a `.deb`, and optionally registering Ghostty as the system default terminal.\n\n## Requirements\n\n- Debian/Ubuntu-based Linux (amd64 or aarch64)\n- A normal user account with `sudo` privileges — do not run as root\n\n---\n\n## Quick Start (one-liners)\n\nRun any option directly without cloning the repo first.\n\n**Install** — clone, build, package, and install Ghostty:\n```bash\nbash \u003c(curl -fsSL https://raw.githubusercontent.com/bradsec/ghostty-deb/main/ghostty-deb.sh) --install\n```\n\n**Install unattended** — skip all confirmation prompts:\n```bash\nbash \u003c(curl -fsSL https://raw.githubusercontent.com/bradsec/ghostty-deb/main/ghostty-deb.sh) --install --yes\n```\n\n**Update** — pull latest Ghostty, rebuild, and reinstall (skips rebuild if already up to date):\n```bash\nbash \u003c(curl -fsSL https://raw.githubusercontent.com/bradsec/ghostty-deb/main/ghostty-deb.sh) --update\n```\n\n**Check version** — show installed version and latest stable upstream release:\n```bash\nbash \u003c(curl -fsSL https://raw.githubusercontent.com/bradsec/ghostty-deb/main/ghostty-deb.sh) --version\n```\n\n**Make Ghostty the default terminal**:\n```bash\nbash \u003c(curl -fsSL https://raw.githubusercontent.com/bradsec/ghostty-deb/main/ghostty-deb.sh) --make-default\n```\n\n**Restore the original default terminal**:\n```bash\nbash \u003c(curl -fsSL https://raw.githubusercontent.com/bradsec/ghostty-deb/main/ghostty-deb.sh) --restore-default\n```\n\n**Uninstall**:\n```bash\nbash \u003c(curl -fsSL https://raw.githubusercontent.com/bradsec/ghostty-deb/main/ghostty-deb.sh) --uninstall\n```\n\n---\n\n## Local Usage (clone first)\n\n```bash\ngit clone https://github.com/bradsec/ghostty-deb.git\ncd ghostty-deb\nchmod +x ghostty-deb.sh\n./ghostty-deb.sh --install\n```\n\nAll subsequent commands work the same way:\n\n```bash\n./ghostty-deb.sh --update\n./ghostty-deb.sh --version\n./ghostty-deb.sh --make-default\n./ghostty-deb.sh --restore-default\n./ghostty-deb.sh --uninstall\n./ghostty-deb.sh --build-deb\n```\n\nAdd `--yes` (or `-y`) to any command to skip all confirmation prompts:\n\n```bash\n./ghostty-deb.sh --install --yes\n./ghostty-deb.sh --update -y\n```\n\n---\n\n## Options\n\n| Option | Description |\n|---|---|\n| `--install` | Clone Ghostty, install Zig, build `.deb`, install it |\n| `--update` | Pull latest Ghostty, rebuild `.deb`, reinstall (no-op if already up to date) |\n| `--version` | Show installed version and latest stable upstream release |\n| `--build-deb` | Build `.deb` only, do not install |\n| `--make-default` | Register Ghostty as the default `x-terminal-emulator` |\n| `--restore-default` | Restore the previous default terminal |\n| `--uninstall` | Remove Ghostty and restore original terminal |\n| `--yes`, `-y` | Auto-accept all prompts (for unattended/scripted runs) |\n| `--help` | Show usage |\n\nEach option (except `--version`, `--help`, and when `--yes` is set) displays a summary of what it will do and asks for confirmation before proceeding.\n\n---\n\n## What It Does\n\n1. **Installs build dependencies** — GTK4, libadwaita, blueprint-compiler, and related dev libraries via `apt`\n2. **Clones Ghostty** — from `https://github.com/ghostty-org/ghostty` into `~/ghostty-install/ghostty`\n3. **Detects the required Zig version** — checks `build.zig.zon` first, then falls back to `src/build/zig.zig`\n4. **Downloads Zig** — to `/opt/zig/\u003cversion\u003e/` if not already present; supports both old and new tarball naming conventions from ziglang.org\n5. **Builds Ghostty** — using `zig build -Doptimize=ReleaseFast`\n6. **Packages as `.deb`** — staged under `~/ghostty-install/deb-build/` (wiped each build), output to `~/ghostty-install/`\n7. **Installs the package** — via `sudo apt install`\n8. **Prompts to set as default terminal** — after a successful install or update (skipped with `--yes`)\n\nThe built package (`ghostty-deb-local`) installs Ghostty to `/usr/local/bin/ghostty` with runtime dependencies on `libgtk-4-1`, `libadwaita-1-0`, and `libgtk4-layer-shell0`.\n\n---\n\n## Default Terminal Management\n\n`--make-default` registers Ghostty with `update-alternatives` at priority 60 and saves the current default to `~/.config/ghostty-default-terminal` before overwriting it.\n\n`--restore-default` reads that backup file to restore your previous terminal. If no backup exists, it tries common terminals in order: GNOME Terminal, GNOME Console, xterm, Konsole, Xfce Terminal, rxvt. If none are found, it lists the available alternatives and prints the manual restore command.\n\n---\n\n## Version Check\n\n`--version` shows the full output of the installed `ghostty --version` alongside the latest tagged stable release fetched directly from the upstream Git repository. If you built from the `main` branch (tip channel), your version will appear ahead of the latest stable tag — this is expected.\n\n---\n\n## Notes\n\n- Build time depends on your machine. On slower hardware the build can appear to hang for several minutes — particularly during the Zig compilation stage — but it is working. Do not interrupt it.\n- Do not run this script with `sudo`. It calls `sudo` internally only where root access is needed (package installation, `/opt/zig`).\n- Zig is installed to `/opt/zig/` and persists across builds. If Ghostty requires a different Zig version after an `--update`, the new version is downloaded alongside the old one without removing the previous.\n- The build staging directory (`~/ghostty-install/deb-build/`) is wiped at the start of each build; the final `.deb` is written to `~/ghostty-install/`.\n- Ghostty source is cloned once to `~/ghostty-install/ghostty` and reused on subsequent `--update` runs.\n- `--update` compares the local `HEAD` against the upstream tracking branch after fetching; if they match, the rebuild is skipped entirely.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradsec%2Fghostty-deb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbradsec%2Fghostty-deb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradsec%2Fghostty-deb/lists"}