Skip to main content

List, copy and move secrets across libsecret keyrings

Project description

secret-move
list, copy and move libsecret secrets between keyrings

Latest PyPI version CI

Installation

From PyPI

pip install secret-move

From git

git clone https://github.com/F-i-f/secret-move.git
cd secret-move
python -m build
pip install dist/secret_move-*.whl

From a self-built RPM package

These instructions will download the source package (sdist) from PyPI.

spectool -gR secret-move.spec
rpmbuild -ba secret-move.spec
rpm -Uvh .../RPMS/noarch/python3-secret-move-*.noarch.rpm

Help screens

user@localhost:~/% secret-move --help
usage: secret-move [-h] [-V] {copy,keyrings,list,move} ...

List, copy and move secrets across libsecret keyrings.

positional arguments:
  {copy,keyrings,list,move}
						command to execute
	copy                copy items between keyrings
	keyrings            list all available keyrings
	list                list all keys in a keyring
	move                move items between keyrings

options:
  -h, --help            show this help message and exit
  -V, --version         show version and copyright notice
user@localhost:~/% secret-move keyrings --help
usage: secret-move keyrings [-h]

List all available keyrings.

options:
  -h, --help  show this help message and exit
user@localhost:~/% secret-move list --help
usage: secret-move list [-h] [-s SOURCE] [-v]

List all keys in SOURCE keyring.

options:
  -h, --help           show this help message and exit
  -s, --source SOURCE  source keyring (default: login)
  -v, --verbose        show item attributes, repeat a second time to show
					   secrets
user@localhost:~/% secret-move copy --help
usage: secret-move copy [-h] [-s SOURCE] [-v] [-f] [-i] [-n] [-q] [-r]
						   DEST SEARCH

Copy items matching SEARCH from SOURCE to DEST keyrings.

positional arguments:
  DEST                  destination keyring
  SEARCH                label to search for

options:
  -h, --help            show this help message and exit
  -s, --source SOURCE   source keyring (default: login)
  -v, --verbose         show item attributes, repeat a second time to show
						secrets
  -f, --force           overwrite existing items in destination
  -i, --ignore-case     case-insensitive matching
  -n, --dry-run, --no-do
						dry-run mode
  -q, --quiet           suppress all output except errors
  -r, --regex           enable anchored regex matching

Examples

List keyrings

secret-move keyrings

List keyring contents

List all secrets (in default keyring, Login) secret-move list
List all secrets with their attributes secret-move list -v
List all secrets with their attributes and secret secret-move list -vv
List all secrets from keyring OtherKeyring secret-move list -s OtherKeyring

Copy keyring contents

Copy secret Secret1 from default keyring (Login) to OtherKeyring secret-move copy OtherKeyring Secret1
Copy secret Secret1 from alternate keyring SourceKeyring to OtherKeyring secret-move copy -s SourceKeyring DestKeyring Secret1

Move keyring contents

Move secret Secret1 from default keyring (Login) to OtherKeyring secret-move move OtherKeyring Secret1
Move secret Secret1 from alternate keyring SourceKeyring to OtherKeyring secret-move move -s SourceKeyring DestKeyring Secret1

Move/copy by regular expression

Copy all secrets starting with RDP from the default keyring (Login) to OtherKeyring secret-move move OtherKeyring -r 'RDP.*'
Copy all secrets containing rdp (case insensitive match) from the default keyring (Login) to OtherKeyring secret-move move OtherKeyring -i -r '.*rdp.*'

Changelog

Version 0.5

  • Created.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

secret_move-0.5.1.tar.gz (20.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

secret_move-0.5.1-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file secret_move-0.5.1.tar.gz.

File metadata

  • Download URL: secret_move-0.5.1.tar.gz
  • Upload date:
  • Size: 20.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for secret_move-0.5.1.tar.gz
Algorithm Hash digest
SHA256 2aa7a2e64e97df75bb259a51d7a7f1a9ee51a326db00fec0c1b32cc8d0e056b7
MD5 45ed4a4598db54677537eef8948b6827
BLAKE2b-256 dd7d581975b63bda938d8d2b3b7bcfdebdb68d6757d756b4451e8735ad661a4d

See more details on using hashes here.

Provenance

The following attestation bundles were made for secret_move-0.5.1.tar.gz:

Publisher: publish-to-pypi.yml on F-i-f/secret-move

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file secret_move-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: secret_move-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 18.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for secret_move-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 00e923655b108fe5d16a1e7c2410d799901654a2df9fb8e62f71ddae213aa6ae
MD5 0151552dd2856120f7e0598796540d91
BLAKE2b-256 af14a0c286d4626f7a3319a27a574e52a4ea60c92f3be1da29325d7642bdc1aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for secret_move-0.5.1-py3-none-any.whl:

Publisher: publish-to-pypi.yml on F-i-f/secret-move

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page