DuckDB Terminal - v0.2.0
    Preparing search index...

    Interface TerminalConfig

    Configuration options for creating a DuckDB terminal.

    const config: TerminalConfig = {
    container: '#terminal',
    };
    const config: TerminalConfig = {
    container: document.getElementById('terminal'),
    fontFamily: 'JetBrains Mono',
    fontSize: 16,
    theme: 'dark',
    storage: 'opfs',
    databasePath: '/mydata.duckdb',
    welcomeMessage: true,
    prompt: 'SQL> ',
    continuationPrompt: '... ',
    linkDetection: true,
    };
    interface TerminalConfig {
        container: string | HTMLElement;
        continuationPrompt?: string;
        databasePath?: string;
        fontFamily?: string;
        fontSize?: number;
        linkDetection?: boolean;
        prompt?: string;
        scrollback?: number;
        storage?: "memory" | "opfs";
        theme?: Theme | "dark" | "light";
        welcomeMessage?: boolean;
    }
    Index

    Properties

    container: string | HTMLElement

    The container element or CSS selector where the terminal will be mounted. Can be an HTMLElement or a CSS selector string (e.g., '#terminal', '.container').

    continuationPrompt?: string

    The continuation prompt displayed for multi-line SQL statements.

    '  > '
    
    databasePath?: string

    The database file path when using OPFS storage. Only used when storage is 'opfs'.

    fontFamily?: string

    Font family for the terminal text.

    '"Fira Code", "Cascadia Code", "JetBrains Mono", Consolas, monospace'
    
    fontSize?: number

    Font size in pixels.

    14
    
    linkDetection?: boolean

    Whether to automatically detect and make URLs clickable in output.

    true
    
    prompt?: string

    The primary prompt string displayed before each command.

    '🦆 '
    
    scrollback?: number

    Scrollback buffer size in bytes. Larger values allow more history but use more memory.

    10485760 (10MB)
    
    storage?: "memory" | "opfs"

    The storage backend for the database.

    • 'memory': In-memory storage (data lost on page refresh)
    • 'opfs': Origin Private File System (persistent storage)
    'memory'
    
    theme?: Theme | "dark" | "light"

    The color theme for the terminal. Can be 'dark', 'light', or a custom Theme object.

    'dark'
    
    welcomeMessage?: boolean

    Whether to display the welcome message on startup.

    true