CLI for MavensMate

mavensmate, salesforce, salesorce1, force, com, ide, cli
pip install mm==0.2.6




The APIs in this project are deprecated. All development is currently occuring at


Build Status


mm is an executable that powers MavensMate IDEs. You can use mm to perform every important task relative to developing on the Salesforce1 platform. For example, to compile a project:

$ mm compile_project

You can also use mm to provide a default UI for tasks like creating a new project, editing a project, running unit tests & anonymous apex, & deploying metadata to servers. Just use the --ui flag:

$ mm new_project --ui

In order to provide context to your operation, pipe json to mm via STDIN. For example:

$ mm compile_project <<< '{ "project_name" : "myproject" }'


mm is a Python 2.7 package that can be installed and run traditionally (via Python) or optionally run as a standalone executable with no dependencies.

As a Standalone Executable

As a Python Package

If you do not have Python 2.7 installed, you'll need to do so:


pip is the best way to install mm. To install pip: Then run:

$ pip install mm

This will create an executable called mm (or mm.exe in Windows).

$ easy_install mm
$ git clone
$ python install

Running mm Commands

In order to run mm commands, it should be located on your path. For Linux/Unix users, this should be fairly straightforward. For Windows users:


$ mm -o new_project -c SUBLIME_TEXT <<< '{"settings":{"mm_workspace":"some/location"}, "project_name" : "mycoolproject", "username":"", "password":"foo", "org_type":"developer", "package": {"ApexClass":"*"}}'
$ mm new_project <<< '{"settings":{"mm_workspace":"some/location"}, "project_name" : "mycoolproject", "username":"", "password":"foo", "org_type":"developer", "package": {"ApexClass":"*"}}'

Command Line Arguments

Argument Description
-o Requested Operation (optional)
-c Plugin client making the request ("Sublime Text" [default], "TextMate", "Notepad++", etc.)
--ui Launch the base UI for the operations

Supported Operations

All supported commands can be found here:

Operations Description
new_project Creates a new project
edit_project Edits contents of a project
upgrade_project Upgrades a project
compile_project Compiles a project
new_metadata Creates new metadata
refresh Refreshes files and/or directories from the server
clean_project Reverts a project to server state based on package.xml
compile Compiles files and/or directories
delete Deletes metadata from the server
get_active_session Retrieves an active session
update_credentials Updates the credentials associated with a project
execute_apex Executes a block of Apex
deploy Deploys metadata to one or more destination orgs
test Runs Apex unit tests
list_metadata Lists metadata of a certain type
index_metadata Indexes project metadata
list_connections List org connections for this project
new_connection Creates a new org connection
delete_connection Deletes an org connection
index_apex_overlays Indexes Apex checkpoints
new_apex_overlay Creates a new Apex checkpoint
delete_apex_overlay Deletes an Apex checkpoint
fetch_logs Fetches most recent Apex debug logs for this user
fetch_checkpoints Fetches most recent Apex checkpoints for this user
new_project_from_existing_directory Creates a new project from an existing directory
open_sfdc_url Opens metadata in Salesforce
index_apex Indexes Apex metadata for a project
update_subscription Updates metadata subscription for a project
new_log Creates a new Apex debug log