Skip to content

rozumak/shiki-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shikicli

A simple CLI app that applies syntax highlighting to a file using shiki. It is packaged as a standalone executable and can be used without Node.js or npm.

Getting Started

To install and use Shikicli, you can download the executable for your platform from the latest release on GitHub. Make sure to give it executable permissions:

# Example for macOS
curl -sLO https://github.com/rozumak/shiki-cli/releases/latest/download/shikicli-macos-x64
chmod +x shikicli-macos-x64
mv shikicli-macos-x64 shikicli

Now you can use it to apply syntax highlighting to a file:

# Highlight a file using default options
./shikicli --input example.js --output example.html --language javascript

# Highlight a file using a specific theme
./shikicli -i example.js -o example.html -l js -t nord

Only the default languages and themes that are bundled with the shiki library can be used.

Usage

shikicli --input [input file path] --output [output file path] --language [input file language] [--theme [shiki theme]]

Options

--input, -i: Required. Path to the input file to highlight.

--output, -o: Required. Path to the output file to write the highlighted code to.

--language, -l: Required. Language of the input file. Supported languages.

--theme, -t: Optional. Shiki theme to use for highlighting. Supported themes. If not specified, the default theme ("dark-plus") is used.

License

This project is licensed under the MIT License.

About

A simple CLI app that applies syntax highlighting to a file using shiki

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published