Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/felixdotgo/querybox/llms.txt

Use this file to discover all available pages before exploring further.

Overview

This guide will walk you through:
  • Launching QueryBox for the first time
  • Creating your first database connection
  • Exploring database objects
  • Executing your first query
  • Understanding query results
This quickstart assumes you’ve already installed QueryBox. If not, complete the installation first.

Launch QueryBox

Start the application using your platform’s method:
Double-click querybox.exe or run from Command Prompt:
querybox.exe
The main query workspace window will open, along with a connections management window.

Create Your First Connection

Let’s create a connection using SQLite, which doesn’t require a separate database server.
1

Open Connections Window

If the connections window isn’t visible:
  • Click the Connections menu item, or
  • Use the keyboard shortcut to open it
The connections window displays all saved database connections.
2

Click New Connection

Click the New Connection button to open the connection creation dialog.
3

Select Database Type

From the database type dropdown, select SQLite.You’ll see two authentication options:
  • Local File - For local SQLite database files
  • Turso Cloud - For Turso cloud-hosted SQLite databases
Select Local File for this quickstart.
4

Configure Connection

Fill in the connection details:
name
string
required
A friendly name for your connection (e.g., “My Test Database”)
path
string
required
Path to your SQLite database file. You can:
  • Browse to an existing .db or .sqlite file
  • Enter a path to create a new database
  • Use :memory: for an in-memory database (lost when connection closes)
Example:
Name: Test Database
Path: /Users/yourname/test.db
For a quick test, use :memory: as the path. This creates a temporary database perfect for experimentation.
5

Test the Connection

Before saving, click Test Connection to verify the SQLite plugin can access the database.You should see a green checkmark with “Connection successful” message.
If testing fails:
  • Verify the file path is correct and accessible
  • Check file permissions (read/write access required)
  • Ensure the directory exists for new databases
6

Save Connection

Click Save or Create Connection to store the connection.Your new connection appears in the connections list. QueryBox has:
  • Stored connection metadata in its internal SQLite database
  • Saved credentials securely using your OS keyring (or encrypted fallback)
  • Emitted a connection:created event to update the UI

Explore Database Objects

Now that you have a connection, let’s explore its structure using the connection tree.
1

Open Connection Tree

In the main query window, you’ll see a sidebar with a tree view. Select your newly created connection from the dropdown at the top.The plugin will execute the connection-tree command to fetch the database structure.
2

Browse Database Objects

For SQLite, the tree shows:
📁 Test Database
├── 📊 Tables
│   └── (any existing tables)
├── 🔍 Indexes
└── 👁️ Views
Click the arrows to expand and collapse sections.
If you used :memory: or a new database file, the tree will be empty initially. We’ll create tables in the next section.
3

Use Node Actions

Some tree nodes have action buttons. For example:
  • Clicking a table shows its columns
  • Right-clicking may show actions like “Show CREATE TABLE” or “Browse Data”
These actions send queries to the database automatically.

Execute Your First Query

Let’s create a sample table and run some queries.
1

Create a Table

In the query editor (main text area), enter:
CREATE TABLE users (
  id INTEGER PRIMARY KEY AUTOINCREMENT,
  name TEXT NOT NULL,
  email TEXT UNIQUE NOT NULL,
  created_at TEXT DEFAULT CURRENT_TIMESTAMP
);
Click the Execute button or press Ctrl+Enter (Windows/Linux) or Cmd+Enter (macOS).
When you execute a query:
  1. QueryBox calls PluginManager.ExecPlugin()
  2. The SQLite plugin process is spawned
  3. Your query is sent via stdin as JSON:
    {
      "connection": {"path": "/path/to/test.db"},
      "query": "CREATE TABLE users ...",
      "options": {}
    }
    
  4. The plugin executes the query and returns results via stdout
  5. The plugin process exits
  6. Results are displayed in the results pane
Expected result: “Query executed successfully” or similar message.
2

Insert Sample Data

Add some test data:
INSERT INTO users (name, email) VALUES
  ('Alice Smith', 'alice@example.com'),
  ('Bob Jones', 'bob@example.com'),
  ('Carol White', 'carol@example.com');
Execute the query. You should see “3 rows affected” or similar.
3

Query the Data

Now retrieve the data:
SELECT * FROM users ORDER BY created_at DESC;
Execute the query. The results pane displays a formatted table:
idnameemailcreated_at
3Carol Whitecarol@example.com2026-03-01 10:30:15
2Bob Jonesbob@example.com2026-03-01 10:30:15
1Alice Smithalice@example.com2026-03-01 10:30:15
4

Refresh Connection Tree

After creating tables, refresh the connection tree (click the refresh icon) to see your new users table appear under the Tables section.Expand the users table to see its columns:
📊 users
├── 🔑 id (INTEGER)
├── 📝 name (TEXT)
├── 📧 email (TEXT)
└── 📅 created_at (TEXT)
Congratulations! You’ve successfully created a connection, explored database objects, and executed queries.

Understanding Query Results

QueryBox displays results in different formats depending on the query type and database:
SELECT queries return SqlResult with columns and rows:
{
  "columns": ["id", "name", "email"],
  "rows": [
    [1, "Alice Smith", "alice@example.com"],
    [2, "Bob Jones", "bob@example.com"]
  ]
}
Displayed as an interactive table with:
  • Column headers
  • Sortable columns (click header to sort)
  • Scrollable rows
  • Copy to clipboard functionality

Try Other Database Types

Now that you understand the basics, try connecting to other databases:

MySQL

Required info:
  • Host (e.g., localhost:3306)
  • Database name
  • Username and password
  • Optional: TLS/SSL settings
Sample query:
SHOW TABLES;

PostgreSQL

Required info:
  • Host (e.g., localhost:5432)
  • Database name
  • Username and password
  • Optional: SSL mode
Sample query:
SELECT * FROM information_schema.tables
WHERE table_schema = 'public';

Redis

Required info:
  • Host and port (e.g., localhost:6379)
  • Password (if configured)
  • Database number (0-15)
Sample commands:
SET mykey "Hello QueryBox"
GET mykey
KEYS *

ArangoDB

Required info:
  • URL (e.g., http://localhost:8529)
  • Database name
  • Username and password
Sample query (AQL):
FOR doc IN users
  RETURN doc

Advanced Features

EXPLAIN Queries

For databases that support it (MySQL, PostgreSQL, SQLite), use the Explain button to analyze query execution plans:
1

Write a Query

SELECT * FROM users WHERE email LIKE '%example.com';
2

Click Explain

Instead of Execute, click the Explain button.The plugin automatically adds EXPLAIN to your query and shows the execution plan.
3

Analyze Results

Review the query plan to identify:
  • Which indexes are used
  • Scan types (full table scan vs. index scan)
  • Estimated row counts
  • Optimization opportunities
The Explain button only appears for plugins that advertise the explain-query capability in their metadata.

Multiple Connections

QueryBox supports multiple concurrent connections:
  1. Create connections to different databases (even different types)
  2. Switch between them using the connection dropdown
  3. Each connection maintains its own tree view and state
  4. Credentials are managed securely and independently

Plugin Management

View and manage installed plugins:
1

Open Plugins Window

From the menu, select Plugins or use the keyboard shortcut.
2

View Plugin Information

Each plugin displays:
  • Name and version
  • Description and author
  • Capabilities (connection-tree, test-connection, explain-query)
  • License and documentation links
3

Rescan Plugins

If you add new plugin executables to bin/plugins/ or the user plugin directory, click Rescan to discover them without restarting.

Best Practices

Use descriptive names that include:
  • Environment (dev, staging, production)
  • Database purpose
  • Server location
Examples:
  • “Production MySQL - Users DB”
  • “Dev PostgreSQL - Local”
  • “Analytics Redis - Cache”
  • QueryBox stores credentials in your OS keyring when available
  • Never commit the QueryBox data directory to version control
  • Use read-only credentials for production databases
  • Test connections before saving to catch authentication issues early
  • Save frequently used queries as snippets (feature coming soon)
  • Use comments to document complex queries
  • Test queries on development databases first
  • Use transactions for multi-statement operations
  • Use LIMIT clauses for large result sets
  • Each query spawns a new plugin process (intentional isolation)
  • Connection tree queries have 30s timeout
  • Test connections have 15s timeout for faster feedback

Troubleshooting

Common causes:
  • Incorrect host, port, or credentials
  • Firewall blocking the connection
  • Database server not running
  • SSL/TLS configuration mismatch
Debug steps:
  1. Verify credentials in a different client (e.g., mysql CLI)
  2. Check network connectivity: ping <host> or telnet <host> <port>
  3. Review error message from the plugin
  4. Check database server logs
Symptoms: “context deadline exceeded” after 30 secondsSolutions:
  • Optimize the query (add WHERE clauses, indexes)
  • Use LIMIT to reduce result set size
  • For long-running queries, increase timeout (feature coming soon)
  • Consider running expensive queries directly on the database server
Possible reasons:
  • New/empty database (expected)
  • Plugin doesn’t implement connection-tree command
  • Insufficient permissions to query metadata tables
Solutions:
  1. Create some tables and refresh the tree
  2. Check if the plugin supports connection trees in Plugins window
  3. Verify database user has metadata query permissions
Symptoms: “Plugin not found” when creating connectionSolutions:
  1. Open Plugins window and verify plugin is listed
  2. Click Rescan to re-probe plugins
  3. Check that plugin executable exists in bin/plugins/
  4. Verify file is executable (Linux/macOS: chmod +x)
  5. Rebuild plugins: task build:plugins

Next Steps

Connection Management

Learn advanced connection features and credential management

Plugin System

Understand how plugins work and create your own database drivers

Query Workspace

Master the query editor and result viewing features

Security Model

Deep dive into QueryBox’s security architecture

Build docs developers (and LLMs) love