Document the CLI within the docopt setup #50

Closed
opened 2020-12-29 12:50:45 +00:00 by decentral1se · 4 comments
Owner
> https://codimd.autonomic.zone/h1E5ZDaoQ-OeK0M3S4Ap0A
decentral1se added the
documentation
label 2020-12-29 12:50:45 +00:00
decentral1se added the
enhancement
label 2020-12-29 13:04:46 +00:00
Author
Owner

I still really love the git --help output...might try to play around with this again to see if it is possible to have more random description strings in the docopt thing itself...

➜  abra (main) ✔ git --help
usage: git [--version] [--help] [-C <path>] [-c <name>=<value>]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           <command> [<args>]

These are common Git commands used in various situations:

start a working area (see also: git help tutorial)
   clone      Clone a repository into a new directory
   init       Create an empty Git repository or reinitialize an existing one

work on the current change (see also: git help everyday)
   add        Add file contents to the index
   mv         Move or rename a file, a directory, or a symlink
   reset      Reset current HEAD to the specified state
   rm         Remove files from the working tree and from the index

examine the history and state (see also: git help revisions)
   bisect     Use binary search to find the commit that introduced a bug
   grep       Print lines matching a pattern
   log        Show commit logs
   show       Show various types of objects
   status     Show the working tree status

grow, mark and tweak your common history
   branch     List, create, or delete branches
   checkout    Switch branches or restore working tree files
   commit     Record changes to the repository
   diff       Show changes between commits, commit and working tree, etc
   merge      Join two or more development histories together
   rebase     Reapply commits on top of another base tip
   tag        Create, list, delete or verify a tag object signed with GPG

collaborate (see also: git help workflows)
   fetch      Download objects and refs from another repository
   pull       Fetch from and integrate with another repository or a local branch
   push       Update remote refs along with associated objects

'git help -a' and 'git help -g' list available subcommands and some
concept guides. See 'git help <command>' or 'git help <concept>'
to read about a specific subcommand or concept.
I still really love the `git --help` output...might try to play around with this again to see if it is possible to have more random description strings in the docopt thing itself... ``` ➜ abra (main) ✔ git --help usage: git [--version] [--help] [-C <path>] [-c <name>=<value>] [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path] [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare] [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>] <command> [<args>] These are common Git commands used in various situations: start a working area (see also: git help tutorial) clone Clone a repository into a new directory init Create an empty Git repository or reinitialize an existing one work on the current change (see also: git help everyday) add Add file contents to the index mv Move or rename a file, a directory, or a symlink reset Reset current HEAD to the specified state rm Remove files from the working tree and from the index examine the history and state (see also: git help revisions) bisect Use binary search to find the commit that introduced a bug grep Print lines matching a pattern log Show commit logs show Show various types of objects status Show the working tree status grow, mark and tweak your common history branch List, create, or delete branches checkout Switch branches or restore working tree files commit Record changes to the repository diff Show changes between commits, commit and working tree, etc merge Join two or more development histories together rebase Reapply commits on top of another base tip tag Create, list, delete or verify a tag object signed with GPG collaborate (see also: git help workflows) fetch Download objects and refs from another repository pull Fetch from and integrate with another repository or a local branch push Update remote refs along with associated objects 'git help -a' and 'git help -g' list available subcommands and some concept guides. See 'git help <command>' or 'git help <concept>' to read about a specific subcommand or concept. ```
Owner

it is possible to have more random description strings in the docopt thing itself...

We can add anything we want below the initial list, I think we just need a blank line to demarcate the end. e.g. see https://github.com/andsens/docopt.sh

> it is possible to have more random description strings in the docopt thing itself... We can add anything we want below the initial list, I think we just need a blank line to demarcate the end. e.g. see https://github.com/andsens/docopt.sh
Owner

See #61:

$ abra help app_ls
abra [options] app (list|ls) [--status] [--server=<server>]

List your exciting apps

OPTIONS
  --status           Show whether apps are deployed (warning! slow!)
  --server=<server>  Filter to a specific server
$ abra help app_deploy
abra [options] app <domain> deploy [--skip-check]

Deploy app <domain> to the configured server

OPTIONS
  --skip-check    Don't check whether app definition is up-to-date first
$ abra help
(shows full usage)

Currently requires manual copypasta for the usage statements (maybe some terrifying grep of DOC? unsure), and the app_ls syntax isn't ideal.

See #61: ``` $ abra help app_ls abra [options] app (list|ls) [--status] [--server=<server>] List your exciting apps OPTIONS --status Show whether apps are deployed (warning! slow!) --server=<server> Filter to a specific server $ abra help app_deploy abra [options] app <domain> deploy [--skip-check] Deploy app <domain> to the configured server OPTIONS --skip-check Don't check whether app definition is up-to-date first $ abra help (shows full usage) ``` Currently requires manual copypasta for the usage statements (maybe some terrifying `grep` of `DOC`? unsure), and the `app_ls` syntax isn't ideal.
Author
Owner

Can we get this for abra app ls --help? app_ls is a bit funky alright.

Looking rad though.

Can we get this for `abra app ls --help`? `app_ls` is a bit funky alright. Looking rad though.
3wordchant referenced this issue from a commit 2021-01-01 13:09:55 +00:00
This repo is archived. You cannot comment on issues.
No Milestone
No Assignees
2 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coop-cloud/abra#50
No description provided.