LinuxCommandLibrary

carbon-now

TLDR

Generate image from file

$ carbon-now [file.js]
copy
Interactive mode
$ carbon-now [file.py] --interactive
copy
Save to specific location
$ carbon-now [file.rs] --save-to [~/images]
copy
Save with custom name
$ carbon-now [file.go] --save-as [my-code]
copy
From clipboard
$ carbon-now --from-clipboard
copy
Copy result to clipboard
$ carbon-now [file.ts] --to-clipboard
copy
Use preset
$ carbon-now [file.js] --preset [my-preset]
copy
Specific line range
$ carbon-now [file.py] --start [5] --end [15]
copy

SYNOPSIS

carbon-now file [options]
carbon-now --from-clipboard [options]

DESCRIPTION

carbon-now creates beautiful images of source code from the terminal using Carbon (carbon.now.sh). It downloads high-quality images and automatically detects file types.

PARAMETERS

-i, --interactive

Customize settings before generating
-s, --start line
Starting line of input
-e, --end line
Ending line of input
-p, --preset name
Apply existing preset
--save-to path
Image save location (default: cwd)
--save-as name
Image filename without extension
--from-clipboard
Read input from clipboard
--to-clipboard
Copy image to clipboard
--open-in-browser
Open in browser instead of saving
--config path
Use different config file
--settings json
Override specific settings
--disable-headless
Run browser in headful mode
--engine name
Rendering engine (default: chromium)

CONFIGURATION

Settings stored in ~/.carbon-now.json. Previous settings are reused automatically.

CAVEATS

Requires Node.js and npm. Uses headless browser (Playwright) for rendering. Internet connection required for Carbon service.

SEE ALSO

silicon(1), freeze(1)

Copied to clipboard