Skip to content

πŸ“Έ CodeLumer CLI to batch generate beautiful, high resolution code screenshots from your terminal. Highly customizable.πŸ“Έ Lens Assembler - Dual Camera Effect - Picture in Picture && Code Composer

License

Notifications You must be signed in to change notification settings

plantacerium/CodeLumer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Έ CodeLumer CLI

Batch generate beautiful, high-resolution code screenshots from your terminal.

Bash Powered By License


CodeLumer CLI Demo

πŸš€ About

CodeLumer CLI is a powerful wrapper around the silicon rendering engine, designed to automate the process of creating code-style screenshots.

While browser-based tools are great for one-offs, CodeLumer CLI is built for developers who need speed and automation. It can process entire directories of source code in seconds, applying consistent styling, fonts, and window controls to every image.

⚑ Support

Made with ❀️ and β˜• by the Plantacerium

ko-fi

⭐ Star us on GitHub if the script is useful to You! ⭐

✨ Features

  • πŸ“‚ Batch Processing: Give it a folder, and it automatically finds .py, .rs, .js, .go, and more, converting them all at once.
  • 🎨 Beautiful Defaults: Comes pre-configured with the Dracula theme, drop shadows, and macOS-style window controls.
  • πŸ”  Font Control: Fully supports ligatures (Fira Code, Hack, JetBrains Mono) and custom sizes.
  • πŸ›  Highly Configurable: Toggle line numbers, adjust padding, change background colors, and swap themes on the fly.
  • ⚑ Blazing Fast: Powered by Rust (via silicon), rendering images instantly without launching a browser.

πŸ“¦ Installation

1. Install Dependencies

This script relies on silicon for the rendering engine.

macOS (Homebrew):

brew install silicon

Linux / Windows (via Cargo):

cargo install silicon

2. Install CodeSnap

Clone this repo or download the script directly.

# Download the script
curl -o codelumer.sh [https://raw.githubusercontent.com/plantacerium/CodeLumer/main/codelumer.sh](https://raw.githubusercontent.com/plantacerium/CodeLumer/main/codelumer.sh)

# Make it executable
chmod +x codelumer.sh

# (Optional) Move to global path
sudo mv codelumer.sh /usr/local/bin/codesnap

πŸ’» Usage

Basic Usage

Generate a snapshot of a single file using default settings (Dracula theme, 1920px width context).

sh codelumer.sh --font "Hack; Noto Color Emoji" --size 39 photo-test.sh

Batch Mode (Directory)

Recursively scan a directory and generate snapshots for all supported code files.

sh codelumer.sh --font "Hack; Noto Color Emoji" --size 39 ./phototest

Customization Examples

Change Theme and Font:

./codelumer.sh --theme Nord --font "JetBrains Mono" --size 28 app.rs

Minimalist Style (No Window Controls or Line Numbers):

./codelumer.sh --no-window --no-line-numbers script.js

Custom Output Directory:

./codelumer.sh --output ./assets/blog-images ./src

🎨 Themes & Aesthetics

CodeSnap CLI supports all standard .tmTheme syntax highlighting files.

To list all available themes on your machine:

./codelumer.sh --list-themes

Tip: You can install custom themes (like those from iTerm2-Color-Schemes) by placing .tmTheme files in ~/.config/silicon/themes/.


πŸ‘ Acknowledgments

This tool stands on the shoulders of giants. A huge thank you to:

  • Aloxaf/silicon - The incredibly fast Rust-based image renderer that powers this script.
  • Dracula Theme - The beautiful default color scheme used in our presets.

πŸ“Έ Lens Assembler - Dual Camera Effect - Picture in Picture + Code Composer

A robust Bash script using ImageMagick to automatically overlay a circular avatar onto a code snippet or screenshot, mimicking the modern "dual camera" or "picture-in-picture" recording style for professional content creation.

The script dynamically resizes the avatar relative to the background, applies a perfect circular mask, and adds a transparent shadow for a professional, floating effect.

🌟 Features

  • Dynamic Scaling: The avatar size is calculated as a percentage (default 20%) of the background image width, ensuring the avatar always fits regardless of the input resolution.
  • Perfect Circle Masking: Uses ImageMagick's DstIn composite method for clean, artifact-free circular cropping.
  • Transparent Shadow: Applies a soft drop shadow to the avatar, ensuring it "floats" above the code without any white or black background boxes.
  • Flexible Positioning: Supports placing the avatar in any of the four corners (Top-Left, Top-Right, Bottom-Left, Bottom-Right).
Lens Assembler CLI Demo

πŸ’» Prerequisites

You must have ImageMagick installed on your system.

Installation Commands:

OS Command
macOS (Homebrew) brew install imagemagick
Ubuntu/Debian sudo apt-get install imagemagick
CentOS/RHEL sudo yum install ImageMagick
Fedora sudo dnf install ImageMagick

πŸš€ Installation and Setup

  1. Save the Script: Save the provided Bash code as lens_assembler.sh.
  2. Make it Executable:
    chmod +x lens_assembler.sh

πŸ’‘ Usage

The script requires a background image (-b) and an avatar image (-a).

Basic Execution (Bottom Right Default)

./lens_assembler.sh -b code.png -a face.png -o reaction_shot.png

Advanced Usage with Flags

Flag Description Values Default
-b Required. Path to the background (code snippet) image. [path/to/file] N/A
-a Required. Path to the avatar (face) image. [path/to/file] N/A
-p Position of the avatar in the corner. tl, tr, bl, br br (Bottom Right)
-s Scale of the avatar as a percentage of the background width. 1 to 100 20
-o Output filename. [filename] output.png

Example: Top Left, 15% Scale

./lens_assembler.sh -b code.png -a avatar.png -p tl -s 15 -o presentation_shot.png

πŸ“„ License

This project is licensed under the MIT License - see the [LICENSE]

⚑ Support

Made with ❀️ and β˜• by the Plantacerium

ko-fi

⭐ Star us on GitHub if the script is useful to You! ⭐


About

πŸ“Έ CodeLumer CLI to batch generate beautiful, high resolution code screenshots from your terminal. Highly customizable.πŸ“Έ Lens Assembler - Dual Camera Effect - Picture in Picture && Code Composer

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages