kukicha

package module
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: MIT Imports: 1 Imported by: 0

README

Kukicha

AI-assisted coding.

You describe what you want. AI writes the code. Kukicha lets you read it.

Kukicha is a programming language designed to be read by humans and written by AI agents. It compiles to Go, so your programs run fast and deploy as a single binary with no dependencies.

The Workflow

You describe what you want
        ↓
AI agent writes Kukicha
        ↓
You read and approve it  ← Kukicha makes this step possible
        ↓
kukicha build → single binary
        ↓
Ship it

You don't need to know how to write Kukicha as long as you can read it and spot when something looks wrong.

See the Agent Workflow Tutorial to get started immediately.


Here's What AI-Generated Kukicha Looks Like

See if you can follow it:

import "stdlib/fetch"
import "stdlib/slice"
import "stdlib/sort"
import "stdlib/table"

type Repo
    name string as "name"
    stars int as "stargazers_count"
    language string as "language"

function main()
    repos := fetch.Get("https://api.github.com/users/golang/repos")
        |> fetch.CheckStatus()
        |> fetch.Json(list of Repo) onerr panic "fetch failed: {error}"

    popular := repos
        |> slice.Filter(r => r.stars > 100)
        |> sort.ByKey(r => r.stars)
        |> slice.Reverse()

    t := table.New("Name", "Stars", "Language")
    for repo in popular
        t |> table.AddRow(repo.name, "{repo.stars}", repo.language)
    t |> table.Print()

What just happened: Fetch repos from GitHub, keep the popular ones, sort by stars, print a formatted table. The |> pipe passes results between steps. onerr panic means "if something fails, stop and show this message." Four stdlib packages, zero boilerplate.


Quickstart

Prerequisites

Go 1.26+ is required. If you don't have Go installed, download it here.

Install Kukicha

Option A — Binary download (no Go toolchain needed after install):

Download a pre-built binary from GitHub Releases.

Option B — Install with Go:

go install github.com/duber000/kukicha/cmd/kukicha@v0.0.20
kukicha version
Your First Project
mkdir myapp && cd myapp
kukicha init          # sets up your project and stdlib

Create a file called hello.kuki:

# hello.kuki
function main()
    name := "World"
    print("Hello, {name}!")

Then run it:

kukicha run hello.kuki
Which Command Do I Use?
Command What it does When to use it
kukicha check file.kuki Validates syntax without running anything Before committing — catches errors early
kukicha run file.kuki Compiles and runs immediately While developing and testing
kukicha build file.kuki Compiles to a standalone binary When you're ready to ship
kukicha pack skill.kuki Packages a skill into SKILL.md + binary When building tools for agent pipelines

What Can You Build?

A Tool for Your AI Agent (MCP Server)
import "stdlib/mcp"
import "stdlib/fetch"

function getPrice(symbol string) string
    price := fetch.Get("https://api.example.com/price/{symbol}")
        |> fetch.CheckStatus()
        |> fetch.Text() onerr return "unavailable"
    return "{symbol}: {price}"

# you can use functon or func to define a function
func main()
    server := mcp.NewServer()
    server |> mcp.Tool("get_price", "Get stock price by ticker symbol", getPrice)
    server |> mcp.Serve()

Compile to a single binary and register it with Claude Desktop or any MCP-compatible agent. Add a skill declaration and run kukicha pack to generate a machine-readable manifest alongside the binary — see the Agent Workflow Tutorial.

More examples: Automation scripts, CLI tools, Concurrent health checker, REST API server, Release tooling


Beyond Readability

Kukicha compiles to Go — single binaries, goroutines, strong typing, memory safety, fast cold starts. No runtime dependencies.

But readability alone isn't enough. AI writes nearly half of all committed code, yet 45% of it contains security flaws and AI-generated code introduces 1.7x more issues. In 2026, security debt hit 82% of organizations and AI-generated code introduces 15–18% more security vulnerabilities at enterprise scale.

The Kukicha compiler catches common AI-generated vulnerabilities at build time — SQL injection, XSS, SSRF, path traversal, command injection, and open redirects while telling both you and the AI agent what safe alternative to use instead.


For Developers

If you already know Go or Python, here's how Kukicha compares:

Go Python Kukicha
Reads like English Partially Yes Yes
Classes / OOP required No Common No
Special symbols (&&, __, **) && __, ** No
Compiles to single binary Yes No Yes (via Go)
Built for AI generation + human review No No Yes
Transfers to Go/Python 1:1

Every Kukicha concept maps 1:1 to Go and Python — see the Quick Reference for a full translation table.


Standard Library

41+ packages, pipe-friendly, error-handled with onerr.

Category Packages
Data fetch, files, json, parse, encoding, cast
Logic slice, maps, string, math, sort (custom comparators, ByKey), iterator (lazy iter.Seq pipelines), random
Security crypto (SHA-256, HMAC, secure random), netguard, sandbox
Infrastructure pg, kube, container, shell, net
AI & Agents llm, mcp, a2a, skills
Web http, fetch, validate, template
Config & Ops env, must, cli, semver, obs, retry, ctx, datetime, concurrent
Output table (terminal tables: plain, box, markdown), input (interactive prompts)
Errors & Testing errors, test

See the full Stdlib Reference.


Editor Support

VS Code: Search kukicha-lang in extensions, or download the .vsix from GitHub Releases. See editors/vscode/README.md.

Zed: Open Zed → zed: install dev extension → point to editors/zed/ in this repo.

Other editors: make install-lsp and configure your editor to run kukicha-lsp for .kuki files.

All editors get syntax highlighting, hover, go-to-definition, completions, and diagnostics via the LSP.


Documentation

New to Kukicha?

Build something real:

Go deeper:


Contributing

See Contributing Guide for development setup, tests, and architecture.


Status

Version: 0.0.20 — Ready for testing Go: 1.26.1+ required License: See LICENSE

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-lsp command
duckdb command
internal
ast
ir
lsp
version
Package version provides the Kukicha compiler version.
Package version provides the Kukicha compiler version.
stdlib
a2a
cli
ctx
env
git
llm
mcp
net
obs
pg

Jump to

Keyboard shortcuts

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