Development roadmap for Modshells, the modular shell configuration manager.
- Current State: v0.0 (Alpha)
- Milestone 1: Core Functionality
- Milestone 2: Multi-Shell Orchestration
- Milestone 3: Configuration Management
- Milestone 4: Distribution and Integration
- Milestone 5: Comprehensive Validation (NEW)
- 5.1 Syntax and Sequence Validation
- 5.2 Directory and File Validation
- 5.3 Permission Validation
- 5.4 Duplication Detection
- 5.5 POSIX Compliance
- 5.6 Performance Analysis
- 5.7 Security Validation
- 5.8 SELinux and Firewall Compatibility
- 5.9 Tool Integration Validation
- 5.10 Formal Verification
- 5.11 Annotation and Metadata
- Milestone 6: Advanced Features
- Technical Debt
- Appendix A: POSIX Shell Validation Roadmap
- Appendix B: Non-POSIX Shell Compatibility
- Non-Goals
- Version Planning
- Contributing
| Component | Description | Status |
|---|---|---|
|
Main entry point, initialisation flow |
Complete |
|
Path resolution from env vars, home directory detection |
Complete |
|
Idempotent directory creation (core, tools, misc, os, ui) |
Complete |
|
Shell detection (10 shell types enumerated) |
Stub only |
|
Signature-based idempotency check |
Partial |
|
Backup + injection logic |
Stub only |
Build system |
GPRBuild project files, CI/CD |
Complete |
Documentation |
README, Contributing, Security, Citations |
Complete |
Complete the foundational shell management capabilities.
Implement actual shell detection to replace the current stub.
-
❏ Detect installed shells via
which/command -v -
❏ Detect shells listed in
/etc/shells -
❏ Handle non-standard installation paths
-
❏ Return accurate
Shell_Status(Installed, Not_Installed, Can_Be_Installed) -
❏ Test on multiple Linux distributions
Map each shell type to its configuration file(s).
-
❏ Define config file paths per shell
-
Bash:
~/.bashrc,~/.bash_profile -
Zsh:
~/.zshrc,~/.zprofile -
Fish:
~/.config/fish/config.fish -
Nushell:
~/.config/nushell/config.nu -
Ion:
~/.config/ion/initrc -
Oils:
~/.oshrc,~/.yshrc -
Tcsh:
~/.tcshrc,~/.cshrc -
Ksh:
~/.kshrc -
Dash: requires
ENVvariable -
PowerShell: profile paths vary by platform
-
-
❏ Handle XDG Base Directory specification
-
❏ Support custom config locations
Implement safe backup before modification.
-
❏ Create timestamped backup:
.bashrc.modshells-backup-20240101-120000 -
❏ Configurable backup location
-
❏ Backup rotation (keep N most recent)
-
❏ Verify backup integrity before proceeding
Inject sourcing logic into shell configurations.
-
❏ Generate shell-specific sourcing syntax
-
POSIX shells:
for f in dir/*.sh; do . "$f"; done -
Fish:
for f in dir/*.fish; source $f; end -
Nushell:
sourcewith glob -
PowerShell:
Get-ChildItem | ForEach-Object { . $_ }
-
-
❏ Inject between signature markers
-
❏ Handle different file extension conventions
-
❏ Respect alphabetical ordering of sourced files
-
❏
modshells init- Modularise all detected shells -
❏
modshells init --shell=bash,zsh- Modularise specific shells -
❏ Interactive mode with shell selection
-
❏ Dry-run mode (
--dry-run) showing planned changes
-
❏ Define
.modshellsextension for cross-shell configs -
❏ Transpilation layer for common syntax
-
Common aliases → shell-specific syntax
-
Environment variables (portable)
-
Path modifications
-
-
❏ Fall back to shell-specific files when needed
-
❏
modshells add <category> <name>- Create new snippet -
❏
modshells list- List all snippets by category -
❏
modshells enable/disable <snippet>- Toggle snippets -
❏ Template system for common configurations
-
❏ Configurable category directories
-
❏ Explicit ordering via manifest file
-
❏ Dependency declaration between snippets
-
❏ Conditional loading (by hostname, OS, etc.)
-
❏ Guix package definition (
guix.scm) -
❏ Nix flake (
flake.nix) -
❏ Binary releases for common platforms
-
❏ Container image for CI/CD integration
-
❏ Starship prompt integration
-
❏ Direnv compatibility
-
❏ asdf/mise version manager integration
-
❏ Shell plugin manager compatibility (oh-my-zsh, fisher, etc.)
The Shell Validator provides comprehensive validation, verification, and security analysis.
-
❏
Validate_Syntax- Run bash -n and shellcheck -
❏
Validate_Command_Sequence- Ensure correct ordering (exports before use) -
❏
Detect_Infinite_Loops- Static analysis for potential loops -
❏
Detect_Skipped_Blocks- Dead code detection
-
❏
Validate_Directory_Structure- Check modular structure -
❏
Validate_Symlinks- Verify all symlinks are valid -
❏
Validate_File_Presence- Check required files exist -
❏
Validate_Completeness- No orphaned modules
-
❏
Validate_Permissions- Correct read/write/execute -
❏
Validate_Ownership- File owned by current user -
❏
Detect_World_Writable- Security risk detection -
❏
Detect_SUID_SGID- Inappropriate permission bits
-
❏
Detect_Duplicate_Aliases- Find duplicate alias definitions -
❏
Detect_Duplicate_Functions- Find duplicate function definitions -
❏
Detect_Duplicate_Exports- Find duplicate exports -
❏
Detect_Path_Duplicates- Find duplicate PATH entries -
❏
Detect_Conflicting_Settings- Find overriding settings
-
❏
Validate_POSIX_Compliance- Strict/Relaxed/Extended levels -
❏
Detect_Bashisms- Find bash-specific syntax -
❏
Validate_Portable_Syntax- Cross-shell compatibility
-
❏
Analyze_Load_Time- Profile shell startup -
❏
Detect_Slow_Commands- Find slow initialization -
❏
Suggest_Lazy_Loading- Deferred loading candidates -
❏
Analyze_Execution_Flow- Optimal load order
-
❏
Detect_Hardcoded_Secrets- Find exposed credentials -
❏
Detect_Dangerous_Commands- rm -rf, eval, exec -
❏
Validate_Input_Sanitization- Proper quoting -
❏
Check_CVE_Vulnerabilities- Known shell CVEs -
❏
Validate_Sudo_Usage- Safe sudo patterns
-
❏
Validate_SELinux_Context- Appropriate contexts -
❏
Detect_SELinux_Conflicts- Policy violations -
❏
Validate_Firewall_Safety- Network command safety
-
❏
Validate_Starship_Config- Prompt configuration -
❏
Validate_Completion_Setup- bash-completion, carapace -
❏
Validate_Direnv_Integration- Hook placement -
❏
Validate_Asdf_Integration- Version manager setup -
❏
Validate_Atuin_Integration- History sync
-
❏
Run_Formal_Verification- ShellCheck, BATS, Pyre -
❏
Generate_Verification_Report- Comprehensive report -
❏
Export_For_Theorem_Prover- Experimental prover export
-
❏ Sync configurations via Git
-
❏ Encrypted secrets handling
-
❏ Machine-specific overlays
-
❏ Dotfiles repository integration
-
❏ Profile switching (work/personal)
-
❏ Temporary configuration injection
-
❏ Session isolation
-
❏ Replace mock paths in
Is_Modularizedwith actual config paths -
❏ Implement comprehensive error messages
-
❏ Add logging with configurable verbosity
-
❏ Unit test suite with AUnit
-
❏ Complete
justfilerecipes (build, test, clean, fmt, lint) -
❏ Add development container (
.devcontainer) -
❏ Cross-compilation for macOS and Windows
-
❏ Static linking for portable binaries
Validation support for POSIX-compliant shells. The Shell Validator will provide equivalent validation capabilities for all POSIX shells.
| Shell | Config Files | Special Considerations | Priority |
|---|---|---|---|
sh (Bourne) |
|
Strictest POSIX compliance, no arrays |
High |
dash |
|
Debian/Ubuntu |
High |
bash |
|
Most common, extensive extensions |
Complete |
ksh (KornShell) |
|
POSIX superset, advanced features |
Medium |
zsh |
|
Extensive customisation, oh-my-zsh ecosystem |
High |
ash (BusyBox) |
|
Embedded systems, Alpine Linux |
Medium |
mksh |
|
Android shell, MirBSD |
Low |
yash |
|
Strictest POSIX compliance |
Low |
Each POSIX shell will support:
-
❏ Syntax validation using shell’s native
-nflag -
❏ POSIX compliance level checking (strict/relaxed)
-
❏ Shell-specific extension detection
-
❏ Configuration file location resolution
-
❏ Startup script ordering validation
-
❏ Environment variable inheritance checking
-
❏ Signal handling validation
-
❏ Exit code propagation analysis
Support for modern non-POSIX shells requires different validation strategies.
| Shell | Config Files | Language/Paradigm | Compatibility Notes |
|---|---|---|---|
Fish |
|
Not POSIX, user-friendly syntax |
No |
Nushell |
|
Structured data, tables as first-class |
Completely different paradigm. Pipeline operates on structured data, not text. |
Elvish |
|
Functional, structured values |
Different variable syntax ( |
Ion |
|
Rust-inspired, typed |
Method syntax on variables. Strong typing. Array operations differ. |
Oils (osh/ysh) |
|
POSIX-compatible (osh) + enhanced (ysh) |
osh is POSIX-compatible. ysh adds JSON, expressions, better errors. |
PowerShell |
|
Object-oriented, .NET based |
Completely different. Cmdlets, objects in pipeline, |
Tcsh/Csh |
|
C-like syntax |
Different syntax for everything. Avoid for scripting (historical only). |
Xonsh |
|
Python + shell hybrid |
Python syntax mixed with shell. Import Python directly. |
Murex |
|
Type-aware, safety-focused |
Strong typing, safer defaults, different pipeline semantics. |
For each non-POSIX shell, implement:
-
❏ Native syntax validation (
fish -n) -
❏ Universal variable handling
-
❏ Abbreviation vs alias distinction
-
❏ Function autoloading paths
-
❏ Fisher/oh-my-fish plugin detection
-
❏ Native syntax validation
-
❏ Module system validation
-
❏ Hook configuration (env_change, pre_prompt)
-
❏ Plugin registration
-
❏ Structured config validation (TOML-based)
-
❏ Native syntax validation
-
❏ Module import validation
-
❏ Edit mode configuration
-
❏ Persistent variable handling
-
❏ Native syntax validation
-
❏ Method call validation
-
❏ Array type checking
-
❏ Plugin/builtin validation
-
❏ osh: POSIX validation
-
❏ ysh: Enhanced syntax validation
-
❏ Expression evaluation safety
-
❏ JSON/YAML parsing in configs
For cross-shell configuration:
-
❏ Define common abstraction for aliases
-
❏ Define common abstraction for environment variables
-
❏ Define common abstraction for PATH modifications
-
❏ Transpiler from abstract config to shell-specific syntax
-
❏ Bidirectional sync between shell configs
Runtime detection of shell capabilities:
| Feature | Bash | Zsh | Fish | Nushell | PowerShell |
|---|---|---|---|---|---|
Arrays |
✓ |
✓ |
✓ |
✓ (tables) |
✓ |
Associative Arrays |
✓ (4.0+) |
✓ |
✗ |
✓ (records) |
✓ (hashtables) |
Command Substitution |
|
|
|
|
|
Process Substitution |
|
|
|
✗ |
✗ |
Job Control |
✓ |
✓ |
✓ |
Limited |
✓ |
Programmable Completion |
✓ |
✓ |
✓ |
✓ |
✓ |
Unicode Support |
Limited |
✓ |
✓ |
✓ |
✓ |
The following are explicitly out of scope:
-
Shell implementation - Modshells manages configuration, not shell execution
-
Plugin system - Use native shell plugin managers instead
-
Remote shell management - Focus on local workstation configuration
-
GUI - CLI-first design; TUI may be considered later
| Version | Milestone | Target |
|---|---|---|
v0.1 |
Milestone 1 (Core Functionality) |
- |
v0.5 |
Milestone 2 (Multi-Shell Orchestration) |
- |
v1.0 |
Milestone 3 (Configuration Management) |
- |
v1.5 |
Milestone 4 (Distribution and Integration) |
- |
v2.0 |
Milestone 5 (Advanced Features) |
- |
See CONTRIBUTING.md for contribution guidelines.
Priority areas for contribution:
-
Shell-specific expertise (especially Fish, Nushell, PowerShell)
-
Cross-platform testing (macOS, BSD, Windows via WSL)
-
Package definitions (Homebrew, AUR, RPM, DEB)
-
Documentation and tutorials