ConsoleToSvg 0.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global ConsoleToSvg --version 0.2.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local ConsoleToSvg --version 0.2.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=ConsoleToSvg&version=0.2.0
                    
nuke :add-package ConsoleToSvg --version 0.2.0
                    

console2svg

Easily convert terminal output into SVG images. truecolor, animation, cropping and many appearance options are supported.

alternate text is missing from this package README image

Of course, this image is automatically generated 😉

Overview

The simplest way to use it is to just put the command you want to run after console2svg. For example, the following command converts the description text of console2svg into SVG (oh, how meta).

console2svg console2svg

alternate text is missing from this package README image


You can also generate SVG with a window frame. and some options to customize the appearance.

console2svg -w 120 -c -d macos-pc -- console2svg

alternate text is missing from this package README image


In video mode, you can capture the animation of the command execution and save it as an SVG.

console2svg -v -c -d macos -- copilot --banner

alternate text is missing from this package README image

Install

NuGet Version GitHub Release

You can install it as a global tool using the dotnet command.

dotnet tool install -g ConsoleToSvg

It is also distributed as a static binary.

# linux
curl -sSL https://github.com/arika0093/console2svg/releases/latest/download/console2svg-linux-x64 -o console2svg
chmod +x console2svg

# macos
curl -sSL https://github.com/arika0093/console2svg/releases/latest/download/console2svg-osx-x64 -o console2svg
chmod +x console2svg

# windows (cmd)
curl -sSL https://github.com/arika0093/console2svg/releases/latest/download/console2svg-win-x64.exe -o console2svg.exe

Usage

Pipe mode

Width and height default to the current terminal dimensions.

my-command | console2svg

PTY command mode

console2svg "git log --oneline"

Or pass the command after --:

console2svg -- dotnet run app.cs

Animated SVG

use -m video or -v to capture the animation of the command execution and save it as an SVG.

console2svg -v -- nyancat

No loop playback:

console2svg -v --no-loop -- nyancat

Static SVG with crop

You can crop the output by specifying the number of pixels or characters to crop from each side.

# ch: character width, px: pixel
console2svg --crop-top 1ch --crop-left 5px --crop-right 30px -- your-command

You can also crop at the position where a specific character appears. When specifying a character, you can specify it like :(number), which crops at a relative position from the detected line.

For example, the following example crops from the line where the character Host is located to 2 lines above the line where the character .NET runtimes installed: is located.

console2svg --crop-top "Host" --crop-bottom ".NET runtimes installed:-2" -- dotnet --info

The result will look like this.

alternate text is missing from this package README image

Background and opacity

You can set the background color or image of the output SVG, and adjust the opacity of the background fill.

console2svg -w 100 -h 10 -c -d macos-pc --background "#003060" --opacity 0.8 -- dotnet --version

alternate text is missing from this package README image

You can also set a gradient background.

console2svg -w 100 -h 10 -c -d macos-pc --background "#004060" "#0080c0" --opacity 0.8 -- dotnet --version

alternate text is missing from this package README image

Image background is also supported.

console2svg -w 100 -h 10 -c -d macos-pc --background image.png --opacity 0.8  -- dotnet --version

alternate text is missing from this package README image

Window chrome

console2svg -d macos-pc -- dotnet --version

available themes:

  • none: no window frame (default)
  • macos: macOS style window frame (default if -d is specified without a value)
  • macos-pc: macOS style window frame with background and shadow
  • windows: Windows style window frame
  • windows-pc: Windows style window frame with background and shadow

Major options

  • -o: Output SVG file path (default: output.svg)
  • -c: Prepend the command line to the output as if typed in a terminal.
  • -w: width of the output SVG (default: terminal width[pipe], 80ch[pty])
  • -h: height of the output SVG (default: terminal height[pipe], auto[pty])
  • -v: output to video mode SVG (animated, looped by default)
  • -d: window chrome style (none, macos, ...)
  • --background: background color or image for the output SVG
  • --verbose: enable verbose logging
  • --crop-*: crop the output by specified pixels, characters, or text patterns
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
0.5.0 0 3/2/2026
0.4.11 0 3/2/2026
0.4.10 0 3/2/2026
0.4.9 0 3/2/2026
0.4.8 0 3/2/2026
0.4.7 0 3/2/2026
0.4.6 29 3/1/2026
0.4.5 25 3/1/2026
0.4.4 26 3/1/2026
0.4.3 34 3/1/2026
0.4.2 34 3/1/2026
0.4.1 39 3/1/2026
0.4.0 41 3/1/2026
0.3.0 42 2/28/2026
0.2.2 41 2/28/2026
0.2.1 50 2/27/2026
0.2.0 42 2/27/2026
0.1.5 43 2/27/2026
0.1.4 46 2/26/2026
0.1.3 40 2/26/2026
Loading failed