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

ogis

v0.2.0

Published

TypeScript client for OGIS OpenGraph image generation service

Downloads

46

Readme

ogis: Open Graph Images as a Service

GitHub Actions Workflow Status Docker Pulls Docker Image Size npm License

Generate beautiful Open Graph images via URL. No design skills required.

Quick Start

Install the SDK:

npm install ogis

Next.js (App Router)

// app/blog/[slug]/page.tsx
import { OgisClient } from 'ogis';

const ogis = new OgisClient({ baseUrl: 'https://img.ogis.dev' });

export async function generateMetadata({ params }) {
  const post = await getPost(params.slug);

  return {
    openGraph: {
      images: [ogis.generateUrl({
        title: post.title,
        description: post.excerpt,
        template: 'twilight'
      })]
    }
  };
}

SvelteKit

<script lang="ts">
  import { OgisClient } from 'ogis';

  const ogis = new OgisClient({ baseUrl: 'https://img.ogis.dev' });
  const ogImage = ogis.generateUrl({
    title: 'My Page',
    template: 'minimal'
  });
</script>

<svelte:head>
  <meta property="og:image" content={ogImage} />
  <meta property="og:image:width" content="1200" />
  <meta property="og:image:height" content="630" />
</svelte:head>

Astro

---
import { OgisClient } from 'ogis';

const ogis = new OgisClient({ baseUrl: 'https://img.ogis.dev' });
const ogImage = ogis.generateUrl({
  title: frontmatter.title,
  description: frontmatter.description
});
---

<head>
  <meta property="og:image" content={ogImage} />
</head>

Nuxt

<script setup lang="ts">
import { OgisClient } from 'ogis';

const ogis = new OgisClient({ baseUrl: 'https://img.ogis.dev' });

useSeoMeta({
  ogImage: ogis.generateUrl({
    title: 'My Page',
    template: 'modern'
  })
});
</script>

Plain HTML / Any Framework

No SDK needed - just construct the URL:

<meta property="og:image" content="https://img.ogis.dev/?title=Hello%20World&template=twilight" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />

Templates

Browse all templates at ogis.dev/playground.

Parameters

All parameters are optional and passed as query parameters or SDK options.

| Parameter | Description | Example | |-----------|-------------|---------| | title | Main heading text | My Blog Post | | description | Secondary text below title | A deep dive into... | | subtitle | Small text above title | Tutorial | | template | Template name (see above) | twilight | | logo | URL to logo image | https://example.com/logo.png | | image | URL to background/hero image | https://example.com/hero.jpg |

Templates may support additional color customization parameters. See the playground for template-specific options.

Self-Hosting

Deploy on Railway Deploy to Google Cloud

Docker

docker run -d -p 3000:3000 twango/ogis:latest

Docker Compose

docker compose up -d

From Source

cargo build --release
./target/release/ogis

Configuration

Configure via environment variables (prefixed with OGIS_) or CLI arguments:

| Environment Variable | CLI Argument | Default | Description | |---------------------|--------------|---------|-------------| | OGIS_PORT | --port | 3000 | Server port | | OGIS_HOST | --host | 0.0.0.0 | Server host | | OGIS_HMAC_SECRET | --hmac-secret | - | Enable HMAC authentication | | OGIS_DEFAULT_TEMPLATE | --default-template | twilight | Default template | | OGIS_MAX_INPUT_LENGTH | --max-input-length | 500 | Max text length | | OGIS_CACHE_SIZE | --cache-size | 1000 | Image cache size |

Run ogis --help for all options.

Authentication

For private instances, enable HMAC-SHA256 signature validation:

# Server
docker run -d -p 3000:3000 -e OGIS_HMAC_SECRET=your-secret twango/ogis:latest
// Client
const ogis = new OgisClient({
  baseUrl: 'https://your-instance.com',
  hmacSecret: process.env.OGIS_SECRET
});

// URLs are automatically signed
const url = ogis.generateUrl({ title: 'Secure Image' });
// => https://your-instance.com/?title=Secure+Image&signature=abc123...

See Authentication docs for details.

Documentation

License

AGPL-3.0