github.com/mhlo/force@v0.22.28-0.20150915022417-6d05ecfb0b47/README.md (about) 1 ## force 2 3 A command-line interface to force.com 4 ![](https://travis-ci.org/devangel/force.svg?branch=master) 5 6 ### Installation 7 8 ##### Precompiled Binaries 9 10 * [Linux 32bit](https://godist-new.herokuapp.com/projects/heroku/force/releases/current/linux-386/force) 11 * [Linux 64bit](https://godist-new.herokuapp.com/projects/heroku/force/releases/current/linux-amd64/force) 12 * [Linux Arm](https://godist-new.herokuapp.com/projects/heroku/force/releases/current/linux-arm/force) 13 * [OS X 32bit](https://godist-new.herokuapp.com/projects/heroku/force/releases/current/darwin-386/force) 14 * [OS X 64bit](https://godist-new.herokuapp.com/projects/heroku/force/releases/current/darwin-amd64/force) 15 * [Windows 32bit](https://godist-new.herokuapp.com/projects/heroku/force/releases/current/windows-386/force.exe) 16 * [Windows 64bit](https://godist-new.herokuapp.com/projects/heroku/force/releases/current/windows-amd64/force.exe) 17 18 ##### Compile from Source 19 20 $ go get -u github.com/heroku/force 21 22 ### Usage 23 24 Usage: force <command> [<args>] 25 26 Available commands: 27 login Log in to force.com 28 logout Log out from force.com 29 logins List force.com logins used 30 active Show or set the active force.com account 31 whoami Show information about the active account 32 describe Describe the object or list of available objects 33 sobject Manage standard & custom objects 34 field Manage sobject fields 35 record Create, modify, or view records 36 bulk Load csv file use Bulk API 37 fetch Export specified artifact(s) to a local directory 38 import Import metadata from a local directory 39 export Export metadata to a local directory 40 query Execute a SOQL statement 41 apex Execute anonymous Apex code 42 oauth Manage ConnectedApp credentials 43 test Run apex tests 44 security Displays the OLS and FLS for a given SObject 45 version Display current version 46 update Update to the latest version 47 push Deploy single artifact from a local directory 48 aura Retrieve or deploy Aura components 49 password See password status or reset password 50 notify Should notifications be used 51 limits Display current limits 52 help Show this help 53 54 Run 'force help [command]' for details. 55 56 ### login 57 When you login using the CLI a record of the login is saved. Eventually your token will expire requiring re-authentication. The default login is for all production instances of salesforce.com. Two predefined non-production instances are available using the test and pre aliases. You can set an arbitrary instance to log in to by specifying the instance url in the form of subdomain.domain. For example login-blitz.soma.salesforce.com. 58 59 force login # log in to production or developer org 60 force login -i=test # log in to sandbox org 61 force login -i=pre # log in to prerelease org 62 force login -u=un -p=pw # log in using SOAP 63 force login -i=test -u=un -p=pw # log in using SOAP to sandbox org 64 force login -i=<instance> -u=un -p=pw # internal only 65 66 ### logout 67 Logout will delete your authentication token and remove the saved record of that login. 68 69 force logout -u=user@example.org 70 71 ### logins 72 Logins will list all the user names that you have used to authenticate with the instance URL associated with each one. The active login will be indicated behind the login name in red. 73 74 force logins 75 76 ![](https://raw.githubusercontent.com/dcarroll/dcarroll.github.io/master/images/force/screenshot-191.png) 77 78 ### active 79 Active without any arguments will display the currently acctive login that you are using. You can also supply a username argument that will set the active login to the one corresponding to the username argument. Note, just because you set a login as active, does not mean that the token is necessarily valid. 80 81 force active 82 force active dave@demo.1 83 84 ### whoami 85 Whoami will display detailed user information about the currently active logged in user. This is Force.com specific information. 86 87 force whomai 88 89 ![](https://raw.githubusercontent.com/dcarroll/dcarroll.github.io/master/images/force/screenshot-191%20copy.png) 90 91 ### sobject 92 Sobject command gives you access to creating and deleting schema objects. The list argument will list ALL of the objects, both standard and custom, in your org. 93 94 force sobject list 95 force sobject create <object> [<field>:<type>]... 96 force sobject delete <object> 97 98 ![](https://raw.githubusercontent.com/dcarroll/dcarroll.github.io/master/images/force/screenshot-192.png) 99 100 ### field 101 Field gives you the ability to create, list and delete the fields on an object. Fields need to be created one at a time. You can also set required and optional attributes for the type of field. All defaultable field attributes will be defaulted based on the defaults in the web UI. 102 103 force field list Todo__c 104 force field create Todo__c Due:DateTime required:true 105 force field delete Todo__c Due 106 107 ### push 108 Push gives you the ability to push specified resources to force.com. The resource will be pulled from ./src/{type}/ 109 110 force push -t(ype) StaticReource -n(ame) MyResource.resource 111 force -type ApexClass -name MyClass.cls 112 force -t ApexPage -n MyPage.page 113 114 You can also push all of a specific type of resource from a given folder. 115 116 force push -t StaticResource -p(ath) src/staticresources/ 117 force push -t ApexClass -path src/classes/ 118 force push -t ApexPage -p src/pages/ 119 120 ### notify 121 Includes notification library, [gotifier](https://github.com/ViViDboarder/gotifier), that will display notifications for using either Using [terminal-notifier](https://github.com/alloy/terminal-notifier) on OSX or [notify-send](http://manpages.ubuntu.com/manpages/saucy/man1/notify-send.1.html) on Ubuntu. Currently, only the `push` and `test` methods are displaying notifications. 122 123 ### limits 124 Limits will display limits information for your organization. 125 - Max is the limit total for the organization 126 - Remaining is the total number of calls or events left for the organization 127 128 The list is limited to those exposed by the REST API. 129 130 force limits 131 132 ### Hacking 133 134 # set these environment variables in your startup scripts 135 export GOPATH=~/go 136 export PATH="$GOPATH/bin:$PATH" 137 138 # download the source and all dependencies 139 $ go get -u github.com/heroku/force 140 $ cd $GOPATH/src/github.com/heroku/force 141 142 # to compile and test modifications 143 $ go get . 144 $ force