github.com/haagen/force@v0.19.6-0.20140911230915-22addd930b34/README.md (about)

     1  ## force
     2  
     3  A command-line interface to force.com
     4  
     5  ### Installation
     6  
     7  ##### Precompiled Binaries
     8  If the download does not work, download instead from the [binaries](https://github.com/heroku/force/tree/master/binaries) folder in the repo.
     9  
    10  * [Linux 32bit](https://github.com/heroku/force/raw/master/binaries/linux-386/force)
    11  * [Linux 64bit](https://github.com/heroku/force/raw/master/binaries/linux-amd64/force)
    12  * [Linux Arm](https://github.com/heroku/force/raw/master/binaries/linux-arm/force)
    13  * [OS X 32bit](https://github.com/heroku/force/raw/master/binaries/darwin-386/force)
    14  * [OS X 64bit](https://github.com/heroku/force/raw/master/binaries/darwin-386/force)
    15  * [Windows 32bit](https://github.com/heroku/force/raw/master/binaries/windows-386/force.exe)
    16  * [Windows 64bit](https://github.com/heroku/force/raw/master/binaries/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         sobject   Manage standard & custom objects
    33         field     Manage sobject fields
    34         record    Create, modify, or view records
    35         bulk      Load csv file use Bulk API
    36         fetch     Export specified artifact(s) to a local directory
    37         export    Export metadata to a local directory
    38         fetch     Export specified artifact(s) to a local directory
    39         import    Import metadata from a local directory
    40         query     Execute a SOQL statement
    41         apex      Execute anonymous Apex code
    42         oauth     Manage ConnectedApp credentials
    43         version   Display current version
    44         update    Update to the latest version
    45         push      Deploy single artifact from a local directory
    46         password  See password status or reset password
    47         help      Show this help
    48  
    49      Run 'force help [command]' for details.
    50  
    51  ### login
    52  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.
    53  
    54        force login               # log in to production or developer org
    55        force login -i=test           # log in to sandbox org
    56        force login -i=pre            # log in to prerelease org
    57        force login -u=un -p=pw       # log in using SOAP
    58        force login -i=test -u=un -p=pw       # log in using SOAP to sandbox org
    59        force login -i=<instance> -u=un -p=pw     # internal only
    60  
    61  ### logout
    62  Logout will delete your authentication token and remove the saved record of that login.
    63  
    64        force logout -u=user@example.org
    65  
    66  ### logins
    67  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.
    68  
    69        force logins
    70  
    71  ![](https://raw.githubusercontent.com/dcarroll/dcarroll.github.io/master/images/force/screenshot-191.png)
    72  
    73  ### active
    74  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.
    75  
    76        force active
    77        force active dave@demo.1
    78  
    79  ### whoami
    80  Whoami will display detailed user information about the currently active logged in user.  This is Force.com specific information.
    81  
    82        force whomai
    83  
    84  ![](https://raw.githubusercontent.com/dcarroll/dcarroll.github.io/master/images/force/screenshot-191%20copy.png)
    85  
    86  ### sobject
    87  Sobject command gives you access to creating and deleting schema objects. The list argumenet will list ALL of the objects, both standard and custom, in your org.
    88  
    89        force sobject list
    90        force sobject create <object> [<field>:<type>]...
    91        force sobject delete <object>
    92  
    93  ![](https://raw.githubusercontent.com/dcarroll/dcarroll.github.io/master/images/force/screenshot-192.png)
    94  
    95  ### field
    96  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.
    97  
    98        force field list Todo__c
    99        force field create Todo__c Due:DateTime required:true
   100        force field delete Todo__c Due
   101  
   102  ### notifications
   103  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.
   104  
   105  ### Hacking
   106  
   107      # set these environment variables in your startup scripts
   108      export GOPATH=~/go
   109      export PATH="$GOPATH/bin:$PATH"
   110  
   111      # download the source and all dependencies
   112      $ go get -u github.com/heroku/force
   113      $ cd $GOPATH/src/github.com/heroku/force
   114  
   115      # to compile and test modifications
   116      $ go get .
   117      $ force