MotionQL

Workspace

Projects and cross-database links

Group connections by environment, save items to a project and link fields across databases.

Projects and environments

A project groups connections of every engine (MongoDB, SQL databases, Redis / Valkey, Elasticsearch / OpenSearch) into environments, so the sidebar shows one application's databases instead of every connection you have.

  • Switch with the project button at the top of the sidebar, or from the command palette (Switch Project…, New Project…, Open Project: <name>, Show All Connections). All connections is the classic sidebar; Ungrouped connections lists the ones in no project.
  • Environments: Development, Test, Staging, Production or a custom one, each with a colour from a fixed palette that reads well in light and dark, tags, and a policy:
    • Confirm writes (always on for Production): SQL statements, grid edits, row deletes and table designs, and Redis and search writes ask before they run. The app's main process enforces it, not just the screen, and refusals are written to the audit log.
    • Read-only: every write is refused, on every engine, as for a read-only connection.
    • When a connection is in several projects, the strictest environment applies, whichever project is open.
  • The sidebar of a project shows Pinned objects, the Connected connections, then each environment (coloured header, policy badges, tag chips that filter) with its folders and each connection's own tree. Drag a connection onto another environment or folder to move it. Tabs get a stripe in the colour of their connection's environment, and Production connections of every engine show the production banner.
  • Pin a collection, table, index or Redis database from its context menu (Pin to project).
  • Project Home (the house button) shows the environments with live connection status, pinned objects, recent SQL queries and Markdown notes, plus quick actions: add a connection, import a project, new notebook, new query, edit and export.
  • Open tabs are saved per project: switching projects saves the open tabs and brings back the ones that were open when you last left the other project.
  • Export a project as a folder (the workspace folder layout: motionql-workspace.json, connections/*.json for every engine and project.motionql.json; commit it to Git) or as a single file. Passwords, keys, tokens and local file paths are left out, and the app lists what was removed. Import matches connections by type and name and adds missing ones without credentials; you enter them on the first connect. Projects themselves are stored on this computer only (projects.json in the app's data folder).
  • First run: with saved connections and no project, the sidebar offers Create a project from my connections, placing each connection in Development, Staging or Production by its own environment or production flag.
  • Ask AI about this project (Project Home) answers questions such as "where are customers stored?" or "how do these databases relate?" from the names of the project's databases, collections, tables and indices. Only names are sent, never values, hosts or credentials; schemas are included only for open connections whose Allow AI switch is on. The answer is advice; nothing runs.

A project can record links between fields of different databases and engines: orders.customerId in MongoDB → customers.id in PostgreSQL, the Redis key pattern customer:{id} → the same table, an Elasticsearch index field → a MySQL column. Each link has a cardinality (1–1, 1–N, N–1, N–N), an optional label and a source (declared by you, or inferred and confirmed by you). Links are stored with the project and travel in its export, with connections matched by name.

  • Open the diagram from Project Home (Links → Open diagram) or the command palette (Project Links Diagram). Every linked collection, table, key pattern and index is a node framed in its engine's colour, with the linked fields as rows; lines are labelled with their cardinality (dashed when inferred). Drag to arrange (kept per project), Arrange lays it out again, and Export saves a PNG or SVG. Select a line to change its cardinality or label, swap its direction, open either end or remove it; double-click a node to open it.
  • Find links reads the names and types of the chosen connections' objects: field and column names (customerId, customer_id, *_id) matched to a collection, table, index or key pattern of the same entity, with compatible types (an ObjectId stored as text is flagged, ObjectId vs integer is rejected). Declared SQL foreign keys are added at once as known links. With Check sampled values on, each suggestion is checked against a small sample (at most 50 values per field, read-only) and its confidence rises or falls with how many values are found. Tick the suggestions to keep; nothing is added without your confirmation. The reads use each connection's normal read paths, so read-only connections work, and no value is sent to an AI provider.
  • Add link declares one by hand: connection, database or schema, object (a Redis key pattern such as user:{id}) and field ({id} stands for the variable part of a key).
  • Jump to related record: in the SQL table grid, MongoDB's table view, Elasticsearch hits and the Redis key detail (hash fields, JSON fields and the key itself), a linked value shows a small arrow. Clicking it opens the Related records panel, which reads the records it points to on their own connection (by key, at most 20) and, under Show referencing records, the records that point at it. Each record opens in its own tab. The panel only reads: read-only connections, environment policies and AI switches are untouched.
  • Ask AI: Explain how these databases relate describes the entities, data flows and gaps of the link graph, and AI: propose links suggests new links, each with an Add button. Both send connection, database, object and field names and the existing links only, never values, and leave out connections whose Allow AI switch is off. Run Find links first so the AI sees the objects that have no link yet.
  • Project Home shows the number of links and a thumbnail of the diagram.

Saved items

  • Save to project… in a tab's menu (right-click the tab), or Mod+S while a project is open, saves what the tab holds into the project: a SQL editor's query, a MongoDB collection query or aggregation pipeline, an IntelliShell or SQL script, the Redis console's line (or the commands run in it), a search console's requests or SQL, a notebook or an open dashboard. Give it a name and, optionally, a folder (reports/daily makes nested folders). Saving the same tab again updates that item; a name already used in the folder asks before replacing.
  • The Saved section in the project sidebar and on Project Home lists folders and items with their environment colour. Click an item to open it; its menu (… or right-click) has Run against…, Rename…, Move to folder… and Delete….
  • Roles and Run against. Give connections a Role in the project dialog (for example orders-db on the Development, Staging and Production copies of the same database). An item remembers the connection it was saved from and its role; Run against… lists the project's other connections of the same engine (SQL items only the same SQL engine), the same role first, by environment. The item opens in a new tab on that connection; nothing runs until you run it, and the target environment's policy applies (Production asks before writes).
  • Items are part of the project: they are exported with it and shared with it through Team Server. Each item holds at most 512 KB, and all items of a project 4 MB together.

MongoDB writes in Production

On a MongoDB connection in a Production environment (or an environment with Confirm writes on, or a connection whose own environment label is prod), every write asks first: inserting, editing and deleting documents, dropping or renaming collections and databases, index changes, imports, transfers into the connection, and writes from IntelliShell, script mode and the embedded mongosh. The app's main process refuses the write until you confirm Write to production; each confirmation is written to the audit log (confirm.mongoWrite). One confirmation covers the operation it was asked for (for example all documents of one import). Scheduled tasks run unattended and are not asked. A read-only environment refuses every write.

Sharing a project with your team

With a Team Server configured, Share with team… on Project Home (or the share button in the Team panel header while the project is open) shares the project into a team folder: environments and their policies, folders, roles, pinned objects, links and saved items, plus the settings of its connections. Passwords, keys, tokens and local file paths are never sent; the dialog lists what was left out, and the server refuses a project that still holds credentials. Teammates choose Add to my projects in the Team panel: connections they already have are matched by type and name, the others are added without credentials (enter them on the first connect). Who can see, change or delete the shared project follows the team folder's permissions, as for every shared item.

Something unclear or out of date? Write to support@motionql.com.