Skip to content

TakoA structured framework for terminal applications.

Build rich, scalable TUIs in Go. UI library agnostic. Extensible by design.

Tako Logo
Go 1.26+
Minimum Go version
MIT
Open-source license
100%
UI library agnostic
6 deps
Minimal external dependencies

Everything you need to build great TUIs

A complete framework with the abstractions that make terminal application development a joy.

Bring Your Own UI

Tako doesn't dictate your renderer. Use Bubble Tea, tview, tcell, or termbox. We handle the infrastructure, you choose the canvas.

main.go
app.Register(tview.NewRenderer())
// or Bubble Tea, termbox, tcell

Layered Architecture

Say goodbye to messy global states. Organize your TUI into clean, decoupled layers, components, and services for maximum maintainability.

Extensible Ecosystem

Build modular extensions. Distribute and integrate independent plugins seamlessly without altering the core framework logic.

Inversion of Control

Replace tightly-coupled code with our built-in Service Container. Easily resolve loggers, config, and events via clean interfaces.

Smart Routing

Our Key Router guarantees keystrokes only reach active elements.

UI Abstractions

Quickly implement modals, overlays, and complex navigations using built-in high-level patterns like OverlayManager and DialogService.

DialogService.Show()

Get Started in Minutes

Initialize your app, register your dependencies, and let the framework handle the rest.
1
Install TakoPull the module into your Go project.
_
2
Choose your UI library Implement contracts.UIRenderer with any library you like — tview, tcell, Bubble Tea, or a raw terminal renderer. Register it once via the service container and Tako handles the rest.
3
Build your app Bind keys, register services, add plugins — then call tako.Run(app).
go
package main

import (
    "log"

    "github.com/takoterm/tako"
    "github.com/takoterm/tako/contracts"
    "github.com/takoterm/tako/pkg/adapter/bubbletea"
)

func main() {
    app := tako.NewApp()

    app.Keys().Bind("ctrl+c", func() {
        app.Shutdown()
    })

    // Use the official Bubble Tea adapter — the most popular
    // Go TUI library is supported out of the box.
    app.Container().Singleton(
        new(contracts.UIRenderer),
        bubbletea.NewAdapter(app.Context(), app.EventBus(), app.Router(), &myLayout{}),
    )

    if err := tako.Run(app); err != nil {
        log.Fatalf("tako: %v", err)
    }
}
go
package main

import (
    "log"

    "github.com/takoterm/tako"
    "github.com/takoterm/tako/contracts"
)

// MyAdapter wraps any terminal library (tview, tcell, termbox…)
type MyAdapter struct{}

func (a *MyAdapter) Render() error {
    // Hand control to your UI library. Must block until exit.
    return nil // e.g. return myApp.Run()
}

func (a *MyAdapter) Stop() error {
    // Release the terminal on shutdown.
    return nil
}

func main() {
    app := tako.NewApp()

    app.Keys().Bind("ctrl+c", func() {
        app.Shutdown()
    })

    // Register your own UIRenderer — any library, any renderer.
    app.Container().Singleton(new(contracts.UIRenderer), &MyAdapter{})

    if err := tako.Run(app); err != nil {
        log.Fatalf("tako: %v", err)
    }
}
Built for scale

Architecture that grows with you

Building terminal applications that scale is notoriously difficult. Tako introduces web-like architecture concepts to the terminal.

Layered Rendering

Treat your TUI like a modern web app. Use overlays, dialogs, and absolute positioning without managing complex array states.

Event-Driven

Decouple your components using the powerful built-in Event Bus. Broadcast actions across your entire application effortlessly.

Developer Tooling

Debug visually. Tako includes a built-in Inspector and Profiler to monitor container bindings, events, and performance in real-time.

Architecture matters

Structure over chaos

Most TUI libraries give you widgets. Tako gives you architecture. Here's what that means in practice.
Raw TUI library
With Tako
State management
Giant global struct or scattered package-level vars
IoC Service Container — resolve by interface, no globals
Key routing
Giant switch-case on every keypress, no context awareness
Zone-aware Key Router — keys only fire in the active focus context
Overlays & modals
Manual stack push, focus shift, render flag, teardown logic
ctx.Overlay().Show("name", renderFn) — one elegant call
Plugin integrations
Hard imports, tight coupling, rewrite to add features
Decoupled plugins via Event Bus + Hook Registry
UI library choice
Locked in — refactoring means rewriting the whole app
contracts.UIRenderer — swap tview, tcell, Bubble Tea any time
DevTools
fmt.Println debugging, manual log tailing
Built-in Inspector TUI with live FPS, events & hook timings
UI Agnostic by Design

Bring any renderer.Tako doesn't care.

The contracts.UIRenderer interface is the only surface the framework ever calls. Swap your library at any time — your plugins, event bus, key router, storage, and devtools keep working.

Bubble Tea is the most popular Go TUI library, so Tako ships an official Bubble Tea adapter (pkg/adapter/bubbletea) and also uses it internally for its Inspector and log viewer commands — but this is a private detail in internal/ui. Your app is never affected.

Works with
tviewtcellBubble Teatermboxyour own
…or a raw escape-code renderer

Ready to build better TUIs?

Join the open-source community and start building robust, modular terminal applications today.