Kakashi-CLI
A smart environment manager for switching between different .env configurations.
About
Kakashi is a lightweight CLI tool written in Rust that helps you manage multiple environment files (.env.*). Instead of manually editing .env files or juggling multiple configuration files, Kakashi lets you switch between pre-configured environments with a single command.
Perfect for managing different configurations for development, staging, and production environments, or for swapping between different sets of API keys and credentials.
Installation
Install Crates.io published package
cargo install kakashi
OR
Clone the repository and install using Cargo:
This will compile and install the kakashi binary to your system.
Usage
Initialize
Set up Kakashi in your project:
This creates a .kakashi directory to store configuration and metadata.
List Environments
View all available environment files:
This displays all .env.* files in your current directory.
Switch Environment
Switch to a specific environment:
This replaces your current .env file with the contents of .env.<env>. For example:
Current Environment
Check which environment is currently active:
Example Workflow
# Initialize Kakashi in your project
# Create your environment files
# List available environments
# Output:
# dev
# prod
# Switch to development
# Switch to production
# Check current environment
Project Structure
src/
├── main.rs # CLI entry point and command routing
└── commands/
├── mod.rs # Command module definitions
├── init.rs # Initialize command
├── list.rs # List environments command
├── switch.rs # Switch environment command
└── current.rs # Show current environment command
Dependencies
clap- Command-line argument parser