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

swiftpatch-cli

v2.0.10

Published

Ship React Native OTA updates instantly. Bundle, sign, publish, and manage releases from the terminal. AI-powered diagnostics included.

Readme


Why SwiftPatch?

CodePush is deprecated. Expo Updates locks you into Expo. Shorebird doesn't support React Native.

SwiftPatch is a modern OTA update platform built specifically for React Native. Push JS bundle updates to your users in seconds -- no app store review required.

| Feature | SwiftPatch | CodePush | Expo Updates | |---------|-----------|----------|--------------| | React Native support | Yes | Deprecated | Expo only | | Hermes bytecode | Yes | No | Limited | | Bundle signing (RSA-256) | Yes | No | No | | AI-powered diagnostics | Yes | No | No | | Rollback & rollout control | Yes | Limited | Limited | | CI/CD tokens | Yes | Limited | Yes | | Self-hosted option | Coming soon | No | No |

Installation

npm install -g swiftpatch-cli

Requires Node.js 18+.

Quick Start

# 1. Authenticate
swiftpatch login

# 2. Create an app
swiftpatch apps create

# 3. Deploy (bundle + upload + release in one step)
swiftpatch deploy -p ios --ci-token <token>

Commands

Authentication

| Command | Description | |---------|-------------| | swiftpatch login | Authenticate via browser or API key | | swiftpatch logout | Clear stored credentials | | swiftpatch whoami | Show current authenticated user |

Apps

| Command | Description | |---------|-------------| | swiftpatch apps list | List all apps | | swiftpatch apps create | Create a new app | | swiftpatch apps info <app-id> | Get app details | | swiftpatch apps update <app-id> | Update app properties | | swiftpatch apps delete <app-id> | Delete an app |

Publishing & Releases

| Command | Description | |---------|-------------| | swiftpatch deploy -p <platform> | One-step bundle + upload + release (recommended) | | swiftpatch publish-bundle -p <platform> | (Deprecated) Bundle, compile, sign, and upload. Use deploy instead. | | swiftpatch release-bundle --hash <hash> | (Deprecated) Promote a bundle to a release. Use deploy instead. | | swiftpatch releases list -a <app-id> | List releases | | swiftpatch releases rollout <id> --percent 50 | Update rollout percentage | | swiftpatch releases rollback <id> | Rollback a release |

Channels

| Command | Description | |---------|-------------| | swiftpatch channels list -a <app-id> | List channels | | swiftpatch channels create -a <app-id> | Create a channel | | swiftpatch channels delete <id> -a <app-id> | Delete a channel |

CI Tokens

| Command | Description | |---------|-------------| | swiftpatch ci-tokens create | Generate a CI token | | swiftpatch ci-tokens list | List CI tokens | | swiftpatch ci-tokens delete <id> | Revoke a CI token | | swiftpatch ci-tokens regenerate <id> | Regenerate a CI token |

Utilities

| Command | Description | |---------|-------------| | swiftpatch init | Set up SwiftPatch in your project | | swiftpatch doctor | Diagnose setup issues |


AI-Powered Intelligence

SwiftPatch includes AI features powered by Claude (Anthropic) for local project analysis and by the SwiftPatch backend for release intelligence.

Local AI Commands (Claude-powered)

These commands analyze your local project. You will be prompted for consent before any data is read or sent.

# Scan your project for OTA readiness issues
swiftpatch ai doctor

# Generate a changelog from git history
swiftpatch ai explain

# Safety review your code changes before deploying OTA
swiftpatch ai review

| Command | What it does | |---------|-------------| | swiftpatch ai doctor | Scans package.json, native deps, assets, Hermes config, signing keys. Flags anything that could break an OTA update. | | swiftpatch ai explain | Reads git log between the last tag and HEAD, generates a categorized changelog (Features, Bug Fixes, Improvements). | | swiftpatch ai review | Diffs your JS/TS changes, detects native code modifications, sensitive file changes, and gives an OTA safety score (1-10). |

All three commands support:

  • -y, --yes to skip the consent prompt (for CI/CD)
  • --json for machine-readable output
  • -f, --from and -t, --to for custom git ranges (explain & review)

Backend AI Commands

These require SwiftPatch authentication and query the platform API.

| Command | Description | |---------|-------------| | swiftpatch ai ask <question> | Ask AI about releases, crashes, or strategy | | swiftpatch ai risk-score | Get AI risk assessment for a release | | swiftpatch ai crashes | List AI-grouped crash reports | | swiftpatch ai insights | View AI-generated insights |

Setting up the Claude API Key

Local AI commands require a Claude API key. Configure it in one of three ways:

# Option 1: Store in encrypted config (recommended for local dev)
swiftpatch config set claudeApiKey sk-ant-xxxxx

# Option 2: Environment variable (recommended for CI/CD)
export SWIFTPATCH_CLAUDE_API_KEY=sk-ant-xxxxx

# Option 3: SwiftPatch Pro (platform-provisioned key -- no setup needed)

Your API key is stored in an encrypted local store and is never logged or exposed.

Data & Privacy

Before any local data is read or sent to the AI:

  1. You are shown exactly what data categories will be accessed
  2. You must explicitly consent (or pass --yes for CI/CD)
  3. Consent can be remembered or revoked anytime
# Revoke all AI consent
swiftpatch config delete aiConsentScopes

# Remove your Claude API key
swiftpatch config delete claudeApiKey

No source code is stored by the AI service. All data is transmitted over encrypted HTTPS.


Bundle Signing

SwiftPatch supports RSA-256 bundle signing to verify bundle integrity on device:

# Generate a key pair
swiftpatch generate-key-pair

# Publish with signing
swiftpatch publish-bundle -p ios --hermes -k ./swiftpatch-private.pem

Add the public key to your React Native app via the SwiftPatch SDK.

Hermes Support

Compile your JS bundle to Hermes bytecode for faster startup:

swiftpatch publish-bundle -p ios --hermes

# Or with a custom hermesc binary
swiftpatch publish-bundle -p android --hermes --hermesc-path ./node_modules/react-native/sdks/hermesc/osx-bin/hermesc

CI/CD Integration

Use CI tokens for automated deployments:

# Create a token
swiftpatch ci-tokens create

# Use in your pipeline
export SWIFTPATCH_CI_TOKEN=sp_ci_xxxxx

swiftpatch deploy -p ios

GitHub Actions Example

- name: Deploy OTA update
  env:
    SWIFTPATCH_CI_TOKEN: ${{ secrets.SWIFTPATCH_CI_TOKEN }}
  run: npx swiftpatch-cli deploy -p ios

Configuration

| Command | Description | |---------|-------------| | swiftpatch config set <key> <value> | Set a config value | | swiftpatch config get <key> | Get a config value | | swiftpatch config delete <key> | Delete a config value | | swiftpatch config list | List all config values |

Config keys: apiUrl, defaultOrg, defaultApp, defaultPlatform, defaultChannel, claudeApiKey

Environment Variables

| Variable | Description | |----------|-------------| | SWIFTPATCH_CI_TOKEN | CI/CD token for automated auth | | SWIFTPATCH_API_URL | Custom API endpoint | | SWIFTPATCH_CLAUDE_API_KEY | Claude API key for AI features | | DEBUG | Enable debug logging |

Development

git clone https://github.com/codewprincee/swiftpatch-cli.git
cd swiftpatch-cli
npm install
npm run dev     # watch mode
npm run build   # production build
npm test        # run tests

Links

License

MIT