Skip to main content

DevOps CLI — workspace sync (GDrive, git, GPG, systemd timers) + GitLab/Bitwarden tooling

Project description

lnp-devopscli

DevOps CLI for workspace sync (Google Drive + git + GPG + systemd timers) and GitLab/Bitwarden tooling.

Install

Via PyPI (recommended)

pipx install lnp-devopscli
# or
pip install --user lnp-devopscli

Provides two equivalent commands: devopscli and dc.

From source

git clone https://gitlab.com/lnp-consulting-ti/devops/devops-cli.git ~/bin/devops-cli
cd ~/bin/devops-cli && make setup

Bootstrap on a new PC

For a full workspace bootstrap (rclone + GPG + git-crypt + 10 repos + systemd timers), use the public bootstrap launcher:

bash <(curl -fsSL https://gitlab.com/-/snippets/6003334/raw/main/bootstrap.sh)

See MIGRATION-RUNBOOK.md for the complete migration procedure.

Commands

devopscli ws sync             # full bidirectional sync (pull → git → push)
devopscli ws push             # sync local → GDrive (13 categories)
devopscli ws pull             # sync GDrive → local
devopscli ws doctor           # health check (deps, configs, timers, repos)
devopscli ws ai-sync          # git pull/commit/push for ai_workspaces
devopscli ws repos-sync       # git pull/commit/push for repos_sync
devopscli ws gpg-backup       # export GPG key + encrypt + send to GDrive
devopscli ws gpg-restore      # download GPG key from GDrive + decrypt + import
devopscli ws install-timers   # install systemd user timers (replaces cron)
devopscli ws uninstall-timers # remove systemd timers

See devopscli ws --help for the full list.

Security

The CLI is open source but never accesses your data without your credentials:

  • Google OAuth protects access to your GDrive (rclone config)
  • GPG passphrase protects the GPG key backup
  • git-crypt protects .env files inside synced repos
  • GitLab/SSH keys protect access to private repositories

Anyone can pip install the CLI — but without your credentials, they cannot access your data.

Configuration

Edit ~/bin/config.yaml (synced via ws push step 7):

ai_workspaces:
  - name: "workspace-personal"
    path: "~/workspace-personal"
    clone_url: "git@gitlab.com:user/repo.git"
    remote: "origin"
    branch: "main"
    auto_commit: true
    commit_message: "chore(auto-sync): snapshot via ws ai-sync"

repos_sync:
  - name: "devops-cli"
    path: "~/bin/devops-cli"
    clone_url: "git@gitlab.com:lnp-consulting-ti/devops/devops-cli.git"
    remote: "origin"
    branch: "main"
    auto_commit: true
    commit_message: "chore(auto-sync): snapshot via ws repos-sync"

Release

To publish a new version to PyPI:

# 1. Bump version in pyproject.toml
git commit -am "chore(release): v1.0.1"

# 2. Tag and push
git tag v1.0.1
git push origin main v1.0.1

The GitLab CI pipeline auto-publishes when a tag matches v*.*.*.

Setup once: add PYPI_TOKEN to GitLab CI/CD Variables (Settings > CI/CD).

License

MIT

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

lnp_devopscli-1.1.0.tar.gz (50.5 kB view details)

Uploaded Source

Built Distribution

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

lnp_devopscli-1.1.0-py3-none-any.whl (56.1 kB view details)

Uploaded Python 3

File details

Details for the file lnp_devopscli-1.1.0.tar.gz.

File metadata

  • Download URL: lnp_devopscli-1.1.0.tar.gz
  • Upload date:
  • Size: 50.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for lnp_devopscli-1.1.0.tar.gz
Algorithm Hash digest
SHA256 3e1d71034c0e5c21e3bd00b0b5a56a1f3965758c0d762748119cac6286bcb8ff
MD5 15dde2d2af567f4a12b7b227d5e7d9be
BLAKE2b-256 339d2894250615a21e52ea9eb0b3ed2aacff958b4eb9bdae66333f8372c1842d

See more details on using hashes here.

File details

Details for the file lnp_devopscli-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: lnp_devopscli-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 56.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for lnp_devopscli-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a0e12f3e9ce18865b8c1f873559a701d858544cead2cc822ca5771e7ff02b073
MD5 22e2742ee7956acf61e1837f5635a7d0
BLAKE2b-256 473d50fa1bbc866ad5c9e81b6632b26d6305b7ce9442747d2f5f3af61b858d0e

See more details on using hashes here.

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