CodeFrame is a powerful tool for converting code files into beautifully styled image snippets. It features CLI support, syntax highlighting, and customizable themes.
- Syntax Highlighting: Supports multiple languages using
highlight.js
. - Customizable Themes: Choose from Monokai, GitHub, and Dracula themes.
- CLI Tool: Easily convert code files from the command line.
- Customization Options: Adjust padding, font size, background, and line numbers.
npm install -g codeframe-snap
npm install codeframe-snap
Use the codeframe
command to convert a code file into an image:
codeframe convert <file> -o <output.png>
codeframe convert example.js -o example.png
-t, --theme <theme>
: Select a theme (monokai
,github
,dracula
). Default ismonokai
.-p, --padding <pixels>
: Set padding (in pixels). Default is32
.-f, --font-size <pixels>
: Set font size (in pixels). Default is14
.--no-line-numbers
: Hide line numbers.--no-background
: Use a transparent background.
Available themes:
- Monokai
- GitHub
- Dracula
- OceanWave
- Duotone
- AyuDark
Run the test suite using:
npm run test
Contributions are welcome! If you have suggestions or find issues, feel free to create an issue or pull request.
This project is licensed under the MIT License.
Rishabh Shetty