Interactive SQL CLI for Atlassian Forge SQL via web triggers
npm install forge-fsql
Interactive CLI for querying Atlassian Forge SQL databases via web triggers.
!demo
- 🎨 Table formatting with colors
- ⚡ Special commands (.tables, .describe, .schema)
- ⌨️ Command history (↑/↓ arrows)
- 💾 Persistent history across sessions
- ⏱️ Query timing
- 📝 Multi-line SQL support
``sh
fsql> .help
Special Commands:
.schema Show database schema
.tables List all tables
.describe Describe a table (.describe table_name)
.indexes Show all indexes
.migrations List all migrations
.database Show the database name
.help Show available commands
Other:
exit, quit Exit the CLI
Ctrl+C Cancel current query
Ctrl+D Exit the CLI
↑/↓ Navigate command history
`
- Disabled in Production - returns a 403 error if you attempt to call it
`sh
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
`sh`
fsql
`shupgrade the CLI
> npm install -g forge-fsql@latest