← Back to tools

carbon-now-cli

Beautiful images of your code from right inside your terminal

Development Media Cloud & Services linuxmacoswindows TypeScript MIT

Description

carbon-now-cli generates beautiful, high-quality images of your source code directly from the terminal using the carbon.now.sh service. It downloads real rendered images (not DOM screenshots) with automatic language detection, support for custom themes and fonts, interactive mode for tweaking settings, and preset saving. You can pipe code from stdin, read from the clipboard, or specify a file with optional line range selection.

Install

npmnpm install -g carbon-now-cli
yarnyarn global add carbon-now-cli
npxnpx carbon-now-cli <file>
pnpmpnpm install -g carbon-now-cli

AI Summary

Generate beautiful code screenshot images from the terminal using carbon.now.sh with custom themes, fonts, and presets.

Capabilities

  • + Generate high-quality code images from source files
  • + Automatic language and file type detection
  • + Interactive mode for customizing theme, font, and appearance
  • + Save and reuse presets for consistent styling
  • + Select specific line ranges with --start and --end flags
  • + Accept input from stdin or clipboard
  • + Custom theme colors and visual effects
  • + Batch processing with configurable concurrency

Use When

  • When you want to create beautiful code screenshots for sharing
  • When preparing code images for presentations, blog posts, or social media
  • When you want consistent code image styling via saved presets

Avoid When

  • x When you need syntax-highlighted code as text rather than an image
  • x When you have no internet connection (requires carbon.now.sh service)
  • x When you need to process very large code files

Usage Patterns

Create a code screenshot from a file

carbon-now main.py

Generates a beautiful image of main.py using carbon.now.sh

Pipe code from clipboard

pbpaste | carbon-now --from-clipboard

Creates a code image from clipboard contents

Select specific lines

carbon-now main.py --start 10 --end 20

Creates an image of only lines 10-20 from the file

Interactive mode

carbon-now main.py --interactive

Opens interactive mode to customize the image appearance

Use a saved preset

carbon-now main.py --preset my-theme

Generates an image using a previously saved preset configuration

Typical Pipelines

pbpaste | carbon-now --from-clipboard
View AGENTS.md for carbon-now-cli