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

    Function createTerminal

    • Creates and initializes a DuckDB terminal instance.

      This is the primary factory function for creating a terminal. It instantiates a new DuckDBTerminal, initializes all components (terminal adapter, database, history), and returns the ready-to-use terminal.

      Parameters

      Returns Promise<DuckDBTerminal>

      A promise that resolves to the initialized terminal instance

      Error if the container element is not found

      Error if DuckDB WASM initialization fails

      const terminal = await createTerminal({
      container: '#my-terminal',
      theme: 'dark',
      });
      const container = document.getElementById('terminal');
      const terminal = await createTerminal({
      container,
      fontSize: 16,
      fontFamily: 'JetBrains Mono',
      theme: 'light',
      });
      const terminal = await createTerminal({
      container: '#terminal',
      theme: {
      name: 'my-theme',
      colors: {
      background: '#1a1b26',
      foreground: '#a9b1d6',
      // ... other colors
      },
      },
      });
      const terminal = await createTerminal({
      container: '#terminal',
      prompt: 'SQL> ',
      continuationPrompt: '... ',
      });