clifs

0.0.3 • Public • Published

clifs

clifs is a command line interface for salesforce written in javascript and designed to run on Node.js

Source Code

Go here if your looking for the README for working with the project as source code. README.dev is dedicated to developers looking to use the clifs as an installed npm package.

Prerequisites

Minimum: You must have a version of Node and npm installed.
Advanced: You must install the clifs managed package to use these features.

Installation

npm install -g clifs

This package is designed to be a development tool not as a library to be included in other projects. Normally we hate packages that insist on global installation, however, for a cli development tool it just makes sense for it to be globally installed.

Getting Started

Confirm that clifs is installed and working correctly by running the following at a command prompt:

clifs

This should list all the availiable commands and help text.

Navigate to the directory you want to work in:

cd <path to project directory>

<path to project directory> should be the directory that contains or will contain your apex src directory.

Log-in to a Salesforce org where <password> is your password with your security token appended:

clifs login <username> <password>

This will safely store your authentication in the local encrypted key store for your OS for later use. This authentication is scoped to the directory you log-in from much like when you use git from the command line.

Pull down the code from your instance:

clifs pull

This will download all the apex code from your salesforce instance and put it in the /src folder. It will overwrite files where necessary. It will also create a project.json file at the root of your folder. This file allows us to ignore the standard project.xml and <class>-meta.xml files and provides more flexibility in controlling our project.

Other Commands

Get More help:

sf help pull

This will list more detailed information about the push command.

Watch and build:

clifs watch

This will build your /src directory and then watch your /src directory for changes. Whenever a file is saved, clifs will attempt to build the single file and report the results. No tests are run at this time. We frequently leave this running in the background in a terminal while we work to get immediate feedback.


Advanced

Stream custom logs:

clifs logs

This will stream any logs created by the clifs package.

Scratchpad:

clifs logs

This will stream any logs created by the clifs package.



Wrapping Up

Push the code to your instance:

clifs push

This will upload all the apex code from your salesforce instance. No tests are run at this time.


Logout:

clifs logout

This will remove authentication information from your OS's key store



Yet Another Tool?

There are plenty of other salesforce tools that get the job done. From the Force.com IDE to MavensMate and even a Force.com CLI tool, you might be right in thinking that another development tool is superfluous. So, here are our reasons for building this tool:

Usability of Existing Tools: In addition to working in Salesforce, we also do a lot of web development. For the last few years, this has included working with Node, Express, MongoDb, Ember, and other "modern" development tools. Tools in this area tend to respond quickly, provide good feedback, and clear instructions on usage. clifs aims to replicate this feeling for Salesforce developers. Some advantages of using clifs over the current tools are:

  • Editor Independence
  • Minimal Project Size
  • Push Logging
  • Homogeneous Deployments

Developing for Developers: We spend most of our time creating solutions for business users with business problems. It's refreshing to do something a little different every once in a while. It's also very satisfying to give back to a community that has helped us to be who we are and have a successful business of our own.

Building a Lightsaber: Much like a Jedi Master building a lightsaber demonstrates a certain expertise, building development tooling demonstrates a level of knowledge and skill beyond writing business code or solving high level problems like developing triggers or batch jobs. Plus ... its just plain fun!



Readme

Keywords

none

Package Sidebar

Install

npm i clifs

Weekly Downloads

2

Version

0.0.3

License

none

Last publish

Collaborators

  • billowlabs