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

garfcode

v0.4.0

Published

Generate three-panel Garfield comics from any text file using AI

Readme

garfcode

Generate three-panel Garfield comic strips from any text file using AI.

Powered by the Garfield Intelligence Layer.

Installation

npm install -g garfcode

Requires Node.js 18+.

Setup

Configure your API keys:

garfcode config

This will prompt for your Anthropic and OpenAI API keys and save them to ~/.garfcoderc. You can also set them as environment variables (ANTHROPIC_API_KEY, OPENAI_API_KEY).

Usage

Point garfcode at any text file to generate a three-panel Garfield comic:

garfcode article.txt

This will generate panel_1.png, panel_2.png, panel_3.png, and comic.json in your current directory.

Options

garfcode <textfile> [options]
garfcode <textfile> --secure --pubkey <keyfile> [options]
garfcode --decrypt <dir> --key <keyfile> [options]
garfcode keygen [options]
garfcode config

Commands:
  config              Set up API keys (saved to ~/.garfcoderc)
  keygen              Generate a SecureGarf RSA key pair

SecureGarf Options:
  --secure            Encrypt text into steganographic comic panels
  --pubkey <file>     Path to public key PEM (required with --secure)
  --decrypt <dir>     Decrypt text from a SecureGarf comic directory
  --key <file>        Path to private key PEM (required with --decrypt)

General Options:
  --output <dir>      Output directory (default: current directory)
  --help, -h          Show this help message

Examples

# Generate a comic from a blog post
garfcode blog-post.txt

# Save output to a specific directory
garfcode notes.md --output ./my-comic

# Pipe anything through it
curl -s https://example.com/article | tee /tmp/article.txt && garfcode /tmp/article.txt

How It Works

  1. Reads your text file as source material
  2. Uses Claude to write a three-panel comic script with classic Garfield humor
  3. Uses OpenAI's image generation to draw each panel in authentic newspaper comic strip style
  4. Saves the panels as PNG images with a metadata JSON file

SecureGarf

SecureGarf — A Next Generation Communication Protocol

SecureGarf is an encrypted steganography protocol built into garfcode. It hides any text inside an innocuous Garfield comic strip. The recipient decrypts it with a private key; anyone else just sees a comic about lasagna.

Quick Start

# 1. Generate a key pair (one-time setup)
garfcode keygen --output ./keys
# Creates: keys/securegarf.pub (public) + keys/securegarf.key (private)

# 2. Encrypt a message into a comic strip
garfcode secret-message.txt --secure --pubkey ./keys/securegarf.pub --output ./comic
# Creates: comic/securegarf.png + comic/comic.json

# 3. Decrypt the message from the comic strip
garfcode --decrypt ./comic --key ./keys/securegarf.key
# Creates: decrypted.txt with the original message

Key Management

Generate a reusable RSA-2048 key pair with garfcode keygen. The key pair supports unlimited encrypt/decrypt cycles.

  • Public key (securegarf.pub) — give to anyone who wants to send you encrypted comics. This key can only encrypt, not decrypt.
  • Private key (securegarf.key) — keep this secret. It is the only way to decrypt messages sent to you.
garfcode keygen --output ./my-keys

The private key is saved with restricted file permissions (0600).

Encrypting

The sender needs the recipient's public key and configured API keys (Anthropic + OpenAI).

garfcode message.txt --secure --pubkey ./recipient-pubkey.pub --output ./outgoing

This generates a single comic strip image (securegarf.png) that:

  • Looks like a normal Garfield comic about an innocuous topic (Mondays, lasagna, naps, etc.)
  • Contains the full encrypted message hidden via steganography
  • Can be shared over email, Signal, or any chat app

The comic topic is randomly selected and has no relation to the hidden text.

Decrypting

The recipient needs their private key. No API keys are required for decryption.

garfcode --decrypt ./incoming-comic --key ./my-keys/securegarf.key
# Writes: decrypted.txt in the current directory

# Or specify an output directory:
garfcode --decrypt ./incoming-comic --key ./my-keys/securegarf.key --output ./recovered
# Writes: recovered/decrypted.txt

How SecureGarf Works

SecureGarf combines three techniques: hybrid encryption, dialog-derived key material, and compression-robust steganography.

Encryption Scheme

  1. The input text is gzip-compressed to minimize payload size
  2. A random 32-byte key is generated and XOR'd with a SHA-256 hash of the comic's dialog text, producing the AES key. This makes the dialog a required component of decryption.
  3. The compressed text is encrypted with AES-256-GCM using the derived key
  4. The random key (not the AES key) is encrypted with the recipient's RSA-2048 public key (OAEP padding, SHA-256)
  5. The encrypted payload is: IV (12 bytes) | auth tag (16 bytes) | RSA-encrypted key (256 bytes) | AES ciphertext

Steganography: Quantization Index Modulation (QIM)

The three comic panels are combined into a single 3072x1024 horizontal strip. The encrypted payload is then embedded using QIM on the blue channel of 4x4 pixel blocks:

  • Each block's average blue channel value is quantized to encode one bit (step size 24)
  • Every bit is encoded 5 times across shuffled block positions (repetition coding with majority voting)
  • This survives JPEG compression at quality 70+, making the strip safe to transmit through messaging apps that re-compress images

Capacity: ~4.9 KB of encrypted data per strip. With gzip compression, this handles approximately 15-20 KB of plaintext text.

Why Dialog Matters

The comic's dialog text (visible in the speech/thought bubbles) is hashed and XOR'd into the AES encryption key. This means:

  • The private key alone cannot decrypt the message
  • The correct dialog must also be present (it is stored in the steganographic payload alongside the encrypted data)
  • If someone modifies the dialog, the derived AES key changes and decryption fails

The dialog is embedded in the steganographic header, so the strip image is fully self-contained for decryption.

Limitations

  • Capacity: ~15-20 KB of uncompressed text per strip (depends on gzip compression ratio)
  • Image integrity: Heavy image manipulation (cropping, resizing, aggressive filters) can corrupt the embedded data. Normal JPEG compression from messaging apps is fine.
  • Not a replacement for established crypto tools. SecureGarf is a fun, novel protocol. For high-stakes secure communication, use standard tools like GPG or Signal's native encryption.

Requirements

License

Copyright 2026 Arbuckle Systems. All rights reserved.