Skip to main content

Prerequisites

Before installing Kosh, ensure you have:

Go 1.23+

Kosh uses Go generics and modern standard library features.

Git

For version control and theme installation.

Install Kosh

Verify Installation

Confirm Kosh is installed correctly:
kosh version
Kosh v1.2.1
Built with Go 1.23
Optimizations: BLAKE3, Generics, Memory Pools, LRU Cache
If you see version information, installation was successful!

Platform-Specific Setup

Install Go via Homebrew

brew install go

Verify Go installation

go version
# Should show: go version go1.23.x darwin/amd64 (or arm64)

Install Kosh

go install github.com/Kush-Singh-26/kosh/cmd/kosh@latest

Add to PATH (if needed)

Add to ~/.zshrc or ~/.bash_profile:
export PATH="$PATH:$(go env GOPATH)/bin"
Then reload your shell:
source ~/.zshrc

Install Go (Ubuntu/Debian)

sudo apt update
sudo apt install golang-go

Install Go (Fedora/RHEL)

sudo dnf install golang

Verify Go installation

go version
# Should show: go version go1.23.x linux/amd64

Install Kosh

go install github.com/Kush-Singh-26/kosh/cmd/kosh@latest

Add to PATH (if needed)

Add to ~/.bashrc or ~/.zshrc:
export PATH="$PATH:$(go env GOPATH)/bin"
Then reload:
source ~/.bashrc

Install Go via winget

winget install GoLang.Go
Or download from go.dev/dl

Verify Go installation

go version
# Should show: go version go1.23.x windows/amd64

Install Kosh

go install github.com/Kush-Singh-26/kosh/cmd/kosh@latest

Add to PATH (usually automatic)

If kosh command not found, add %USERPROFILE%\go\bin to your PATH:
  1. Press Win + X and select System
  2. Click Advanced system settings
  3. Click Environment Variables
  4. Edit Path and add: C:\Users\YourName\go\bin
Restart your terminal after adding to PATH.

Update Kosh

To update to the latest version:
go install github.com/Kush-Singh-26/kosh/cmd/kosh@latest
The @latest flag ensures you get the most recent release.

Uninstall Kosh

To remove Kosh from your system:
# Find the binary location
which kosh

# Remove it
rm $(which kosh)
Or on Windows:
Remove-Item (Get-Command kosh).Path

Command Reference

Once installed, Kosh provides these commands:
CommandDescription
kosh init [name]Initialize a new site
kosh new <title>Create a new blog post
kosh buildBuild the static site
kosh serveStart preview server
kosh serve --devDev mode with live reload
kosh cleanClean output directory
kosh clean --cacheClean cache for full rebuild
kosh cache statsShow cache statistics
kosh versionShow version info
Run any command with --help to see available flags:
kosh build --help

Troubleshooting

Problem: Shell can’t find the kosh binary.Solution: Add $GOPATH/bin to your PATH:
# Check GOPATH
go env GOPATH

# Add to PATH (example for ~/.bashrc)
echo 'export PATH="$PATH:$(go env GOPATH)/bin"' >> ~/.bashrc
source ~/.bashrc
Problem: Kosh requires Go 1.23+Solution: Update Go to the latest version:
# macOS
brew upgrade go

# Linux - download from go.dev
wget https://go.dev/dl/go1.23.linux-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go1.23.linux-amd64.tar.gz

# Windows
winget upgrade GoLang.Go
Problem: Installation fails with permission errors.Solution: Don’t use sudo with go install. Instead, ensure proper ownership:
# Fix GOPATH ownership
sudo chown -R $USER:$USER $(go env GOPATH)

# Then install
go install github.com/Kush-Singh-26/kosh/cmd/kosh@latest

Next Steps

Quick Start Guide

Build your first site in 5 minutes.

Configuration

Learn about kosh.yaml configuration.

Build docs developers (and LLMs) love