Skip to content
WebsiteDocumentationDashboard ↗LibertyJS repo ↗npm package ↗GitHub organization ↗

LibertyTools / Docs

Build with an AI assistant

An AI coding assistant can help build your bot or event receiver. Give it the right delivery mode and current contract so it does not invent credentials, endpoints, or event fields.

Give it the right context

Start with the machine-readable docs index, then link the guide for your chosen output: Poll, forwarding, or hosted commands. For code, also provide the current LibertyJS README and examples.

Tell the assistant whether you want a no-code rule, a running Node.js bot, or an HTTP receiver. These are different setups. Hosted commands run in LibertyTools; a Poll bot runs on your machine or server; forwarding calls your own endpoint.

Example brief for a Poll bot

You can adapt this text for your coding assistant:

Build a Node.js 22+ ES module integration with @libertytools/libertyjs.
Use a LibertyTools v2 Poll client with POLL_SUBSCRIPTION_ID and POLL_TOKEN.
Read https://libertytools.dev/docs/poll, https://libertytools.dev/docs/events, and https://libertytools.dev/docs/api-reference.
Keep ERLC_SERVER_KEY and POLL_TOKEN in server-side environment variables.
Handle SDK errors and 429 retry delays. Do not assume unknown event fields.
Show me the exact files and commands to run, plus how to verify one event.

For forwarding, replace the Poll line with “Build a Signed Proxy receiver that verifies X-Liberty-Signature over the exact raw body before parsing JSON.” For a direct ER:LC webhook, require official Ed25519 verification instead.

Check what the assistant produces

  • It uses POLL_SUBSCRIPTION_ID and POLL_TOKEN for a new Poll client. It does not try to read events using only the public webhook URL.
  • It keeps all secrets server-side and does not print them in errors.
  • It handles network and API failures, including 429, without rapid retry loops.
  • It treats unknown event types and extra fields safely. It does not require optional fields such as data.username or invent a pollState property.
  • For a custom HTTP Poll client, it follows pages, restarts each scan without a cursor, acknowledges handled IDs, and deduplicates side effects.
  • You can run the result locally and verify one event in the dashboard's Events tab before relying on it.

If code and docs disagree, check the installed SDK version and current dashboard setup before sending real commands.