Skip to content

pxgo/goku

Repository files navigation

Goku

English | 简体中文

An AI-driven static site generator — describe your pages in a config file, and Goku turns them into live HTML at every request.

Goku is an experimental tool that reimagines how websites are built. Instead of writing HTML, CSS, and JavaScript by hand, you describe what each page should look like in a single YAML configuration file using natural language. On every HTTP request, Goku calls an AI model to generate a complete, valid HTML5 page — and streams it directly to the browser. No build step, no deployment pipeline, no caching.


⚠️ AI-Generated Project Notice

This project was written entirely by AI — every line of source code, configuration, and documentation. It runs as described, but it has not been professionally audited, battle-tested, or hardened for production. If you intend to use it in a real-world environment, you should independently review all code and add proper error handling, rate limiting, authentication, and security measures as needed.


How It Works

You write a YAML config ──▶ AI reads your prompt ──▶ HTML is served to the browser
  1. Define your site in config.yaml — describe pages, layout, colors, typography, and content in plain language.
  2. Start the server — Goku runs a lightweight HTTP server written in Go.
  3. Every request is fresh — the AI model generates the page in real time and streams it back. No static files, no stale content.

Quick Start

Prerequisites

  • Go 1.26 or later
  • An API key for an OpenAI-compatible service (e.g., DeepSeek, OpenAI, or any compatible provider)

Installation

git clone https://github.com/pxgo/goku.git
cd goku
go build -o goku .

Configuration

Copy the example config and edit it with your own settings:

cp config.yaml config.local.yaml

A sample configuration file is provided at config.yaml — it contains a fully documented example that will generate a complete product landing page. See config-CN.yaml for the Chinese version.

Key settings:

Field Description
server.port HTTP port to listen on (default: 7880)
server.host Bind address (default: 127.0.0.1)
server.proxyCount Number of trusted reverse proxies (for correct client IP detection)
provider.baseUrl OpenAI-compatible API base URL
provider.apiKey Your API key
provider.model Model name (e.g., deepseek-v4-flash)
prompt Natural language description of your entire website

Running

./goku -c config.local.yaml

Then open http://127.0.0.1:7880 in your browser.


Project Structure

goku/
├── main.go           # Entry point
├── config/
│   └── config.go     # YAML config loading and structs
├── handler/
│   └── handler.go    # HTTP handler — AI streaming logic
├── prompt/
│   └── prompt.go     # System prompt template (includes favicon/logo instructions)
├── config.yaml       # Example configuration (English)
├── config-CN.yaml    # Example configuration (Chinese)
├── go.mod
└── go.sum

Tech Stack

  • Go — backend server
  • OpenAI-compatible API — AI model integration (works with DeepSeek, OpenAI, and others)
  • HTML5 — output format, rendered directly in any modern browser

Roadmap

Current Status

  • Basic LLM integration — real-time HTML generation via OpenAI-compatible API

Planned

  • Agent integration — enable the AI to autonomously manipulate files, scaffold projects, and interact with the filesystem
  • Scale & MCP support — integrate with the Model Context Protocol (MCP) and horizontally scalable architectures

Community

All items above are open for contribution. If something here sparks your interest, feel free to fork the repo, pick a task, and send a PR — welcome!


License

MIT

About

An AI-driven static site generator — describe your pages in a config file, and Goku turns them into live HTML at every request.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages