codeshot.dev
v0.3.0
Published
Turn source code into polished PNG screenshots with codeshot.dev
Readme
codeshot.dev CLI
Turn a local source file into a PNG:
npx codeshot.dev render src/app.tsx --theme macos --output screenshot.pngOmit the file to read piped code, and provide its language explicitly:
printf 'const answer = 42' | npx codeshot.dev render --language typescript --output screenshot.pngChoose a theme
Use an included theme by name:
npx codeshot.dev render src/app.tsx --theme technical-plate --output screenshot.pngFor a theme you published with link sharing enabled, pass its share URL or share: reference:
npx codeshot.dev render src/app.tsx --theme https://codeshot.dev/a/SHARE_ID --output screenshot.png
npx codeshot.dev render src/app.tsx --theme share:SHARE_ID --output screenshot.pngBoth forms use the theme's current published version. Pin a version when you need reproducible output:
npx codeshot.dev render src/app.tsx --theme share:SHARE_ID@2 --output screenshot.pngResolve any theme input to the exact reference used for rendering:
npx codeshot.dev theme https://codeshot.dev/a/SHARE_ID
# share:SHARE_ID@2Discover the current public contract:
npx codeshot.dev themes --json
npx codeshot.dev theme macos --json
npx codeshot.dev capabilities --jsonSet CODESHOT_API_URL to override the default API at https://api.codeshot.dev.
