SVERMINAL

A Terminal and command line interface emulating Svelte component styled with Tailwind CSS.

Sverminal Demo GIF

Getting Started

Integrating Sverminal into an existing Svelte project is pretty straightforward...

Step 1. Installation

Install the latest npm package of Sverminal.

npm install sverminal

Step 2. Import the Sverminal Component

After installation, import the Sverminal component into your Svelte project...

import { Sverminal } from 'sverminal';

Step 3. Define a Command Handling Function

Create a command handling function to manage commands entered in Sverminal...

async function processor(command: string): Promise<void> {
    // Your command processing logic here
}

Step 4. Create the Sverminal Component

Add the Sverminal component to your app...

<Sverminal {processor}/>

Step 5. Update your Tailwind Configuration

Finally, to correctly render the tailwind styles used by the Sverminal component, you must add the install location to your Tailwind configuration like below...

export default {
	content: [
        './src/**/*.{html,js,svelte,ts}', 
        './node_modules/sverminal/**/*.{html,svelte,js,ts}'
    ],
}

Step 6. Explore the Documentation

After integrating Sverminal into your app, explore the Documentation to discover all the powerful features it offers, including writing to the terminal, requesting user input, autocomplete, and much more.