Skip to content
This repository was archived by the owner on Apr 29, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions PR_NOTE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

## Note About Path Handling

While the documentation describes path handling features, the actual implementation of these features needs to be done through specs/docs that drive code generation as per repository guidelines. This PR only adds documentation of the desired functionality, without modifying any generated code files.
70 changes: 68 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,56 @@ Windows:
The project includes several useful make commands:

- **`make`**: Sets up the virtual environment and installs all dependencies
- **`make run`**: Launches the interactive terminal UI (recommended for most users)
- **`make recipe-executor-context`**: Builds AI context files for recipe executor development
- **`make recipe-executor-create`**: Generates recipe executor code from scratch using the recipe itself
- **`make recipe-executor-create-with-desc DESC="Your product description" [IN="/path/to/input"] [OUT="/path/to/output"]`**: Generates recipe executor code with a custom product description and optional directory paths
- **`make recipe-executor-edit`**: Revises existing recipe executor code using recipes

### Interactive Terminal UI

The easiest way to use Recipe Executor is through the interactive terminal UI:

```bash
make run
```

This will present a comprehensive menu organized by functionality:

#### Code Generation
1. **Generate code from recipe-executor templates** - Create code based on your description
2. **Edit existing code using recipe-executor** - Modify and enhance existing code

#### Blueprint Operations
3. **Create component blueprint** - Generate a blueprint for a new component
4. **Generate code from blueprint** - Create code from an existing blueprint

#### Recipe Utilities
5. **Execute custom recipe file** - Run any recipe file with optional parameters
6. **List available recipes** - View all available recipes in the project

#### System Tools
7. **Rebuild AI context files** - Update the AI context for better code generation
8. **View system information** - See details about your installation and configuration
9. **Exit** - Quit the application

The UI guides you through each operation with clear prompts, helpful descriptions, and real-time feedback. Each menu option provides a dedicated interface for the specific functionality, making it easy to use all of Recipe Executor's features without remembering complex commands.

## Recent Improvements

### Enhanced Terminal UI
The new terminal-based user interface (`make run`) provides a comprehensive menu system that makes it easy to access all Recipe Executor features without remembering complex commands.

### Robust Path Handling
The path handling system has been significantly improved to support:
- Absolute paths (`/Users/name/project/output`)
- Relative paths (`output`, `./output`)
- Home directory paths with tilde expansion (`~/project/output`)
- Prevention of path duplication issues
- Safe file placement across different environments

These improvements ensure that files are always created in the expected locations, regardless of how paths are specified.

## Running Recipes

Execute a recipe using the command line interface:
Expand All @@ -90,12 +136,32 @@ Execute a recipe using the command line interface:
python recipe_executor/main.py path/to/your/recipe.json
```

You can also pass context variables:
You can also pass a product description and other options:

```bash
python recipe_executor/main.py path/to/your/recipe.json --context key=value
# Simple usage with description
python recipe_executor/main.py path/to/your/recipe.json "Your product description"

# With input/output directories (using short options)
python recipe_executor/main.py path/to/your/recipe.json "Your description" -i /path/to/input -o /path/to/output

# Using home directory path with tilde
python recipe_executor/main.py path/to/your/recipe.json "Your description" -i ~/project/input -o ~/project/output

# Advanced: context variables
python recipe_executor/main.py path/to/your/recipe.json -c key=value
```

### Path Handling

Recipe Executor supports various path formats:

- **Relative paths**: `output`, `./output`, `project/output`
- **Absolute paths**: `/Users/name/project/output`
- **Home directory paths**: `~/project/output`

The system ensures files are placed in the correct locations without path duplication issues, making it safe to use in different environments.

## Project Structure

The project contains:
Expand Down