Skip to content

lispyclouds/dei

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dei!

This is a (growing and evolving) collection of useful CLI tools that I used pretty much on daily and even hourly basis and has been put together in a nicely packaged and reusable manner as some of the stuff seems to be useful to you all too!

The name

Dei, or the informal way to call someone with a "Hey" (more info) is something that was common where I come from and it happens to also align with my last name "De". So whenever someone wanted something, dei/de became the de-facto standard to ask me, specially by close friends, something that I truly cherish. Since I essentially wanted "myself in code" its only natural to call this tool dei.

Usage

Installation

To install as a Go binary:

  • Ensure Go 1.25+ is installed
  • Run GOEXPERIMENT=jsonv2 go install github.com/lispyclouds/dei@latest
  • See what's possible: dei --help

TODO: Release versioned binaries

Tools

Stateless passwords

In my (not so humble) opinion, passwords should:

  • Not need me to remember more than one main password
  • Be managed by a tool which:
    • Is open source
    • Simple
    • Stateless
    • Uses peer reviewed and strong cryptographic primitives
    • Customisable
    • Have fast and simple UX

Spectre checks all of these boxes for me, specially from the cryptographic point of view. It however doesn't quite have the greatest CLI flow so here we are.

dei implements v3 of the algorithm along with an intuitive UX that I think is useful to all users. It implements aggressive caching to speedup the whole process and is optimised to be simple and nimble. Run dei pw --help to see all the options.

dei caches the main password by encrypting it with a upto 32 char long PIN with AES_256_GCM. Upon subsequent invocations, the PIN will be prompted for. To reset the PIN or change the cached main password pass the --flush-cache option. Also can pass --no-cache to make the session ephemeral.

Generate a password for a site, eg: github.com

dei pw gen --full-name "Your Full Name" --site "github.com" # pass --to-clipboard to directly copy to clipboard

It's recommended to pass the base host name to --site without the protocols, www, paths etc. dei will do a best effort extraction of the host from what is passed but will pass through if it can't.

As mentioned in the algorithm paper, spectre takes in optional parameters like --counter, --class and --variant. All these options have a default value and when dei encounters a new site, it saves these values to an internal DB and used from there subsequently. If there is a need to update them, eg --counter 2, pass these explicitly on the CLI and dei with notice the diff and update.

dei pw gen --full-name "Full Name" --site "github.com" --counter 3 --class long # update the saved counter and password class

Site metadata cache

dei caches things quite aggressively to improve both performance and UX. Sometimes 💩 happens or you may need to manually tweak things a bit. For that, take a look at dei pw site-cache --help to manually step in during these trying times.

Crafting conventional commits

Conventional Commits are not only a great idea, but is sometimes a mandate in various projects. Although there are various tools that implement this, I didn't quite like their UX, specially when it comes to caching the right bits to speed not only the tool but your workflow too.

This is limited to only Git for now.

dei helps in two ways:

  • help craft the right conventional commit
  • help manage a set of co-authors and help attribute them correctly in the message

It does not go any other git interaction like staging, pull, push etc.

Make a commit prompting for the data and co-authors(if configured):

dei commit

Manage co-authors

dei commit co-authors add --name foo --email bar
dei commit co-authors remove --email bar
dei commit co-authors list

License

Copyright © 2025- Rahul De

Distributed under the MIT License. See LICENSE.

About

me in the command line

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages