Skip to content

chatch/forge-fsql

Repository files navigation

Forge FSQL CLI

Interactive CLI for querying Atlassian Forge SQL databases via web triggers.

Demo

demo

Features

  • 🎨 Table formatting with colors
  • ⚡ Special commands (.tables, .describe, .schema)
  • ⌨️ Command history (↑/↓ arrows)
  • 💾 Persistent history across sessions
  • ⏱️ Query timing
  • 📝 Multi-line SQL support

Security

  • Disabled in Production - returns a 403 error if you attempt to call it

Installation

In Your Forge Project

npm install -g forge-fsql

fsql-setup

Notes:

  • creates a webtrigger in your manifest.yml
  • creates a module at src/fsql.ts for the webtrigger function
  • deploys the project with the new manifest
  • creates the webtrigger with forge webtrigger create (default environment which is DEVELOPMENT in a standard setup)
  • adds the webtrigger URL to a FORGE_SQL_WEBTRIGGER environment variable in .env

Run

fsql

Upgrade

# upgrade the CLI
> npm install -g forge-fsql@latest

# run the setup from the root of your project to pick up the new version
# it will install fsql.ts again and redeploy again
myforgeproject> fsql-setup

About

Interactive CLI for querying Atlassian Forge SQL databases via web triggers.

Resources

License

Stars

Watchers

Forks

Packages

No packages published