Class CLI

CLI tool for generating and visualizing directory tree structures.

Command

treegen

Description

CLI tool for generating and visualizing directory tree structures.

Version

1.0.0

Hierarchy

  • CLI

Constructors

Methods

  • Generate a directory tree structure and output to the console or a file.

    Parameters

    • options: {
          dir?: string;
          encoding?: string;
          ignore?: string[];
          inDirCharacter?: string;
          indent?: string;
          indentCharacter?: string;
          output?: string;
          root?: string;
          structure?: "\n" | ` ${string}>${string}` | `${string}>${string} ` | `${string}>${string} ${string}>${string}`;
          tabs?: string;
          treeCharacter?: string;
          typeMarker?: boolean;
          useInDirCharacter?: boolean;
          useTreeCharacter?: boolean;
      }

      Command options.

      • Optional dir?: string

        Directory path to scan.

      • Optional encoding?: string

        Encoding of file structure (default: 'utf-8').

      • Optional ignore?: string[]

        Patterns to ignore.

      • Optional inDirCharacter?: string

        The character to use for indicating that we are inside a directory (default: '/').

      • Optional indent?: string

        Indentation configuration (e.g., 'spaces' or 'tabs').

      • Optional indentCharacter?: string

        The character to use for indentation (default: '-').

      • Optional output?: string

        Output destination file path.

      • Optional root?: string

        The name of the root directory in the structure (default: 'root'). // *

      • Optional structure?: "\n" | ` ${string}>${string}` | `${string}>${string} ` | `${string}>${string} ${string}>${string}`

        Directory tree structure.

      • Optional tabs?: string

        The number of spaces to represent a single level of indentation (default: 4).

      • Optional treeCharacter?: string

        The character to use for tree representation (default: '|').

      • Optional typeMarker?: boolean

        Include type markers in the structure (default: false).

      • Optional useInDirCharacter?: boolean

        Whether to use the "in-dir-character" for indicating that we are inside a directory (default: false).

      • Optional useTreeCharacter?: boolean

        Whether to use the "tree-character" for tree representation (default: true).

    Returns void

    Command

    generate-tree

    Description

    Generate a directory tree structure and output to the console or a file.

  • Scan a directory and output its structure.

    Parameters

    • options: {
          dir: string;
          ignore: string[];
          root: string;
          typeMarker: boolean;
      }

      Command options.

      • dir: string

        Directory path to scan. (default: "./")

      • ignore: string[]

        Patterns to ignore. (default: [])

      • root: string

        The name of the root directory in the structure. (default: "root")

      • typeMarker: boolean

        Include type markers in the structure. (default: false)

    Returns void

    Command

    scan-dir

    Description

    Scan a directory and output its structure.

  • Validate treegen structure from a file.

    Parameters

    • options: {
          encoding: string;
          file: string;
          root: string;
      }

      Command options.

      • encoding: string

        Encoding of file structure. (default: "utf-8")

      • file: string

        File path to validate structure.

      • root: string

        The name of the root directory in the structure. (default: "root")

    Returns void

    Command

    validate

    Description

    Validate treegen structure from a file.

Generated using TypeDoc