Before you begin
- Install MOLT Replicator v1.3.0 or later for full compatibility with the userscript API.
- Install a TypeScript-compatible IDE (for example, VS Code).
Step 1: Set up your environment
Create a new TypeScript file for your userscript in your IDE (for example,userscript.ts).
For IDE autocomplete and type-checking support, optionally add the Replicator TypeScript definitions. For details, refer to Access this API.
Step 2: Write a userscript
Use the userscript cookbook as a starting point. The cookbook provides ready-to-use examples that you can copy and adapt. Copy and adapt a cookbook example that matches your use case. For example, adapt the template to filter a single table to exclude theaudit_logs table from the public schema during replication:
Step 3: Use with Replicator
Include the--userscript flag to have MOLT Replicator apply the userscript. For example, to apply your userscript during PostgreSQL replication:

