carbon-now
Generate beautiful images of source code
TLDR
Generate image from file
SYNOPSIS
carbon-now file [options]
carbon-now --from-clipboard [options]
DESCRIPTION
carbon-now creates beautiful images of source code from the terminal using the Carbon service (carbon.now.sh). It renders code with syntax highlighting, customizable themes, and professional styling suitable for presentations, documentation, and social media.
The tool uses a headless browser (Playwright) to render images through the Carbon web service. It supports reading from files, clipboard, or stdin, and can output to files or clipboard. Interactive mode allows customizing appearance settings before generating the image. Presets save frequently used configurations for consistent styling.
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
~/.carbon-now.json
Saved settings and presets. Previous settings are reused automatically.
CAVEATS
Requires Node.js and npm. Uses headless browser (Playwright) for rendering. Internet connection required for Carbon service.
