The web framework for Go

Build modern web apps
with the power of GOX

Build pages and actions in Go. Return data, HTML or components. Your favorite framework, when you need it.

FROM TERMINAL TO BROWSER

Your first page starts here.

Install GOX, create a project, and bring it to life.

01Install GOX

Go 1.26+ · Linux, macOS or WSL

go install github.com/gox-lang/server/cmd/gox@latest
If gox is not on your PATH

Go installs gox in GOBIN, or in $(go env GOPATH)/bin when GOBIN is unset. The commands below install it in ~/.local/bin and persist PATH for Bash/Zsh.

gox_bin="$(go env GOBIN)"
gox_bin="${gox_bin:-$(go env GOPATH)/bin}"
mkdir -p "$HOME/.local/bin"
if [ "$gox_bin" != "$HOME/.local/bin" ]; then
    install -m 755 "$gox_bin/gox" "$HOME/.local/bin/gox"
fi
gox_path_line='export PATH="$HOME/.local/bin:$PATH"'
for gox_profile in "$HOME/.profile" "$HOME/.bashrc" \
    "${ZDOTDIR:-$HOME}/.zshrc" "${ZDOTDIR:-$HOME}/.zprofile"; do
    touch "$gox_profile"
    grep -Fqx "$gox_path_line" "$gox_profile" ||
        printf '\n%s\n' "$gox_path_line" >> "$gox_profile"
done
for gox_profile in "$HOME/.bash_profile" "$HOME/.bash_login"; do
    if [ -f "$gox_profile" ]; then
        grep -Fqx "$gox_path_line" "$gox_profile" ||
            printf '\n%s\n' "$gox_path_line" >> "$gox_profile"
    fi
done
export PATH="$HOME/.local/bin:$PATH"

Open a new terminal and run gox version to verify the persistent installation.

02Check your version

gox version
↳GOX Server v0.1.3Example output

03Create. Run. Build.

gox createproject my-project
cd my-project
gox run
Your new project
localhost:3000

Hello Gox

A page rendered by Go. Ready for your next idea.

Explore all the installation options and choose the one that fits your workflow.

All installation options →
GOX CAPABILITIES

A simple start. Room to build more.

From your first page to an interactive application.

From an idea to your next project.

Explore the guides, concepts and examples in the GOX documentation.

Read the documentation
CLIENT FRAMEWORKS

Your favorite framework. Still your choice.

Go on the server. The tools you love in the browser.

1. Add the framework

my-project/Project root
gox client add react

2. Declare your component


client Profile react {
    src: "components/Profile.jsx"
}

3. Use it in a template


<@Profile name="George" hydrate="load" />
Explore the React integration docs
components/Profile.jsx

import { useState } from "react"

export default function Profile({ name }) {
    const [following, setFollowing] = useState(false)
    const label = following ? "Following" : "Follow"

    return <article className="profile">
        <div className="avatar">G</div>
        <div>
            <h3>{name}</h3>
            <p>Full stack with GOX.</p>
            <button className="profile-follow" type="button"
                aria-pressed={following}
                onClick={() => setFollowing(!following)}>
                {label}
            </button>
        </div>
    </article>
}
Live component
G

George

Full stack with GOX.

GOX TOOLS · VS CODE

It all starts in your editor.

Install GOX and start building without leaving VS Code. Autocompletion, diagnostics and formatting, right where you write.