This quickstart guides you through creating, validating, and deploying your first based on a example.
Before you begin
- 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 .
Step 2: Write a userscript
Use the 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 to exclude the audit_logs table from the public schema during replication:
For details on the userscript API and handler functions, refer to the .
When writing userscripts, follow the .
Step 3: Use with Replicator
Include the flag to have apply the userscript. For example, to apply your userscript during PostgreSQL replication:
See also