add custom commands to the cli

Bug #821621 reported by Mark Mims
This bug report is a duplicate of:  Bug #807794: Ensemble should have cli plugins. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pyjuju
New
Wishlist
Unassigned

Bug Description

I'd like to be able to easily extend the cli's command set with custom commands.

To do this, I'd create an executable script in my path called 'ensemble-<command>' and have it called by ensemble as 'ensemble <command> [<args>]'

This is exactly like git's command extensibility/monkeypatching.

Mark Mims (mark-mims)
Changed in ensemble:
importance: Undecided → Wishlist
Revision history for this message
Kapil Thangavelu (hazmat) wrote :

are you looking to implement ensemble cli plugins or a generic way to invoke say a formula custom hook?

Revision history for this message
Mark Mims (mark-mims) wrote :

cli plugins.

# example

    $ ensemble freeze lts:mysql

that would call a script '~/bin/ensemble-freeze' that would look something like

    #!/bin/bash

    repo_name=${1/lts://}
    bzr branch lp:principia/${repo_name} ~/my/local/formulas/${repo_name}

# example

    $ ensemble deploy-stack rails

that would call a script '~/bin/ensemble-deploy-stack' that would look something like

    #!/bin/bash

    # parse some stack config ~/.ensemble/stacks.yml

    for service in stack_services; do
      ensemble deploy local:${service}
    done

    # etc etc

---

I don't think there's any special env setup needs for custom commands other than what git does to shift args appropriately.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.