
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
Unofficial community SDK for building R1/RabbitOS plugins with hardware access, storage, LLM integration, and optimized UI utilities
Unofficial community JavaScript/TypeScript SDK for building R1/RabbitOS plugins with full hardware access, AI integration, and mobile optimization.
npm install r1-create
import { r1, createR1App } from 'r1-create';
// Simple setup
createR1App((sdk) => {
console.log('R1 App initialized!');
// Listen for side button press
sdk.hardware.on('sideClick', () => {
console.log('Side button clicked!');
});
// Ask the LLM something
sdk.llm.askLLMSpeak('Hello, how are you today?');
});
// Accelerometer
await r1.accelerometer.start((data) => {
console.log(`Tilt: x=${data.x}, y=${data.y}, z=${data.z}`);
});
// Touch simulation
r1.touch.tap(120, 141); // Center of screen
// Hardware buttons
r1.hardware.on('sideClick', () => console.log('PTT clicked'));
r1.hardware.on('scrollUp', () => console.log('Scroll up'));
// Store user preferences (automatically Base64 encoded)
await r1.storage.plain.setItem('theme', { dark: true, color: 'blue' });
const theme = await r1.storage.plain.getItem('theme');
// Secure storage for sensitive data
await r1.storage.secure.setItem('api_key', 'secret123');
const apiKey = await r1.storage.secure.getItem('api_key', false); // Get as string
// Send message to LLM
await r1.messaging.sendMessage('What time is it?', { useLLM: true });
// Ask LLM to speak response
await r1.llm.askLLMSpeak('Tell me a joke', true); // Save to journal
// Get structured JSON response
await r1.llm.askLLMJSON('List 3 facts about rabbits in JSON format');
// Handle responses
r1.messaging.onMessage((response) => {
if (response.parsedData) {
console.log('Parsed response:', response.parsedData);
}
});
// Camera
const stream = await r1.camera.start({ facingMode: 'user' });
const videoElement = r1.camera.createVideoElement();
document.body.appendChild(videoElement);
// Capture photo
const photo = r1.camera.capturePhoto(240, 282);
// Microphone
await r1.microphone.startRecording();
const audioBlob = await r1.microphone.stopRecording();
// Speaker
await r1.speaker.play(audioBlob);
await r1.speaker.playTone(440, 1000); // A note for 1 second
import { LayoutUtils, CSSUtils, R1_DIMENSIONS } from 'r1-create';
// Create R1-optimized container
const container = document.createElement('div');
LayoutUtils.applyR1Container(container);
// Hardware-accelerated animations
CSSUtils.setTransform(element, 'translateX(10px)');
CSSUtils.addTransition(element, 'transform', 300);
// Screen dimensions
console.log(`Screen: ${R1_DIMENSIONS.width}x${R1_DIMENSIONS.height}px`);
import { R1Plugin } from 'r1-create';
const plugin = new R1Plugin({
onMount: () => console.log('Plugin mounted'),
onMessage: (data) => console.log('Received:', data),
onHardwareEvent: (event) => console.log('Hardware event:', event)
});
plugin.mount();
import { PerformanceUtils } from 'r1-create';
// Measure performance
PerformanceUtils.startMeasure('animation');
// ... do animation work
PerformanceUtils.endMeasure('animation');
// Monitor frame rate
PerformanceUtils.monitorFPS(5, (fps) => {
console.log(`Average FPS: ${fps}`);
});
import { R1Component } from 'r1-create';
class MyComponent extends R1Component {
protected onMount(): void {
this.element.innerHTML = `
<div style="width: 240px; height: 282px;">
<h1>My R1 Component</h1>
</div>
`;
}
protected onUnmount(): void {
// Cleanup
}
}
const component = new MyComponent();
component.mount(document.body);
transform, opacity)DOMUtils.batchOperations() for multiple changesThe SDK is built with TypeScript and includes comprehensive type definitions:
import type {
AccelerometerData,
PluginMessage,
StorageAPI,
HardwareEventType
} from 'r1-create';
try {
await r1.storage.secure.setItem('key', 'value');
} catch (error) {
if (error.message.includes('not available')) {
// Fallback to plain storage
await r1.storage.plain.setItem('key', 'value');
}
}
See the examples directory for complete plugin examples:
Full API documentation is available in the TypeScript definitions and inline JSDoc comments.
Apache-2.0 - See LICENSE file for details.
Contributions welcome! Please read our contributing guidelines and submit pull requests to our GitHub repository.
FAQs
Unofficial community SDK for building R1/RabbitOS plugins with hardware access, storage, LLM integration, and optimized UI utilities
The npm package r1-create receives a total of 11 weekly downloads. As such, r1-create popularity was classified as not popular.
We found that r1-create demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.