Skip to content
← Public packages

@kody/origin

Inspect Cursor Origin repositories, pull requests, and installations with a saved Origin App.

FollowFork

Files

README.md

70 lines · 3.1 KB · Markdown

@kody/origin

Intent

Give Kody agents a durable, secret-safe way to call the Cursor Origin REST API (repos, pull requests, installation discovery, and a raw request escape hatch) using an Origin App. Cloud Agents API keys are not Origin credentials.

This package mints short-lived app JWTs through secret_jwt_sign (EdDSA) and exchanges them for installation tokens. The Ed25519 private key never enters package or execute code. Writes default to dry-run and require confirm: true. Jobs are not enabled.

Share this listing at https://kody.codes/@kody/origin

What it does

  • Verify the Origin App rate-limit budget (rate-limit)
  • List installations and installation-visible repos
  • List or fetch repositories and pull requests
  • Preview or apply writes (repos create, pulls create/update/merge, raw request)
  • Persist app and installation ids in this package's storage (settings)

It does not create an Origin App for you, and it does not back Kody package source. Artifacts remains the durable home for Kody repos.

Prerequisites / setup

Follow coding_guide_get({ guide: "provider_origin" }). Origin Apps live at cursor.com/codebase/settings/apps.

  1. Create an Origin App and copy the app id (app_01…).
  2. Generate an Ed25519 key pair locally. Register only the public key on the app. Keep the PKCS#8 private key out of chat and out of git.
  3. Install the app into a codebase. After install, copy the installation id (i_01…).
  4. Save the private key in Kody (do not paste it in chat):
https://kody.codes/account/secrets/new?name=originAppPrivateKey&description=Origin%20App%20Ed25519%20PKCS%238%20private%20key&allowedHosts=api.cursor.com&allowedCapabilities=secret_jwt_sign&scope=user

Approve host api.cursor.com and capability secret_jwt_sign.

  1. Persist the readable ids with ./settings (confirm: true), or pass appId / installationId on each call. Leftover user values named originAppId / originInstallationId are copied into package storage on first read.

Default helper input: omit account, integrationName, and secretName. The package uses secret originAppPrivateKey and storage keys originAppId / originInstallationId.

There is no Origin OAuth lane. /connect/oauth is not used here.

Agents: import paths, smoke checks, mutation guards, and multi-app notes live in AGENTS.md.

Done when

  • Secret originAppPrivateKey exists with host api.cursor.com and secret_jwt_sign
  • describeOrigin returns package: "@kody/origin" without reading secrets
  • rate-limit succeeds with the Origin App (not cursorApiKey)
  • Mutation helpers preview with dryRun: true before any confirm: true

Branding

community-icon.svg is Cursor's official cube mark (white cube on black). Cursor and Origin are trademarks of Anysphere, Inc. This package is not affiliated with or endorsed by Cursor. Keep the MIT license and this Intent section when forking.

Docs