{"id":50567925,"url":"https://github.com/nimblemarkets/go-booba-example","last_synced_at":"2026-06-04T16:01:23.824Z","repository":{"id":352107493,"uuid":"1211865074","full_name":"NimbleMarkets/go-booba-example","owner":"NimbleMarkets","description":"Example of go-booba with GitHub Pages","archived":false,"fork":false,"pushed_at":"2026-04-17T21:50:28.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-17T23:35:55.662Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NimbleMarkets.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-15T20:34:48.000Z","updated_at":"2026-04-17T21:50:32.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/NimbleMarkets/go-booba-example","commit_stats":null,"previous_names":["nimblemarkets/go-booba-example"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/NimbleMarkets/go-booba-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NimbleMarkets%2Fgo-booba-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NimbleMarkets%2Fgo-booba-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NimbleMarkets%2Fgo-booba-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NimbleMarkets%2Fgo-booba-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NimbleMarkets","download_url":"https://codeload.github.com/NimbleMarkets/go-booba-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NimbleMarkets%2Fgo-booba-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33912343,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-04T02:00:06.755Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-04T16:01:21.185Z","updated_at":"2026-06-04T16:01:23.814Z","avatar_url":"https://github.com/NimbleMarkets.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-booba-example\n\n[Link the GitHub Pages Example](https://nimblemarkets.github.io/go-booba-example/)\n\nA complete example of using [go-booba](https://github.com/NimbleMarkets/go-booba) to host a [BubbleTea](https://github.com/charmbracelet/bubbletea) program on GitHub Pages.\n\nThe BubbleTea program compiles to WebAssembly and runs entirely in the browser —\nno backend server needed. No npm dependencies. No shell scripts.\n\n## Quick Start\n\n1. Fork this repo\n2. Enable GitHub Pages: **Settings → Pages → Source → GitHub Actions**\n3. Push to `main` — the workflow builds and deploys automatically\n\n## Local Development\n\nRun the program natively in your terminal:\n\n```sh\ngo run ./cmd/example/\n```\n\nBuild and serve the WASM version:\n\n```sh\n# 1. Compile the program to WASM.\ngo tool booba-wasm-build -o web/app.wasm ./cmd/example/\n\n# 2. Populate web/ with wasm_exec.js, booba/, and ghostty-web/.\ngo tool booba-assets web/\n\n# 3. Serve the web/ directory with any static file server.\nnpx serve web\n```\n\nThen open the URL the server prints (typically http://localhost:3000).\n\n## Serving it over HTTP\n\nThe same BubbleTea program can also be served over HTTP+WebSocket via\ngo-booba's `serve` package, so users can connect from a browser or a native\nterminal without compiling the app to WASM themselves.\n\nBuild and run the server entrypoint:\n\n```sh\ntask build-native-server\n./bin/example-server --listen 127.0.0.1:8080\n```\n\nOpen `http://127.0.0.1:8080/` in a browser to use the built-in terminal UI\n(BoobaTerminal), or connect from a native terminal using the companion\n`booba-sip-client`:\n\n```sh\nbooba-sip-client ws://localhost:8080/ws\n```\n\n`booba-sip-client` ships with go-booba (`cmd/booba-sip-client/`) for headless\nor SSH-tunneled use. Press Ctrl-] then type `quit` to disconnect.\n\n### Taskfile\n\nA [Taskfile](https://taskfile.dev) wraps the commands above. With\n[`task`](https://taskfile.dev/installation/) installed:\n\n```sh\ntask list         # show all tasks\ntask build-native # build bin/example\ntask build-web    # compile WASM + populate web/\ntask serve        # build web assets and serve on :3000\ntask test         # run go test ./...\ntask go-lint      # run golangci-lint\ntask clean        # remove build artifacts\n```\n\n`task` (no args) runs `test` + `build`. `task dev-deps` installs the Go dev\ntools (golangci-lint, errcheck, godoc).\n\nTo run in the terminal or serve via webpage:\n  * `task run`\n  * `task serve`\n\n## How It Works\n\nThe example is a `cmd/example/main.go` that calls `booba.Run(model.InitialModel())`.\n`booba.Run` is platform-polymorphic:\n\n- **Native builds** call `tea.NewProgram(model).Run()` — a normal BubbleTea app.\n- **`GOOS=js GOARCH=wasm` builds** delegate to `wasm.Run`, which installs the\n  JavaScript bridge that booba's browser terminal uses.\n\nNo build tags are required in your code; the split is inside `go-booba` itself.\n\nIn the browser, [ghostty-web](https://github.com/coder/ghostty-web)\nrenders a real terminal emulator in a canvas, and booba's `BoobaWasmAdapter`\nshuttles data between that terminal and your compiled program.\n\nTwo helper commands from `go-booba` handle the rest:\n\n- `booba-wasm-build` — compiles to WASM, working around BubbleTea v2's missing\n  `js/wasm` build tags.\n- `booba-assets` — populates `web/` with `wasm_exec.js`, the booba terminal\n  wrapper, and ghostty-web runtime files.\n\n## Project Structure\n\n```\n├── .github/workflows/pages.yml   # Build WASM + deploy to GitHub Pages\n├── cmd/example/\n│   └── main.go                   # booba.Run entrypoint (native + WASM)\n├── cmd/example-server/\n│   └── main.go                   # HTTP+WebSocket server entrypoint\n├── internal/model/\n│   └── model.go                  # Shared BubbleTea model\n├── web/\n│   └── index.html                # Static page (customize freely)\n└── go.mod\n```\n\nThe following are generated and gitignored: `web/app.wasm`, `web/wasm_exec.js`,\n`web/booba/`, `web/ghostty-web/`.\n\n## Customizing\n\nReplace the model, update, and view functions in `internal/model/model.go` with\nyour own BubbleTea program. The model should handle `tea.WindowSizeMsg` to\nadapt to the browser window size.\n\nCustomize `web/index.html` for your own title, theme, or layout — the\n`booba-assets` tool won't overwrite it unless you pass `--force`.\n\nKeep the `booba.Run(initialModel())` call in `main` as-is — it's what\nmakes the same source build for both native terminals and the browser.\n\n## See Also\n\n- [go-booba](https://github.com/NimbleMarkets/go-booba) — the library\n\n## License\n\nReleased under the [MIT License](https://en.wikipedia.org/wiki/MIT_License), see [LICENSE.txt](./LICENSE.txt).\n\nCopyright (c) 2026 [Neomantra Corp](https://www.neomantra.com).   \n\n----\nMade with :heart: and :fire: by the team behind [Nimble.Markets](https://nimble.markets).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnimblemarkets%2Fgo-booba-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnimblemarkets%2Fgo-booba-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnimblemarkets%2Fgo-booba-example/lists"}