
Security News
White House Authorizes Private Companies to Conduct Offensive Cyber Operations
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.
@codetoimage/cli
Advanced tools
Official CLI for codetoimage.app — render HTML/CSS to PNG/JPG/WebP from your terminal.
Official CLI for codetoimage.app — render HTML/CSS to PNG/JPG/WebP from your terminal.
npm install -g @codetoimage/cli
Or run without installing:
npx @codetoimage/cli render index.html -o out.png
# 1. Authenticate (paste an API key from https://codetoimage.app/dashboard/keys)
cti login
# 2. Render an HTML file
cti render hello.html -o hello.png
# 3. Or render inline HTML
cti render --html '<h1 style="font-family:sans-serif">Hi</h1>' -o hi.png
# JPEG at 1200×630, custom background
cti render og.html -f jpeg --quality 90 -w 1200 -h 630 --background "#0a0a0a"
# Separate CSS file
cti render card.html --css card.css -o card.png
# Transparent PNG (paid plans only)
cti render badge.html --transparent -o badge.png
# Get a temporary URL instead of bytes (output:"url" mode — needs R2 backing)
cti render og.html --url
# → https://render.codetoimage.app/r/abc123.png
Three ways to supply your API key, in priority order:
--api-key <key> flag (per-call)CODETOIMAGE_API_KEY environment variable~/.config/codetoimage/config.json (created by cti login, chmod 600)| Variable | Default | Purpose |
|---|---|---|
CODETOIMAGE_API_KEY | – | API key (overrides stored config) |
CODETOIMAGE_API_URL | https://api.codetoimage.app | API base URL (override for dev/proxy) |
0 — success1 — error (auth, validation, network, plan limit, …); details on stderrcti login Save an API key locally
cti render [input] Render HTML to image
cti --version Print CLI version
cti --help Show help
Run cti render --help for the full flag list.
MIT
FAQs
Official CLI for codetoimage.app — render HTML/CSS to PNG/JPG/WebP from your terminal.
The npm package @codetoimage/cli receives a total of 6 weekly downloads. As such, @codetoimage/cli popularity was classified as not popular.
We found that @codetoimage/cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.

Research
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.