
Company News
Socket Named Top Sales Organization by RepVue
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.
@powersync/op-sqlite
Advanced tools
PowerSync - sync Postgres or MongoDB with SQLite in your React Native app for offline-first and real-time data
This package (packages/powersync-op-sqlite) enables using OP-SQLite with PowerSync alongside the React Native SDK.
If you are not yet familiar with PowerSync, please see the PowerSync React Native SDK README for more information.
Follow the installation instructions for the React Native SDK if you haven't yet set up PowerSync in your project. However, note that this package cannot be installed alongside @journeyapps/react-native-quick-sqlite. Skip the step about installing it as a peer dependency, or uninstall it if it is already installed.
npx expo install @powersync/op-sqlite
When using this package without a frameowrk like Expo, we recommend adding this metro config
to avoid issues related to bundling PowerSync.
Without it, you may be getting TypeError: Cannot read property 'PowerSyncDatabase' of undefined or similar errors.
This SDK currently requires @op-engineering/op-sqlite as a peer dependency.
Install it in your app with:
npx expo install @op-engineering/op-sqlite
import { OPSqliteOpenFactory } from '@powersync/op-sqlite';
import { PowerSyncDatabase } from '@powersync/react-native';
const factory = new OPSqliteOpenFactory({
dbFilename: 'sqlite.db'
});
this.powersync = new PowerSyncDatabase({ database: factory, schema: AppSchema });
To enable SQLCipher you need to add the following configuration option to your application's package.json. Note that for monorepos you may have to add this configuration to the monorepo root package.json instead, this depends on where your package manager tool hoists modules.
{
// your normal package.json
// ...
"op-sqlite": {
"sqlcipher": true
}
}
Additionally you will need to add an encryption key to the OPSQLite factory constructor
const factory = new OPSqliteOpenFactory({
dbFilename: 'sqlite.db',
sqliteOptions: {
encryptionKey: 'your-encryption-key'
}
});
To load additional SQLite extensions include the extensions option in sqliteOptions which expects an array of objects with a path and an entryPoint:
sqliteOptions: {
extensions: [{ path: libPath, entryPoint: 'sqlite3_powersync_init' }];
}
More info can be found in the OP-SQLite docs.
Example usage:
import { getDylibPath } from '@op-engineering/op-sqlite';
let libPath: string;
if (Platform.OS === 'ios') {
libPath = getDylibPath('co.powersync.sqlitecore', 'powersync-sqlite-core');
} else {
libPath = 'libpowersync';
}
const factory = new OPSqliteOpenFactory({
dbFilename: 'sqlite.db',
sqliteOptions: {
extensions: [{ path: libPath, entryPoint: 'sqlite3_powersync_init' }]
}
});
This package uses native libraries. Create native Android and iOS projects (if not created already) by running:
npx expo run:android
# OR
npx expo run:ios
FAQs
PowerSync - sync Postgres or MongoDB with SQLite in your React Native app for offline-first and real-time data
The npm package @powersync/op-sqlite receives a total of 8,644 weekly downloads. As such, @powersync/op-sqlite popularity was classified as popular.
We found that @powersync/op-sqlite demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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.

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.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.