Skip to content

Instantly share code, notes, and snippets.

@jkbrzt
Last active December 20, 2015 04:29
Show Gist options
  • Save jkbrzt/6070786 to your computer and use it in GitHub Desktop.
Save jkbrzt/6070786 to your computer and use it in GitHub Desktop.
Opbeat CLI syntax survey
#
# Opbeat is looking for the best CLI syntax for the `opbeat'
# command that sends deployment info to the Opbeat API.
#
# Users should be able to specify repositories that the app being deployed
# consists of and their attributes.
#
# The attributes are "name", "version", "vcs", "rev", "branch", "remote_url".
#
# We are considering these syntaxes:
#
### 1. --repo takes one argument, a string of comma-separated key=value pairs:
$ opbeat deployment \
--repo name=myapp,version=1.0,vcs=git,branch=master,[email protected]:myorg/app.git,rev=hash \
--repo name=myapp2,version=1.0,vcs=git,branch=master,[email protected]:myorg/app2.git,rev=hash
### 2. --repo takes multiple arguments, each is a key=value pair.
$ opbeat deployment \
--repo \
name=myapp \
version=1.0 \
vcs=git \
branch=master \
[email protected]:opbeat/opbeatcli.git \
rev=hash \
--repo \
name=myapp2 \
version=1.0 \
vcs=git \
branch=master \
[email protected]:myorg/app2.git \
rev=hash
#
# Please let us know what you think. Thanks!
#
@dideler
Copy link

dideler commented Aug 1, 2013

#1 is easier to type, but #2 is easier to read. I prefer #2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment