termcast

command
v0.21.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Command termcast is a chromedp example demonstrating how to stream the screen of the browser to the terminal with terminal graphics. It loads the page /animation/ of the local test site, which shows an animated SVG of a harbour at night, and lets the animation play for the time of -d. The package github.com/chromedp/termcast draws the frames of the screencast in the terminal while the page plays. The flag -fps sets the number of frames per second that the stream draws. A terminal that can show Kitty, iTerm2 or Sixel graphics is needed. If the terminal has none, the program stops with an error that says so. The variable TERM_GRAPHICS can force the type of graphics to kitty, iterm or sixel. The stream clears the terminal at each frame, so the program keeps its log lines and its results until the stream stops, and then it prints them. With -v or -visible the program does the same work and prints the same lines, but it does not start the stream, because the protocol messages and the window do not mix with the images. The flag -url gives the full URL of the page to play, and then the program does not start the local site. It starts a local server and needs no internet. Use -v to print the protocol messages and -visible to show the browser window and leave it open.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL