kukicha

package module
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2026 License: MIT Imports: 1 Imported by: 0

README

Kukicha

Brewed from what Go leaves on the table. Kukicha is a strict superset of Go — rename .go to .kuki and it compiles unchanged. Then blend in features that didn't fit Go's minimalist philosophy: pipes, onerr, enums, if-expressions, readable operators. Not sure? kukicha brew gives you standard Go back. The stems dissolve, the tea remains.

kukicha.org | Quick Reference | Tutorials | Stdlib Reference


Go vs Kukicha

// Go — 8 lines of error ceremony
data, err := fetchData()
if err != nil {
    return fmt.Errorf("fetch: %w", err)
}
result, err := parse(data)
if err != nil {
    return fmt.Errorf("parse: %w", err)
}
// Kukicha — same thing, 2 lines
result := fetchData()
    |> parse() onerr return explain "pipeline failed"

Both are valid Kukicha. The Go version compiles as-is. The Kukicha version is what you graduate to.


Quickstart

Requires Go 1.26+ (download) | Pre-built binaries on GitHub Releases

go install github.com/kukichalang/kukicha/cmd/kukicha@v0.1.2
mkdir myapp && cd myapp
kukicha init

Create hello.kuki:

function main()
    name := "World"
    print("Hello, {name}!")
kukicha run hello.kuki
Adopt Gradually
# See what your Go code looks like with Kukicha idioms
kukicha-blend main.go

# Convert Go to Kukicha (preview first, then apply)
kukicha-blend --diff main.go
kukicha-blend --apply main.go

# Convert Kukicha back to Go anytime
kukicha brew main.kuki
Commands
Command What it does
kukicha check file.kuki Validate syntax without compiling
kukicha run file.kuki Compile and run immediately
kukicha build file.kuki Compile to a standalone binary
kukicha brew file.kuki Convert back to standalone Go
kukicha fmt -w file.kuki Format in place
kukicha-blend file.go Suggest Kukicha idioms for Go code

What Kukicha Adds

Go's philosophy is radical simplicity — and that's genuinely powerful. But some proven patterns from Rust, Elixir, Kotlin, and Python didn't fit that vision. Kukicha picks them up.

Feature Go Kukicha
Error handling if err != nil { return err } onerr return
Pipes f(g(h(x))) x |> h() |> g() |> f()
If-expressions 5-line temp var + if/else x := if cond then a else b
Readable operators &&, ||, ! and, or, not
Type syntax []string, map[K]V, *T list of string, map of K to V, reference T
Enums const + iota enum Status with named variants
Lambdas func(x int) int { return x*2 } (x int) => x * 2
String interpolation fmt.Sprintf("hi %s", name) "hi {name}"

All Go syntax is also accepted — Kukicha is a strict superset. Use whichever form you prefer.


Why Not Just Write Go?

  • Zero adoption cost — your existing .go files compile as .kuki unchanged
  • Zero lock-inkukicha brew converts back to standard Go anytime
  • Gradual migration — blend in one feature at a time, leave the rest as Go
  • Security at compile time — catches SQL injection, XSS, SSRF, path traversal, command injection, and open redirects at build time
  • 42+ stdlib packagesfetch, slice, sort, mcp, llm, html, crypto, shell, and many more
  • Ships as Go — single binary, cross-compile, WASM support, full Go ecosystem

Editor Support

  • VS Code: Search kukicha-lang in extensions (repo)
  • Zed: kukichalang/zed-kukicha
  • Other: make install-lsp and point your editor at kukicha-lsp

Documentation


Version: 0.1.2 | License: MIT

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SkillFS embed.FS

SkillFS contains docs/SKILL.md — the concise Kukicha language reference for AI coding agents. Extracted and upserted into AGENTS.md in user projects by `kukicha init`, tied to the same KUKICHA_VERSION stamp as the stdlib.

View Source
var StdlibFS embed.FS

StdlibFS contains the embedded Kukicha standard library source files. This includes all transpiled .go files from stdlib sub-packages. The .kuki source files are not embedded since only the Go code is needed. A go.mod file for the extracted stdlib is generated at extraction time.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
cmd
gengostdlib command
gengostdlib generates internal/semantic/go_stdlib_gen.go by inspecting Go standard library function signatures via go/importer.
gengostdlib generates internal/semantic/go_stdlib_gen.go by inspecting Go standard library function signatures via go/importer.
genstdlibregistry command
genstdlibregistry generates internal/semantic/stdlib_registry_gen.go by scanning all stdlib/*.kuki source files and extracting exported function signatures: return counts, per-position return types, and parameter names.
genstdlibregistry generates internal/semantic/stdlib_registry_gen.go by scanning all stdlib/*.kuki source files and extracting exported function signatures: return counts, per-position return types, and parameter names.
kukicha command
kukicha-blend command
kukicha-lsp command
kukicha-proxy command
kukicha-wasm command
Package main is the WASM entrypoint for the Kukicha playground.
Package main is the WASM entrypoint for the Kukicha playground.
duckdb command
stem-panic command
internal
ast
ir
lsp
version
Package version provides the Kukicha compiler version.
Package version provides the Kukicha compiler version.
stdlib
a2a
cli
ctx
db
env
git
llm
mcp
net
obs

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL