stand

Crates.iostand
lib.rsstand
version0.1.1
created_at2026-01-12 01:22:31.114125+00
updated_at2026-01-12 01:30:05.308982+00
descriptionA CLI tool for explicit environment variable management
homepage
repositoryhttps://github.com/ueneid/stand
max_upload_size
id2036830
size357,568
ueneid (ueneid)

documentation

README

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

  1. Initialize a new project:

    stand init
    
  2. List available environments:

    stand list
    
  3. Show variables for an environment:

    stand show dev --values
    
  4. 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 extends to 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 extends for 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

Developer Documentation

AI Assistant Documentation

  • AGENTS.md - AI assistant instructions and development guidelines
    • CLAUDE.md is 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

  1. Read the development guidelines
  2. Follow the TDD workflow (RED → GREEN → REFACTOR)
  3. Create feature branches from main
  4. Ensure all tests pass before submitting PR
  5. 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
Commit count: 93

cargo fmt