### Install Orvanta CLI Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/README.md Install the Orvanta CLI globally using npm and verify the installation. ```sh npm install -g @orvanta/cli orvanta --version ``` -------------------------------- ### Start Orvanta App Dev Server Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/preview/SKILL.md Use this command to start the Orvanta app development server. Navigate to the app's raw path first. The `--port` flag specifies the port for the local app server. ```bash cd __raw_app && orvanta app dev --no-open --port 4000 ``` -------------------------------- ### Load S3 File Stream Example Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-bun/SKILL.md Shows how to load the content of a file from S3 as a stream. The stream can be read directly, for example, as text. ```typescript let fileContentBlob = await orvanta.loadS3FileStream(inputFile) // if the content is plain text, the blob can be read directly: console.log(await fileContentBlob.text()); ``` -------------------------------- ### Start Orvanta Dev Server in Direct Mode Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/preview/SKILL.md Use this command to start the Orvanta dev server in direct mode for flows or scripts. This mode provides the remote dev-page URL. The `--no-open` flag prevents the browser from automatically opening. ```bash orvanta dev --path --no-open ``` -------------------------------- ### Standard Python Imports Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-python3/SKILL.md Common Python libraries are automatically installed and available for use in your scripts. No installation instructions are needed. ```python import requests import pandas as pd from datetime import datetime ``` -------------------------------- ### Start Orvanta Dev Server in Proxy Mode Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/preview/SKILL.md Use this command to start the Orvanta dev server in proxy mode for flows or scripts. This mode exposes the dev page on a localhost URL that redirects to the remote dev page. The `--proxy-port` flag specifies the port for the proxy. ```bash orvanta dev --proxy-port 4000 --path --no-open ``` -------------------------------- ### Bun TypeScript Workflow Example Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-workflow-as-code/SKILL.md Demonstrates the structure of a Bun TypeScript Workflow-as-Code script, including necessary imports and the workflow entrypoint. ```typescript import { task, taskScript, taskFlow, step, sleep, waitForApproval, getResumeUrls, parallel, workflow, } from "@orvanta/client"; const process = task(async (x: string): Promise => { return `processed: ${x}`; }); export const main = workflow(async (x: string) => { const result = await process(x); return { result }; }); ``` -------------------------------- ### Example SQL Migration File Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/raw-app/SKILL.md Create SQL files in the `sql_to_apply/` directory for database schema changes. Use `CREATE TABLE IF NOT EXISTS` for idempotency. ```sql CREATE TABLE IF NOT EXISTS users ( id SERIAL PRIMARY KEY, email TEXT NOT NULL UNIQUE, name TEXT, created_at TIMESTAMP DEFAULT NOW() ); ``` -------------------------------- ### PostgreSQL Resource Configuration Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/resources/SKILL.md Example configuration for a PostgreSQL resource, specifying connection details and credentials. ```json { "resource_type": "postgresql", "value": { "host": "localhost", "port": 5432, "user": "postgres", "password": "$var:g/all/pg_password", "dbname": "orvanta", "sslmode": "prefer" } } ``` -------------------------------- ### MySQL Resource Configuration Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/resources/SKILL.md Example configuration for a MySQL resource, including host, port, user, password, and database name. ```json { "resource_type": "mysql", "value": { "host": "localhost", "port": 3306, "user": "root", "password": "$var:g/all/mysql_password", "database": "myapp" } } ``` -------------------------------- ### Python Workflow Example Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-workflow-as-code/SKILL.md Illustrates the structure of a Python Workflow-as-Code script, showing decorator usage for tasks and workflows. ```python from orvanta import task, task_script, task_flow, step, sleep, wait_for_approval, get_resume_urls, parallel, workflow @task() async def process(x: str) -> str: return f"processed: {x}" @workflow async def main(x: str): result = await process(x) return {"result": result} ``` -------------------------------- ### Resource File Structure Example Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/resources/SKILL.md Defines the basic structure of a resource file, including the value, description, and resource type. ```json { "value": { "host": "db.example.com", "port": 5432, "user": "admin", "password": "$var:g/all/db_password", "dbname": "production" }, "description": "Production PostgreSQL database", "resource_type": "postgresql" } ``` -------------------------------- ### Variable Reference Example Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/resources/SKILL.md Illustrates how to reference global, user, or folder variables within resource values using the $var syntax. ```json { "value": { "api_key": "$var:g/all/api_key", "secret": "$var:u/admin/secret" } } ``` -------------------------------- ### Load S3 File Content Example Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-bun/SKILL.md Demonstrates how to load the content of a file from S3. If the file is text, it can be decoded and printed. ```typescript let fileContent = await orvanta.loadS3File(inputFile) // if the file is a raw text file, it can be decoded and printed directly: const text = new TextDecoder().decode(fileContentStream) console.log(text); ``` -------------------------------- ### Common Cron Expression Examples Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/schedules/SKILL.md Illustrates common cron expressions for various scheduling needs, from daily execution to specific intervals and weekdays. ```text 0 0 0 * * * ``` ```text 0 0 12 * * * ``` ```text 0 */5 * * * * ``` ```text 0 0 9 * * 1-5 ``` ```text 0 0 0 1 * * ``` -------------------------------- ### denoS3LightClientSettings Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-bunnative/SKILL.md Gets S3 client settings, either from a specified resource path or workspace defaults. ```APIDOC ## denoS3LightClientSettings ### Description Gets S3 client settings, either from a specified resource path or workspace defaults. ### Method async ### Parameters * **s3_resource_path** (string | undefined) - Path to S3 resource (uses workspace default if undefined). ### Returns * **DenoS3LightClientSettings** - S3 client configuration settings. ``` -------------------------------- ### Resource Reference Example Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/resources/SKILL.md Shows how to reference another Orvanta resource within a resource's value field using the $res syntax. ```json { "value": { "database": "$res:f/databases/postgres" } } ``` -------------------------------- ### Get HTTP Client Instance Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-python3/SKILL.md Retrieve the configured httpx.Client instance for making API requests to the Orvanta API. ```python import orvanta import httpx # Get the HTTP client instance. # # Returns: # Configured httpx.Client for API requests def get_client() -> httpx.Client: pass ``` -------------------------------- ### denoS3LightClientSettings Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-bun/SKILL.md Gets S3 client settings, either from a specified S3 resource or workspace default. ```APIDOC ## denoS3LightClientSettings ### Description Gets S3 client settings, either from a specified S3 resource or workspace default. ### Method async ### Signature denoS3LightClientSettings(s3_resource_path: string | undefined): Promise ### Parameters * **s3_resource_path** (string | undefined) - Optional. Path to S3 resource (uses workspace default if undefined). ``` -------------------------------- ### Connect to External Database Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-duckdb/SKILL.md Attach an external database resource using its path and specify the type, for example, PostgreSQL. ```sql ATTACH '$res:path/to/resource' AS db (TYPE postgres); SELECT * FROM db.schema.table; ``` -------------------------------- ### Get Deno S3 Light Client Settings Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-bunnative/SKILL.md Obtains S3 client settings, defaulting to workspace settings if no S3 resource path is provided. ```typescript async denoS3LightClientSettings(s3_resource_path: string | undefined): Promise ``` -------------------------------- ### Calling Backend Runnable from Frontend Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/raw-app/SKILL.md Example of how to import and call a backend runnable from the frontend using the auto-generated `orvanta.ts` file. This ensures type-safe communication between frontend and backend. ```typescript import { backend } from './orvanta'; // Call a backend runnable const user = await backend.get_user({ user_id: '123' }); ``` -------------------------------- ### AWS S3 Resource Configuration Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/resources/SKILL.md Example configuration for an AWS S3 resource, specifying bucket, region, and access credentials. ```json { "resource_type": "s3", "value": { "bucket": "my-bucket", "region": "us-east-1", "accessKeyId": "$var:g/all/aws_access_key", "secretAccessKey": "$var:g/all/aws_secret_key" } } ``` -------------------------------- ### Basic PHP Script Structure Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-php/SKILL.md A PHP script must start with ` $param1, "count" => $param2]; } ``` -------------------------------- ### R Script Execution Annotations Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-rlang/SKILL.md Provides examples of comment annotations used in R scripts to control execution behavior, such as verbosity for package resolution and installation, and enabling sandboxing. ```r #renv_verbose = true # Show verbose renv output during resolution #renv_install_verbose = true # Show verbose output during package installation #sandbox = true # Run in nsjail sandbox (requires nsjail) ``` -------------------------------- ### S3 Operations with Orvanta Client Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-bunnative/SKILL.md Provides examples for common S3 operations including loading file content, loading as a stream, and writing files to S3. ```typescript import * as orvanta from "@orvanta/client"; // Load file content from S3 const content: Uint8Array = await orvanta.loadS3File(s3object); // Load file as stream const blob: Blob = await orvanta.loadS3FileStream(s3object); // Write file to S3 const result: orvanta.S3Object = await orvanta.writeS3File( s3object, // Target path (or undefined to auto-generate) fileContent, // string or Blob s3ResourcePath // Optional: specific S3 resource to use ); ``` -------------------------------- ### Make HTTP GET Request Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-python3/SKILL.md Make an HTTP GET request to the Orvanta API. Additional arguments can be passed to httpx.get. ```python import orvanta import httpx # Make an HTTP GET request to the Orvanta API. # # Args: # endpoint: API endpoint path # raise_for_status: Whether to raise an exception on HTTP errors # **kwargs: Additional arguments passed to httpx.get # # Returns: # HTTP response object def get(endpoint, raise_for_status = True, **kwargs) -> httpx.Response: pass ``` -------------------------------- ### Create a New Raw App Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/raw-app/SKILL.md Use this command to create a new raw app, providing a summary, path, and framework. This is the non-interactive mode. ```bash orvanta app new \ --summary "Customer dashboard" \ --path f/sales/dashboard \ --framework react19 ``` -------------------------------- ### Get Resume Endpoints (Deprecated) Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-bun/SKILL.md Deprecated method to get resume and cancel endpoints for a flow. Use `getResumeUrls` instead. ```typescript getResumeEndpoints(approver?: string): Promise<{ approvalPage: string; resume: string; cancel: string; }> ``` -------------------------------- ### Get Current User Information Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-python3/SKILL.md Retrieves the current user's details. This function can be used to get information about the authenticated user. ```python user_info = client.whoami() ``` -------------------------------- ### Create a New Raw App Interactively Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/raw-app/SKILL.md This command initiates the interactive wizard for creating a raw app. It should only be run by a human in a terminal. ```bash orvanta app new ``` -------------------------------- ### Get Boto3 S3 Connection Settings Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-python3/SKILL.md Generates settings for establishing an S3 connection using boto3, given an S3 resource path. ```python def get_boto3_connection_settings(s3_resource_path: str = '') -> Boto3ConnectionSettings ``` -------------------------------- ### Initialize a Project Directory Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/README.md Initialize a new project directory with Orvanta CLI. This command sets up the necessary configuration files, agent prompts, and AI coding assistant guides for a new project. ```sh orvanta init ``` -------------------------------- ### Get Flow Resume Endpoints (Deprecated) Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-bunnative/SKILL.md Deprecated method to get flow resume and cancel API endpoints. Use `getResumeUrls` instead. ```typescript getResumeEndpoints(approver?: string): Promise<{ approvalPage: string; resume: string; cancel: string }> ``` -------------------------------- ### CLI: List Resources Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/resources/SKILL.md Command to list all available resources managed by Orvanta. ```bash orvanta resource list ``` -------------------------------- ### getResult Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-bunnative/SKILL.md Gets the result of a completed job. ```APIDOC ## getResult ### Description Get the result of a completed job. ### Method `async getResult(jobId: string): Promise` ### Parameters * **jobId** (string) - Required - ID of the completed job. ### Returns * Job result (any) ``` -------------------------------- ### Importing Packages in Bun/TypeScript Scripts Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-bun/SKILL.md Import external packages and functions as needed for your Bun/TypeScript scripts. Example shows importing 'stripe' and a function from 'some-package'. ```typescript import Stripe from "stripe"; import { someFunction } from "some-package"; ``` -------------------------------- ### getResult Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-bun/SKILL.md Gets the result of a completed job. ```APIDOC ## getResult ### Description Get the result of a completed job. ### Method `async getResult(jobId: string): Promise` ### Parameters * **jobId** (string) - Required - ID of the completed job ### Returns * Job result ``` -------------------------------- ### CLI: List Resource Types with Schemas Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/resources/SKILL.md Command to list all defined resource types along with their associated JSON schemas. ```bash orvanta resource-type list --schema ``` -------------------------------- ### Get Variable Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-bunnative/SKILL.md Retrieves a variable's value by its path. ```typescript async getVariable(path: string): Promise ``` -------------------------------- ### getResultMaybe Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-bunnative/SKILL.md Gets the result of a job if completed, or its current status. ```APIDOC ## getResultMaybe ### Description Get the result of a job if completed, or its current status. ### Method `async getResultMaybe(jobId: string): Promise` ### Parameters * **jobId** (string) - Required - ID of the job. ### Returns * Object with started, completed, success, and result properties (any) ``` -------------------------------- ### Rust Script with Dependencies Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-rust/SKILL.md Illustrates how to specify dependencies for a Rust script using a partial `cargo.toml` block at the beginning of the script file. Serde is pre-included. ```rust //! ```cargo //! [dependencies] //! anyhow = "1.0.86" //! reqwest = { version = "0.11", features = ["json"] } //! tokio = { version = "1", features = ["full"] } //! ``` use anyhow::anyhow; // ... rest of the code ``` -------------------------------- ### getResultMaybe Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-bun/SKILL.md Gets the result of a job if completed, or its current status. ```APIDOC ## getResultMaybe ### Description Get the result of a job if completed, or its current status. ### Method `async getResultMaybe(jobId: string): Promise` ### Parameters * **jobId** (string) - Required - ID of the job ### Returns * Object with started, completed, success, and result properties ``` -------------------------------- ### CLI: Push Resources Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/resources/SKILL.md Command to synchronize local resources with the Orvanta platform. Use with caution. ```bash orvanta sync push ``` -------------------------------- ### Get Workspace ID Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-python3/SKILL.md Retrieves the unique identifier for the current workspace. ```python get_workspace() -> str ``` -------------------------------- ### App Launch Configuration Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/preview/SKILL.md Use this JSON configuration for apps in .claude/launch.json. It specifies the runtime, arguments, and port for previewing app development. ```json { "name": "orvanta: f/test/my_app", "runtimeExecutable": "bash", "runtimeArgs": ["-c", "cd f/test/my_app__raw_app && orvanta app dev --no-open --port ${PORT:-4001}"], "port": 4001, "autoPort": true } ``` -------------------------------- ### get_shared_state Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-python3/SKILL.md Gets the state from the shared folder using JSON deserialization. ```APIDOC ## get_shared_state ### Description Get the state in the shared folder using JSON. ### Method (Not specified, likely a client method) ### Parameters - **path** (str) - The path to the state file (defaults to 'state.json'). ### Returns - **None** - Note: The return type in the source is 'None', which might be an error or indicate an empty return. ``` -------------------------------- ### get_shared_state_pickle Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-python3/SKILL.md Gets the state from the shared folder using pickle deserialization. ```APIDOC ## get_shared_state_pickle ### Description Get the state in the shared folder using pickle. ### Method (Not specified, likely a client method) ### Parameters - **path** (str) - The path to the state file (defaults to 'state.pickle'). ### Returns - **Any** - The deserialized state value. ``` -------------------------------- ### getWorkspace Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-bun/SKILL.md Creates a client configuration based on environment variables. ```APIDOC ## getWorkspace ### Description Create a client configuration from env variables. ### Method `getWorkspace(): string` ### Returns * client configuration ``` -------------------------------- ### Get Orvanta CLI Version Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-python3/SKILL.md Retrieves the current version of the Orvanta CLI. ```python get_version() -> str ``` -------------------------------- ### Get Orvanta Server Version Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-python3/SKILL.md Retrieves the version string of the Orvanta server. ```python def version() -> str ``` -------------------------------- ### getWorkspace Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-bunnative/SKILL.md Creates a client configuration based on environment variables. ```APIDOC ## getWorkspace ### Description Create a client configuration from env variables. ### Method `getWorkspace(): string` ### Returns * client configuration (string) ``` -------------------------------- ### Get Job Details Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-python3/SKILL.md Retrieves the details of a specific job using its UUID. ```python def get_job(job_id: str) -> dict ``` -------------------------------- ### Create a New Flow Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-flow/SKILL.md Use this command to scaffold a new flow. It creates the necessary directory structure, a minimal flow.yaml, and provides helpful next-step hints. Add a description if the user provided a longer explanation. ```bash orvanta flow new f/folder/my_flow --summary "Short description" ``` ```bash orvanta flow new f/folder/my_flow --summary "Short description" --description "..." ``` -------------------------------- ### Get Progress Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-bunnative/SKILL.md Retrieves the progress for a specific job, clamped between 0 and 100. ```typescript async getProgress(jobId?: any): Promise ``` -------------------------------- ### Raw App Directory Structure Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/raw-app/SKILL.md Overview of the file and directory structure for a Raw App, including AI agent instructions, database schemas, configuration files, frontend entry points, backend runnables, and SQL migrations. ```directory my_app__raw_app/ ├── AGENTS.md # AI agent instructions (auto-generated) ├── DATATABLES.md # Database schemas (run 'orvanta app generate-agents' to refresh) ├── raw_app.yaml # App configuration (summary, path, data settings) ├── index.tsx # Frontend entry point ├── App.tsx # Main React/Svelte/Vue component ├── index.css # Styles ├── package.json # Frontend dependencies ├── orvanta.ts # Auto-generated backend type definitions (DO NOT EDIT) ├── backend/ # Backend runnables (server-side scripts) │ ├── . # Code file (e.g., get_user.ts) │ ├── .yaml # Optional: config for fields, or to reference existing scripts │ └── .lock # Lock file (run 'orvanta generate-metadata' to create/update) └── sql_to_apply/ # SQL migrations (dev only, not synced) └── *.sql # SQL files to apply via dev server ``` -------------------------------- ### Get State Path Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-bunnative/SKILL.md Retrieves the state file path from environment variables. ```typescript getStatePath(): string ``` -------------------------------- ### Importing npm Packages and Deno Standard Library Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-deno/SKILL.md Import npm packages using the 'npm:' prefix and Deno standard library modules using their URLs. ```typescript // npm packages use npm: prefix import Stripe from "npm:stripe"; import { someFunction } from "npm:some-package"; // Deno standard library import { serve } from "https://deno.land/std/http/server.ts"; ``` -------------------------------- ### getRootJobId Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-bunnative/SKILL.md Gets the true root job ID for a given job ID. ```APIDOC ## getRootJobId ### Description Get the true root job id. ### Method `async getRootJobId(jobId?: string): Promise` ### Parameters * **jobId** (string) - Optional - Job ID to get the root job ID from (defaults to current job). ### Returns * root job ID (string) ``` -------------------------------- ### getRootJobId Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-bun/SKILL.md Gets the true root job ID for a given job ID. ```APIDOC ## getRootJobId ### Description Get the true root job id. ### Method `async getRootJobId(jobId?: string): Promise` ### Parameters * **jobId** (string) - Optional - Job id to get the root job id from (default to current job) ### Returns * root job id ``` -------------------------------- ### Initialize Global Client Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-python3/SKILL.md Initializes a global client, likely for use in subsequent operations. ```python init_global_client(f) ``` -------------------------------- ### Static Input Transform Example Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-flow/SKILL.md Maps a parameter to a fixed, unchanging value. ```json {"param_name": {"type": "static", "value": "fixed_string"}} ``` -------------------------------- ### Get State Path Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-python3/SKILL.md Retrieves the configured path for state storage from the environment variables. ```python get_state_path() -> str ``` -------------------------------- ### Get Variable Value Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-python3/SKILL.md Retrieves the string value of a variable from Orvanta using its path. ```python def get_variable(path: str) -> str ``` -------------------------------- ### Accessing Orvanta Resources and Variables in R Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-rlang/SKILL.md Demonstrates how to use the built-in `get_variable` and `get_resource` helpers within an R script to fetch external data or configuration. ```r main <- function() { # Get a variable api_key <- get_variable("f/my_folder/api_key") # Get a resource (returns a list) db <- get_resource("f/my_folder/postgres_config") host <- db$host port <- db$port return(list(host = host, port = port)) } ``` -------------------------------- ### Get Job Status Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-python3/SKILL.md Fetches the current status of a job, which can be 'RUNNING', 'WAITING', or 'COMPLETED'. ```python def get_job_status(job_id: str) -> JobStatus ``` -------------------------------- ### getProgress Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-bunnative/SKILL.md Gets the progress for a specified job. Returns a value clamped between 0 and 100. ```APIDOC ## getProgress ### Description Gets the progress for a specified job. Returns a value clamped between 0 and 100. ### Method async ### Parameters * **jobId** (any) - Optional. The job to get progress from. ### Returns * **number | null** - Optional clamped between 0 and 100 progress value. ``` -------------------------------- ### Importing the Orvanta Client Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-python3/SKILL.md Import the Orvanta client library to interact with the Orvanta platform. Refer to the SDK documentation for available methods. ```python import orvanta ``` -------------------------------- ### Get Flow User State Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-bunnative/SKILL.md Retrieves a user-defined state from a flow using its key. ```typescript async getFlowUserState(key: string, errorIfNotPossible?: boolean): Promise ``` -------------------------------- ### Flow or Script Launch Configuration Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/preview/SKILL.md Use this JSON configuration for flows or scripts in .claude/launch.json. It specifies the runtime, arguments, and port for previewing. ```json { "name": "orvanta: f/test/my_flow", "runtimeExecutable": "bash", "runtimeArgs": ["-c", "orvanta dev --proxy-port ${PORT:-4000} --path f/test/my_flow --no-open"], "port": 4000, "autoPort": true } ``` -------------------------------- ### Get Flow User State Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-python3/SKILL.md Retrieves a user-defined state for a flow associated with a given key. ```python def get_flow_user_state(key: str) -> Any ``` -------------------------------- ### General Step Configuration Properties Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-flow/SKILL.md Includes properties for execution priority, error handling, and retry mechanisms for a flow step. ```json { "priority": {"type": "number", "description": "Execution priority for this step (higher numbers run first)"}, "continue_on_error": {"type": "boolean", "description": "If true, flow continues even if this step fails"}, "retry": {"description": "Retry configuration if this step fails", "$ref": "#/components/schemas/Retry"} } ``` -------------------------------- ### Python SDK (orvanta) - Script Execution (Sync) Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-python3/SKILL.md Provides synchronous functions for running scripts by path or hash, and for running inline script previews. ```APIDOC ## Script Execution (Synchronous) ### `orvanta.run_script(path: str = None, hash_: str = None, args: dict = None, timeout: dt.timedelta | int | float | None = None, verbose: bool = False, cleanup: bool = True, assert_result_is_not_none: bool = False) -> Any` **Deprecated**: Use `run_script_by_path` or `run_script_by_hash` instead. Runs a script synchronously and returns its result. - **Args**: - **path** (str, optional): The path to the script. - **hash_** (str, optional): The hash of the script. - **args** (dict, optional): Arguments to pass to the script. - **timeout** (dt.timedelta | int | float | None, optional): Maximum time to wait for the script to complete. - **verbose** (bool, optional): Enable verbose logging. Defaults to False. - **cleanup** (bool, optional): Register cleanup handler to cancel job on exit. Defaults to True. - **assert_result_is_not_none** (bool, optional): Raise exception if the result is None. Defaults to False. - **Returns**: - **Any**: The result of the script execution. ``` ```APIDOC ### `orvanta.run_script_by_path(path: str, args: dict = None, timeout: dt.timedelta | int | float | None = None, verbose: bool = False, cleanup: bool = True, assert_result_is_not_none: bool = False) -> Any` Runs a script by its path synchronously and returns its result. - **Args**: - **path** (str): The path to the script. - **args** (dict, optional): Arguments to pass to the script. - **timeout** (dt.timedelta | int | float | None, optional): Maximum time to wait for the script to complete. - **verbose** (bool, optional): Enable verbose logging. Defaults to False. - **cleanup** (bool, optional): Register cleanup handler to cancel job on exit. Defaults to True. - **assert_result_is_not_none** (bool, optional): Raise exception if the result is None. Defaults to False. - **Returns**: - **Any**: The result of the script execution. ``` ```APIDOC ### `orvanta.run_script_by_hash(hash_: str, args: dict = None, timeout: dt.timedelta | int | float | None = None, verbose: bool = False, cleanup: bool = True, assert_result_is_not_none: bool = False) -> Any` Runs a script by its hash synchronously and returns its result. - **Args**: - **hash_** (str): The hash of the script. - **args** (dict, optional): Arguments to pass to the script. - **timeout** (dt.timedelta | int | float | None, optional): Maximum time to wait for the script to complete. - **verbose** (bool, optional): Enable verbose logging. Defaults to False. - **cleanup** (bool, optional): Register cleanup handler to cancel job on exit. Defaults to True. - **assert_result_is_not_none** (bool, optional): Raise exception if the result is None. Defaults to False. - **Returns**: - **Any**: The result of the script execution. ``` ```APIDOC ### `orvanta.run_inline_script_preview(content: str, language: str, args: dict = None) -> Any` Runs a script directly on the current worker without creating a job. On agent workers without an internal server, this falls back to running a normal preview job and waiting for the result. - **Args**: - **content** (str): The script content. - **language** (str): The language of the script (e.g., 'python3'). - **args** (dict, optional): Arguments to pass to the script. - **Returns**: - **Any**: The result of the script execution. ``` -------------------------------- ### Basic Bun Native Script Structure Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-bunnative/SKILL.md Export an async function named `main` to serve as the entry point for your script. It accepts parameters and returns a result object. ```typescript export async function main(param1: string, param2: number) { // Your code here return { result: param1, count: param2 }; } ``` -------------------------------- ### Get State Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-bunnative/SKILL.md Retrieves the shared state across executions, optionally overriding the default path. ```typescript async getState(path?: string): Promise ``` -------------------------------- ### Data Table Configuration in raw_app.yaml Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/raw-app/SKILL.md Example configuration for data tables within `raw_app.yaml`. This section specifies the default datatable, schema, and a whitelist of accessible tables. Only tables listed here can be queried. ```yaml data: datatable: main # Default datatable schema: app_schema # Default schema (optional) tables: - main/users # Table in public schema - main/app_schema:items # Table in specific schema ``` -------------------------------- ### Get Job Result Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-python3/SKILL.md Retrieves the result of a completed job. By default, it raises an exception if the result is None. ```python def get_result(job_id: str, assert_result_is_not_none: bool = True) -> Any ``` -------------------------------- ### getRootJobId Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-nativets/SKILL.md Gets the true root job ID for a given job ID, defaulting to the current job. ```APIDOC ## getRootJobId ### Description Get the true root job id. ### Method `async getRootJobId(jobId?: string): Promise` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters * **jobId** (string) - Optional - Job id to get the root job id from (default to current job) ### Returns * **Promise** - root job id ``` -------------------------------- ### Python SDK (orvanta) - Script Execution (Async) Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-python3/SKILL.md Provides asynchronous functions for running scripts by path or hash. ```APIDOC ## Script Execution (Async) ### `orvanta.run_script_async(path: str = None, hash_: str = None, args: dict = None, scheduled_in_secs: int = None) -> str` **Deprecated**: Use `run_script_by_path_async` or `run_script_by_hash_async` instead. Creates a script job asynchronously and returns its job ID. - **Args**: - **path** (str, optional): The path to the script. - **hash_** (str, optional): The hash of the script. - **args** (dict, optional): Arguments to pass to the script. - **scheduled_in_secs** (int, optional): Seconds until the job is scheduled. - **Returns**: - **str**: The job ID of the created script job. ``` ```APIDOC ### `orvanta.run_script_by_path_async(path: str, args: dict = None, scheduled_in_secs: int = None) -> str` Creates a script job by its path asynchronously and returns its job ID. - **Args**: - **path** (str): The path to the script. - **args** (dict, optional): Arguments to pass to the script. - **scheduled_in_secs** (int, optional): Seconds until the job is scheduled. - **Returns**: - **str**: The job ID of the created script job. ``` ```APIDOC ### `orvanta.run_script_by_hash_async(hash_: str, args: dict = None, scheduled_in_secs: int = None) -> str` Creates a script job by its hash asynchronously and returns its job ID. - **Args**: - **hash_** (str): The hash of the script. - **args** (dict, optional): Arguments to pass to the script. - **scheduled_in_secs** (int, optional): Seconds until the job is scheduled. - **Returns**: - **str**: The job ID of the created script job. ``` -------------------------------- ### S3Object Input for Scripts Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-python3/SKILL.md Demonstrates how to type-hint a script parameter with `S3Object` to accept a file from S3 as input. ```APIDOC ## Receiving an S3Object as a script parameter ### Description To accept a file from S3 as input to a script, type the parameter with `S3Object` (imported from `orvanta`). The SDK will handle fetching the S3 object and passing it to your script. ### Function Signature Example ```python import orvanta from orvanta import S3Object def main(file: S3Object): content = orvanta.load_s3_file(file) # ... process content ... ``` ### Parameters - **file** (S3Object) - Represents an object stored in S3 that can be loaded by the script. ``` -------------------------------- ### getState Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-bunnative/SKILL.md Gets the state shared across executions, optionally overriding the default state resource path. ```APIDOC ## getState ### Description Gets the state shared across executions, optionally overriding the default state resource path. ### Method async ### Parameters * **path** (string) - Optional. State resource path override. Defaults to `getStatePath()`. ### Returns * **any** - The shared state. ``` -------------------------------- ### Get DuckDB Connection Settings Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-bunnative/SKILL.md Retrieves connection settings for DuckDB, potentially from an S3 resource path. ```typescript async duckdbConnectionSettings(s3_resource_path: string | undefined): Promise ``` -------------------------------- ### Get Polars Connection Settings Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-bunnative/SKILL.md Retrieves connection settings for Polars, potentially from an S3 resource path. ```typescript async polarsConnectionSettings(s3_resource_path: string | undefined): Promise ``` -------------------------------- ### Using PostgreSQL Resource in Python Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/resources/SKILL.md Shows how to use a typed dictionary to represent and access PostgreSQL resource values in Python. ```python class postgresql(TypedDict): host: str port: int user: str password: str dbname: str def main(db: postgresql): # db contains the resource values pass ``` -------------------------------- ### Get Internal State (Deprecated) Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-bunnative/SKILL.md Retrieves the internal state. This method is deprecated; use `getState` instead. ```typescript async getInternalState(): Promise ``` -------------------------------- ### Handle Approvals with Steps in Python Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-workflow-as-code/SKILL.md Generate resume URLs inside `step()` before sending them. Use `wait_for_approval()` to suspend the workflow until an external approval is received. The timeout is in seconds. ```python urls = await step("get_urls", lambda: get_resume_urls()) await step("notify", lambda: send_approval_email(urls["approvalPage"])) approval = await wait_for_approval(timeout=3600) ``` -------------------------------- ### GraphQL Mutation Source: https://github.com/orvanta-cloud/orvanta-cli-docs/blob/main/skills/write-script-graphql/SKILL.md Example of a GraphQL mutation to create a user. Mutations are used to modify data on the server. ```graphql mutation CreateUser($input: CreateUserInput!) { createUser(input: $input) { id name createdAt } } ```