Skip to content

Add CLI documentation for direct keyring access across all platforms#2

Merged
alexec merged 5 commits intomasterfrom
copilot/document-cli-secrets-management
Oct 17, 2025
Merged

Add CLI documentation for direct keyring access across all platforms#2
alexec merged 5 commits intomasterfrom
copilot/document-cli-secrets-management

Conversation

Copy link
Copy Markdown

Copilot AI commented Oct 17, 2025

  • Add documentation section for using CLI tools directly to set and get secrets
    • macOS: Document security command usage
    • Linux: Document secret-tool or dbus-send usage
    • Windows: Document cmdkey or PowerShell usage
  • Add examples showing how the library functions map to CLI commands
  • Use "service" and "user" as parameter names matching library API
  • Test documentation for clarity and accuracy

Added comprehensive "Direct CLI Usage" section to README.md with:

  • macOS: Examples using the security command for add-generic-password, find-generic-password, and delete-generic-password
  • Linux/*BSD: Examples using secret-tool from libsecret, including installation instructions
  • Windows: Examples using both cmdkey and PowerShell CredentialManager module
  • Clear explanations of parameters and how they map to the Go library's Set/Get/Delete functions
  • CLI examples use "service", "user", and "password" as values to match the library API parameter names
  • Enhanced introduction explaining that secrets can be set via CLI and accessed from Go, or vice-versa
  • Clean, focused CLI examples without redundant comments
Original prompt

Document how to set and get secrets by directly invoking the different CLIs for the different OS. E.g. security on MacOS, dbus on Linux. The library has keyring.Set and Get funcs.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Copilot AI changed the title [WIP] Document usage of CLIs for setting and getting secrets Add CLI documentation for direct keyring access across all platforms Oct 17, 2025
Copilot AI requested a review from alexec October 17, 2025 03:48
@kitproj kitproj deleted a comment from coderabbitai bot Oct 17, 2025
@alexec
Copy link
Copy Markdown
Collaborator

alexec commented Oct 17, 2025

@copilot can you please show the equivalent Golang API from the library as a comment on each code sample.

Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented Oct 17, 2025

@copilot can you please show the equivalent Golang API from the library as a comment on each code sample.

Added Go API equivalents as comments in all CLI code samples (commit 008149c updated). Each command now shows the corresponding keyring.Set(), keyring.Get(), or keyring.Delete() call.

@kitproj kitproj deleted a comment from coderabbitai bot Oct 17, 2025
@alexec
Copy link
Copy Markdown
Collaborator

alexec commented Oct 17, 2025

@copilot please use "service" and "user" , just like the library apis.

Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented Oct 17, 2025

@copilot please use "service" and "user" , just like the library apis.

Updated all CLI examples to use "service" and "user" as the literal values to match the library API parameter names (commit 7d5a4b8 updated).

README.md Outdated

## Direct CLI Usage

While this library provides a convenient Go API, you can also interact with the system keyring directly using OS-specific command-line tools. This can be useful for debugging, scripting, or understanding what the library does under the hood.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
While this library provides a convenient Go API, you can also interact with the system keyring directly using OS-specific command-line tools. This can be useful for debugging, scripting, or understanding what the library does under the hood.
While this library provides a convenient Go API, you can also interact with the system keyring directly using OS-specific command-line tools. This can be useful for debugging, scripting, or understanding what the library does under the hood. You can use the CLI to set-up the secrets from a script and then access them from Go, or vice-versa.

README.md Outdated

**Set a password:**
```bash
# Equivalent Go: keyring.Set("service", "user", "password")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is clear how to use this, as service and user and obvious. You can delete comment like this.

Suggested change
# Equivalent Go: keyring.Set("service", "user", "password")

@alexec
Copy link
Copy Markdown
Collaborator

alexec commented Oct 17, 2025

@copilot make the requested changes.

Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented Oct 17, 2025

@copilot make the requested changes.

Changes made in commit 526c2e1:

  1. Updated intro paragraph to mention setting up secrets from scripts and accessing from Go or vice-versa
  2. Removed all Go API equivalent comments from CLI code samples across all platforms

Copilot AI requested a review from alexec October 17, 2025 04:17
@alexec alexec marked this pull request as ready for review October 17, 2025 04:20
@alexec alexec merged commit 5ed3203 into master Oct 17, 2025
@alexec alexec deleted the copilot/document-cli-secrets-management branch October 17, 2025 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants