# carbon-now-cli
> Beautiful images of your code from right inside your terminal

## 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

## When to Use
- 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

## When NOT to Use
- When you need syntax-highlighted code as text rather than an image
- When you have no internet connection (requires carbon.now.sh service)
- 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

## Installation
- **npm**: `npm install -g carbon-now-cli`
- **yarn**: `yarn global add carbon-now-cli`
- **npx**: `npx carbon-now-cli <file>`
- **pnpm**: `pnpm install -g carbon-now-cli`

---
Source: https://littlescripts.sh/tools/carbon-now-cli
