🔬 A Text User Interface (TUI) for managing and interacting with Grok physics models.
This application provides a terminal-based interface for managing Python-based physics models. The models represent various physics concepts including "Ternary Elegance," "E8 triality," and "φ-scaling" as described in the repository description.
- Model Management: Discover and list Python model files in the
models/directory - Interactive Execution: Run models with JSON input and view formatted output
- Configuration Management: Store API keys and settings in
config.toml - Terminal UI: Navigate using keyboard controls with a clean, organized interface
grok/
├── src/ # Rust source code
│ ├── main.rs # Main application entry point
│ ├── config.rs # Configuration management
│ ├── model_executor.rs # Python model execution
│ └── ui.rs # TUI interface
├── models/ # Python physics models
│ ├── ternary_elegance.py
│ ├── e8_triality.py
│ └── phi_scaling.py
├── config.toml # Configuration file
├── Cargo.toml # Rust dependencies
└── README.md # This file
# Build the application
cargo build --release
# Run the application
cargo run
# or
./target/release/grok-tui- ↑/↓: Navigate through menus and lists
- Enter: Select items or confirm actions
- Esc: Go back to previous screen
- Tab: Switch between input modes (when editing)
- 'q': Quit the application
- Browse Models: Select "Browse Models" from the main menu
- Choose Model: Select a model from the list
- Input Data: Enter JSON input for the model (e.g.,
{"energy": 2.0}) - Execute: Press Enter to run the model
- View Results: Review the formatted output
- Place Python files (
.py) in themodels/directory - Use "Refresh Models" from the main menu to detect new files
- Models should:
- Accept JSON input as command line argument
- Return JSON output to stdout
- Handle errors gracefully
Explores ternary relationships in fundamental constants using the golden ratio.
python3 models/ternary_elegance.py '{"energy": 2.0}'Investigates E8 Lie group triality relationships in physics.
python3 models/e8_triality.py '{"x": 1.0, "y": 1.0, "z": 1.0}'Analyzes golden ratio scaling patterns in natural phenomena.
python3 models/phi_scaling.py '{"scale": 2.0, "dimension": 3}'Edit config.toml to customize:
- API Keys: Store external API credentials
- Default Model: Set a preferred default model
- UI Theme: Choose interface appearance
- Rust (2021 edition or later)
- Python 3.6+
- Terminal with Unicode support
ratatui: Terminal UI frameworkcrossterm: Cross-platform terminal manipulationserde&toml: Configuration serializationtokio: Async runtimeclap: Command line parsing
- Standard library only (no external dependencies for included models)
MIT License - see LICENSE file for details.