TypeScript
The TypeScript client uses HTTP/JSON against the clone API. This is not
CrowdStrike production. Base URL on Compose is
http://crowdstrike-api.localhost:8088.
The product sample is Hosts queryDevices (GET /devices/queries/devices/v1).
hello / fetchHello are sample health helpers, not a Falcon collection.
import { PlatformClient } from '@platform/hello-client';
const client = new PlatformClient({
baseUrl: 'http://crowdstrike-api.localhost:8088',
token: process.env.PLATFORM_TOKEN,
});
await client.queryDevices();
await client.queryDevices("hostname:'win*'");
Hello sample
import { fetchHello, PlatformClient } from '@platform/hello-client';
const { message, source } = await fetchHello('http://crowdstrike-api.localhost:8088');
const client = new PlatformClient({ baseUrl: 'http://crowdstrike-api.localhost:8088' });
await client.healthz();
await client.hello();
fetchHello and useHello are one-call helpers. PlatformClient covers the
full surface (queryDevices, hello, healthz, and the spec).
Install
- macOS
- Linux
- Windows
Needs Node 22+.
pnpm add @platform/hello-client
npm install @platform/hello-client and yarn add @platform/hello-client
also work.
Install Node 22+ (LTS). In a new PowerShell:
pnpm add @platform/hello-client
Or npm install @platform/hello-client. Restart the terminal after installing
Node if the command is not found.