Skip to content

Commit

Permalink
improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelmansuy committed Jun 29, 2024
1 parent 5c4ec97 commit d4289e4
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,19 @@ Example custom template (code_review.j2):
- Areas for improvement: [Add your observations]
```

## Templating system documentation

### Creating Template Examples

Code2Prompt provides a convenient way to generate example templates for customizing your output. Use the `--create-templates` command to create a `templates` directory in your current working folder, populated with sample Jinja2 templates. These examples serve as a starting point for creating your own custom templates. To use this feature, simply run:

```bash
code2prompt --create-templates
```

This command will create a `templates` directory containing example files like `basic.j2`, `detailed.j2`, and `custom.md`. You can then modify these templates or create new ones to tailor the output to your specific needs.


### Templates documentions

A full documentation of the templating system is available at [Documentation Templating](./TEMPLATE.md)

Expand Down Expand Up @@ -226,6 +238,7 @@ pip install code2prompt llm
code2prompt --path /path/to/your/script.py | llm "Suggest refactoring improvements for this code"
```


### Advanced Use Cases

1. Code Review Assistant:
Expand Down

0 comments on commit d4289e4

Please sign in to comment.