The dx menu system is the heart of your terminal workflow, allowing you to organize commands, files, and interactive forms in a hierarchical structure.
dx supports multiple configuration formats for maximum flexibility:
items :
- name : Build Project
description : Compile and build the project
cmd : cargo build --release
alias : build
Auto-Detection
dx automatically searches for menu files in this priority order:
dx.yaml
, dx.yml
, dx.toml
, dx.json
menu.yaml
, menu.yml
, menu.toml
, menu.json
Item Types
Commands Execute shell commands with full PTY support
Files Display files with rich Markdown rendering
Nested Menus Organize items in hierarchical structures
Interactive Forms Collect user input with dynamic field validation
Aliases for CLI Access
dx build # Run aliased command directly
dx test # Execute test suite
dx aliases # List all available aliases
Advanced Features
Create organized hierarchies with unlimited depth:
items :
- name : "Development Tools"
description : "Build, test, and deploy commands"
children :
- name : "Build Release"
cmd : "cargo build --release"
alias : "build"
- name : "Run Tests"
cmd : "cargo test"
alias : "test"
Build dynamic forms that collect input and execute commands:
items :
- name : "Deploy Application"
description : "Deploy to specified environment"
form :
title : "Application Deployment"
fields :
- name : "environment"
label : "Target Environment"
type : "select"
options : [ "staging" , "production" ]
- name : "version"
label : "Version Tag"
placeholder : "v1.0.0"
submit : "deploy.sh {environment} {version}"
Menu configurations support environment variable expansion and can reference relative file paths for maximum flexibility.