0.1.2 • Published 6 months ago
@rightbrain/cli v0.1.2
Generate SDK
Generates TypeScript SDK code from your RightBrain tasks:
Installation
npm install -g @rightbrain/cli
or
pnpm add -g @rightbrain/cli
or
yarn global add @rightbrain/cliUsage
Create a configuration file (rightbrain.config.ts):
import { type Config } from "@rightbrain/cli"
const config: Config = {
  orgId: "your-org-id",
  projectId: "your-project-id",
  oauthUrl: "https://oauth.rightbrain.ai",
  apiUrl: "https://api.rightbrain.ai",
  clientId: "your-client-id",
  clientSecret: "your-client-secret",
  output: "./generated",
}
export default configCommands
Generate SDK
Generates TypeScript SDK code from your RightBrain tasks:
rightbrain generateOptions:
-o, --output <path>- Output directory for generated code-t, --task-ids <ids>- Comma-separated list of task IDs to generate (optional)
You can also specify task IDs in your config file:
const config: Config = {
  // ... other config options
  taskIds: ["task-id-1", "task-id-2"], // Optional: Generate only these tasks
}Create Task
Creates a new task in your RightBrain project:
rightbrain create-task \
--name "My Task" \
--description "Task description" \
--system-prompt "System prompt" \
--user-prompt "User prompt" \
--model "gpt-4" \  # Can use model name or UUID
--output-format '{"response": "string"}' \
--image-requiredOptions:
-n, --name- Task name-d, --description- Task description-s, --system-prompt- System prompt-u, --user-prompt- User prompt-m, --model- LLM model name or UUID (e.g., "gpt-4" or model UUID)-f, --output-format- Output format (JSON string)-i, --image-required- Whether image is required--disabled- Create task in disabled state
Configuration Options
| Option | Type | Description | 
|---|---|---|
| orgId | string | Your organization ID | 
| projectId | string | Your project ID | 
| oauthUrl | string | OAuth2 server URL | 
| apiUrl | string | RightBrain API URL | 
| clientId | string | OAuth2 client ID | 
| clientSecret | string | OAuth2 client secret | 
| output | string | Output directory for generated code | 
| taskIds | string[] | Optional: Generate only these tasks | 
| envFilePath | string | Optional: path to environment .env file | 
License
MIT