Repository navigation
Add db-schema-explorer extension - #25197
Conversation
- Fix ESLint and Prettier for publish - Refactor schema selection actions in explore-tables component - Add keyboard shortcuts for copy actions in explore-tables component - Add table selection functionality in explore-tables component - Update package.json to enhance the description for clarity and change the icon filename. Remove the old extension icon file to streamline assets. - Enhance database management to support MongoDB integration. Update package dependencies to include MongoDB, modify UI components to accommodate MongoDB connection options, and adjust schema synchronization logic for MongoDB collections. This improves the extension\'s functionality by allowing users to manage both PostgreSQL and MongoDB databases seamlessly. - Update subtitle formatting in manage-databases component to remove the "Default" label from the subtitle. This change simplifies the display of database entries, enhancing UI clarity while maintaining essential information. - Add showTableNamesOnly feature to database management and explore tables - Remove subtitle from List.Item in explore-tables component to simplify the display of database entries. This change enhances the clarity of the UI by focusing on the title and detail without additional context. - Refactor database management in Raycast extension by consolidating credential handling and exclusion rules into a per-database model. Remove legacy credential and exclusion rule files, and update commands for managing databases. Enhance the explore tables functionality to support the new structure, ensuring a smoother user experience. - Enhance Raycast extension to support multiple databases, allowing users to manage connections, local caches, and exclusion rules per database. Update key features and commands for improved usability, including a dual-pane interface for exploring tables and a streamlined schema sync process. Expand storage format to accommodate multiple databases and prepare for future database types. - Update README.md to clarify the purpose of the schema retrieval feature, specifying it is for reference or context for AI. - Rename project from "Sql Schema Explorer" to "DB Schema Explorer" across all relevant files, including changelog, package.json, package-lock.json, and README.md. Update descriptions to reflect the new name and enhance clarity. - Initial commit of the Sql Schema Explorer extension for Raycast. This includes the core functionality to sync and explore PostgreSQL database schemas, manage exclusion rules, and set connection credentials. Added configuration files, TypeScript support, and essential UI components for user interaction.
|
Congratulations on your new Raycast extension! 🚀 We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 10-15 business days. Once the PR is approved and merged, the extension will be available on our Store. |
- Fix Prettier formatting in explore-tables.tsx - Update keyboard shortcut for \'Copy DDL\' action in explore-tables component to use standard copy shortcut. This change enhances consistency in user interactions with copy actions.
Greptile OverviewGreptile SummaryThis PR adds a new DB Schema Explorer extension that enables users to browse and export database schemas from PostgreSQL and MongoDB. The extension caches schemas locally for fast access and provides powerful filtering with exclusion rules. Key Features:
Code Quality:
Minor Issue:
Confidence Score: 5/5
Important Files Changed
|
| return { | ||
| host: url.hostname, | ||
| port: Number.isFinite(port) ? port : 5432, | ||
| user: url.username ? decodeURIComponent(url.username) : undefined, | ||
| password: url.password ? decodeURIComponent(url.password) : undefined, | ||
| database: database || undefined, | ||
| connectionTimeoutMillis: 10000, | ||
| ssl: { rejectUnauthorized: false }, | ||
| }; |
There was a problem hiding this comment.
Insecure forced TLS setting
parseConnectionConfig forces ssl: { rejectUnauthorized: false } for all Postgres connections (pg-config.ts:11-19). This both weakens TLS (accepts MITM certificates) and can break connections to servers that don’t support SSL. This should be opt-in (e.g., only when sslmode=require / user preference) and should not disable cert verification by default.
| let connectionString = ""; | ||
| const fromStorage = await LocalStorage.getItem<string>(LEGACY_STORAGE_KEY_CONNECTION); | ||
| if (fromStorage && String(fromStorage).trim()) connectionString = String(fromStorage).trim(); | ||
| if (!connectionString) { | ||
| const prefs = getPreferenceValues<{ connectionString?: string }>(); | ||
| const fromPrefs = prefs.connectionString?.trim(); | ||
| if (fromPrefs) connectionString = fromPrefs; | ||
| } |
There was a problem hiding this comment.
Disallowed preference typing
getPreferenceValues<{ connectionString?: string }>() in ensureMigratedAsync (databases.ts:73-80) manually types preferences. In this repo the preference types are auto-generated in raycast-env.d.ts and the manual generic is explicitly disallowed, because it can drift from the actual schema. Use the generated Preferences type instead (or avoid typing here entirely if it’s only for legacy migration).
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| "preferences": [ | ||
| { | ||
| "name": "connectionString", | ||
| "type": "password", | ||
| "required": false, | ||
| "title": "Connection String", | ||
| "description": "PostgreSQL connection string (e.g. postgresql://user:password@host:5432/database)" | ||
| } | ||
| ], |
There was a problem hiding this comment.
Unused legacy preference
package.json still declares a connectionString preference (package.json:33-41), but the extension UI uses the per-database registry (Manage Databases) for credentials and doesn’t read this preference anywhere except a one-time migration path. Leaving this preference exposed in the Store UI is confusing and implies a single-DB setup that won’t be used. Either remove the preference or clearly scope it as “Legacy migration only” and stop showing it to users.
- added idea to gitignore - Remove idea.txt file and update package.json to eliminate deprecated connection string preference. Enhance database management by adding delete functionality for databases in manage-databases component, improving user experience and database management capabilities. - Enhance explore-tables component by adding a feature to toggle visibility of table names. Users can now choose to display either full table names (schema.table) or just the table names, improving clarity and customization in table management.
… interface. Update fetchMysqlSchemaData function to use this interface, clarifying that MySQL support is not currently integrated into the extension.
|
@greptileai, could you please do a fresh review of this PR? |
| if (fromStorage && String(fromStorage).trim()) connectionString = String(fromStorage).trim(); | ||
| if (!connectionString) { | ||
| // Legacy migration: check for connectionString preference that may no longer exist in Preferences type | ||
| const prefs = getPreferenceValues<Preferences>() as Preferences & { connectionString?: string }; |
There was a problem hiding this comment.
Use auto-generated Preferences type instead of manual typing - don't manually extend with connectionString. This violates the repository's rule that preference types should match raycast-env.d.ts
| const prefs = getPreferenceValues<Preferences>() as Preferences & { connectionString?: string }; | |
| const prefs = getPreferenceValues<Preferences>(); |
Context Used: Rule from dashboard - What: Don't manually define Preferences for getPreferenceValues() or commends Argument interfa... (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
commented
Feb 9, 2026
Additional Comments (2)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! |
- Refactor connection string retrieval in ensureMigratedAsync function - Add \'Copy Full Schema\' action in explore-tables component
- Refactor \'Copy DDL\' action in explore-tables component - Refactor \'Copy Full Schema\' action in explore-tables component
commented
Feb 9, 2026
|
@greptileai, could you please do a fresh review of this PR? |
| export function ruleDescription(rule: ExclusionRule): string { | ||
| switch (rule.type) { | ||
| case "regex": | ||
| return `Regex: ${rule.pattern}`; | ||
| case "contains": | ||
| return `Contains: ${rule.pattern}`; | ||
| case "not_contains": | ||
| return `Does not contain: ${rule.pattern}`; | ||
| } | ||
| } |
There was a problem hiding this comment.
Missing default return
ruleDescription is declared to return string, but it has no default return path. If an invalid rule type ever makes it into storage (e.g., from legacy data or a manual edit), this will return undefined at runtime and can crash when used in string interpolation (e.g., the “Remove Rule” action title). Consider adding a fallback return (or throwing) for unknown rule.type values.
| <List> | ||
| <List.EmptyView | ||
| title="No databases" | ||
| description="Add a database in Manage Databases first." | ||
| icon="🔌" | ||
| actions={ | ||
| <ActionPanel> |
There was a problem hiding this comment.
Invalid List.EmptyView icon
List.EmptyView’s icon prop expects an ImageLike (asset path, Icon, URL, etc.). Passing a raw emoji string like "🔌" is not a valid icon value and can fail at runtime. This pattern appears multiple times in this PR (see also explore-tables.tsx and manage-databases.tsx). Use an Icon.* or an image asset instead.
Also appears in:
extensions/db-schema-explorer/src/sync-schema.tsx:112-134extensions/db-schema-explorer/src/explore-tables.tsx:176-238extensions/db-schema-explorer/src/manage-databases.tsx:319-323
… sync-schema components
commented
Feb 9, 2026
|
@greptileai, could you please do a fresh review of this PR? |
commented
Feb 9, 2026
Additional Comments (1)
|
commented
Feb 17, 2026
|
Published to the Raycast Store: |
commented
Feb 17, 2026
|
🎉 🎉 🎉 We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag. |
Description
DB Schema Explorer is a Raycast extension that turns your database into a fast, local, searchable schema dictionary, optimized for AI prompts.
Multiple databases (Postgres, MongoDB): each with its own credentials, local JSON cache, default flag, and exclusion rules.
Instant search over cached schema instead of live DB queries, so browsing tables feels zero-latency.
Sync Schema command to fetch tables/views, columns, relations, enums, and indices and refresh the cache per database.
Explore Tables command with a dual-pane view: searchable table list on the left, clean CREATE TABLE DDL preview on the right; Enter copies DDL to clipboard.
Per-database exclusion rules (regex / contains / does not contain) to hide noisy or internal tables from Explore Tables.
Focused on speed, AI-friendly output, and local privacy—no schema leaves your machine unless you paste it elsewhere.
Screencast
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare placed outside of themetadatafolder