Skip to content

Commit 1f23418

Browse files
committed
feat(pass): documentation
Signed-off-by: Johannes Großmann <grossmann.johannes@t-online.de>
1 parent 768012d commit 1f23418

5 files changed

Lines changed: 24 additions & 1 deletion

File tree

plugins/pass/command.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,17 @@ Examples:
5050
// Root returns the root command for the docker-pass CLI plugin
5151
func Root(ctx context.Context, s store.Store, info commands.VersionInfo) *cobra.Command {
5252
cmd := &cobra.Command{
53-
Use: "pass [OPTIONS]",
53+
Use: "pass [OPTIONS]",
54+
Short: "Manage your local OS keychain secrets.",
55+
Long: `Docker Pass is an experimental utility for managing secrets in your
56+
local OS keychain. Secrets are stored using platform-specific credential
57+
storage:
58+
59+
- Windows: Windows Credential Manager API
60+
- macOS: Keychain services API
61+
- Linux: org.freedesktop.secrets API (requires DBus + gnome-keyring or kdewallet)
62+
63+
Secrets can be injected into running containers at runtime using the se:// URI scheme.`,
5464
SilenceUsage: true,
5565
TraverseChildren: true,
5666
CompletionOptions: cobra.CompletionOptions{

plugins/pass/commands/get.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ func GetCommand(kc store.Store) *cobra.Command {
2828
Use: "get",
2929
Args: cobra.ExactArgs(1),
3030
Short: "Get a secret from a keystore.",
31+
Long: "Retrieves a named secret from the local OS keychain. The secret value is masked in output.",
3132
RunE: func(cmd *cobra.Command, args []string) error {
3233
id, err := store.ParseID(args[0])
3334
if err != nil {

plugins/pass/commands/list.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ func ListCommand(kc store.Store) *cobra.Command {
2727
Use: "ls",
2828
Aliases: []string{"list"},
2929
Short: "List all secrets from local keychain.",
30+
Long: "Lists the names of all secrets stored in the local OS keychain.",
3031
Args: cobra.NoArgs,
3132
RunE: func(cmd *cobra.Command, _ []string) error {
3233
l, err := kc.GetAllMetadata(cmd.Context())

plugins/pass/commands/rm.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@ func RmCommand(kc store.Store) *cobra.Command {
3737
Use: "rm name1 name2 ...",
3838
Aliases: []string{"delete", "erase", "remove"},
3939
Short: "Remove secrets from local keychain.",
40+
Long: "Removes one or more named secrets from the local OS keychain.\nUse --all to remove every stored secret at once.",
41+
Example: `# Remove a specific secret:
42+
docker pass rm GH_TOKEN
43+
44+
# Remove multiple secrets:
45+
docker pass rm GH_TOKEN NPM_TOKEN
46+
47+
# Remove all secrets:
48+
docker pass rm --all`,
4049
RunE: func(cmd *cobra.Command, args []string) error {
4150
idList, err := validateArgs(args, opts)
4251
if err != nil {

plugins/pass/commands/set.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ func SetCommand(kc store.Store) *cobra.Command {
5959
Use: "set id[=value]",
6060
Aliases: []string{"store", "save"},
6161
Short: "Set a secret",
62+
Long: `Stores a secret in the local OS keychain. The secret value can be
63+
provided inline (NAME=VALUE) or piped via STDIN.`,
6264
Example: strings.Trim(setExample, "\n"),
6365
Args: cobra.ExactArgs(1),
6466
RunE: func(cmd *cobra.Command, args []string) error {

0 commit comments

Comments
 (0)