Skip to main content

Prerequisites

Before you begin, make sure you have Bun installed on your system. Bun is a fast all-in-one JavaScript runtime that we use for package management and running scripts.
curl -fsSL https://bun.sh/install | bash

Installation

1

Clone the repository

Clone the Ghostty Config repository from GitHub:
git clone https://github.com/zerebos/ghostty-config.git
cd ghostty-config
2

Install dependencies

Install all required dependencies using Bun:
bun install
This will install all packages defined in package.json, including:
  • Svelte 5 and SvelteKit
  • TypeScript
  • Vite
  • Development tools (ESLint, Prettier, Vitest)
3

Start the development server

Run the development server:
bun run dev
The application will be available at http://localhost:5173 by default. The dev server includes:
  • Hot module replacement (HMR)
  • Automatic page reloads on file changes
  • TypeScript type checking

Available Scripts

The project includes several useful npm scripts defined in package.json:
ScriptCommandDescription
devbun run devStart the Vite development server
buildbun run buildBuild the production-ready static site
previewbun run previewPreview the production build locally
checkbun run checkRun Svelte and TypeScript type checking
check:watchbun run check:watchRun type checking in watch mode
testbun run testRun the test suite with Vitest
lintbun run lintLint the codebase with ESLint
formatbun run formatFormat code with Prettier and fix linting issues

Development Workflow

  1. Start the dev server: Run bun run dev to start developing
  2. Make changes: Edit files in src/ - changes will hot-reload automatically
  3. Check types: Run bun run check to verify TypeScript types
  4. Format code: Run bun run format before committing
  5. Test changes: Run bun run test to ensure tests pass
  6. Build: Run bun run build to create a production build in build/

Troubleshooting

Port already in use

If port 5173 is already in use, Vite will automatically try the next available port. Check the terminal output for the actual URL.

Dependency issues

If you encounter dependency problems, try removing node_modules and reinstalling:
rm -rf node_modules
bun install

Type errors

Run the type checker to see detailed error information:
bun run check

Build docs developers (and LLMs) love