npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

inkscape-cli

v1.0.4

Published

Bindings for Inkscape's command line interface

Downloads

11

Readme

inkscape-cli

inkscape-cli is a Node.js binding for Inkscape's command line interface. You need to have Inkscape installed to your computer. Furthermore, inkscape-cli is designed for Windows. Other platforms may not work well.

Github: https://github.com/The3DSquare/inkscape-cli

NPM: https://www.npmjs.com/package/inkscape-cli

Quick start:

Import the library into your code and start coding!

const I = require('inkscape-cli');

const save_as_pdf = I.generate_command([
    I.O.file('.\\File.svg'),
    I.O.export_area_page,
    I.O.export_pdf('.\\File.pdf')
]);
I.run_command(save_as_pdf);

Documentation

setFolder(path)

Tells inkscape-cli that inkscape.exe is in the folder specified by path.

param | type | description --- | --- | --- path | String | Path to Inkscape's folder

I.inkscape_folder("C:\\Program Files\\Inkscape\\");
  • Path must use \\ instead of /
  • It's ok to leave spaces in the path

O

inkscape-cli has an object called O. O has all the options one can use when creating a command with generateCommand. Go to https://inkscape.org/doc/inkscape-man.html for specific details about each command.

Here are some examples:

I.O.file('.\\File.svg');
I.O.export_area_drawing;
I.O.export_png('.\\File Image.png');

File paths need to use \\ instead of /. Feel free to leave spaces in a filepath as well. Options with no parameter can be left without (). Options that do need parameters can put them in via a function call.

generateCommand(args)

Generates a command inkscape-cli can run.

param | type | description --- | --- | --- args | Array | An array of I.O. values

const savePDF = I.generateCommand([
    I.O.file('.\\File.svg'),
    I.O.export_area_page,
    I.O.export_pdf('.\\File.pdf')
]);
const savePNG = I.generateCommand([
    I.O.file('.\\File.svg'),
    I.O.export_area_drawing,
    I.O.export_width(2024),
    I.O.export_height(1024),
    I.O.export_png('.\\File.png')
]);

runCommand(command)

Runs a command generated by generateCommand

param | type | description --- | --- | --- command | String | A command created by generateCommand

I.runCommand(savePDF);

chainCommands(commands)

Runs multiple commands one at a time

param | type | description --- | --- | --- commands | Array<String> | Array of commands created by generateCommand

I.chainCommands([savePDF, savePNG]);