Official client libraries for the Precifarm API
v2.1.0
v1.8.0
v1.5.0
v1.3.0
Official SDK for Node.js and browser environments
npm install @precifarm/sdkimport { PrecifarmClient } from '@precifarm/sdk';
// Initialize the client
const client = new PrecifarmClient({
apiKey: 'pk_live_...',
// Optional: specify API version
apiVersion: '2024-01'
});
// Get all devices
const devices = await client.devices.list();
// Run diagnostics on a device
const result = await client.diagnostics.run({
deviceId: 'device_123',
type: 'full'
});
console.log(result);Command-line interface for interacting with the Precifarm API
macos
brew install precifarm/tap/precifarmlinux
curl -fsSL https://cli.precifarm.com/install.sh | bashwindows
winget install Precifarm.CLI# Authenticate
precifarm auth login
# List devices
precifarm devices list
# Run diagnostic
precifarm diagnostics run --device device_123 --type full
# Stream device logs
precifarm devices logs device_123 --follow
# Create API key
precifarm keys create --name "Production" --scopes read,writeHow we handle API versions and backward compatibility
The current API version is 2024-01. All SDKs default to the latest stable version.
You can pin a specific version using the X-API-Version header or by configuring your SDK client.
Deprecated versions are supported for 12 months after a new version is released. We'll notify you via email before any breaking changes.
View the full API changelog for a detailed history of all changes and new features.
Our developer support team is here to help you build with the Precifarm API.