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

@curenorway/kode-cli

v1.14.0

Published

CLI for Cure Kode CDN - manage, deploy, and sync JS/CSS scripts for Webflow sites with AI agent support

Readme

Cure Kode CLI

Command-line tool for managing JavaScript and CSS scripts for Webflow sites via Cure Kode CDN.

Features

  • Pull/Push scripts - Sync scripts between local files and remote CDN with conflict detection
  • Sync awareness - Staleness indicators show when local state is out of date
  • Deploy dry-run - Preview what will be deployed before executing
  • Doctor command - Diagnose configuration issues and check for CLI updates
  • Watch mode - Auto-sync on file changes with retry on failure
  • Staging/Production - Separate environments with explicit production enable
  • Rollback - Quick recovery to previous deployments
  • AI-ready - Auto-generates KODE.md documentation for AI agents
  • MCP Integration - Works with Cure Kode MCP for AI agents

Installation

npm install -g @curenorway/kode-cli
# or
pnpm add -g @curenorway/kode-cli

Quick Start

# Initialize a new project (creates config + AI context)
kode init

# Pull existing scripts from remote
kode pull

# Edit your scripts locally in .cure-kode-scripts/

# Push changes
kode push

# Deploy to staging
kode deploy

# Watch for changes and auto-push
kode watch

Commands

kode init

Initialize a Cure Kode project in the current directory.

kode init

Creates:

  • .cure-kode/config.json - Site configuration and API key
  • .cure-kode/KODE.md - Auto-generated documentation (scripts, pages, commands)
  • .cure-kode/context.md - AI context file
  • .cure-kode-scripts/ - Scripts directory
  • CLAUDE.md - Reference to KODE.md (prepended, never overwrites existing content)
  • .mcp.json - MCP server configuration (cure-kode, webflow, playwright)

kode pull

Download scripts from remote to your local scripts directory.

kode pull           # Pull all scripts
kode pull --force   # Overwrite local changes

Output shows script status:

  • [G] = Global scope, [P] = Page-specific
  • = Auto-load enabled, = Manual load only

kode push

Upload local scripts to remote.

kode push                           # Push all changed scripts
kode push my-script.js              # Push specific script
kode push --all                     # Push all scripts
kode push -m "Fixed bug"            # Add change message
kode push --auto-load               # Enable auto-load for new scripts
kode push --no-auto-load            # Disable auto-load

kode watch

Watch for file changes and automatically push to remote.

kode watch                  # Watch and push
kode watch --deploy         # Watch, push, and deploy on changes

Features:

  • Retry on network failure with exponential backoff
  • Session summary on exit (Ctrl+C)
  • Debounced uploads to prevent rapid-fire pushes

kode deploy

Deploy scripts to staging or production.

kode deploy                 # Deploy to staging (default)
kode deploy --dry-run       # Preview deployment without executing
kode deploy --promote       # Promote staging to production
kode deploy --force         # Force release stale deploy lock

Note: Production must be enabled before promoting. See kode production.

kode rollback

Rollback to a previous deployment.

kode rollback               # Rollback staging to previous version
kode rollback production    # Rollback production to previous version

kode production

Manage production environment (disabled by default for safety).

kode production status                    # Check if production is enabled
kode production enable                    # Enable production environment
kode production enable --domain example.com  # Enable with specific domain
kode production disable                   # Disable production environment

kode html <url>

Fetch and analyze HTML from a URL.

kode html https://mysite.com              # Analyze page
kode html https://mysite.com --json       # Output as JSON
kode html https://mysite.com --scripts    # Show scripts only
kode html https://mysite.com --styles     # Show styles only
kode html https://mysite.com --save       # Cache page context for AI

kode pages

List cached page contexts.

kode pages                  # List all cached pages
kode pages --json           # Output as JSON

kode context

View and manage AI context.

kode context                # View current context
kode context --edit         # Open context in editor
kode context --refresh      # Refresh context from remote
kode context --json         # Output as JSON

kode status

Show current project status with staleness indicators.

kode status

Shows:

  • Site info and CDN URL
  • Production enabled state
  • Script sync status with staleness warnings
  • Per-script indicators: modified locally, server updated, conflicts
  • Deployment versions

kode doctor

Diagnose configuration and environment issues.

kode doctor

Checks:

  • Project configuration and API key validity
  • Network connectivity and API access
  • MCP server configuration
  • KODE.md and CLAUDE.md setup
  • Security (.gitignore for API key)
  • Sync state staleness
  • CLI version and available updates

kode diff <script>

Show differences between local and remote script versions.

kode diff my-script    # Compare local vs remote

kode sync

Bidirectional sync with conflict detection.

kode sync              # Sync both directions
kode sync --dry-run    # Preview what would change

Configuration

Project Config (.cure-kode/config.json)

{
  "siteId": "uuid",
  "siteSlug": "my-site",
  "siteName": "My Site",
  "apiKey": "ck_...",
  "scriptsDir": ".cure-kode-scripts",
  "environment": "staging"
}

Scripts Directory

Default: .cure-kode-scripts/ (avoids conflicts with AI-generated scripts/ folders)

Environment Variables

  • CURE_KODE_API_KEY - API key (overrides project config)
  • CURE_KODE_API_URL - API URL (default: https://app.cure.no)

Project Structure

your-project/
├── .cure-kode/
│   ├── config.json       # Project configuration (gitignored)
│   ├── scripts.json      # Sync state for conflict detection
│   ├── KODE.md           # Auto-generated documentation
│   ├── context.md        # AI context (notes, discoveries)
│   └── pages/            # Cached page contexts
├── .cure-kode-scripts/   # Your scripts directory
│   ├── main.js
│   ├── form-handler.js
│   └── styles.css
├── .mcp.json             # MCP server configuration
└── CLAUDE.md             # Reference to KODE.md (your content preserved)

Workflow Examples

Basic Development

# 1. Initialize project
kode init

# 2. Pull existing scripts
kode pull

# 3. Start watch mode
kode watch

# 4. Edit files - they auto-push on save

# 5. When ready, deploy to staging
kode deploy

# 6. Test, then promote to production
kode production enable
kode deploy --promote

AI-Assisted Development

# 1. Initialize with MCP support
kode init

# 2. Cache page structures for AI context
kode html https://mysite.com/page1 --save
kode html https://mysite.com/page2 --save

# 3. AI can now use MCP tools to:
#    - Read page structure: kode_get_page_context
#    - Create scripts: kode_create_script
#    - Push changes: kode_push
#    - Deploy: kode_deploy

CI/CD Integration

# In your CI pipeline
kode push --all
kode deploy
# Run tests...
kode deploy --promote

Emergency Rollback

# Something went wrong in production
kode rollback production

# Or if deploy is stuck
kode deploy --force

API Key

Get your API key from the Cure app:

  1. Go to https://app.cure.no/tools/kode
  2. Open your site settings
  3. Generate an API key with appropriate permissions

Permissions

| Permission | CLI Commands | |------------|--------------| | read | pull, status, html, pages, context | | write | push, watch | | deploy | deploy, rollback, production | | delete | (delete scripts) |

Security

API Key Storage

  • API keys stored locally in .cure-kode/config.json
  • Directory is automatically gitignored during kode init
  • Keys are SHA256/HMAC hashed before server storage (V2 keys use salt)

SSRF Protection

The HTML fetch feature includes protection against Server-Side Request Forgery:

  • Blocks private IP ranges (127.x.x.x, 10.x.x.x, 172.16-31.x.x, 192.168.x.x)
  • Blocks localhost and internal domain names
  • Blocks cloud metadata endpoints (169.254.169.254)
  • Only allows HTTP/HTTPS protocols

Best Practices

  1. Never commit .cure-kode/config.json to version control
  2. Use separate keys for different environments
  3. Use read-only keys when possible
  4. Rotate keys periodically

Troubleshooting

"No project found"

Run kode init to initialize a project in the current directory.

"API key invalid"

Check that your API key:

  • Starts with ck_
  • Has not expired
  • Has the required permissions

"Deploy lock held"

Another deployment may be in progress. Wait or use:

kode deploy --force

"Production not enabled"

Enable production before promoting:

kode production enable
kode deploy --promote

Requirements

  • Node.js 18 or later
  • Cure Kode API key

License

MIT