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 🙏

© 2025 – Pkg Stats / Ryan Hefner

orshot-cli

v1.0.0

Published

CLI tool for Orshot - Automated Visual Content Generation

Readme

Orshot CLI

A command-line interface for Orshot - AI powered visual content generation platform. Generate images from your templates directly from your terminal

Installation

npm install -g orshot-cli

Quick Start

  1. Login with your API key:

    orshot auth login <your-api-key>
  2. List available templates:

    orshot templates library
    orshot templates studio
  3. Generate an image:

    orshot generate library <template-id>
    orshot generate studio <template-id>

Commands

Authentication

orshot auth login [api-key]

Log in with your Orshot API key. If no key is provided, you'll be prompted to enter it securely.

Options:

  • -d, --domain <domain> - API domain (default: https://api.orshot.com)

Examples:

orshot auth login your-api-key-here
orshot auth login  # Will prompt for API key

orshot auth logout

Log out and clear stored credentials.

orshot auth whoami

Show current user information and authentication status.

Templates

orshot templates library

List your library templates.

Options:

  • -l, --limit <number> - Limit number of results (default: 20)
  • -j, --json - Output as JSON

orshot templates studio

List your studio templates.

Options:

  • -l, --limit <number> - Limit number of results (default: 20)
  • -j, --json - Output as JSON

orshot templates modifications <template-id>

Show available modifications for a template.

Options:

  • -t, --type <type> - Template type: library or studio (default: library)
  • -j, --json - Output as JSON

Examples:

orshot templates modifications abc123
orshot templates modifications def456 --type studio

Generate Images

orshot generate library <template-id>

Generate an image from a library template.

Options:

  • -m, --modification <key=value> - Template modifications (can be used multiple times)
  • -f, --format <format> - Output format: png, jpg, jpeg, webp, pdf (default: png)
  • -t, --type <type> - Response type: base64, binary, url (default: base64)
  • -o, --output <filename> - Output filename
  • -i, --interactive - Interactive mode to set modifications
  • -j, --json - Output response as JSON

Examples:

# Basic generation
orshot generate library abc123

# With modifications
orshot generate library abc123 -m title="Hello World" -m color="blue"

# Interactive mode
orshot generate library abc123 --interactive

# Custom output
orshot generate library abc123 -o my-image.png -f png

# Get URL instead of downloading
orshot generate library abc123 -t url

orshot generate studio <template-id>

Generate an image from a studio template.

Options:

  • -m, --modification <key=value> - Template modifications (can be used multiple times)
  • -f, --format <format> - Output format: png, jpg, jpeg, webp, pdf (default: png)
  • -t, --type <type> - Response type: base64, binary, url (default: base64)
  • -o, --output <filename> - Output filename
  • -i, --interactive - Interactive mode to set modifications
  • -j, --json - Output response as JSON

Examples:

# Basic generation
orshot generate studio def456

# With modifications
orshot generate studio def456 -m name="John Doe" -m title="CEO"

# Interactive mode
orshot generate studio def456 --interactive

# Custom output
orshot generate studio def456 -o my-studio-image.png -f png

Configuration

The CLI stores your configuration in your system's config directory:

  • macOS: ~/Library/Preferences/orshot-cli/config.json
  • Linux: ~/.config/orshot-cli/config.json
  • Windows: %APPDATA%/orshot-cli/config.json

API Key

Get your API key from Orshot Workspace > Settings > API Key here.

Output Formats

  • PNG - Best for images with transparency
  • JPG/JPEG - Best for photos and images without transparency
  • WebP - Modern format with good compression
  • PDF - For documents and print-ready files

Response Types

  • base64 - Image data as base64 string (default)
  • binary - Raw binary data
  • url - Returns a URL to the generated image

Examples

Complete Workflow Example

# Login
orshot auth login your-api-key

# Check authentication
orshot auth whoami

# List library templates
orshot templates library

# Check available modifications for a template
orshot templates modifications template-123

# Generate image with modifications
orshot generate library template-123 \\
  -m title="My Custom Title" \\
  -m background_color="#ff0000" \\
  -o custom-image.png

# Generate from studio template interactively
orshot generate studio studio-456 --interactive

Batch Processing

# Generate multiple variations
orshot generate library template-123 -m title="Version 1" -o v1.png
orshot generate library template-123 -m title="Version 2" -o v2.png
orshot generate library template-123 -m title="Version 3" -o v3.png

Error Handling

The CLI provides detailed error messages and suggestions:

❌ Login failed: Invalid API key. Please check your credentials.

❌ Failed to generate image: Template not found.
💡 Make sure the template ID is correct and you have access to it

❌ Not authenticated. Please run:
   orshot auth login <your-api-key>

Support

License

MIT License - see LICENSE file for details.