Skip to content

MongoDB ​

Schemas are more of a suggestion.

Connecting ​

FieldDefaultNotes
Hostlocalhost
Port27017
Databaseadmin when emptyAlso the database used to authenticate
User, PasswordOptional
  • Use TLS / SSL encrypts the connection, checked against the system's trusted certificates.
  • URLs: mongodb://. mongodb+srv:// is read, but SRV records are not resolved, so point Lily at a host and port instead.
  • Lily connects to one host. There is no separate authentication-database option.
  • SSH tunnels are supported.

The MongoDB workspace ​

The Database menu switches databases (admin, local and config are hidden) and has Convert to SQL…. The sidebar lists collections; right-click one for Understand collection, Details & indexes and Drop collection.

Finding documents ​

Type a filter as JSON, for example {"active": true}, and get 50 documents per page. The explain button says whether the filter uses an index (IXSCAN) or scans the collection (COLLSCAN), with documents examined and returned.

The view toggle switches between JSON cards and a Table, which can be exported like any result.

Editing ​

New document and Edit open the document as JSON. Saving (⌘ S) replaces the whole document by _id. Delete document removes it.

Extended JSON keeps types intact: $oid, $date, $numberLong, $numberInt, $numberDouble, $binary and $timestamp.

Aggregation ​

Aggregation pipeline opens an editor with two modes:

  • JSON, with templates: match + sort + limit, group and count, sum and average by group, lookup and project, count distinct values, and a daily date histogram.
  • Stages, a visual builder for $match, $group, $sort, $project, $limit, $skip, $unwind, $lookup and $count.

Up to 1,000 results are shown. $out and $merge are blocked on read-only connections.

Indexes ​

Details & indexes lists the indexes (with unique and TTL tags) and creates single-field indexes, ascending or descending, optionally unique.

Change streams ​

Watch changes tails inserts, updates, replaces and deletes on the collection live (the last 200). It needs a replica set.

Activity ​

Running operations from currentOp, refreshed every two seconds, with kill.

AI ​

  • Ask your data writes an aggregation pipeline from the fields of the first 24 documents and answers from the results. Only reads run. The answer step sends up to 20 documents as they are; see What the AI sees.
  • Understand collection describes it from field names and types.

Health Check and conversion ​

Playground ​

mongo:7 on port 37017, no authentication, database lily_store.

Lily DB is free for personal and commercial use.