CodeSnap

Output

CodeSnap CLI output type

CodeSnap CLI can generate multiple output types, including:

  • file - Save the snapshot to a file
    • PNG
    • SVG
    • HTML
  • clipboard - Copy the snapshot to clipboard

Copy to Clipboard

It's really easy to copy the snapshot to clipboard. You can use the --output or -o flag to specify the output type.

codesnap -f <file_path> -o clipboard

Save to File

You can also save the snapshot to a file. You can specify the output file path using the --output or -o flag.

PNG

codesnap -f <file_path> -o content/docs/cli/output.png

SVG

codesnap -f <file_path> -o content/docs/cli/output.svg

HTML

codesnap -f <file_path> -o content/docs/cli/output.html

ASCII art

You can also generate an ASCII art snapshot of your code, just set the --type to ascii:

codesnap -f <file_path> --type ascii -o clipboard
╭────────────────────────────────────────────────────╮
1 import type { MDXComponents } from 'mdx/types';  │
╰────────────────────────────────────────────────────╯

On this page