Installation
Configuration
To connect the SDK to your Re-Factor instance, you need to set the following environment variables:re-factor in development mode you will need to run the re-factor dev command before using the SDK.Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Work with the Re-Factor TypeScript SDK
npm install @re-factor/sdk
yarn add @re-factor/sdk
pnpm add @re-factor/sdk
bun add @re-factor/sdk
export REFACTOR_ACCOUNT_ID=<your_account_id>
export REFACTOR_API_KEY=<your_api_key>
export REFACTOR_API_URL=<your_api_url>
REFACTOR_ACCOUNT_ID=<your_account_id>
REFACTOR_API_KEY=<your_api_key>
REFACTOR_API_URL=<your_api_url>
import { Context as RefactorContext } from '@re-factor/sdk/context';
RefactorContext.setAccountID('<your_account_id>');
RefactorContext.setAPIKey('<your_api_key>');
RefactorContext.setAPIUrl('<your_api_url>');
export REFACTOR_DEVELOPMENT_MODE=true
REFACTOR_DEVELOPMENT_MODE=true
import { Context as RefactorContext } from '@re-factor/sdk/context';
RefactorContext.setDevelopmentMode(true);
re-factor in development mode you will need to run the re-factor dev command before using the SDK.