@runtypelabs/cli
v0.1.8
Published
Command-line interface for Runtype AI platform
Readme
Runtype CLI
Command-line interface for the Runtype AI platform.
Official CLI tool published on npm
Installation
npm install -g @runtypelabs/cliQuick Start
1. Create Account & Authenticate
# Create a new account
runtype auth signup
# Or login to existing account
runtype auth login
# Check authentication status
runtype auth whoami2. Start Interactive Chat
# Start a chat session
runtype talk
# With custom model
runtype talk --model claude-3-opus --temperature 0.2
# With system prompt
runtype talk --system "You are an expert in Next.js development"3. Manage Flows and Records
# List flows
runtype flows list
# Run a flow
runtype flows run <flow-id> --record <record-id>
# Create a record
runtype records create --name "My Record" --type "document"
# List records
runtype records list --type documentChat Commands
During a chat session, you can use these special commands:
/help- Show available commands/clear- Clear conversation history/save [filename]- Save session to file/load <filename>- Load session from file/export- Export conversation as markdown/model <model>- Change AI model/temp <value>- Set temperature (0-1)/info- Show session information/exit- Exit chat session
Configuration
# View all configuration
runtype config get
# Set API URL
runtype config set apiUrl https://api.runtype.com
# Set default model
runtype config set defaultModel gpt-4o
# Reset configuration
runtype config resetDevelopment
Local Development Setup
# From repository root, navigate to CLI package
cd packages/cli
# Install dependencies
pnpm install
# Copy environment template and configure for local development
cp .env.example .env
# Edit .env with your local settings (API URL, Clerk key, etc.)
# Build the CLI
pnpm buildRunning the CLI Locally
Option 1: Development mode with hot reload
# Run with tsx watch (for development)
pnpm dev
# Run specific commands in dev mode
pnpm dev -- --help
pnpm dev -- auth login
pnpm dev -- config getOption 2: Build and run directly
# Build first
pnpm build
# Run built CLI with Node.js
node dist/index.js --help
node dist/index.js auth login
node dist/index.js talkOption 3: Install globally for testing
# Build and install globally
pnpm build
npm install -g .
# Now use the runtype command anywhere
runtype --help
runtype auth login
runtype talk
# After making changes, rebuild and reinstall
pnpm build && npm install -g .Local Environment Configuration
Create a .env file for local development:
# Point to local API and dashboard
RUNTYPE_API_URL=http://localhost:8787
RUNTYPE_DASHBOARD_URL=http://localhost:3001
# Add your Clerk publishable key (get from Clerk dashboard)
CLERK_PUBLISHABLE_KEY=pk_test_your_key_here
# Optional: Set defaults
RUNTYPE_DEFAULT_MODEL=meta/llama3.1-8b-instruct-free
RUNTYPE_DEFAULT_TEMPERATURE=0.7
DEBUG=trueTesting
# Run tests
pnpm test
# Watch mode
pnpm test:watchEnvironment Variables
RUNTYPE_API_URL- API endpoint URL (default: https://api.runtype.com)RUNTYPE_DASHBOARD_URL- Dashboard URL (default: https://use.runtype.com)CLERK_PUBLISHABLE_KEY- Clerk public key for OAuthRUNTYPE_DEFAULT_MODEL- Default AI model (default: gpt-4o)RUNTYPE_DEFAULT_TEMPERATURE- Default temperature (default: 0.7)DEBUG- Enable debug mode
License
MIT
