Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Consular CLI Commands

imakewebthings edited this page Apr 8, 2012 · 1 revision

Running Consular Projects

Once the project file has been declared to your satisfaction, simply execute any project defined in the ~/.config/consular directory with:

$ consular start foo

This will execute the steps and create the tabs defined and run the various options as expected. That's it. Create as many project files with as many tabs as you would like and automate your workflow.

Removing Consular Projects

If you no longer need a particular project, you can easily remove the consular file for the project:

$ consular delete foo

to remove a legacy yml syntax file you can just append the file extension and run:

$ consular delete foo.yml

Listing Consular Projects

You can also see a full list of available projects with:

$ consular list

This will print out the available project files that you can execute. The list also returns whatever text you have in the first comment of each consular script.

Creating Termfile for Repo

In addition to creating 'local' projects which can run on your computer (and are stored in your home directory), we also optionally allow you to create a Termfile within any directory and then you can execute this any time to setup the environment for that particular project source.

For example, let's say I am in /code/my/foo/project directory which is a Sinatra application. This application might have a Gemfile which includes all dependencies. You can also generate a Termfile which contains the ideal development setup for OSX. To generate this file, invoke:

$ consular create

This will generate a 'Termfile' in the current project directory and open the file to be edited in the default text editor. The format of the file is using [the new Ruby DSL](Consular Script DSL).

Now, when you or another developer clones a project, you could simply:

$ git clone git://path/to/my/foo/project.git
$ cd project
$ consular setup
$ consular start

This would clone the project repo, and then install all dependencies and then launch the ideal development environment for the project. Clearly this makes assumptions about the user's system setup right now, but we have some ideas on how to make this work more effectively on different configurations in the future.

In addition, you are in the project folder and you wish to remove the Termfile, you can invoke the command:

$ consular delete

This will clear the Termfile for the particular project.