x-gen-1.0.1 is not a library.
X-Gen - AI Agent Experiment Generator
A CLI tool designed for AI agents to generate structured experiment project layouts. Enables consistent, reproducible experiment workflows with customizable templates for researchers, data scientists, and developers.
Features
- 🤖 AI-Agent Optimized: Designed specifically for automated experiment setup
- 🚀 Quick Setup: Generate experiment structures with a single command
- 🧩 Template System: Built-in and custom template support
- 📁 Structured Layouts: Predefined directory structures for different experiment types
- 🔧 Extensible: Easy to add new templates for different experiment types
- 🔄 Consistent Workflows: Ensures reproducible experiment structures across projects
Installation
Prerequisites
- Rust (1.70 or later)
Install from Source
Install from Crates.io (when published)
Quick Start
Generate your first experiment:
This creates:
- A directory structure based on the "basic" template
- A pre-filled README.md with sections for experiment planning
- Follow-up instructions for next steps
Usage
Basic Command
Options
-d, --destination <PATH>: Destination directory (default: "./")-t, --template <TEMPLATE>: Template name (default: "basic")
Examples
# Create experiment in current directory
# Create experiment in specific directory
# Use a specific template
Templates
X-Gen supports both built-in and custom templates:
Built-in Templates
basic: General machine learning experiment template
Custom Templates
You can create your own templates by adding them to ~/.x-gen/templates/:
- Create a template directory:
~/.x-gen/templates/my_template/ - Add a template definition:
~/.x-gen/templates/my_template/my_template.toml - Add supporting files:
~/.x-gen/templates/my_template/README.md,FOLLOW_UP_PROMPT.md
Template Structure
The template definition file uses TOML format with ASCII tree notation:
[]
= "my_template"
= """
├── README.md # Experiment documentation
├── src/ # Source code
│ └── main.py
├── data/ # Data files
│ └── input.csv
├── results/ # Results and outputs
│ └── output.json
└── notebooks/ # Jupyter notebooks
└── analysis.ipynb
"""
Extending X-Gen
Adding New Templates
- Create a new template directory in
~/.x-gen/templates/ - Define the structure in
{template_name}/{template_name}.toml - Add custom README.md and FOLLOW_UP_PROMPT.md files as needed
Template File Structure
Each template directory should contain:
{name}.toml: Defines the directory structure using ASCII tree notationREADME.md: Template for the experiment's README fileFOLLOW_UP_PROMPT.md: Instructions shown after experiment creation
Example Custom Template
# Create a deep learning template
~/.x-gen/templates/deep_learning/deep_learning.toml:
[]
= "deep_learning"
= """
├── README.md
├── model/
│ ├── __init__.py
│ ├── architecture.py
│ └── trainer.py
├── data/
│ ├── __init__.py
│ ├── loader.py
│ └── preprocessing.py
├── experiments/
│ ├── config.yaml
│ └── run_experiment.py
├── results/
└── notebooks/
└── exploratory_analysis.ipynb
"""
Integration with AI Agents
X-Gen is designed to work well with AI agents:
- Generate experiment structure:
x-gen my_experiment -t basic - AI agent fills in the README.md with experiment details
- AI agent implements the experiment based on the structured layout
- Follow-up instructions guide the next steps
Directory Structure
After installation, X-Gen creates:
~/.x-gen/
└── templates/ # Custom templates directory
└── basic/ # Default template (auto-created)
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
License
MIT License - see LICENSE file for details.
Support
For support, please open an issue on the GitHub repository.