4 releases
| new 0.2.1 | May 12, 2026 |
|---|---|
| 0.2.0 | May 12, 2026 |
| 0.1.1 | Jan 12, 2026 |
| 0.1.0 | Jan 12, 2026 |
#1901 in Development tools
225KB
5K
SLoC
Stand
A CLI tool for explicit environment variable management that provides a clean, organized way to handle different environments (dev, staging, prod) with their specific configurations.
Quick Start
Installation
From crates.io (recommended):
cargo install stand
From source:
git clone https://github.com/ueneid/stand
cd stand
cargo install --path .
Basic Usage
-
Initialize a new project:
stand init -
List available environments:
stand list -
Show variables for an environment:
stand show dev --values -
Execute command with environment:
stand exec dev -- npm start
Configuration Example
Create a .stand.toml file in your project root:
version = "2.0"
[settings]
auto_exit_on_dir_change = true # Prevent navigation outside project directory
[common]
APP_NAME = "MyApp"
LOG_FORMAT = "json"
[environments.dev]
description = "Development environment"
color = "green"
DATABASE_URL = "postgres://localhost:5432/dev"
DEBUG = "true"
[environments.prod]
description = "Production environment"
color = "red"
extends = "dev"
requires_confirmation = true
DATABASE_URL = "postgres://prod.example.com/myapp"
DEBUG = "false"
See Configuration Format for all available settings.
Features
- Environment Management: Define and switch between multiple environments
- Variable Inheritance: Use
extendsto inherit from other environments - Variable Interpolation: Reference system environment variables with
${VAR} - Shell Integration: Start shell sessions with environment loaded
- Command Execution: Execute commands with specific environment variables
- Configuration Validation: Validate configuration file syntax and structure
Examples
Learn by example! Check out the examples/ directory for practical demonstrations:
- basic/ - Simple environment setup (dev, prod)
- inheritance/ - Using
extendsfor environment inheritance - web-app/ - Realistic web application configuration
- interpolation/ - Variable interpolation with
${VAR}syntax
Each example includes a complete .stand.toml configuration and usage instructions. See the Examples README for detailed walkthroughs.
Documentation
User Documentation
- CLI Commands - Complete command reference
- Configuration Format - Configuration file syntax and examples
Developer Documentation
- Architecture Overview - High-level system design
- Development Guidelines - TDD workflow and build commands
- Design Documentation - Detailed design decisions
- Requirements - Feature specifications
- PR Review Guidelines - Pull request checklist
AI Assistant Documentation
- AGENTS.md - AI assistant instructions and development guidelines
CLAUDE.mdis a symlink to this file for Claude Code compatibility
Development
Prerequisites
- Rust 2021 edition
- Cargo
Setup
git clone https://github.com/ueneid/stand
cd stand
cargo build
Running Tests
cargo test
Code Quality
cargo fmt && cargo clippy -- -D warnings && cargo test
Command Implementation Status
- ✅
list- List all available environments - ✅
validate- Validate configuration file - ✅
current- Show current environment status - ✅
init- Initialize new configuration - ✅
shell- Start interactive shell with environment loaded - ✅
exec- Execute command with environment variables - ✅
show- Show environment variables with source attribution - ✅
env- Show active environment variables in current subshell - 🚧
set/unset- Modify environment variables (planned)
Contributing
- Read the development guidelines
- Follow the TDD workflow (RED → GREEN → REFACTOR)
- Create feature branches from
main - Ensure all tests pass before submitting PR
- Follow the PR review guidelines
License
MIT License - see LICENSE file for details.
Support
- Issues: GitHub Issues
- Documentation: See
docs/directory - Development: See AGENTS.md for AI assistant guidelines
Dependencies
~15–29MB
~407K SLoC