retui

module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2026 License: MIT

README

retui

A Go framework for building interactive terminal UIs with React-style components and hooks. Inspired by React and Flutter, Retui brings a component-based, reactive approach to building terminal applications.

Contributing

Contributions are welcome. Please follow these guidelines to keep the codebase consistent.

Getting Started
git clone https://github.com/subhasundardass/retui
cd retui
go mod download
go test ./...
Workflow
  1. Open an issue first for non-trivial changes to align on the approach before writing code.
  2. Branch off main: git checkout -b feat/my-feature
  3. Keep commits focused — one logical change per commit with a clear message.
  4. Add tests for new layout or rendering behaviour in *_test.go files.
  5. Run tests and vet before opening a PR:
    go test ./...
    go vet ./...
    
  6. Open a pull request against main with a description of what changed and why.
Code Style
  • Follow standard Go conventions (gofmt, golint)
  • Keep component functions pure where possible; side effects belong in UseEffect
  • New built-in components go in retui/components/ — simple/display in components.go, interactive in interactive.go, compound in complex.go
  • Avoid adding dependencies; the stdlib + the two existing deps cover most needs
Adding a Component
  1. Write the component function in the appropriate file under retui/components/.
  2. Use plain typed parameters where possible; reserve props.Values for genuinely dynamic data.
  3. Add a runnable demo under examples/<your-feature>/main.go.
  4. Document signature, keyboard contract, and a snippet in DOCS.md under the relevant section.
Reporting Bugs

Open a GitHub issue with:

  • Go version (go version)
  • Terminal emulator and OS
  • Minimal reproduction case
  • What you expected vs. what happened

License

MIT — see LICENSE.md.

Directories

Path Synopsis
cmd
app command
Global focus
Global focus

Jump to

Keyboard shortcuts

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