Dirvana is a lightweight CLI tool designed to streamline project-specific shell environments. By automatically loading configurations when entering a directory, it prevents clutter in global settings and enhances productivity. Simplify the management of aliases, functions, and environment variables with zero friction.
Dirvana is a versatile CLI tool designed to simplify the management of project-specific shell environments. With Dirvana, users can automatically load shell aliases, functions, and environment variables tailored to specific directories whenever they use the cd command. This approach eliminates the need to clutter global configurations such as .bashrc with project-specific settings and ensures a clean environment every time users switch directories.
.dirvana.yml file upon entering a directory and dynamically loads the corresponding settings, making project configurations instantly accessible.A typical configuration in the .dirvana.yml file may look like this:
aliases:
tf:
command: task terraform --
completion: terraform # Inherits terraform's auto-completion!
plan: task terraform -- plan
apply: task terraform -- apply
functions:
greet: |
echo "Hello, $1!"
env:
GIT_REPOSITORY:
sh: git remote get-url origin | sed 's/.*github.com:\(.*\)\.git/\1/'
PROJECT_NAME: myproject
TF_LOG: debug
The workflow of how Dirvana operates can be visualized as follows:
cd ~/projects/myapp): Dirvana performs a series of checks, reads the configuration file, and merges it with any relevant global settings. If authorized, it will load the necessary aliases, functions, and environment variables.Dirvana streamlines the workflow for developers managing multiple projects by automating the management of shell configurations. This tool not only enhances productivity but also maintains clarity in the command line environment, making it an essential utility for anyone working with various coding projects.
No comments yet.
Sign in to be the first to comment.