A CLI tool and library for analyzing MongoDB query performance and recommending optimal indexes. Current stable version is 2.0.5. Release cadence is irregular. It works by generating test data, creating indexes (either user-specified or all possible combinations), running queries, and providing human-readable statistics. Differentiators: unlike general profiling tools, it explicitly tests multiple indexes and suggests the best one for each query.
npm install flamongoNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates programmatic usage of the explain function to analyze query performance against specified indexes.
Use import statement instead of require(). If using CommonJS, use dynamic import: const flamongo = await import('flamongo');Use flamongo.bestIndex() programmatically.
Ensure MongoDB is running and accessible at the default port 27017 or provide a custom URL.
Verify that the schema field types correspond to actual data types used in MongoDB collections.
Limit the number of fields in the schema or use the explain command with a curated set of indexes instead.
Run `npm install -g flamongo` for global CLI, or `npm install flamongo` for local project use.
Use `import flamongo from 'flamongo'` with ESM or `const flamongo = await import('flamongo')` for dynamic import.Start MongoDB server with `mongod` or provide a valid connection URL via options.