0.1.2 • Published 6 months ago

@rightbrain/cli v0.1.2

Weekly downloads
-
License
-
Repository
-
Last release
6 months ago

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/cli

Usage

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 config

Commands

Generate SDK

Generates TypeScript SDK code from your RightBrain tasks:

rightbrain generate

Options:

  • -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-required

Options:

  • -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

OptionTypeDescription
orgIdstringYour organization ID
projectIdstringYour project ID
oauthUrlstringOAuth2 server URL
apiUrlstringRightBrain API URL
clientIdstringOAuth2 client ID
clientSecretstringOAuth2 client secret
outputstringOutput directory for generated code
taskIdsstring[]Optional: Generate only these tasks
envFilePathstringOptional: path to environment .env file

License

MIT

0.1.2

6 months ago

0.1.1

6 months ago

0.1.0

6 months ago

0.0.8

8 months ago

0.0.7

9 months ago

0.0.6

9 months ago

0.0.5

9 months ago

0.0.4

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago