Skip to content

Commit

Permalink
chore(all): improve wording
Browse files Browse the repository at this point in the history
pinglin committed Oct 13, 2023
1 parent 5a58530 commit 3f27ea4
Showing 9 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion internal/oauth2/auth_code_flow.go
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ var (
clientSecret = ""
)

// HostConfigInstillCloud return a host config for the main Instill AI Cloud server.
// HostConfigInstillCloud return a host config for the main Instill Cloud server.
func HostConfigInstillCloud() *config.HostConfigTyped {

host := config.DefaultHostConfig()
2 changes: 1 addition & 1 deletion internal/oauth2/success.go
Original file line number Diff line number Diff line change
@@ -128,7 +128,7 @@ const oauthSuccessPage = `
<h1 class="title">Login Success</h1>
<p class="text">
Signed in via your OIDC provider. You can now close the window and
start using Instill AI.
start using Instill CLI.
</p>
</div>
</div>
10 changes: 6 additions & 4 deletions pkg/cmd/auth/login/login.go
Original file line number Diff line number Diff line change
@@ -23,6 +23,7 @@ import (
"github.com/instill-ai/cli/pkg/prompt"
)

// LoginOptions contains the command line options
type LoginOptions struct {
IO *iostreams.IOStreams
Config func() (config.Config, error)
@@ -31,6 +32,7 @@ type LoginOptions struct {
Hostname string
}

// NewCmdLogin creates a new command
func NewCmdLogin(f *cmdutil.Factory, runF func(*LoginOptions) error) *cobra.Command {
opts := &LoginOptions{
IO: f.IOStreams,
@@ -40,14 +42,14 @@ func NewCmdLogin(f *cmdutil.Factory, runF func(*LoginOptions) error) *cobra.Comm
cmd := &cobra.Command{
Use: "login",
Args: cobra.ExactArgs(0),
Short: "Authenticate with an Instill host",
Short: "Authenticate with an Instill Core/Cloud host",
Long: heredoc.Docf(`
Authenticate with an Instill host.
Authenticate with an Instill Core/Cloud host.
The default authentication mode is an authorization code flow.
`),
Example: heredoc.Doc(`
# start login
# login to the default host
$ inst auth login
`),
RunE: func(cmd *cobra.Command, args []string) error {
@@ -68,7 +70,7 @@ func NewCmdLogin(f *cmdutil.Factory, runF func(*LoginOptions) error) *cobra.Comm
// TODO handle err
cfg, _ := opts.Config()

cmd.Flags().StringVarP(&opts.Hostname, "hostname", "h", cfg.DefaultHostname(), "Hostname of an already added Instill AI instance")
cmd.Flags().StringVarP(&opts.Hostname, "hostname", "h", cfg.DefaultHostname(), "Hostname of an already added Instill Core/Cloud instance")

return cmd
}
4 changes: 2 additions & 2 deletions pkg/cmd/auth/logout/logout.go
Original file line number Diff line number Diff line change
@@ -28,8 +28,8 @@ func NewCmdLogout(f *cmdutil.Factory, runF func(*LogoutOptions) error) *cobra.Co
cmd := &cobra.Command{
Use: "logout",
Args: cobra.ExactArgs(0),
Short: "Log out of an Instill Core or Instill Cloud instance",
Long: heredoc.Doc(`Remove authentication for a Instill host.
Short: "Log out of an Instill Core/Cloud host",
Long: heredoc.Doc(`Remove authentication for an Instill Core/Cloud host.
This command removes the authentication configuration for a host either specified
interactively or via --hostname.
2 changes: 1 addition & 1 deletion pkg/cmd/factory/default.go
Original file line number Diff line number Diff line change
@@ -120,7 +120,7 @@ func configFunc() func() (config.Config, error) {
return func() (config.Config, error) {
if cachedConfig != nil || err != nil {
if err != nil {
fmt.Printf("ERROR: cant read the config\n%s", err)
fmt.Printf("ERROR: cannot read the config\n%s", err)
}
return cachedConfig, err
}
2 changes: 1 addition & 1 deletion pkg/cmd/instance/add.go
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ func NewAddCmd(f *cmdutil.Factory, runF func(*AddOptions) error) *cobra.Command
},
Short: "Add a new instance",
Long: heredoc.Docf(`
Add a new Instill AI instance, either Cloud or Core.
Add a new Instill Core/Cloud instance.
`),
Example: heredoc.Doc(`
# add a local instance as the default one
2 changes: 1 addition & 1 deletion pkg/cmd/instance/edit.go
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ func NewEditCmd(f *cmdutil.Factory, runF func(*EditOptions) error) *cobra.Comman
},
Short: "Edit an existing instance",
Long: heredoc.Docf(`
Edit an existing Instill AI instance, either Cloud or Core.
Edit an existing Instill Core/Cloud instance.
`),
Example: heredoc.Doc(`
# update the issuer for api.instill.tech
2 changes: 1 addition & 1 deletion pkg/cmd/instance/instances.go
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ func New(f *cmdutil.Factory) *cobra.Command {
cmd := &cobra.Command{
Use: "instance <command>",
Short: "Instance management",
Long: `Manage instance of Instill AI, both Cloud and Core.`,
Long: `Manage instance of Instill Core/Cloud.`,
}

cmdutil.DisableAuthCheck(cmd)
2 changes: 1 addition & 1 deletion pkg/cmd/instance/remove.go
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ func NewRemoveCmd(f *cmdutil.Factory, runF func(*RemoveOptions) error) *cobra.Co
},
Short: "Remove an existing instance",
Long: heredoc.Docf(`
Remove an existing Instill AI instance, either Cloud or Core.
Remove an existing Instill Core/Cloud instance.
`),
Example: heredoc.Doc(`
# remove the local instance instance

0 comments on commit 3f27ea4

Please sign in to comment.