CLI

Markdown

The Devcaster CLI helps you generate type-safe code and manage your Devcaster workspace.

Installation

Install the Devcaster CLI using the installation script:

curl -fsSL https://devcaster.dev/install | bash

Or using wget:

wget -qO- https://devcaster.dev/install | bash

Authentication

Manage your Devcaster authentication directly from the terminal.

Login

Authenticate with your Devcaster account:

devcaster login

This opens your browser to complete authentication and stores your API key locally.

To authenticate without opening a browser (useful for SSH/remote sessions):

devcaster login --no-browser

This displays a URL to manually open in your browser.

Check authentication status

Verify your current authentication:

devcaster whoami

This displays your current API key or indicates if you're not authenticated.

Logout

Remove stored authentication:

devcaster logout

Generate type definitions

Generate TypeScript or Python type definitions for all Devcaster tools. These types provide type safety when using direct tool execution (devcaster.tools.execute()), helping you pass the correct parameters and catch errors early.

Auto-detect and generate

The CLI auto-detects your project language. In your project directory:

devcaster generate

For TypeScript projects only, include individual tool types:

devcaster generate --type-tools

The CLI automatically:

  • Detects your project type (Python or TypeScript)
  • Generates appropriate type definitions

Specify output directory

devcaster generate --output-dir ./my-types

Language-specific commands

For explicit control, use language-specific commands:

Basic generation:

devcaster ts generate

Generate as single file:

devcaster ts generate --compact

Include individual tool types:

devcaster ts generate --type-tools

Generate both .ts and .js files:

devcaster ts generate --transpiled

Custom output directory:

devcaster ts generate --output-dir ./my-types

Basic generation:

devcaster py generate

Custom output directory:

devcaster py generate --output-dir ./my_types