github.com/koron/hk@v0.0.0-20150303213137-b8aeaa3ab34c/hkdist/public/styleguide.html (about)

     1  <!DOCTYPE html>
     2  <html>
     3    <head>
     4      <title>hk style guide</title>
     5  
     6      <style>
     7        body {
     8          background: #282A36;
     9          color: white;
    10          font-family: Helvetica;
    11        }
    12  
    13        #viewing-options {
    14          padding: 0;
    15        }
    16  
    17        #viewing-options li {
    18          display: inline-block;
    19          margin-right: 20px;
    20        }
    21  
    22        td {
    23          font-family: monospace;
    24          padding-right: 10px;
    25        }
    26  
    27        td:first-child {
    28          width: 540px;
    29        }
    30  
    31        h2 {
    32          color: #5A5D6E;
    33        }
    34  
    35        .prompt,
    36        .comment {
    37          color: #6272A4;
    38        }
    39  
    40        .command {
    41          color: white;
    42        }
    43  
    44        .root {
    45          color: #FF79C6;
    46          font-weight: bold;
    47        }
    48  
    49        .arguments {
    50          color: #66D9D0;
    51        }
    52      </style>
    53    </head>
    54  
    55    <body>
    56      <script id="command-structure" type="text/x-handlebars-template">
    57        {{#groups}}
    58        <h2>{{title}}</h2>
    59  
    60        <table>
    61          {{#commands}}
    62          <tr>
    63            <td>
    64              <span class='prompt'>$</span>
    65              <span class='command'>hk</span>
    66              <span class='root'>{{root}}</span>
    67              <span class='arguments'>{{arguments}}</span>
    68            </td>
    69            <td class='comment'># {{comment}}</td>
    70          </tr>
    71          {{/commands}}
    72        </table>
    73        {{/groups}}
    74      </script>
    75  
    76      <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
    77      <script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.1.2/handlebars.min.js"></script>
    78  
    79      <script>
    80        var source = $('#command-structure').html();
    81        var template = Handlebars.compile(source);
    82  
    83        var data = [
    84          {
    85            "commands": [
    86              {
    87                "root": "access",
    88                "arguments": "[-a <app or remote>]",
    89                "comment": "list access permissions (extra)"
    90              },
    91              {
    92                "root": "access-add",
    93                "arguments": "[-a <app or remote>] [-s] <email>",
    94                "comment": "give a user access to an app (extra)"
    95              },
    96              {
    97                "root": "access-remove",
    98                "arguments": "[-a <app or remote>] <email>",
    99                "comment": "remove a user's access to an app (extra)"
   100              }
   101            ],
   102            "title": "access"
   103          },
   104          {
   105            "commands": [
   106              {
   107                "root": "account-feature-disable",
   108                "arguments": "<feature>",
   109                "comment": "disable an account feature (extra)"
   110              },
   111              {
   112                "root": "account-feature-enable",
   113                "arguments": "<feature>",
   114                "comment": "enable an account feature (extra)"
   115              },
   116              {
   117                "root": "account-feature-info",
   118                "arguments": "<feature>",
   119                "comment": "show info for an account feature (extra)"
   120              },
   121              {
   122                "root": "account-features",
   123                "arguments": "",
   124                "comment": "list account features (extra)"
   125              },
   126              {
   127                "root": "key-add",
   128                "arguments": "[<public-key-file>]",
   129                "comment": "add ssh public key (extra)"
   130              },
   131              {
   132                "root": "key-remove",
   133                "arguments": "<fingerprint>",
   134                "comment": "remove an ssh public key (extra)"
   135              },
   136              {
   137                "root": "keys",
   138                "arguments": "",
   139                "comment": "list ssh public keys (extra)"
   140              }
   141            ],
   142            "title": "account"
   143          },
   144          {
   145            "commands": [
   146              {
   147                "root": "addon-add",
   148                "arguments": "[-a <app or remote>] <service>[:<plan>] [<config>=<value>...]",
   149                "comment": "add an addon"
   150              },
   151              {
   152                "root": "addon-destroy",
   153                "arguments": "[-a <app or remote>] <name>",
   154                "comment": "destroy an addon"
   155              },
   156              {
   157                "root": "addon-open",
   158                "arguments": "[-a <app or remote>] <name>",
   159                "comment": "open an addon (extra)"
   160              },
   161              {
   162                "root": "addon-plan",
   163                "arguments": "[-a <app or remote>] <name> <plan>",
   164                "comment": "change an addon's plan (extra)"
   165              },
   166              {
   167                "root": "addon-plans",
   168                "arguments": "<service>",
   169                "comment": "list addon plans (extra)"
   170              },
   171              {
   172                "root": "addon-services",
   173                "arguments": "",
   174                "comment": "list addon services (extra)"
   175              },
   176              {
   177                "root": "addons",
   178                "arguments": "[-a <app or remote>] [<service>:<plan>...]",
   179                "comment": "list addons"
   180              }
   181            ],
   182            "title": "add-on"
   183          },
   184          {
   185            "commands": [
   186              {
   187                "root": "apps",
   188                "arguments": "[<name>...]",
   189                "comment": "list apps"
   190              },
   191              {
   192                "root": "create",
   193                "arguments": "[-r <region>] [-o <org>] [<name>]",
   194                "comment": "create an app"
   195              },
   196              {
   197                "root": "destroy",
   198                "arguments": "<name>",
   199                "comment": "destroy an app"
   200              },
   201              {
   202                "root": "drain-add",
   203                "arguments": "[-a <app or remote>] <url>",
   204                "comment": "add a log drain (extra)"
   205              },
   206              {
   207                "root": "drain-info",
   208                "arguments": "[-a <app or remote>] <id or url>",
   209                "comment": "show info for a log drain (extra)"
   210              },
   211              {
   212                "root": "drain-remove",
   213                "arguments": "[-a <app or remote>] <id or url>",
   214                "comment": "remove a log drain (extra)"
   215              },
   216              {
   217                "root": "drains",
   218                "arguments": "[-a <app or remote>]",
   219                "comment": "list log drains (extra)"
   220              },
   221              {
   222                "root": "feature-disable",
   223                "arguments": "[-a <app or remote>] <feature>",
   224                "comment": "disable an app feature (extra)"
   225              },
   226              {
   227                "root": "feature-enable",
   228                "arguments": "[-a <app or remote>] <feature>",
   229                "comment": "enable an app feature (extra)"
   230              },
   231              {
   232                "root": "feature-info",
   233                "arguments": "[-a <app or remote>] <feature>",
   234                "comment": "show info for an app feature (extra)"
   235              },
   236              {
   237                "root": "features",
   238                "arguments": "[-a <app or remote>]",
   239                "comment": "list app features (extra)"
   240              },
   241              {
   242                "root": "info",
   243                "arguments": "[-a <app or remote>]",
   244                "comment": "show app info"
   245              },
   246              {
   247                "root": "log",
   248                "arguments": "[-a <app or remote>] [-n <lines>] [-s <source>] [-d <dyno>]",
   249                "comment": "stream app log lines"
   250              },
   251              {
   252                "root": "maintenance",
   253                "arguments": "[-a <app or remote>]",
   254                "comment": "show app maintenance mode (extra)"
   255              },
   256              {
   257                "root": "maintenance-disable",
   258                "arguments": "[-a <app or remote>]",
   259                "comment": "disable maintenance mode (extra)"
   260              },
   261              {
   262                "root": "maintenance-enable",
   263                "arguments": "[-a <app or remote>]",
   264                "comment": "enable maintenance mode (extra)"
   265              },
   266              {
   267                "root": "open",
   268                "arguments": "[-a <app or remote>]",
   269                "comment": "open app in a web browser (extra)"
   270              },
   271              {
   272                "root": "rename",
   273                "arguments": "<oldname> <newname>",
   274                "comment": "rename an app"
   275              },
   276              {
   277                "root": "transfer",
   278                "arguments": "[-a <app or remote>] <email or org name>",
   279                "comment": "transfer app ownership to a collaborator or an org (extra)"
   280              },
   281              {
   282                "root": "transfer-accept",
   283                "arguments": "[-a <app or remote>]",
   284                "comment": "accept an inbound app transfer request (extra)"
   285              },
   286              {
   287                "root": "transfer-cancel",
   288                "arguments": "[-a <app or remote>]",
   289                "comment": "cancel an outbound app transfer request (extra)"
   290              },
   291              {
   292                "root": "transfer-decline",
   293                "arguments": "[-a <app or remote>]",
   294                "comment": "decline an inbound app transfer request (extra)"
   295              },
   296              {
   297                "root": "transfers",
   298                "arguments": "[-a <app or remote>]",
   299                "comment": "list existing app transfer requests (extra)"
   300              },
   301              {
   302                "root": "url",
   303                "arguments": "[-a <app or remote>]",
   304                "comment": "show app url (extra)"
   305              },
   306              {
   307                "root": "which-app",
   308                "arguments": "[-a <app or remote>]",
   309                "comment": "show which app is selected, if any (extra)"
   310              }
   311            ],
   312            "title": "app"
   313          },
   314          {
   315            "commands": [
   316              {
   317                "root": "env",
   318                "arguments": "[-a <app or remote>]",
   319                "comment": "list env vars"
   320              },
   321              {
   322                "root": "get",
   323                "arguments": "[-a <app or remote>] <name>",
   324                "comment": "get env var (extra)"
   325              },
   326              {
   327                "root": "set",
   328                "arguments": "[-a <app or remote>] <name>=<value>...",
   329                "comment": "set env var"
   330              },
   331              {
   332                "root": "unset",
   333                "arguments": "[-a <app or remote>] <name>...",
   334                "comment": "unset env var"
   335              }
   336            ],
   337            "title": "config"
   338          },
   339          {
   340            "commands": [
   341              {
   342                "root": "domain-add",
   343                "arguments": "[-a <app or remote>] <domain>",
   344                "comment": "add a domain"
   345              },
   346              {
   347                "root": "domain-remove",
   348                "arguments": "[-a <app or remote>] <domain>",
   349                "comment": "remove a domain"
   350              },
   351              {
   352                "root": "domains",
   353                "arguments": "[-a <app or remote>]",
   354                "comment": "list domains"
   355              }
   356            ],
   357            "title": "domain"
   358          },
   359          {
   360            "commands": [
   361              {
   362                "root": "dynos",
   363                "arguments": "[-a <app or remote>] [<name>...]",
   364                "comment": "list dynos"
   365              },
   366              {
   367                "root": "restart",
   368                "arguments": "[-a <app or remote>] [<type or name>]",
   369                "comment": "restart dynos (or stop a dyno started with 'hk run')"
   370              },
   371              {
   372                "root": "run",
   373                "arguments": "[-s <size>] [-d] <command> [<argument>...]",
   374                "comment": "run a process in a dyno"
   375              },
   376              {
   377                "root": "scale",
   378                "arguments": "[-a <app or remote>] <type>=[<qty>]:[<size>]...",
   379                "comment": "change dyno quantities and sizes"
   380              }
   381            ],
   382            "title": "dyno"
   383          },
   384          {
   385            "commands": [
   386              {
   387                "root": "about",
   388                "arguments": "",
   389                "comment": "information about hk (e.g. copyright, license, etc.)"
   390              },
   391              {
   392                "root": "api",
   393                "arguments": "<method> <path>",
   394                "comment": "make a single API request (extra)"
   395              },
   396              {
   397                "root": "commands",
   398                "arguments": "",
   399                "comment": "list all commands with usage"
   400              },
   401              {
   402                "root": "creds",
   403                "arguments": "",
   404                "comment": "show credentials (extra)"
   405              },
   406              {
   407                "root": "environ",
   408                "arguments": "",
   409                "comment": "environment variables used by hk"
   410              },
   411              {
   412                "root": "help",
   413                "arguments": "[<topic>]",
   414                "comment": ""
   415              },
   416              {
   417                "root": "login",
   418                "arguments": "",
   419                "comment": "log in to your Heroku account (extra)"
   420              },
   421              {
   422                "root": "logout",
   423                "arguments": "",
   424                "comment": "log out of your Heroku account (extra)"
   425              },
   426              {
   427                "root": "more",
   428                "arguments": "",
   429                "comment": "additional commands, less frequently used"
   430              },
   431              {
   432                "root": "plugins",
   433                "arguments": "",
   434                "comment": "interface to plugin commands"
   435              },
   436              {
   437                "root": "update",
   438                "arguments": "",
   439                "comment": ""
   440              },
   441              {
   442                "root": "version",
   443                "arguments": "",
   444                "comment": "show hk version"
   445              }
   446            ],
   447            "title": "hk"
   448          },
   449          {
   450            "commands": [
   451              {
   452                "root": "regions",
   453                "arguments": "",
   454                "comment": "list regions (extra)"
   455              },
   456              {
   457                "root": "status",
   458                "arguments": "",
   459                "comment": "display heroku platform status (extra)"
   460              }
   461            ],
   462            "title": "misc"
   463          },
   464          {
   465            "commands": [
   466              {
   467                "root": "orgs",
   468                "arguments": "",
   469                "comment": "list Heroku orgs"
   470              }
   471            ],
   472            "title": "orgs"
   473          },
   474          {
   475            "commands": [
   476              {
   477                "root": "pg-info",
   478                "arguments": "[-a <app or remote>] [<dbname>]",
   479                "comment": "show Heroku Postgres database info (extra)"
   480              },
   481              {
   482                "root": "pg-list",
   483                "arguments": "[-a <app or remote>]",
   484                "comment": "list Heroku Postgres databases (extra)"
   485              },
   486              {
   487                "root": "pg-unfollow",
   488                "arguments": "[-a <app or remote>] <dbname>",
   489                "comment": "stop a replica postgres database from following (extra)"
   490              },
   491              {
   492                "root": "psql",
   493                "arguments": "[-a <app or remote>] [-c <command>] [<dbname>]",
   494                "comment": "open a psql shell to a Heroku Postgres database (extra)"
   495              }
   496            ],
   497            "title": "pg"
   498          },
   499          {
   500            "commands": [
   501              {
   502                "root": "release-info",
   503                "arguments": "[-a <app or remote>] <version>",
   504                "comment": "show release info"
   505              },
   506              {
   507                "root": "releases",
   508                "arguments": "[-a <app or remote>] [-n <limit>] [<version>...]",
   509                "comment": "list releases"
   510              },
   511              {
   512                "root": "rollback",
   513                "arguments": "[-a <app or remote>] <version>",
   514                "comment": "roll back to a previous release"
   515              }
   516            ],
   517            "title": "release"
   518          },
   519          {
   520            "commands": [
   521              {
   522                "root": "ssl",
   523                "arguments": "[-a <app or remote>]",
   524                "comment": "show ssl endpoint info"
   525              },
   526              {
   527                "root": "ssl-cert-add",
   528                "arguments": "[-a <app or remote>] [-s] <certfile> <keyfile>",
   529                "comment": "add a new ssl cert"
   530              },
   531              {
   532                "root": "ssl-cert-rollback",
   533                "arguments": "[-a <app or remote>]",
   534                "comment": "add a new ssl cert"
   535              },
   536              {
   537                "root": "ssl-destroy",
   538                "arguments": "[-a <app or remote>]",
   539                "comment": "destroy ssl endpoint"
   540              }
   541            ],
   542            "title": "ssl"
   543          }
   544        ]
   545  
   546        $('body').append(template({groups: data}));
   547      </script>
   548    </body>
   549  </html>