2 min lesson
Cursor SDK, TypeScript or Python
Complete "Cursor SDK, TypeScript or Python". Check the final state against the lesson before you move on.
Check your understanding
Run this practice: SDK quickstart — one first run, credentials from the environment.
Outcome: One completed run, a request ID support can trace, and a named owner for the usage — the credential boundary is explicit, not assumed.
SDK quickstart — one first run, credentials from the environment
Cursor SDK, TypeScript or Python
DoPick the host language and install the SDK:
@cursor/sdk for TypeScript, or the Python SDK.SayThe key stays out of the source. I read it from an environment variable so nothing secret lands in the repo.
DoLoad the API key from the environment, not a hardcoded string.
Type
Summarize what changed in the last five commits and flag any risky edits.DoStart one local run with that one-line prompt against the working directory.
SayMy code runs locally, but the model still runs on Cursor's hosted service through my credentials, and the run is billed to whoever owns this key.
DoRead the result (stream it while a human is watching), then record the request ID and the usage owner.
SeeOne completed run, a request ID support can trace, and a named owner for the usage — the credential boundary is explicit, not assumed.
Learn more
Optional practice
Practice: Cursor SDK, TypeScript or Python
QYou've applied it. What actually proves the work is done, not just a plausible answer?