{"id":20521596,"url":"https://github.com/tedivm/secretcli","last_synced_at":"2025-04-14T02:36:14.029Z","repository":{"id":57465153,"uuid":"153957420","full_name":"tedivm/secretcli","owner":"tedivm","description":"AWS Secrets Manager CLI","archived":false,"fork":false,"pushed_at":"2021-03-14T01:45:18.000Z","size":8,"stargazers_count":21,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-14T02:35:46.200Z","etag":null,"topics":["aws","aws-secrets-manager","cli","hacktoberfest"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/secretcli/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tedivm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-20T23:31:24.000Z","updated_at":"2023-08-15T18:03:30.000Z","dependencies_parsed_at":"2022-09-17T17:52:18.036Z","dependency_job_id":null,"html_url":"https://github.com/tedivm/secretcli","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tedivm%2Fsecretcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tedivm%2Fsecretcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tedivm%2Fsecretcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tedivm%2Fsecretcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tedivm","download_url":"https://codeload.github.com/tedivm/secretcli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248812009,"owners_count":21165353,"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":["aws","aws-secrets-manager","cli","hacktoberfest"],"created_at":"2024-11-15T22:30:05.515Z","updated_at":"2025-04-14T02:36:14.008Z","avatar_url":"https://github.com/tedivm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# secretcli\n\nThe secretcli project provides a simple to use command line interface to the [AWS Secrets Manager](https://aws.amazon.com/secrets-manager/). It is capable of uploading or downloading the entire secret as well as working with individual fields.\n\n## Installing\n\nThis project is available on [pypi](https://pypi.org/project/secretcli/) and can be installed with pip.\n\n`pip3 install secretcli`\n\n## Usage\n\n### Initializing a new Secret\n\nNew secrets are easy to initiate. This will create a new Secret in the AWS Secret Manager and store an empty javascript object as the first version.\n\n```bash\n$ secretcli init TestSecret\n```\n\n### Working with individual Keys\n\nAdditional Key/Value pairs can be added to the secret using a single command. Behind the scenes this downloads the existing database, updates it with the new key/value pair, and uploads it as the current version.\n\n```bash\n$ secretcli set TestSecret postgreshost 10.10.10.16\n$ secretcli set TestSecret postgresuser postgres\n$ secretcli set TestSecret postgrespassword super_secret_string\n$ secretcli set TestSecret longstring \"This is a string with spaces.\"\n```\n\nRetrieving values is just as simple. This can be useful when trying to use values in bash scripts.\n\n```bash\n$ secretcli get TestSecret postgreshost\n10.10.10.16\n$ secretcli get TestSecret postgresuser\npostgres\n$ secretcli get TestSecret postgrespassword\nsuper_secret_string\n```\n\nValues can also be completely removed from the secret.\n\n```bash\n$ secretcli get TestSecret postgreshost\n10.10.10.16\n$ secretcli remove TestSecret postgreshost\n$ secretcli get TestSecret postgreshost\n```\n\nTo avoid passing the value directly into the console (potentially logging it in places like bash history) the `-s` flag can be passed and the value can be passed in interactively without displaying it.\n\n\n```bash\n$ secretcli set TestSecret postgrespassword -s\nValue:\nRepeat for confirmation:\n$ secretcli get TestSecret postgrespassword\nsuper_secret_string\n```\n\n### Working with entire Files\n\nThe entire Secret can be downloaded as a file. This command works regardless of the format of the file- Secrets that are not managed by `secretcli` can be downloaded using this tool.\n\n```bash\n$ secretcli download TestSecret ./secret_configuration.json\n```\n\nThe file can also be uploaded- but be careful, it will be uploaded exactly as is without any verification of the json formatting.\n\n```bash\n$ secretcli upload TestSecret ./secret_configuration.json\n```\n\n## Datastore Format\n\n`secretcli` stores data as a JSON Object in an attempt to be as interoperable as possible. Each `key` passed to `secretcli` is represented by a `key` in the JSON Object.\n\nWhen storing in AWS Secret Manager `secretcli` uses the `SecretString` field in the AWS Secrets Manager. This allows the database to be viewed in the AWS Console both as a raw string and using the Key/Value table.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftedivm%2Fsecretcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftedivm%2Fsecretcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftedivm%2Fsecretcli/lists"}