Skip to content
Projets

À propos

Scan, backup, and sync all your project API keys with one command. Powered by 1Password & Bitwarden.

Autres projets

Comment ces chiffres sont mesurés

Progression mesurée des étoiles

in 24h
+1
in 7 days
+4
in 15 days
+5
in 1 month
Historique en cours

Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.

README.md

Original

English | 中文 | 日本語

shipkey

Scan, backup, and sync all your project API keys with one command. Powered by 1Password & Bitwarden.

For cloud coding agents, the repository also has a gateway and an issuer: agents call model APIs with short-lived, passkey-approved tokens and never hold the real keys.

Why

  • .env files get lost when you switch machines
  • Secrets scattered across GitHub, Cloudflare, and local files
  • New team members spend hours collecting API keys
  • No one remembers which permissions a token needs

shipkey solves all of this.

Quick Start

# Install (standalone binary)
curl -fsSL https://shipkey.dev/install.sh | bash

# Scan your project and launch the setup wizard
shipkey setup

Tip: shipkey setup will automatically open a web-based wizard connected to a local API server, guiding you through each provider with step-by-step instructions and saving keys to your password manager (1Password or Bitwarden).

Install via npm

You can also install shipkey as a project devDependency to pin the version per project:

# npm
npm install -D shipkey

# bun
bun add -d shipkey

Then run via npx / bunx:

npx shipkey setup
bunx shipkey pull

Or add scripts to your package.json:

{
  "scripts": {
    "setup": "shipkey setup",
    "keys:pull": "shipkey pull",
    "keys:push": "shipkey push"
  }
}

How It Works

shipkey scan     →  Detect .env files, workflows, wrangler configs
                    Generate shipkey.json with providers & permissions

shipkey setup    →  Open browser wizard to enter API keys
                    Save to password manager + env-specific local files

shipkey pull     →  Restore all keys from password manager to local files
                    New machine ready in seconds

shipkey sync     →  Push secrets to GitHub Actions, Cloudflare Workers
                    One command, all platforms

Supported Backends

Backend CLI Read Write List
1Password op ✅ ✅ ✅
Bitwarden bw ✅ ✅ ✅

Set the backend in shipkey.json:

{
  "backend": "bitwarden"
}

Default is "1password" if omitted (backwards compatible).

Supported Providers

shipkey auto-detects providers from your environment variable names. 40+ providers are supported with setup guides built in.

Category Provider Env Pattern
AI OpenRouter OPENROUTER_*
OpenAI OPENAI_*
Anthropic ANTHROPIC_*, CLAUDE_API_*
Google AI GEMINI_*, GOOGLE_AI_*
Replicate REPLICATE_*
Hugging Face HUGGINGFACE_*, HF_*
fal.ai FAL_*
xAI XAI_*, GROK_*
Payments Stripe STRIPE_*
Auth Clerk CLERK_*
Auth0 AUTH0_*
Social / OAuth GitHub GITHUB_*
Google GOOGLE_*, GCP_*
Discord DISCORD_*
Slack SLACK_*
Reddit REDDIT_*
Product Hunt PRODUCTHUNT_*, PH_*
Communication Agora AGORA_*
Twilio TWILIO_*
SendGrid SENDGRID_*
Resend RESEND_*
Databases Supabase SUPABASE_*
Turso TURSO_*
Upstash UPSTASH_*
Neon NEON_*
ClickHouse CLICKHOUSE_*
Redis REDIS_*
Database DATABASE_*, DB_*
Dev Platforms Expo EXPO_*
Daytona DAYTONA_*
Infrastructure Cloudflare CLOUDFLARE_*, R2_*
AWS AWS_*, EC2_*
Vercel VERCEL_*
Fly FLY_*
npm NPM_*
Sentry SENTRY_*
Web3 Coinbase COINBASE_*
Alchemy ALCHEMY_*
WalletConnect WALLETCONNECT_*
Pimlico PIMLICO_*
Etherscan ETHERSCAN_*
CMS TinaCMS TINA_*
Notion NOTION_*
Maps Mapbox MAPBOX_*
OpenWeather OPENWEATHER_*
Analytics Plausible PLAUSIBLE_*
Forms Formspree FORMSPREE_*
Security Turnstile TURNSTILE_*
Sandbox Sandbank SANDBANK_*, SANDBOX_*

Unrecognized variables are grouped under General. To request a new provider, open an issue.

Commands

shipkey setup [dir]

Launch an interactive browser-based setup wizard.

shipkey setup                  # Current directory, prod env
shipkey setup -e dev           # Dev environment
shipkey setup --port 3000      # Specify API port
shipkey setup --no-open        # Don't auto-open browser

The wizard provides:

  • Step-by-step guides for each provider (Cloudflare, AWS, Stripe, etc.)
  • Auto-inferred permission recommendations from your project code
  • One-click save to 1Password or Bitwarden
  • CLI status checks (op/bw, gh, wrangler) with install instructions

shipkey scan [dir]

Scan your project and generate shipkey.json.

shipkey scan                   # Scan and write config
shipkey scan --dry-run         # Preview without writing

Detects:

  • .env, .env.local, .env.example, .dev.vars, .envrc
  • GitHub Actions workflow secrets
  • Wrangler bindings (KV, R2, D1, Queues, AI)
  • package.json dependencies (AWS SDK, Supabase, Stripe, etc.)

Auto-infers required permissions per provider.

shipkey push [dir]

Push local env values to your password manager.

shipkey push                   # Push prod env (default)
shipkey push -e dev            # Push dev env
shipkey push --vault myteam    # Custom vault

shipkey pull [dir]

Pull secrets from your password manager and generate local env files.

shipkey pull                   # Pull prod env (default)
shipkey pull -e dev            # Pull dev env
shipkey pull --no-envrc        # Skip .envrc generation
shipkey pull --no-dev-vars     # Skip .dev.vars generation

Generates environment-specific local files:

Environment Regular projects Cloudflare Workers
dev .env.development.local .dev.vars
prod .env.production.local .dev.vars.production

Also generates:

  • .envrc with op:// references for direnv (1Password) or direct values (Bitwarden)

shipkey sync [target] [dir]

Sync secrets to external platforms.

shipkey sync                   # Sync all targets
shipkey sync github            # GitHub Actions only
shipkey sync cloudflare        # Cloudflare Workers only

Supported targets:

  • GitHub Actions — sets repository secrets via gh secret set
  • Cloudflare Workers — sets secrets via wrangler secret put

Running unattended (servers)

Set OP_SERVICE_ACCOUNT_TOKEN to a 1Password service account token and shipkey uses it instead of the desktop app. Grant the service account only the vaults that machine needs; shipkey will not create vaults with it. Keep the token on trusted machines only, never inside an AI agent's container: whoever can read it can read those vaults.

shipkey rotate <field> [dir]

Replace a secret with a fresh one at its provider, save it to your password manager, and sync it to every target that lists it. The new value is never printed.

shipkey rotate CLOUDFLARE_API_TOKEN

Configure it under rotation in shipkey.json:

"rotation": {
  "CLOUDFLARE_API_TOKEN": { "rotator": "cloudflare", "options": { "account_id": "…" }, "admin_field": "CLOUDFLARE_ADMIN_TOKEN" }
}

Order: rotate at the provider → save (3 tries; if all fail the value goes to ~/.shipkey/recovery/, mode 600) → sync targets → revoke the old value only if every target took the new one.

Rotators:

  • cloudflare — rolls an API token in place (same id and permissions). account_id for account-owned tokens. Rolling needs API Tokens Write; use admin_field to name a separate admin token. Cloudflare invalidates the old value at once.

shipkey list [dir]

List all stored secrets in your password manager.

shipkey list                   # Current project
shipkey list --all             # All projects
shipkey list -e prod           # Filter by environment

Configuration

shipkey.json is auto-generated by shipkey scan. You can also edit it manually.

{
  "project": "my-app",
  "vault": "shipkey",
  "backend": "1password",
  "providers": {
    "Cloudflare": {
      "fields": ["CLOUDFLARE_API_TOKEN", "CLOUDFLARE_ACCOUNT_ID"]
    },
    "Stripe": {
      "fields": ["STRIPE_SECRET_KEY"]
    }
  },
  "targets": {
    "github": {
      "owner/repo": ["CLOUDFLARE_API_TOKEN", "STRIPE_SECRET_KEY"]
    }
  }
}

Storage Structure

1Password

Secrets are stored as items in a vault, organized by section:

op://{vault}/{provider}/{project}-{env}/{FIELD}

Example:

op://shipkey/Cloudflare/my-app-prod/CLOUDFLARE_API_TOKEN
op://shipkey/Stripe/my-app-dev/STRIPE_SECRET_KEY

Bitwarden

Secrets are stored as Secure Note items in a folder, using custom hidden fields:

Folder: {vault}
  Item: {provider}  (Secure Note)
    Field: {project}-{env}.{FIELD}  (Hidden)

Example:

Folder: shipkey
  Item: Cloudflare
    Field: my-app-prod.CLOUDFLARE_API_TOKEN = sk-xxx
  Item: Stripe
    Field: my-app-dev.STRIPE_SECRET_KEY = sk-xxx

Keys for cloud agents: gateway and issuer

Cloud coding agents (Claude Code on the web, Codex, Cursor background agents, …) run in sandboxes you do not fully control, yet they need model APIs, package registries and deploy tokens. Putting long-lived keys into those environments means every prompt injection or leaked log is a leaked key. Two Cloudflare Workers in this repository solve that. You deploy both in your own Cloudflare account; the shipkey project runs neither for anyone.

Package What it does
packages/gateway An API gateway. The agent uses a short-lived grant token as its "API key"; the gateway checks it and swaps in the real key, which only ever lives in the Worker's secrets.
packages/issuer Signs those grant tokens after the owner approves the environment with a passkey, renews them, revokes them, and can mint other short-lived credentials (Cloudflare API tokens, R2 credentials, Tailscale auth keys, a JWT).
packages/provisioner Optional. Gives your own products (Workers) a long-lived, revocable gateway token after a passkey approval, written straight into the product Worker's secrets, so production code calls models through the same gateway.
                 ┌────────────── issuer ──────────────┐
 environment ───▶│ POST /grants      → check code     │◀── owner: types the code,
   (agent)       │ GET  /grants/<id> → grant token,   │    approves with a passkey
       │         │                     gateway token  │
       │         │ GET  /revoked     → revoked ids ───┼──┐
       │         └────────────────────────────────────┘  │ read every minute
       │                                                 ▼
       └──(gateway token as the SDK's API key)──▶ gateway ──(real key)──▶ provider
  • Agent → gateway → provider. The agent points its SDK's base URL at https://<gateway>/<provider> and uses the gateway token as the key. The gateway verifies the token's Ed25519 signature offline (no round trip to the issuer), checks its expiry, audience and provider list, applies the deployment's allow/deny rules, strips everything the agent sent as a credential, and forwards the request with the real key. The key never enters the sandbox.
  • Issuing. An environment asks the issuer for a grant and prints a check code. Its owner opens the approval page, enters the code and approves with a passkey (WebAuthn, user verification required). The signature covers the exact request and the hash of the manifest (what every grant gives), so it cannot approve anything else. Credentials live for hours; an approval renews without the owner for a few days, then asks again.
  • Revoking. One passkey action ends an environment's grants, waiting requests and environment key. The issuer publishes revoked grant ids; the gateway re-reads the list every minute and refuses them within about two minutes. If the gateway cannot read the list for 15 minutes, it refuses every request (fail closed).
  • CI without stored secrets. The issuer's roadmap covers GitHub Actions: a workflow presents its OIDC token and gets credentials limited to its repository, ref and workflow file. See the issuer's README for its current state.

Self-hosting

You need a Cloudflare account, Wrangler and a device with a passkey. Keep your deployment configuration (routes, manifest, approvers) in your own private repository; nothing in this one knows your domains or services.

  1. Issuer. Copy packages/issuer/wrangler.jsonc, set the route, RP_ID and ISSUER_URL, then create the database and the signing key:

    npx wrangler d1 create shipkey-issuer
    npx wrangler d1 migrations apply shipkey-issuer --remote
    openssl genpkey -algorithm ed25519 | npx wrangler secret put GRANT_SIGNING_KEY
    npx wrangler deploy
    
  2. Approver. Open https://<issuer>/register, create a passkey, add the JSON it shows to APPROVERS, deploy again. Adding an approver is always a configuration change you review.

  3. Manifest. Set GRANT_MANIFEST: token lifetime, renewal window, the gateway providers, and any values or minted credentials grants may get. Changing it later makes every environment ask for approval again.

  4. Gateway. Copy packages/gateway/wrangler.jsonc, set the route, GRANT_PUBLIC_KEYS (the x of https://<issuer>/jwks.json), REVOCATION_URL (https://<issuer>/revoked), GRANT_AUDIENCE (the issuer's GATEWAY_AUDIENCE) and PROVIDERS; put each provider key in with npx wrangler secret put OPENAI_API_KEY, and deploy. Use provider keys with the least permissions your agents need.

  5. Agents. In the environment: POST https://<issuer>/grants, show the check code to the owner, collect the grant with GET /grants/<id>, then set the SDK's base URL to the gateway and its API key to the gateway token.

Both READMEs list every setting, the token format and the limits (for example: an open WebSocket is not re-checked against revocations; it closes at the token's expiry, and a JWT already handed out cannot be recalled before it expires).

Requirements

  • Bun runtime
  • One of the following password manager CLIs:
  • GitHub CLI (gh) — for GitHub Actions sync
  • Wrangler — for Cloudflare Workers sync

License

MIT

Explorer des projets similaires

Chargement…