New in version 1.15.0
You can use the Aggregation Pipeline Builder to export your finished pipeline to one of the supported languages; Java, Node, C#, and Python 3. This feature facilitates formatting and exporting pipelines created in MongoDB Compass for use in your applications.
For instructions on creating an aggregation pipeline in MongoDB Compass, see Aggregation Pipeline Builder.
In the Export Pipeline To: dropdown, select your desired programming language:
The My Pipeline pane on the left displays your pipeline in mongo shell syntax.
The pane to the right displays your pipeline in the selected programming language.