Skip to content

Commit ea0acb4

Browse files
committed
Merge branch 'master' of github.com:liquidweb/liquidweb-cli
2 parents c346f41 + d63ffe5 commit ea0acb4

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# lw (liquidweb-cli)
1+
# lw-cli (liquidweb-cli)
22
Official command line interface for the LiquidWeb API
33
```
44
CLI interface for LiquidWeb.
@@ -19,7 +19,7 @@ As always, consult the various subcommands for specific features and
1919
capabilities.
2020
2121
Usage:
22-
lw [command]
22+
lw-cli [command]
2323
2424
Available Commands:
2525
asset All things assets
@@ -36,23 +36,23 @@ Available Commands:
3636
3737
Flags:
3838
--config string config file (default is $HOME/.liquidweb-cli.yaml)
39-
-h, --help help for lw
39+
-h, --help help for lw-cli`
4040
--use-context string forces current context, without persisting the context change
4141
42-
Use "lw [command] --help" for more information about a command.
42+
Use "lw-cli [command] --help" for more information about a command.
4343
```
4444
## Obtaining prebuilt binaries
4545

4646
Head on over to the [releases page](https://github.com/liquidweb/liquidweb-cli/releases) to get prebuilt binaries for your platform.
4747

4848
## Building from source
4949

50-
You can build lw from source by running `make build` from the root of this repository. The resulting program will be located at `./_exe/lw`.
51-
You can also build+install lw onto your system in the ordinary `go install` way. To do this, either just run `go install` from the root of this repository,
50+
You can build lw-cli from source by running `make build` from the root of this repository. The resulting program will be located at `./_exe/lw-cli`.
51+
You can also build+install lw-cli onto your system in the ordinary `go install` way. To do this, either just run `go install` from the root of this repository,
5252
or `make install`. If you run `make` with no arguments, this will be the default action.
5353

5454
## First Time Setup
55-
The first time you use lw, you will need to setup an auth context. An auth context holds authentication related data for a specific LiquidWeb account. You can follow a guided questionnaire to add your auth contexts if you pass arguments `auth init` to lw. By default contexts are stored in `~/.liquidweb-cli.yaml` or `%APPDATA%/.liquidweb-cli.yaml` on Windows.
55+
The first time you use lw-cli, you will need to setup an auth context. An auth context holds authentication related data for a specific LiquidWeb account. You can follow a guided questionnaire to add your auth contexts if you pass arguments `auth init` to lw-cli. By default contexts are stored in `~/.liquidweb-cli.yaml` or `%APPDATA%/.liquidweb-cli.yaml` on Windows.
5656

5757
## Adding auth contexts later
5858
If you end up wanting to add an auth context later on, you can do so with `auth add-context`. You can find the usage documentation in `help auth add-context`.
@@ -76,7 +76,7 @@ For current commands supported via plans, take a look in the `examples/plans` di
7676

7777
Example:
7878

79-
`lw plan --file plan.yaml`
79+
`lw-cli plan --file plan.yaml`
8080

8181
```
8282
---
@@ -110,7 +110,7 @@ If you wanted to pass user defined variables on the command line you would use t
110110
(multiple `--var` flags can be passed). For example, if you wanted to generate the hostname of
111111
`web3.somehost.org` you would use the following command and yaml:
112112

113-
`lw plan --file play.yaml --var node=3 --var role=web`
113+
`lw-cli plan --file play.yaml --var node=3 --var role=web`
114114

115115
```
116116
hostname: "{{- .Var.role -}}{{- .Var.node -}}.somehost.org"

cmd/assetList.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
66
You may obtain a copy of the License at
77
8-
http://www.apache.org/licenses/LICENSE-2.0
8+
http://www.apache.org/licenses/LICENSE-2.0
99
1010
Unless required by applicable law or agreed to in writing, software
1111
distributed under the License is distributed on an "AS IS" BASIS,
@@ -21,7 +21,7 @@ import (
2121
"github.com/spf13/cobra"
2222

2323
"github.com/liquidweb/liquidweb-cli/instance"
24-
"github.com/liquidweb/liquidweb-cli/types/api"
24+
apiTypes "github.com/liquidweb/liquidweb-cli/types/api"
2525
)
2626

2727
var assetListCmdCategoriesFlag []string
@@ -36,10 +36,10 @@ An asset is an individual component on an account. Assets have categories.
3636
Examples:
3737
3838
* List all assets in the Provisioned and DNS categories:
39-
- lw asset list --categories Provisioned,DNS
39+
- lw-cli asset list --categories Provisioned,DNS
4040
4141
* List all dedicated servers:
42-
- lw asset list --categories StrictDedicated
42+
- lw-cli asset list --categories StrictDedicated
4343
`,
4444
Run: func(cmd *cobra.Command, args []string) {
4545
jsonFlag, _ := cmd.Flags().GetBool("json")
@@ -57,15 +57,15 @@ Examples:
5757
ResultsPerPage: 100,
5858
MethodArgs: apiArgs,
5959
}
60-
results, err := lwCliInst.AllPaginatedResults(&methodArgs)
60+
results, err := lw - cliCliInst.AllPaginatedResults(&methodArgs)
6161
if err != nil {
62-
lwCliInst.Die(err)
62+
lw - cliCliInst.Die(err)
6363
}
6464

6565
if jsonFlag {
66-
pretty, err := lwCliInst.JsonEncodeAndPrettyPrint(results)
66+
pretty, err := lw - cliCliInst.JsonEncodeAndPrettyPrint(results)
6767
if err != nil {
68-
lwCliInst.Die(err)
68+
lw - cliCliInst.Die(err)
6969
}
7070
fmt.Print(pretty)
7171
} else {
@@ -74,7 +74,7 @@ Examples:
7474

7575
var details apiTypes.Subaccnt
7676
if err := instance.CastFieldTypes(item, &details); err != nil {
77-
lwCliInst.Die(err)
77+
lw - cliCliInst.Die(err)
7878
}
7979

8080
fmt.Printf("%d.) ", cnt)

0 commit comments

Comments
 (0)