VectoSolve CLI: Convert Images to SVG From the Command Line
Install the VectoSolve CLI to convert images to SVG, remove backgrounds, upscale, and generate logos directly from your terminal. Perfect for batch processing, CI/CD pipelines, and shell scripting.

Founder of VectoSolve
Self-taught developer, founder and sole developer of VectoSolve since 2024. He builds the conversion engine and the cutting, embroidery and 3D printing exports.
How this article was made: drafted with AI assistance, then edited and fact-checked before publication. About the author
Try it on your own file
Free preview, no signup. Drop an image and see the vector before deciding anything.
Why Use a CLI for Image Conversion?
If you've ever needed to convert a batch of PNGs to SVG, strip backgrounds from product photos, or generate logos as part of an automated pipeline, clicking through a web UI isn't going to cut it. That's exactly why we built the VectoSolve CLI — a command-line tool that brings the full power of VectoSolve's AI conversion engine to your terminal.
The CLI is built for developers, designers, and anyone who prefers keyboard over mouse. It's ideal for:
- Batch processing — convert entire folders of images in a single command
- CI/CD pipelines — automate asset conversion as part of your build process
- Shell scripting — chain VectoSolve with other tools using pipes and loops
- Quick one-off conversions — skip the browser entirely
Installation
The VectoSolve CLI is distributed as an npm package. Install it globally to make the vectosolve command available everywhere:
npm install -g vectosolve
If you prefer not to install globally, you can run it on-demand with npx:
npx vectosolve convert photo.png
Verify the installation by checking the version:
vectosolve --version
Setup & Authentication
Before you can use the CLI, you need to authenticate with your VectoSolve API key. You can generate one from your dashboard under the API Keys section.
Option 1: Auth Command
Run the auth command with your key:
vectosolve auth --key vs_live_xxxxxxxxxxxxxxxx
This stores your key locally in ~/.vectosolve/config.json so you don't need to enter it again.
Option 2: Environment Variable
Set the VECTOSOLVE_API_KEY environment variable. This is the recommended approach for CI/CD environments:
# Linux / macOS
export VECTOSOLVE_API_KEY=vs_live_xxxxxxxxxxxxxxxx
# Windows (PowerShell)
$env:VECTOSOLVE_API_KEY = "vs_live_xxxxxxxxxxxxxxxx"
The environment variable takes precedence over the stored config, making it easy to switch between keys for different projects.
A Full Year of Conversions for $49
Starter Annual: 25 conversions every month, $49 for the whole year. That is about $4.08 a month · Cancel anytime
Get the Annual DealCommands
Convert Image to SVG
The convert command transforms raster images (PNG, JPG, WebP) into clean, scalable SVG files using VectoSolve's AI vectorization engine.
# Convert a local file
vectosolve convert logo.png
# Specify output path
vectosolve convert photo.jpg -o output/photo.svg
# Convert from a URL
vectosolve convert --url https://example.com/image.png
By default, the output SVG is saved in the current directory with the same filename. The AI handles color detection, edge tracing, and shape optimization automatically.
Remove Background
Strip the background from any image with a single command. Perfect for product photos, headshots, and assets that need transparency.
# Remove background, print result URL
vectosolve remove-bg product-photo.jpg
# Save to file
vectosolve remove-bg headshot.png -o headshot-nobg.png
Upscale Image
Upscale low-resolution images using AI super-resolution. The result is a crisp, artifact-free image — not a blurry resize.
# Upscale with output path
vectosolve upscale thumbnail.jpg -o thumbnail-hires.png
Generate Logo
Generate AI-powered SVG logos directly from the command line.
# Basic logo generation
vectosolve logo "Mountain hiking brand"
# Full control with all flags
vectosolve logo "Minimalist coffee shop" \
-s icon \
-c "#2D1B0E,#F5E6D3" \
-n 4 \
-o ./logos/
Available flags:
| Flag | Description | Example |
|---|---|---|
-s, --style | Logo style (vector_illustration, icon, line_art...) | -s icon |
-m, --model | AI model (recraftv3, recraftv2) | -m recraftv3 |
-c, --colors | Brand colors as comma-separated hex values | -c "#0090ff,#1cb721" |
-n, --num | Number of variants (1, 2, or 4) | -n 4 |
-o, --output | Output directory for SVG files | -o ./logos/ |
Real-World Use Cases
Batch Convert a Folder of PNGs
Use a simple shell loop to convert every PNG in a directory to SVG:
# Convert all PNGs in the current folder
for file in *.png; do
vectosolve convert "$file" -o "svg/${file%.png}.svg"
done
For larger batches, you can parallelize with xargs:
ls *.png | xargs -P 4 -I {} vectosolve convert {} -o svg/{}.svg
This runs up to 4 conversions in parallel, significantly reducing total processing time.
CI/CD Pipeline Integration
Add VectoSolve to your build pipeline to automatically vectorize assets on every deploy. Here's a GitHub Actions example:
# .github/workflows/build.yml
- name: Convert assets to SVG
env:
VECTOSOLVE_API_KEY: ${{ secrets.VECTOSOLVE_API_KEY }}
run: |
npx vectosolve convert assets/logo.png -o public/logo.svg
npx vectosolve convert assets/icon.png -o public/icon.svg
This ensures your production SVGs are always generated from the latest source images.
Design Workflow Automation
Combine the CLI with file watchers to create a live conversion pipeline:
# Using fswatch (macOS) or inotifywait (Linux)
fswatch -0 ~/design-assets/*.png | while read -d "" file; do
vectosolve convert "$file" -o "${file%.png}.svg"
echo "Converted: $file"
done
Designers work in their preferred format, developers get production-ready SVGs without asking.
Pricing
The CLI uses the same credit-based pricing as the VectoSolve web app and API:
| Command | Cost per Use |
|---|---|
vectosolve convert | $0.20 |
vectosolve remove-bg | $0.07 |
vectosolve upscale | $0.15 |
vectosolve logo | $0.25+ |
Credits are shared across all VectoSolve products — web app, API, CLI, browser extensions, and the embeddable widget. Subscribe on the pricing page.
Free SVG Tools for Crafters
Design Checker · Color Separator · Mat Preview · Offset Generator · Text to SVG
Check Your SVG FreeWhat's Next
The VectoSolve CLI is one piece of a growing developer ecosystem:
- @vectosolve/sdk — JavaScript/TypeScript SDK for programmatic access to all VectoSolve APIs. Ideal for building custom integrations.
- @vectosolve/mcp — MCP server that lets AI assistants like Claude use VectoSolve tools directly through natural language.
- Developer Hub — Full API documentation, authentication guides, and code examples.
- Pricing & Plans — Compare the monthly and annual tiers.
Install the CLI today and start converting images from your terminal:
npm install -g vectosolve