Note: Supported Node versions are 18 (>=18.19.0), 20, 22, and 24. Node 25 is not supported.
Packages
Package
Version
@osdk/client
@osdk/api
@osdk/foundry-sdk-generator
@osdk/oauth
Getting Started
To get started, visit the developer console application on your Foundry stack or see the documentation above.
Do you only want to hit specific APIs or don’t need a generated SDK? Check out the foundry-platform-typescript package, which provides standalone APIs to interact with Foundry directly without the need to generate ontology-specific SDKs.
Frontend quick start with @osdk/create-app
See the instructions on how to get set up quickly with a frontend application in our public documentation.
Installation
Install the client and auth packages via npm:
npm install @osdk/client
npm install @osdk/oauth
Client Overview
Once you have generated an SDK in your Developer Console application, you need to create your token provider via OAuth. This token provider is supplied by creating the auth provider from the @osdk/oauth package. Once you have your token provider set up, you can pass the authentication instance when creating the client.
OAuth Instructions
Public Client
To create a public client, you will need to create an application in the Developer Console app on your Foundry stack. You will need the client ID as well as the base URL of your Foundry stack and a redirect URL that you can configure in Developer Console.
For more details, refer to the documentation provided in your Developer Console application.
Confidential Client
To create a confidential client, follow the steps to create a service user in the Developer Console. You will need the client ID, client secret, and the base URL of your Foundry stack.
For more details, refer to the public docs or documentation in the Developer Console application.
Creating Your Client
import { createClient } from "@osdk/client";
const client = createClient(
"https://stack.palantir.com",
"ri.foundry.main",
auth, // This is the auth that we created above.
);
For more details, refer to the public docs or documentation in the Developer Console application.
Dev workflow
Fork the repo
Create a branch
pnpm install
Add your code
Run pnpm check from root before pushing.
pnpm check runs the same set of tasks CI runs: lint (incl. formatting), typecheck, unit tests, the API report (api-extractor), package-typing checks (attw), bundle checks, spelling, and monorepolint. A green pnpm check locally means CI will be green too, so there is no separate CI-only check to get surprised by.
To iterate faster, run a single task, optionally scoped to one package with turbo’s --filter:
📘 Note
Target packages with --filter; don’t pass pnpm --dir <path> turbo (the --dir flag breaks turbo).
Add a changeset
📘 Note
Follow semver rules here.
Assuming you’ve run pnpm install, run changeset (or pnpm exec changeset).
The tool will split things into changed vs unchanged packages (which you may need if you decide to add changeset logs in a future PR for past features)
Select the packages you want the changeset applied to using the arrow keys (up/down) and space-bar to “select” the package.
Press enter to continue.
The CLI will go through a progression of asking you which packages you previously selected need a major bump? Then a minor bump? Patch bumps assumed for remaining packages changed. Arrows and space bar to select. Enter to continue (even if you selected nothing).
Enter a change (or press enter on empty to open your editor.)
If you’re curious what the final build output might look like you can run pnpm build from root.
Test coverage
To check test coverage locally, run the following from the root:
pnpm run coverage
This runs every package’s test suite with coverage collection and then prints a
per-package line-coverage summary and the repo-wide totals to your terminal:
Coverage by package (lines):
19.7% @osdk/cli
59.3% @osdk/react
76.0% @osdk/client
...
Total across 38 package(s), 1407 files:
Lines : 61.08% (61682/100984)
Full HTML report: coverage/index.html
It also writes a full HTML report to coverage/index.html; open it in a browser
for line-by-line detail. Coverage measures each package’s src/** and excludes
tests, generated code, and index.ts barrel files.
TypeScript Ontology SDK
A TypeScript library for interacting with Palantir’s Ontology.
Documentation
Packages
Getting Started
To get started, visit the developer console application on your Foundry stack or see the documentation above.
Do you only want to hit specific APIs or don’t need a generated SDK? Check out the foundry-platform-typescript package, which provides standalone APIs to interact with Foundry directly without the need to generate ontology-specific SDKs.
Frontend quick start with @osdk/create-app
See the instructions on how to get set up quickly with a frontend application in our public documentation.
Installation
Install the client and auth packages via npm:
Client Overview
Once you have generated an SDK in your Developer Console application, you need to create your token provider via OAuth. This token provider is supplied by creating the auth provider from the
@osdk/oauthpackage. Once you have your token provider set up, you can pass the authentication instance when creating the client.OAuth Instructions
Public Client
To create a public client, you will need to create an application in the Developer Console app on your Foundry stack. You will need the client ID as well as the base URL of your Foundry stack and a redirect URL that you can configure in Developer Console.
For more details, refer to the documentation provided in your Developer Console application.
Confidential Client
To create a confidential client, follow the steps to create a service user in the Developer Console. You will need the client ID, client secret, and the base URL of your Foundry stack.
For more details, refer to the public docs or documentation in the Developer Console application.
Creating Your Client
For more details, refer to the public docs or documentation in the Developer Console application.
Dev workflow
Fork the repo
Create a branch
pnpm installAdd your code
Run
pnpm checkfrom root before pushing.pnpm checkruns the same set of tasks CI runs: lint (incl. formatting), typecheck, unit tests, the API report (api-extractor), package-typing checks (attw), bundle checks, spelling, and monorepolint. A greenpnpm checklocally means CI will be green too, so there is no separate CI-only check to get surprised by.To iterate faster, run a single task, optionally scoped to one package with turbo’s
--filter:pnpm turbo typecheck --filter=@osdk/<package>pnpm turbo lint --filter=@osdk/<package>pnpm turbo test --filter=@osdk/<package>Add a changeset
pnpm install, runchangeset(orpnpm exec changeset).If you’re curious what the final build output might look like you can run
pnpm buildfrom root.Test coverage
To check test coverage locally, run the following from the root:
This runs every package’s test suite with coverage collection and then prints a per-package line-coverage summary and the repo-wide totals to your terminal:
It also writes a full HTML report to
coverage/index.html; open it in a browser for line-by-line detail. Coverage measures each package’ssrc/**and excludes tests, generated code, andindex.tsbarrel files.Publishing
gh auth loginto authenticate with github.compnpm install./scripts/createReleasePr.sh/scripts/tag-release.sh [COMMIT_SHA]to tag your release.Troubleshooting
./scripts/createReleasePr.sh, try runningpnpm installfirst.