Skip to main content

Quick Start

Key Features

  • Automatic sync - Data syncs between your server and MentraOS Cloud
  • User-isolated - Each user has separate storage
  • App-scoped - Other apps can’t access your data
  • Local caching - Fast reads after first fetch
  • Simple API - Works like localStorage

Basic Operations

Store Data

Retrieve Data

Check Existence

Delete Data

Clear All

Storing Complex Data

Storage is key-value pairs with string values. Use JSON for objects:

Batch Operations

Get All Keys

Get All Data

Set Multiple Items

Count Items

Common Patterns

User Preferences

First-Time User Detection

Saving Session State

Usage Counter

Feature Flags

Performance & Caching

Simple Storage caches data locally for fast access:
Cache is per-session. New sessions fetch fresh data from cloud.

Best Practices

✅ Do This

❌ Avoid This

Limitations

Error Handling

Complete Example

API Reference

Simple Storage is ideal for preferences and app state. For user authentication data or external API keys, use environment variables or secure credential storage.