CLI
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 | bashOr using wget:
wget -qO- https://devcaster.dev/install | bashAuthentication
Manage your Devcaster authentication directly from the terminal.
Login
Authenticate with your Devcaster account:
devcaster loginThis 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-browserThis displays a URL to manually open in your browser.
Check authentication status
Verify your current authentication:
devcaster whoamiThis displays your current API key or indicates if you're not authenticated.
Logout
Remove stored authentication:
devcaster logoutGenerate 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 generateFor TypeScript projects only, include individual tool types:
devcaster generate --type-toolsThe CLI automatically:
- Detects your project type (Python or TypeScript)
- Generates appropriate type definitions
Specify output directory
devcaster generate --output-dir ./my-typesLanguage-specific commands
For explicit control, use language-specific commands:
Basic generation:
devcaster ts generateGenerate as single file:
devcaster ts generate --compactInclude individual tool types:
devcaster ts generate --type-toolsGenerate both .ts and .js files:
devcaster ts generate --transpiledCustom output directory:
devcaster ts generate --output-dir ./my-typesBasic generation:
devcaster py generateCustom output directory:
devcaster py generate --output-dir ./my_types