---
title: "CLI quickstart"
description: "Generate and run a CLI for your API from the terminal without creating an account."
url: https://typeship.dev/docs/quickstart/cli
markdown: https://typeship.dev/docs/quickstart/cli.md
section: "Get started"
---
> ## Documentation index
> Fetch the complete documentation index at https://typeship.dev/llms.txt (every page, one line each) or the full text at https://typeship.dev/llms-full.txt.
> Append .md to any docs URL, or send Accept: text/markdown, for the markdown twin of that page.

# CLI quickstart

Generate and run a CLI for your API from the terminal without creating an account.

> For AI agents: use https://typeship.dev/agents.md for the complete CLI runbook and error contract.

The Typeship CLI can turn a public OpenAPI or GraphQL URL into a working command-line interface for that API. You do not need an account for this quickstart.

1. **Generate the CLI**
   
   Run Typeship through `npx` and write the generated package to a directory:
   
   ```bash
   npx -y @typeship-ax/cli@latest generate run \
     --definition '{"url":"https://api.acme.example.com/openapi.json"}' \
     --target cli \
     --out ./acme-cli
   ```
   
   Replace the URL with your OpenAPI document, GraphQL schema, or introspectable GraphQL endpoint.

2. **Build the package**
   
   ```bash
   cd acme-cli
   npm install
   npm run build
   ```
   
   The package contains readable source, tests, human and machine-readable API references, and an `AGENTS.md` file for coding agents.

3. **Inspect the commands**
   
   ```bash
   node dist/cli.js --help
   node dist/cli.js accounts list --help
   ```
   
   Resources and commands come from the API contract. Path parameters become positional arguments, and query, header, and body fields become typed flags.

4. **Call your API**
   
   Set the credential described by your API, then run a command:
   
   ```bash
   export ACME_TOKEN="your-api-token"
   node dist/cli.js accounts list --limit 5
   ```
   
   Success prints JSON to stdout. Failures use stable exit codes and structured error envelopes when the command runs in a pipe, CI job, or agent.

> **Note**
> Anonymous generation includes the first 25 operations and does not retain your API contract or generated files. A linked Free Project retains and diagnoses the complete contract and keeps the same first 25 operations current through pull requests.

## Keep the CLI current

When you want history and automatic regeneration, sign in with `typeship login`, create a Project, and add a GitHub Delivery. You can also add an MCP server or SDKs from the same API contract.

Continue with the [Console quickstart](https://typeship.dev/docs/quickstart/console) for the saved workflow or [add Typeship to an existing API repository](https://typeship.dev/docs/guides/add-to-an-existing-api-repo).

## Sitemap

[Every page of these docs](https://typeship.dev/llms.txt)
