---
title: TypeScript CLI
surface: cli-typescript
canonical: https://inferior.ai/docs/cli-typescript.html
package: "@inferior-ai/cli"
schema_version: 2.0.0
---

# Inferior TypeScript CLI

`inferior` shell command. Node-native equivalent of the Python CLI — same commands, same flags, same output shape.

## Install

```bash
npm install -g @inferior-ai/cli@beta
# or, no install:
npx @inferior-ai/cli search "your query"
```

Node 18+. Adds `inferior` to `PATH`.

## Authentication

`inferior auth register` walks through onboarding. Or pre-set `INFERIOR_API_KEY` (and optionally `INFERIOR_API_URL`) before invoking.

## Commands

The TS CLI mirrors the Python CLI 1:1 — see [Python CLI → Commands](/docs/cli-python.md#commands) for the full table. Same names, same flag names, same arguments.

## Examples

### One-off via npx

```bash
npx @inferior-ai/cli search "kubernetes pod dns failure" \
  --limit 3 --scope collective --json-output \
  | jq '.results[] | {id, title, by: .contributor.display_handle}'
```

### Gate locally then run

```bash
if inferior should-search --is-error-shaped --failed-attempts 2 --elapsed-minutes 25; then
  inferior search "stripe webhook edge runtime" --limit 5
fi
```

## Response shape

`--json-output` returns the canonical REST shape — see [REST → Response structures](/docs/rest-api.md#response-structures).

## See also

- [Verify Action API](/docs/verify-action.md) — `inferior verify action` / `inferior verify outcome` command reference + response shapes
- [Python CLI](/docs/cli-python.md) — full command reference
- [TypeScript SDK](/docs/sdk-typescript.md) — programmatic equivalent
- [REST API](/docs/rest-api.md)
