A Svelte-host TUI framework for Node.js - Build terminal interfaces with the power of Svelte
FerroFrame brings the declarative, component-based approach of Svelte to terminal user interfaces. Write TUIs using familiar web development patterns while leveraging Svelte's reactivity and compilation optimizations.
# Create a new FerroFrame app
pnpm create ferroframe my-tui-app
cd my-tui-app
pnpm install
pnpm dev
pnpm add @ferroframe/core @ferroframe/components
<!-- App.svelte -->
<script>
import { Box, Text, Input, Button } from '@ferroframe/components';
let name = '';
let submitted = false;
function handleSubmit() {
submitted = true;
}
</script>
<Box direction="column" padding={1}>
<Text bold color="cyan">Welcome to FerroFrame!</Text>
{#if !submitted}
<Box direction="row" gap={1}>
<Text>Name:</Text>
<Input bind:value={name} placeholder="Enter your name" />
</Box>
<Button on:click={handleSubmit} disabled={!name}>
Submit
</Button>
{:else}
<Text color="green">Hello, {name}! 👋</Text>
{/if}
</Box>
// main.js
import { FerroHost } from '@ferroframe/core';
import App from './App.svelte';
const host = new FerroHost();
await host.mount(App);
FerroFrame uses a host-based architecture where:
Box
- Flexbox containerText
- Styled text renderingInput
- Text input fieldButton
- Interactive buttonList
- Selectable listTable
- Data tablesProgress
- Progress barsSpinner
- Loading indicators# Clone the repository
git clone https://github.com/yourusername/ferroframe.git
cd ferroframe
# Install dependencies
pnpm install
# Run tests
pnpm test
# Build packages
pnpm build
# Run examples
cd examples/hello-world
pnpm dev
Check out the examples directory for:
Contributions are welcome! Please read our Contributing Guide for details.
MIT © [Your Name]
Status: 🚧 Under active development - MVP in progress