mm

CLI for MavensMate


Keywords
mavensmate, salesforce, salesorce1, force, com, ide, cli
License
GPL-3.0
Install
pip install mm==0.1.9

Documentation

mm

IMPORTANT

The APIs in this project are deprecated. All development is currently occuring at https://github.com/joeferraro/MavensMate

master

Build Status

Overview

mm is an executable that powers MavensMate Force.com 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" }'

Installation

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: https://www.python.org/downloads/.

pip

pip is the best way to install mm. To install pip: http://pip.readthedocs.org/en/latest/installing.html. Then run:

$ pip install mm

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

easy_install
$ easy_install mm
Manual
$ git clone https://github.com/joeferraro/mm.git
$ python setup.py 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: http://stackoverflow.com/a/6318188/429814

Examples:

Longhand
$ mm -o new_project -c SUBLIME_TEXT <<< '{"settings":{"mm_workspace":"some/location"}, "project_name" : "mycoolproject", "username":"foo@bar.com", "password":"foo", "org_type":"developer", "package": {"ApexClass":"*"}}'
Shorthand
$ mm new_project <<< '{"settings":{"mm_workspace":"some/location"}, "project_name" : "mycoolproject", "username":"foo@bar.com", "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: https://github.com/joeferraro/mm/tree/master/lib/commands

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 Salesforce.com 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