Skip to content

Commit d24af1a

Browse files
committed
chore: hide API key in config list command output
- Hide the api key in the config list command output Signed-off-by: appleboy <appleboy.tw@gmail.com>
1 parent 8b6858d commit d24af1a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

cmd/config_list.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ var configListCmd = &cobra.Command{
6161

6262
// Add the key and value to the table
6363
for _, v := range keys {
64+
// Hide the api key
65+
if v == "openai.api_key" {
66+
tbl.AddRow(v, "****************")
67+
continue
68+
}
6469
tbl.AddRow(v, viper.Get(v))
6570
}
6671

0 commit comments

Comments
 (0)