Skip to main content

Hydrate your development environment.

Project description

Hydrator

Hydrate your development environment from a YAML configuration file.

Synopsis

Usage: hydrator [OPTIONS] COMMAND [ARGS]...

  Hydrate your development environment.

  Without arguments, all hydrators will be run.

Options:
  -c, --config path  The config file to load. Defaults to "hydrator.yml"
  -v, --verbose
  --dry              Do not commit changes to disk.
  --select TEXT      Select a subset of hydrators to run (comma separated).
  --help             Show this message and exit.

Commands:
  auth-status  Check the filesystem authentication status.
  login        Authenticate for a filesystem.
  logout       Revoke existing credentials for a filesystem.

Features

  • YAML-configuration for Bash profile and Git config
  • Execute shell commands with access to external file systems (e.g. Nextcloud)

Roadmap

  • Extend YAML configuration (useful for Work profiles)
  • Application directory finders (e.g. to discover VScode application directory)

Example

In a Git repository, create a file called hydrator.yml. In that file you can configure files that will be produced from the YAML configuration or from external sources. External sources are "file systems" that can be configured in the same file.

filesystems:
  nextcloud: {type: nextcloud, server-url: https://my-cloud.example.org}

hydrators:
  gpg:
    type: commands
    commands:
    - gpg --import [[nextcloud://dotfiles/gpgp/master.key]]

  ssh:
    type: commands
    commands:
    - cp nextcloud://dotfiles/ssh/ida_rsa{,.pub} ~./ssh
    - chmod 600 ~/.ssh/id_rsa{,.pub}

  bash_profile:
    type: bash_profile
    aliases:
      ll: ls -l
    path:
    - ~/.local/bin

In order to access files your Nextcloud, Hydrator first needs to authenticate.

$ hydrator login nextcloud

Then you simply run Hydrator to execute all steps. You can select a subset of hydrators using the --select h1,h2,... option. Add --dry to not commit changes to disk, and -v,--verbose or more logs.

$ hydrator

Copyright 2020 © Niklas Rosenstein

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

hydrator-0.1.0.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

hydrator-0.1.0-py3-none-any.whl (23.4 kB view details)

Uploaded Python 3

File details

Details for the file hydrator-0.1.0.tar.gz.

File metadata

  • Download URL: hydrator-0.1.0.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.3

File hashes

Hashes for hydrator-0.1.0.tar.gz
Algorithm Hash digest
SHA256 52fe27c01c933dd033ce6af66a50d373f32ee0640c74f5e49cd9773491818ec2
MD5 bcb621f9cbbaee7553df87d96e3bef65
BLAKE2b-256 a3d4b5df7544553b161bfa5464bdb3a66d2ad8bf6d5bfa15af73117d82b4631e

See more details on using hashes here.

File details

Details for the file hydrator-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: hydrator-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 23.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.3

File hashes

Hashes for hydrator-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a5b941174cf7e4a60f7bf71e1acbff40eabdf1ffe2ab0390d11ea315a5ae1f94
MD5 110b4fa054b3a535b6a491d4b0e6ae48
BLAKE2b-256 e3af5c604accda236c6a4482f6eac383e86a83fda78f1aa868329ec9d5354174

See more details on using hashes here.

Supported by

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