Skip to content
The PyAI command linev0.5.0

Natural voice.
Meet your terminal.

Expressive speech. Clear transcripts. Audio in another language. Put PyAI to work with a command you can type, pipe, or hand to your coding agent.

For engineers, Cursor, Claude Code, Codex, and shell scripts.

pyai · terminal

Turn a line of text into natural speech.

pyai speak "Hello, world." -o hello.wav

What this command does

Generate speech with Speak and save hello.wav.

Command preview · @pyai/sdk 0.5.0your workflow, fewer steps

Short commands. Real files.

JSON when your tools need it.

One profile, across your workflow.

01 / Get set up

From one install to your first file.

Use Node.js 22 or later. Install from npm, sign in, and turn a line of text into audio.

Ready from your terminal

Install @pyai/sdk@0.5.0 from npm. Sign in through your browser, or use an existing API key for scripts and coding agents. Your project’s usual scopes and usage limits apply.

  1. 1

    Install the CLI

    Install the published package from npm. Source and local package options are also available.

  2. 2

    Sign in to your project

    Run pyai login, confirm the terminal code, and approve a project in your browser.

  3. 3

    Make something you can hear

    Generate an audio file, then keep going with your own text and recordings.

Read the full CLI guide
install · choose your build

Install the official CLI from npm.

npm install -g @pyai/sdk@0.5.0
pyai --version
authenticate · then create

Sign in with your PyAI account:

pyai login
pyai whoami
pyai speak "Hello, world." -o hello.wav

02 / Stay in your flow

Small commands. Room to build.

Go from one-off audio to repeatable workflows without rebuilding request bodies and polling loops.

Speak the language of your shell.

Pipe text in. Save audio out. Transcribe a recording directly to a text file.

pipes · files
echo "Your order is ready." | pyai speak -o ready.wav
pyai hear call.wav --text-only > transcript.txt

Start with a project, not a blank file.

Scaffold a starter for your stack. Browse recipes when you need a complete workflow.

init · choose your stack
pyai init voice-demo --template typescript
pyai recipes

Familiar shortcuts

-o for output, -f for file, -t for text, -p for profile, and -j for JSON.

Separate your workspaces

Save profiles, inspect them with pyai profiles list, and select one with pyai use PROFILE.

Keep control of access

Inspect identity with pyai whoami. Remove local credentials with pyai logout; revoke the key in the console.

03 / Build with your coding agent

The same CLI, on both sides of the prompt.

You authorize access. Your agent reads the command contract and uses the profile you choose.

Give Cursor, Claude Code, or Codex a concise guide instead of a pasted API key. Structured output and explicit commands make each step easier to inspect and reuse.

discover · inspect · run
pyai schema --json
pyai speak --help
pyai recipes speak

What this command does

Discover the local command contract and inspect a speech workflow.

A few things worth knowing.

What is the PyAI CLI?

The PyAI CLI brings speech generation, transcription, dubbing and API workflows to your terminal. Engineers and coding agents use the same commands, saved profiles and structured JSON output.

How do I install this version?

Install @pyai/sdk@0.5.0 from npm with npm install -g @pyai/sdk@0.5.0. The package includes the pyai executable, handbook and agent guide. Run pyai login, then create your first audio file.

Does browser login work like gcloud login?

The browser flow lets you run pyai login, confirm a terminal code in the console and approve a project. It also supports remote terminals with --no-browser. Use pyai login --key-stdin to save an existing API key, or provide PYAI_API_KEY directly for unattended automation.

Can Cursor, Claude Code and Codex use it?

Yes. An agent with terminal access can discover commands through pyai schema --json, inspect recipes and run the CLI using an authorized profile. Give it the CLI agent guide and keep API keys out of prompts, source files and logs.

Does the CLI change speech quality or pricing?

The CLI calls the same PyAI APIs as the SDKs. Your selected voice, language and model determine the output. API usage follows your project’s normal billing and limits; the CLI does not add a separate usage charge.

When should I use an SDK instead?

Use the CLI for file workflows, scripts, exploration and agent tools. Keep the SDK for application code and realtime audio sessions. Existing API keys work in both, so adopting the CLI does not require migrating your application.

Your next voice workflow starts here.

Copy a command. Make it yours.