### Create Image Creator Scaffold Source: https://context7.com/homeport/termshot/llms.txt Initializes a new `Scaffold` instance with default settings for font, size, padding, and window decorations. Use this as a starting point for generating screenshots programmatically. ```go package main import ( "os" "strings" "github.com/homeport/termshot/internal/img" ) func main() { scaffold := img.NewImageCreator() // Add text content (ANSI escape sequences are parsed automatically) if err := scaffold.AddContent(strings.NewReader("\x1b[32mHello, World!\x1b[0m")); err != nil { panic(err) } f, err := os.Create("output.png") if err != nil { panic(err) } defer f.Close() if err := scaffold.WritePNG(f); err != nil { panic(err) } } ``` -------------------------------- ### Install Termshot with Homebrew Source: https://github.com/homeport/termshot/blob/main/README.md Installs termshot using Homebrew on macOS or Linux. ```sh brew install homeport/tap/termshot ``` -------------------------------- ### CLI Flag — `--version` / `-v` Source: https://context7.com/homeport/termshot/llms.txt Prints the installed version of Termshot. ```APIDOC ## CLI Flag — `--version` / `-v` Print the installed version of termshot. ### Usage ```sh $ termshot --version termshot version 0.2.5 ``` ``` -------------------------------- ### Generate Screenshot with Figlet Source: https://github.com/homeport/termshot/blob/main/README.md Example of generating a screenshot with custom text using `lolcat` and `figlet`. ```sh termshot lolcat -f <(figlet -f big termshot) ``` -------------------------------- ### Get Termshot Version Source: https://github.com/homeport/termshot/blob/main/README.md Prints the installed version of termshot using the `--version` or `-v` flag. ```sh termshot --version ``` -------------------------------- ### Build Termshot from Source Source: https://context7.com/homeport/termshot/llms.txt Clone the repository and use Go to build the static binary for Termshot. ```sh git clone https://github.com/homeport/termshot.git cd termshot go build -o termshot ./cmd/termshot/main.go ``` -------------------------------- ### Go API — `Scaffold.WritePNG(w io.Writer)` Source: https://context7.com/homeport/termshot/llms.txt Renders the scaffold's content into a PNG image and writes it to the provided `io.Writer`. This function composites the window background, optional shadow, decorations, and text glyphs. ```APIDOC ## Go API — `Scaffold.WritePNG(w io.Writer)` Renders the scaffold's accumulated content into a PNG image and writes it to the provided `io.Writer`. Internally composites the window background, optional shadow, optional decorations, and all text glyphs with their ANSI-derived styles. ### Usage ```go import ( "bytes" "os" "strings" "github.com/homeport/termshot/internal/img" ) scaffold := img.NewImageCreator() scaffold.DrawDecorations(false) scaffold.DrawShadow(false) scaffold.SetMargin(0) scaffold.SetPadding(16) scaffold.ClipCanvas(true) _ = scaffold.AddContent(strings.NewReader("minimal screenshot")) var buf bytes.Buffer if err := scaffold.WritePNG(&buf); err != nil { panic(err) } os.WriteFile("minimal.png", buf.Bytes(), 0644) ``` ``` -------------------------------- ### Go API — `img.NewImageCreator()` Source: https://context7.com/homeport/termshot/llms.txt Creates and returns a new `Scaffold` instance with default settings, including font, size, rendering factor, margin, padding, and shadow. ```APIDOC ## Go API — `img.NewImageCreator()` Creates and returns a new `Scaffold` instance with sensible defaults: Hack font at 12pt/144dpi, 2× rendering factor, margin 48, padding 24, shadow enabled, window decorations enabled, and `LightGray` as the default foreground color. ### Usage ```go package main import ( "os" "strings" "github.com/homeport/termshot/internal/img" ) func main() { scaffold := img.NewImageCreator() // Add text content (ANSI escape sequences are parsed automatically) if err := scaffold.AddContent(strings.NewReader("\x1b[32mHello, World!\x1b[0m")); err != nil { panic(err) } f, err := os.Create("output.png") if err != nil { panic(err) } defer f.Close() if err := scaffold.WritePNG(f); err != nil { panic(err) } } ``` ``` -------------------------------- ### Render Scaffold to PNG Source: https://context7.com/homeport/termshot/llms.txt Renders the accumulated content into a PNG image and writes it to an `io.Writer`. Allows customization of decorations, shadows, margins, padding, and canvas clipping for minimal or stylized output. ```go import ( "bytes" "os" "strings" "github.com/homeport/termshot/internal/img" ) scaffold := img.NewImageCreator() scaffold.DrawDecorations(false) scaffold.DrawShadow(false) scaffold.SetMargin(0) scaffold.SetPadding(16) scaffold.ClipCanvas(true) _ = scaffold.AddContent(strings.NewReader("minimal screenshot")) var buf bytes.Buffer if err := scaffold.WritePNG(&buf); err != nil { panic(err) } os.WriteFile("minimal.png", buf.Bytes(), 0644) ``` -------------------------------- ### Go API — `Scaffold.AddCommand(args ...string)` Source: https://context7.com/homeport/termshot/llms.txt Prepends a styled command line header (green `➜` indicator + dimmed command text) to the screenshot content, similar to the `--show-cmd` CLI flag. ```APIDOC ## Go API — `Scaffold.AddCommand(args ...string)` Prepends a styled command line header (green `➜` indicator + dimmed command text) to the screenshot content. Equivalent to the `--show-cmd` CLI flag. ### Usage ```go scaffold := img.NewImageCreator() // Show "➜ ls -a" in the screenshot header if err := scaffold.AddCommand("ls", "-a"); err != nil { panic(err) } // Then add the actual output if err := scaffold.AddContent(strings.NewReader("file1.txt\nfile2.go\n")); err != nil { panic(err) } ``` ``` -------------------------------- ### ptexec.New() / PseudoTerminal Source: https://context7.com/homeport/termshot/llms.txt Provides a fluent builder for running commands inside a pseudo terminal (PTY), ensuring ANSI-colored output. ```APIDOC ## ptexec.New() / PseudoTerminal ### Description The `ptexec` package provides a fluent builder for running commands inside a pseudo terminal (PTY), ensuring that color-aware programs produce ANSI-colored output exactly as they would in an interactive terminal session. ### Method `ptexec.New()`: Initializes a new command builder. ### Builder Methods - `Cols(cols int)`: Sets the number of columns for the pseudo-terminal. - `Command(name string, args ...string)`: Specifies the command to run. - `Run() ([]byte, error)`: Executes the command and returns its raw ANSI output. ### Request Example ```go import "github.com/homeport/termshot/internal/ptexec" // Run a command in a PTY and capture its output output, err := ptexec.New(). Cols(80). Command("ls", "--color=always", "-a"). Run() if err != nil { panic(err) } // output contains the raw ANSI bytes from the command fmt.Println(string(output)) ``` ### Response Example ``` // The output variable will contain the raw ANSI bytes from the command. ``` ``` -------------------------------- ### Prepend Command to Screenshot Source: https://context7.com/homeport/termshot/llms.txt Use the `--show-cmd` or `-c` flag to display the executed command with a `➜` prompt indicator. The indicator can be changed using the `TS_COMMAND_INDICATOR` environment variable. ```sh termshot --show-cmd -- ls -a ``` ```sh # Override the command indicator symbol TS_COMMAND_INDICATOR="$" termshot --show-cmd -- ls -a ``` -------------------------------- ### Basic Screenshot Generation Source: https://context7.com/homeport/termshot/llms.txt Prefix any command with `termshot` to capture its output. For commands with pipes, wrap the command in quotes. ```sh # Capture output of ls -a → saves to ./out.png termshot ls -a ``` ```sh # Capture a command with pipes — wrap in quotes when using pipes termshot -- "ls -1 | grep go" ``` ```sh # Capture a colorful command (lolcat + figlet) termshot lolcat -f <(figlet -f big termshot) ``` -------------------------------- ### Scaffold Configuration Methods Source: https://context7.com/homeport/termshot/llms.txt Methods to configure the visual appearance of the generated scaffold image. These must be called before WritePNG or WriteRaw. ```APIDOC ## Scaffold Configuration Methods ### Description All scaffold configuration methods return `void` and must be called before `WritePNG` or `WriteRaw`. They control the visual appearance of the generated image. ### Methods #### Layout - `SetColumns(columns int)`: Sets the column count for text wrapping. - `SetMargin(margin int)`: Sets the outer margin in pixels. - `SetPadding(padding int)`: Sets the inner padding in pixels. #### Window Chrome - `DrawDecorations(draw bool)`: Toggles the display of window decorations (red/yellow/green buttons). - `DrawShadow(draw bool)`: Toggles the rendering of a drop shadow. - `ClipCanvas(clip bool)`: Determines whether to keep the transparent margin. #### Custom Font Face (Optional) - `SetFontFaceRegular(face font.Face)`: Sets the regular font face. - `SetFontFaceBold(face font.Face)`: Sets the bold font face. - `SetFontFaceItalic(face font.Face)`: Sets the italic font face. - `SetFontFaceBoldItalic(face font.Face)`: Sets the bold italic font face. ### Request Example ```go import ( "github.com/golang/freetype/truetype" "github.com/gonvenience/font" "github.com/homeport/termshot/internal/img" "golang.org/x/image/font" "os" "strings" ) scaffold := img.NewImageCreator() // Layout scaffold.SetColumns(120) // wrap at 120 columns scaffold.SetMargin(32) // 32px outer margin scaffold.SetPadding(16) // 16px inner padding // Window chrome scaffold.DrawDecorations(true) // show red/yellow/green buttons scaffold.DrawShadow(true) // render drop shadow scaffold.ClipCanvas(false) // keep transparent margin // Custom font face (optional) opts := &truetype.Options{Size: 28, DPI: 144} scaffold.SetFontFaceRegular(font.Hack.Regular(opts)) scaffold.SetFontFaceBold(font.Hack.Bold(opts)) scaffold.SetFontFaceItalic(font.Hack.Italic(opts)) scaffold.SetFontFaceBoldItalic(font.Hack.BoldItalic(opts)) _ = scaffold.AddContent(strings.NewReader("configured output")) f, _ := os.Create("configured.png") defer f.Close() _ = scaffold.WritePNG(f) ``` ``` -------------------------------- ### Specify Output Filename Source: https://context7.com/homeport/termshot/llms.txt Use the `--filename` or `-f` flag to specify the output path for the PNG. The `.png` extension is required. The directory must exist. ```sh # Save to a custom filename in the current directory termshot --filename my-screenshot.png -- ls -a ``` ```sh # Save to a subdirectory (must exist) termshot --filename screenshots/demo.png -- ls -a ``` ```sh # Save to an absolute path termshot --filename /tmp/termshot-output.png -- ls -a ``` -------------------------------- ### Basic Screenshot of ls -a Source: https://github.com/homeport/termshot/blob/main/README.md Generates a basic screenshot of the `ls -a` command output. The output file defaults to `out.png` in the current directory. ```sh termshot ls -a ``` -------------------------------- ### Configure Scaffold Appearance and Font Source: https://context7.com/homeport/termshot/llms.txt Configures visual aspects like columns, margins, padding, window chrome, and custom fonts. Must be called before WritePNG or WriteRaw. ```go import ( "github.com/golang/freetype/truetype" "github.com/gonvenience/font" "github.com/homeport/termshot/internal/img" "golang.org/x/image/font" "os" "strings" ) scaffold := img.NewImageCreator() // Layout scaffold.SetColumns(120) // wrap at 120 columns scaffold.SetMargin(32) // 32px outer margin scaffold.SetPadding(16) // 16px inner padding // Window chrome scaffold.DrawDecorations(true) // show red/yellow/green buttons scaffold.DrawShadow(true) // render drop shadow scaffold.ClipCanvas(false) // keep transparent margin // Custom font face (optional) opts := &truetype.Options{Size: 28, DPI: 144} scaffold.SetFontFaceRegular(font.Hack.Regular(opts)) scaffold.SetFontFaceBold(font.Hack.Bold(opts)) scaffold.SetFontFaceItalic(font.Hack.Italic(opts)) scaffold.SetFontFaceBoldItalic(font.Hack.BoldItalic(opts)) _ = scaffold.AddContent(strings.NewReader("configured output")) f, _ := os.Create("configured.png") defer f.Close() _ = scaffold.WritePNG(f) ``` -------------------------------- ### Add Command Header to Scaffold Source: https://context7.com/homeport/termshot/llms.txt Prepends a styled command line header, including a green indicator and dimmed command text, to the screenshot. This is functionally equivalent to the `--show-cmd` CLI flag. Use it to visually associate output with its originating command. ```go scaffold := img.NewImageCreator() // Show "➜ ls -a" in the screenshot header if err := scaffold.AddCommand("ls", "-a"); err != nil { panic(err) } // Then add the actual output if err := scaffold.AddContent(strings.NewReader("file1.txt\nfile2.go\n")); err != nil { panic(err) } ``` -------------------------------- ### Screenshot with Command Displayed Source: https://github.com/homeport/termshot/blob/main/README.md Includes the target command in the generated screenshot using the `--show-cmd` or `-c` flag. ```sh termshot --show-cmd -- "ls -a" ``` -------------------------------- ### CLI Flag — `--clipboard` / `-b` (macOS only) Source: https://context7.com/homeport/termshot/llms.txt Copies the screenshot directly to the system clipboard instead of writing a file. This flag is only available on macOS. ```APIDOC ## CLI Flag — `--clipboard` / `-b` (macOS only) Copy the screenshot directly to the system clipboard instead of writing a file. Available only on macOS where `/usr/bin/osascript` is present. ### Usage ```sh termshot --clipboard -- ls -a # Clipboard output overrides --filename; the file is not written termshot --clipboard --filename ignored.png -- echo "hello" ``` ``` -------------------------------- ### Go API — `Scaffold.AddContent(in io.Reader)` Source: https://context7.com/homeport/termshot/llms.txt Parses text or ANSI-escaped output from an `io.Reader` and appends it to the scaffold's content buffer. Supports automatic line-wrapping if a column limit is set. ```APIDOC ## Go API — `Scaffold.AddContent(in io.Reader)` Parses an `io.Reader` containing plain text or ANSI-escaped output (colors, bold, italic, underline, background colors) and appends it to the scaffold's internal content buffer. Handles automatic line-wrapping when a column limit is set. ### Usage ```go import ( "bytes" "github.com/gonvenience/bunt" "github.com/homeport/termshot/internal/img" ) scaffold := img.NewImageCreator() scaffold.SetColumns(80) // Add content with bunt-formatted ANSI strings var buf bytes.Buffer bunt.Fprintf(&buf, "Red{error:} LightGray{something went wrong}\n") bunt.Fprintf(&buf, "Green{success:} LightGray{build completed}\n") if err := scaffold.AddContent(&buf); err != nil { panic(err) } ``` ``` -------------------------------- ### Run Command in Pseudo-Terminal (PTY) Source: https://context7.com/homeport/termshot/llms.txt Executes a command within a pseudo-terminal, ensuring ANSI color output. Captures raw ANSI bytes. ```go import "github.com/homeport/termshot/internal/ptexec" // Run a command in a PTY and capture its output output, err := ptexec.New(). Cols(80). Command("ls", "--color=always", "-a"). Run() if err != nil { panic(err) } // output contains the raw ANSI bytes from the command fmt.Println(string(output)) ``` -------------------------------- ### Specify Output Filename Source: https://github.com/homeport/termshot/blob/main/README.md Specifies a custom filename and path for the screenshot using the `--filename` or `-f` flag. Relative and absolute paths are supported. ```sh termshot --filename my-image.png -- "ls -a" ``` ```sh termshot --filename screenshots/my-image.png -- "ls -a" ``` ```sh termshot --filename /Desktop/my-image.png -- "ls -a" ``` -------------------------------- ### Edit Output Before Rendering Source: https://context7.com/homeport/termshot/llms.txt Use the `--edit` or `-e` flag to open the captured command output in your default editor (`$EDITOR` or `vi`) before the PNG is generated. This allows for manual redaction or trimming. ```sh # Opens captured output in $EDITOR for manual editing before rendering termshot --edit -- env ``` ```sh # Use a specific editor EDITOR=nano termshot --edit -- cat /etc/hosts ``` -------------------------------- ### Write Raw Scaffold Content to io.Writer Source: https://context7.com/homeport/termshot/llms.txt Writes the scaffold's parsed content back as a raw string, preserving ANSI escape codes. Useful for capturing or inspecting terminal output. ```go import ( "os" "strings" "github.com/homeport/termshot/internal/img" ) scaffold := img.NewImageCreator() _ = scaffold.AddContent(strings.NewReader("\x1b[31mRed text\x1b[0m\n")) // Writes ANSI-encoded text back to stdout if err := scaffold.WriteRaw(os.Stdout); err != nil { panic(err) } // Output: \x1b[38;2;...]Red text\x1b[0m ``` -------------------------------- ### CLI — Interactive Shell / Multiple Commands Source: https://context7.com/homeport/termshot/llms.txt Launches an interactive shell within Termshot. The screenshot is generated upon exiting the shell session, capturing the entire session's output. ```APIDOC ## CLI — Interactive Shell / Multiple Commands For advanced use cases, launch a fully interactive shell inside termshot. The screenshot is generated when the shell session exits, capturing the entire session output. ### Usage ```sh # Launch zsh, run multiple commands, then exit — the full session is captured termshot /bin/zsh # Same with bash termshot /bin/bash ``` ``` -------------------------------- ### CLI Flag — `--raw-write` Source: https://context7.com/homeport/termshot/llms.txt Captures command output and writes it as raw ANSI text to a file or stdout, instead of generating a PNG. The `--filename` flag is ignored when this is used. ```APIDOC ## CLI Flag — `--raw-write` Capture command output and write it as raw ANSI text to a file (or stdout with `-`) instead of generating a PNG. The `--filename` flag has no effect when this is used. Use this to save terminal output for later replay with `--raw-read`. ### Usage ```sh # Save raw ANSI output to a file termshot --raw-write output.ansi -- ls --color=always -a # Pipe raw output to stdout termshot --raw-write - -- ls --color=always -a | cat ``` ``` -------------------------------- ### Screenshot with Pipes Source: https://github.com/homeport/termshot/blob/main/README.md Captures a screenshot of a command involving pipes. Wrap the command in double quotes to ensure correct parsing. ```sh termshot -- "ls -1 | grep go" ``` -------------------------------- ### Launch Interactive Shell Source: https://context7.com/homeport/termshot/llms.txt Launch a fully interactive shell within termshot for advanced use cases. The screenshot captures the entire session output upon exiting the shell. Supports shells like zsh and bash. ```sh # Launch zsh, run multiple commands, then exit — the full session is captured termshot /bin/zsh ``` ```sh # Same with bash termshot /bin/bash ``` -------------------------------- ### Scaffold.WriteRaw(w io.Writer) Source: https://context7.com/homeport/termshot/llms.txt Writes the scaffold's parsed content back as a raw string (preserving ANSI escape codes) to the provided writer. Useful for capturing, inspecting, or relaying terminal output without rendering an image. ```APIDOC ## Scaffold.WriteRaw(w io.Writer) ### Description Writes the scaffold's parsed content back as a raw string (preserving ANSI escape codes) to the provided writer. Useful for capturing, inspecting, or relaying terminal output without rendering an image. ### Method Signature `func (s *Scaffold) WriteRaw(w io.Writer) error` ### Parameters #### Writer - **w** (io.Writer) - The writer to which the raw content will be written. ### Request Example ```go import ( "os" "strings" "github.com/homeport/termshot/internal/img" ) scaffold := img.NewImageCreator() _ = scaffold.AddContent(strings.NewReader("\x1b[31mRed text\x1b[0m\n")) // Writes ANSI-encoded text back to stdout if err := scaffold.WriteRaw(os.Stdout); err != nil { panic(err) } ``` ### Response Example ``` // Output: \x1b[38;2;...]Red text\x1b[0m ``` ``` -------------------------------- ### Copy Screenshot to Clipboard (macOS) Source: https://context7.com/homeport/termshot/llms.txt Use the `--clipboard` or `-b` flag to copy the screenshot directly to the system clipboard. This option is only available on macOS. The `--filename` flag is ignored when `--clipboard` is used. ```sh termshot --clipboard -- ls -a ``` ```sh termshot --clipboard --filename ignored.png -- echo "hello" ``` -------------------------------- ### Force Column Wrapping Source: https://context7.com/homeport/termshot/llms.txt The `--columns` or `-C` flag forces content to wrap at a specified number of columns, ensuring consistent screenshot width. ```sh # Force 80-column wrap termshot --columns 80 -- ls -a ``` ```sh # Force 128-column wrap with custom filename termshot --columns 128 --filename wide.png -- cat README.md ``` -------------------------------- ### Add Content to Scaffold Source: https://context7.com/homeport/termshot/llms.txt Appends plain text or ANSI-escaped output from an `io.Reader` to the scaffold's content buffer. Supports automatic line-wrapping if a column limit is set. Useful for adding command output or formatted text. ```go import ( "bytes" "github.com/gonvenience/bunt" "github.com/homeport/termshot/internal/img" ) scaffold := img.NewImageCreator() scaffold.SetColumns(80) // Add content with bunt-formatted ANSI strings var buf bytes.Buffer bunt.Fprintf(&buf, "Red{error:} LightGray{something went wrong}\n") bunt.Fprintf(&buf, "Green{success:} LightGray{build completed}\n") if err := scaffold.AddContent(&buf); err != nil { panic(err) } ``` -------------------------------- ### Run Interactive Shell with Termshot Source: https://github.com/homeport/termshot/blob/main/README.md Invoke a fully interactive shell to run several commands and capture the entire output. The screenshot is created once the shell is terminated. Note that some ANSI sequences or cursor reset commands may cause issues. ```sh termshot /bin/zsh ``` -------------------------------- ### Read Raw ANSI Input Source: https://context7.com/homeport/termshot/llms.txt The `--raw-read` flag reads raw ANSI input from a file instead of executing a command. This is used to render previously saved raw output as a PNG. Flags like `--show-cmd` and `--edit` are ineffective here. Input can be piped via stdin. ```sh # First save raw output termshot --raw-write output.ansi -- ls --color=always -a ``` ```sh # Later render it as a PNG (no command execution needed) termshot --raw-read output.ansi --filename replay.png ``` ```sh # Read from stdin cat output.ansi | termshot --raw-read - --filename from-stdin.png ``` -------------------------------- ### Omit Window Decorations Source: https://context7.com/homeport/termshot/llms.txt Use the `--no-decoration` flag to remove the red, yellow, and green window control buttons from the screenshot. ```sh termshot --no-decoration -- echo "clean look" ``` ```sh # Combine with no-shadow for a minimal, border-only window termshot --no-decoration --no-shadow --filename minimal.png -- ls ``` -------------------------------- ### Edit Output Before Screenshot Source: https://github.com/homeport/termshot/blob/main/README.md Opens the terminal output in an editor (defined by `$EDITOR` or defaults to `vi`) before generating the screenshot, allowing for removal of sensitive or unwanted content. ```sh termshot --edit -- "ls -a" ``` -------------------------------- ### CLI Flag — `--raw-read` Source: https://context7.com/homeport/termshot/llms.txt Reads raw ANSI input from a previously saved file instead of executing a command. No PTY is spawned, and `--show-cmd` and `--edit` flags have no effect. ```APIDOC ## CLI Flag — `--raw-read` Read raw ANSI input from a previously saved file instead of executing a command. No PTY is spawned. The `--show-cmd` and `--edit` flags have no effect when this is used. ### Usage ```sh # First save raw output termshot --raw-write output.ansi -- ls --color=always -a # Later render it as a PNG (no command execution needed) termshot --raw-read output.ansi --filename replay.png # Read from stdin cat output.ansi | termshot --raw-read - --filename from-stdin.png ``` ``` -------------------------------- ### Set Inner Padding Source: https://context7.com/homeport/termshot/llms.txt Control the space between the window border and text content with the `--padding` or `-p` flag. Accepts a non-negative integer; defaults to 24. ```sh termshot --padding 48 -- ls -a ``` -------------------------------- ### Set Outer Margin Source: https://context7.com/homeport/termshot/llms.txt Adjust the space outside the window border using the `--margin` or `-m` flag. Accepts a non-negative integer; defaults to 48. ```sh # Tight margin termshot --margin 10 -- ls -a ``` ```sh # No margin at all termshot --margin 0 -- ls -a ``` -------------------------------- ### Write Raw ANSI Output Source: https://context7.com/homeport/termshot/llms.txt The `--raw-write` flag captures command output as raw ANSI text to a file or stdout. This is useful for saving terminal output for later replay with `--raw-read`. The `--filename` flag has no effect with this option. ```sh # Save raw ANSI output to a file termshot --raw-write output.ansi -- ls --color=always -a ``` ```sh # Pipe raw output to stdout termshot --raw-write - -- ls --color=always -a | cat ``` -------------------------------- ### Override Command Indicator Environment Variable Source: https://context7.com/homeport/termshot/llms.txt Sets the TS_COMMAND_INDICATOR environment variable to change the prompt indicator used with --show-cmd. ```sh # Use a custom indicator export TS_COMMAND_INDICATOR="$" termshot --show-cmd -- echo "hello" # Use an emoji TS_COMMAND_INDICATOR="🚀" termshot --show-cmd -- ls -a ``` -------------------------------- ### Clip Canvas to Content Source: https://context7.com/homeport/termshot/llms.txt The `--clip-canvas` or `-s` flag removes transparent margin areas, fitting the canvas exactly to the visible content. This is useful for embedding screenshots. ```sh termshot --clip-canvas --filename clipped.png -- ls -a ``` ```sh # Typical doc-generation pattern combining clip, fixed columns, and show-cmd termshot --columns 128 --clip-canvas --show-cmd --filename docs/demo.png -- "ls -1 | grep go" ``` -------------------------------- ### Disable Drop Shadow Source: https://context7.com/homeport/termshot/llms.txt The `--no-shadow` flag disables the blurred drop shadow beneath the terminal window. ```sh termshot --no-shadow -- ls -a ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.