Glue is designed to feel like normal TypeScript development: you edit code locally, your Glue hot reloads, you trigger real events, and you debug with your editor (orDocumentation Index
Fetch the complete documentation index at: https://docs.glue.wtf/llms.txt
Use this file to discover all available pages before exploring further.
console.log) like any other program.
Your environment
The Glue CLI
Theglue command powers local development (glue dev), deployment (glue deploy), and monitoring (glue logs, glue describe).
Follow the install steps in the Quickstart:
Editor
The beauty of Glue is that you bring your own editor. All the tooling you’re normally used to just works. For best results, make sure to use an editor that supports TypeScript and Deno so that you get autocomplete, formatting, linting, etc. Here are instructions for setting up your editor for Glue:Use your favorite LLM
LLM’s can write Glue code really well. The Glue runtime is fully documented with TSDoc and this documentation site has a LLM friendly single markdown file for the entire site.Running your Glue locally
You can run a Glue locally so that you can have a fast iteration loop. When running Glues locally, you receive real events from the triggers you’ve registered. Our Glue servers register and listen for these events and will tunnel them to your local machine when you are running your Glue locally usingglue dev.
glue dev actually does:
- Runs your Glue locally in a watched process so that code changes are hot reloaded.
- Registers your Glue + triggers with Glue’s backend so trigger events can be routed to you.
- Streams trigger events to your local machine.
- Opens a debugger port by default so you can attach a debugger.
Sample Events
The best “sample event” is a real event. If you’ve registered a webhook trigger, simply visit orcURL the URL that glue dev prints out so that you can see the real event data. If you’ve registered a trigger to listen for new emails in your Gmail inbox, simply send an email to that address. The only exception is for CRON triggers which you can trigger manually in the CLI when using glue dev.
There is no support for generating fake data, we think that is an anti-pattern. However, we do provide helpers to let you replay real events to make iterating and testing fast.
Replay the last event (fast loop)
Whileglue dev is running, you can iterate extremely quickly:
- Write your Glue code
- Run
glue dev - Trigger the event manually in whatever service you registered a trigger for
- Edit your code (it’ll hot reload on save)
- Return to the
glue devterminal - Press
rto replay the last trigger event you received - Repeat
Replay a production event
If you’ve deployed your Glue to production, you can replay a specific event by ID. This is useful for debugging production issues or for testing your Glue against real data.r to replay the event again and test your fix.
Debugging
Glue doesn’t require special debugging tooling, you can:- Use
console.loglike you would in any TypeScript program. - attach a Chrome DevTools debugger to your local Glue process
- attach your editor debugger (if supported)
glue dev runs your Glue with the debugger enabled. It prints out the debugger URL to connect to:
--no-debug. If you want your Glue to wait until your debugger is attached, start dev with:
Deploying and monitoring
Deployment is a single command that takes your locally running Glue, bundles it, uploads it, sets up the same triggers (including webhooks) and hosts your Glue in the cloud:glue deploy again. Glues with the same name are treated as an update.
Monitoring Glues
Glue creates a new execution every time your Glue runs. Each execution has a unique ID and its own log lines (including yourconsole.logs). A failure is simply an execution where your Glue throws an exception. You can monitor these executions in several ways:
Aggregate stats about all Glues
--tail flag to see historic executions. By default, this will only show the first few lines of output for each execution. You can control this and other options, see the glue logs reference for more details.
Viewing specific executions
Versioning and sharing your Glues
Every deploy creates a new immutable deployment. Subsequent deployments override the previous deployment and you can see a history of all your deployments withglue describe.
Since a Glue is just a single TypeScript file, you can version and share it like any other file:
- Put it in a Git repo
- Share it as a Gist (try
glue share path/to/your-glue.ts) - Send it over Drive, email, etc.