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

@gext/cli

v1.1.0

Published

CLI for Gext by ixigo - Google Docs/Slides template engine. Create templates, generate documents, manage forms, and more.

Downloads

22

Readme

Gext CLI

Command-line interface for Gext -- the Google Docs/Slides template engine.

Built by ixigo

Website | Documentation | AI Agents (MCP)

Installation

npm install -g @gext/cli

Or run locally from the project:

npm link

Quick Start

# Sign in with Google
gext login

# Check who you are
gext whoami

# Search your Drive for documents
gext drive search "Invoice Template"

# Create a template from a Google Doc
gext templates create --file 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms

# List your templates
gext templates list

# View template schema (variables)
gext templates schema <template-id>

# Generate a document with inline JSON
gext generate <template-id> --json '{"name": "John Doe", "amount": "1500"}'

# Generate interactively
gext generate <template-id> --interactive

Commands

Authentication

# Sign in (opens browser for Google OAuth)
gext login
gext login --full-access    # Request full Drive/Docs/Slides permissions

# Show current user
gext whoami

# Sign out
gext logout

Templates

# List all templates
gext templates list
gext templates list --json

# Get template details
gext templates get <id>
gext templates get <id> --json

# Create from a Google Doc/Slides file
gext templates create --file <google-doc-id>
gext templates create --file <google-doc-id> --name "My Template"

# Show variable schema
gext templates schema <id>
gext templates schema <id> --json

# Generate AI sample data for variables
gext templates sample-data <id>
gext templates sample-data <id> --context "US healthcare"

# Delete a template
gext templates delete <id>

Document Generation

# Generate with inline JSON
gext generate <id> --json '{"name": "Alice", "date": "2026-03-05"}'

# Generate from a JSON file
gext generate <id> --file data.json

# Interactive mode (prompts for each variable)
gext generate <id> --interactive

# Pipe JSON from stdin
echo '{"name": "Bob"}' | gext generate <id>

# Use API key instead of session (for automation)
gext generate <id> --json '{"name": "Bot"}' --api-key gext_sk_xxx

# Get structured JSON output
gext generate <id> --json '{"name": "Alice"}' --output-json

Google Drive

# Search for documents and slides
gext drive search "quarterly report"

# Search for folders
gext drive search "invoices" --type folder

# JSON output (pipe to jq)
gext drive search "template" --json | jq '.[].name'

Public Forms

# Enable/disable public form for a template
gext form enable <template-id>
gext form disable <template-id>

# Get the public form URL
gext form link <template-id>

# Fetch form schema (no auth required)
gext form get <form-token>
gext form get <form-token> --json

# Submit a form (no auth required)
gext form submit <form-token> --json '{"name": "Jane", "email": "[email protected]"}'
gext form submit <form-token> --file submission.json
cat data.json | gext form submit <form-token>

# JSON output
gext form submit <form-token> --json '{"name": "Jane"}' --output-json

API Keys

# Show the API key for a template
gext api-key show <template-id>

# Regenerate (rotate) the API key
gext api-key regenerate <template-id>

Configuration

# List all settings
gext config list

# Point to a different server (e.g., local dev)
gext config set serverUrl http://localhost:5173

# Reset to production
gext config set serverUrl https://gext.ixigo.com

# Get a specific value
gext config get serverUrl

Recipes

Batch generate documents from a CSV

# Convert CSV to JSON lines, then generate for each row
cat contacts.csv | python3 -c "
import csv, json, sys
reader = csv.DictReader(sys.stdin)
for row in reader:
    print(json.dumps(row))
" | while read -r line; do
  gext generate <template-id> --json "$line" --output-json
done

Integrate with CI/CD

# Use API key auth (no browser login needed)
gext generate <template-id> \
  --api-key "$GEXT_API_KEY" \
  --json '{"version": "'$VERSION'", "date": "'$(date +%Y-%m-%d)'"}' \
  --output-json

Search Drive and create template in one go

# Find the doc ID, then create a template
DOC_ID=$(gext drive search "Invoice" --json | jq -r '.[0].id')
gext templates create --file "$DOC_ID" --name "Invoice Template"

Generate sample data and use it to generate a document

gext templates sample-data <id> | gext generate <id>

Agent/automation workflow

# 1. List templates to find the right one
gext templates list --json | jq '.[] | {id, name}'

# 2. Get schema to know what variables are needed
gext templates schema <id> --json

# 3. Generate document
gext generate <id> --json '{"field1": "value1", "field2": "value2"}' --output-json

# 4. Extract the PDF URL from output
PDF_URL=$(gext generate <id> --json '...' --output-json | jq -r '.pdf_url')

Output Formats

Most commands support --json for machine-readable output. This makes it easy to pipe results through jq or use in scripts.

# Pretty-print template list
gext templates list --json | jq '.[] | {id, name, created_at}'

# Get just template IDs
gext templates list --json | jq -r '.[].id'

Configuration Storage

Credentials and configuration are stored at:

  • macOS: ~/Library/Preferences/gext-nodejs/config.json
  • Linux: ~/.config/gext-nodejs/config.json
  • Windows: %APPDATA%/gext-nodejs/config.json

The session token is a JWT with a 30-day expiry. Run gext login to refresh it.

Related

  • Gext Web App -- Create and manage templates in the browser
  • Gext MCP Server -- Connect AI agents (Claude, Cursor, Gemini, ChatGPT) via Model Context Protocol
  • ixigo -- Built with care by the ixigo team

License

MIT