{"id":16009487,"url":"https://github.com/itfranck/secretmanagementargumentcompleter","last_synced_at":"2025-04-05T02:24:24.975Z","repository":{"id":49220514,"uuid":"272367135","full_name":"itfranck/SecretManagementArgumentCompleter","owner":"itfranck","description":"Argument completer for SecretManagement module","archived":false,"fork":false,"pushed_at":"2021-06-26T19:30:11.000Z","size":33,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-10T10:44:47.879Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itfranck.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-15T07:10:03.000Z","updated_at":"2021-06-25T03:31:53.000Z","dependencies_parsed_at":"2022-09-07T16:13:44.609Z","dependency_job_id":null,"html_url":"https://github.com/itfranck/SecretManagementArgumentCompleter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itfranck%2FSecretManagementArgumentCompleter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itfranck%2FSecretManagementArgumentCompleter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itfranck%2FSecretManagementArgumentCompleter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itfranck%2FSecretManagementArgumentCompleter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itfranck","download_url":"https://codeload.github.com/itfranck/SecretManagementArgumentCompleter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247277507,"owners_count":20912537,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-08T13:02:31.086Z","updated_at":"2025-04-05T02:24:24.676Z","avatar_url":"https://github.com/itfranck.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SecretManagementArgumentCompleter\n Argument completer for SecretManagement module\n\nThis module provide argument completers for the **Microsoft.Powershell.SecretManagement** module and partially for **AzKeyvault** (only on secret related cmdlet).\n\n## Installation\n```Powershell\n# Require Microsoft.Powershell.SecretManagement to be installed.\nInstall-Module -Name SecretManagementArgumentCompleter \n```\n\n## Loading the module\nRecommended use is to add this module to your `$Profile` file so it loads on a new session automatically).\n\nTo load, use: `Import-SecretManagementArgumentCompleter`\n\n\nCache will be saved on disk at: `\"$env:LOCALAPPDATA\\Powershell\\SecretManagement\"`\nOnly the following informations are cached\n- SubscriptionID (AzKeyvault only)\n- Vault Name\n- Secret Name (Actual secret is never cached)\n\n**Optional parameter**\n`[Switch] -InMemory`\n\nAdd the `In-Memory` switch to never create a file based secret cache. \n\n\nIn all cases, secret cache is built in-memory. The initial call to obtain secret info is a bit longer since the provider is contacted to obtain the information. \n\n`In-Memory` means the cache is per-session so each time a new session is restarted, you do have the initial fetch to the provider when doing argument completion. \n\nDefault is to save that information on disk and reload it in-memory when session is loaded.\n\n\nIn any cases, you can delete existing cache (if you need to refresh the values) by calling `Clear-SecretManagementArgumentCompleterCache`\n\n\n\n\n### Profile information\nYou can find your profile location by checking the `$Profile`  variable\n\nVSCode shorthand \n\n```Powershell\nif (! (Test-Path($profile)) {New-Item -Path $profile -ItemType File}\n$psEditor.Workspace.OpenFile($profile)\n```\n\nJust add `Import-SecretManagementArgumentCompleter` to it so you get argument completion configured on profile load.\n\n\n### AZ Keyvault\n\nHere's an example of how to register an az keyvault.\nThis is nothing specific to the argument completer and is just here as reference.\n\n(This is also the reason that pushed me to implement secret info caching, as retrieving the informations of the az keyvaults can take a 2-3 seconds, which is not so bad yet unpractical for argument completion purposes)\n\n\n```Powershell\n$VaultParams = @{\n    Name            = 'ProdAzael-Azkeyvault' \n    ModuleName      = 'Az.KeyVault' \n    VaultParameters = @{ AZKVaultName = 'Prod-Azael-key01'; SubscriptionId = 'e7739e0b-1a01-4361-8fe4-087e14463a4c' }\n}\n\n$Vault = @{Vault = $VaultParams.Name }\n\n\nif ((Get-SecretVault -Name $VaultParams.Name) -eq $null) {\n    Register-SecretVault @VaultParams \n}\n\n\n#Set-Secret @vault -Name 'MySecret' -Secret 'SomethingSecret'\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitfranck%2Fsecretmanagementargumentcompleter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitfranck%2Fsecretmanagementargumentcompleter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitfranck%2Fsecretmanagementargumentcompleter/lists"}