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

@curenorway/kode-cli

v1.9.2

Published

CLI tool for Cure Kode - manage JS/CSS scripts for Webflow sites

Readme

Cure Kode CLI

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

Installation

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

Quick Start

# Initialize a new project
kode init

# Pull existing scripts from remote
kode pull

# Edit your scripts locally...

# 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

This creates a .cure-kode/config.json file with your site configuration.

kode pull

Download scripts from remote to your local scripts directory.

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

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 watch

Watch for file changes and automatically push to remote.

kode watch                  # Watch and push
kode watch --deploy         # Watch, push, and deploy
kode watch --env production # Watch with specific environment

kode deploy

Deploy scripts to staging or production.

kode deploy                 # Deploy to staging (default)
kode deploy --env production # Deploy to production
kode deploy --promote       # Promote staging to production
kode deploy -n "Release v2" # Deploy with notes

kode html <url>

Fetch and analyze HTML from a URL.

kode html https://mysite.com
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 status

Show current project status.

kode status

Configuration

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

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

Global Config

Global configuration is stored in ~/.config/cure-kode/config.json:

{
  "apiUrl": "https://app.cure.no"
}

Environment Variables

  • CURE_KODE_API_KEY - API key (overrides project config)
  • CURE_KODE_API_URL - API URL (overrides global config)

Project Structure

your-project/
├── .cure-kode/
│   ├── config.json      # Project configuration
│   └── scripts.json     # Script metadata (versions, sync status)
└── kode/                # Your scripts directory
    ├── init.js
    ├── tracking.js
    └── styles.css

Workflow Examples

Basic Development

# 1. Initialize project
kode init

# 2. Pull existing scripts
kode pull

# 3. Start watch mode
kode watch

# 4. Edit files in your editor - they auto-push on save

# 5. When ready, deploy
kode deploy

CI/CD Integration

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

Team Workflow

# Developer 1: Pull latest
kode pull --force

# Developer 2: Push changes
kode push -m "Added new animation"

# Deploy to staging for review
kode deploy -n "Review build"

# After approval, promote to production
kode deploy --promote

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

  • read - Pull scripts, view status
  • write - Push scripts
  • deploy - Deploy to staging/production
  • delete - Delete scripts

Requirements

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

Security

API Key Storage

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

Permissions Model

API keys have granular, site-scoped permissions:

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

Network Security

The HTML fetch feature (kode html) includes SSRF protection:

  • 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 and when team members leave

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

"Script not found"

The script may not exist on remote. Use kode push to create it.

License

MIT