{"id":35006328,"url":"https://github.com/cjroth/ink-web","last_synced_at":"2026-02-28T08:52:31.503Z","repository":{"id":324834247,"uuid":"1098711738","full_name":"cjroth/ink-web","owner":"cjroth","description":"CLIs in the browser \u0026 terminal.","archived":false,"fork":false,"pushed_at":"2026-02-26T05:04:31.000Z","size":3059,"stargazers_count":15,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-26T08:11:13.791Z","etag":null,"topics":["cli","cli-app","ink","react","react-reconciler","terminal","tui","tui-app","yoga"],"latest_commit_sha":null,"homepage":"https://ink-web.dev","language":"TypeScript","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/cjroth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2025-11-18T03:36:10.000Z","updated_at":"2026-02-26T05:04:34.000Z","dependencies_parsed_at":"2026-02-26T06:12:14.407Z","dependency_job_id":null,"html_url":"https://github.com/cjroth/ink-web","commit_stats":null,"previous_names":["cjroth/ink-web"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/cjroth/ink-web","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjroth%2Fink-web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjroth%2Fink-web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjroth%2Fink-web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjroth%2Fink-web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cjroth","download_url":"https://codeload.github.com/cjroth/ink-web/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjroth%2Fink-web/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29929100,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T19:37:42.220Z","status":"online","status_checked_at":"2026-02-28T02:00:07.010Z","response_time":90,"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":["cli","cli-app","ink","react","react-reconciler","terminal","tui","tui-app","yoga"],"created_at":"2025-12-27T04:39:34.500Z","updated_at":"2026-02-28T08:52:31.496Z","avatar_url":"https://github.com/cjroth.png","language":"TypeScript","funding_links":[],"categories":["Table of Contents"],"sub_categories":[],"readme":"# Ink Web\n\nBuild interactive terminal UIs with [Ink](https://github.com/vadimdemedes/ink) and React that run in the browser and the terminal.\n\n**[Documentation](https://ink-web.dev)**\n\n## Packages\n\nThis monorepo contains two packages:\n\n### `ink-web` (npm)\n\nA drop-in browser runtime for Ink. It renders Ink components into an xterm.js terminal in the browser.\n\n```bash\nnpm install ink-web\n```\n\nYour components import from `ink` as normal — a bundler alias redirects to `ink-web` at build time:\n\n```tsx\nimport { Box, Text } from \"ink\";\nimport { InkXterm } from \"ink-web\";\nimport \"ink-web/css\";\n\nexport default function App() {\n  return (\n    \u003cInkXterm focus\u003e\n      \u003cBox flexDirection=\"column\"\u003e\n        \u003cText bold color=\"green\"\u003eHello from the browser!\u003c/Text\u003e\n      \u003c/Box\u003e\n    \u003c/InkXterm\u003e\n  );\n}\n```\n\nConfigure the alias in your bundler:\n\n```js\n// next.config.mjs (Turbopack)\n{ turbopack: { resolveAlias: { ink: \"ink-web\" } } }\n\n// vite.config.ts\n{ resolve: { alias: { ink: \"ink-web\" } } }\n```\n\nExports: `ink-web`, `ink-web/css`, `ink-web/core`, `ink-web/next`, `ink-web/vite`, `ink-web/utils`\n\n### `ink-ui` (shadcn registry)\n\nA collection of terminal UI components installable via the [shadcn CLI](https://ui.shadcn.com/docs/cli). Components are served from raw GitHub URLs — there is no npm package.\n\n```bash\nnpx shadcn@latest add https://raw.githubusercontent.com/cjroth/ink-web/main/packages/ink-ui/registry/table.json\n```\n\nThis copies the component source into your `components/ui/` folder. Available components:\n\n| Component | Description |\n|-----------|-------------|\n| `ascii` | Render text as ASCII art using figlet fonts |\n| `gradient` | Apply color gradients to terminal text |\n| `link` | Clickable terminal hyperlinks |\n| `multi-select` | Multi-select input with keyboard navigation |\n| `select-input` | Single-select input with keyboard navigation |\n| `spinner` | Animated loading spinner |\n| `status-bar` | Keybinding hints bar with inverse-bold key badges |\n| `tab-bar` | Horizontal tab bar with inverse highlight |\n| `table` | Table with rounded borders, alignment, per-cell styling, and footer rows |\n| `text-input` | Text input with cursor, placeholder, and history |\n\n## Development\n\n```bash\n# Install dependencies\nbun install\n\n# Run ink-web tests\ncd packages/ink-web \u0026\u0026 bun test\n\n# Run ink-ui tests\ncd packages/ink-ui \u0026\u0026 bun test\n\n# Rebuild the shadcn registry (after changing ink-ui components)\ncd packages/ink-ui \u0026\u0026 bun run build\n\n# Run the docs site\ncd packages/ink-web \u0026\u0026 bun run docs\n```\n\n### Project structure\n\n```\npackages/\n  ink-web/          # npm package — browser runtime for Ink\n    src/            # InkXterm, shims, vite plugin, Next.js helpers\n    docs/           # Documentation site (ink-web.dev)\n      components/\n        ui/         # Copies of ink-ui components used by the docs site\n        demos/      # Live demo components embedded in doc pages\n  ink-ui/           # shadcn registry — terminal UI components\n    components/     # Component source (one directory per component)\n    registry/       # Generated registry JSON + source copies (via bun run build)\n    scripts/        # Build script for generating registry files\n```\n\n### Adding/updating ink-ui components\n\n1. Edit the component in `packages/ink-ui/components/\u003cname\u003e/\u003cname\u003e.tsx`\n2. Run `bun run build` in `packages/ink-ui` to regenerate the registry\n3. Copy the updated source to `docs/components/ui/\u003cname\u003e.tsx` so the docs site stays in sync\n\n## License\n\n[MIT](https://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcjroth%2Fink-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcjroth%2Fink-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcjroth%2Fink-web/lists"}