Skip to content

Commit

Permalink
chore(readme): Update output format
Browse files Browse the repository at this point in the history
  • Loading branch information
yamadashy committed Aug 1, 2024
1 parent 1c5d5f6 commit 92d0bc8
Showing 1 changed file with 43 additions and 5 deletions.
48 changes: 43 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ Once you have generated the packed file, you can use it with Generative AI tools
Repopack generates a single file with clear separators between different parts of your codebase.
To enhance AI comprehension, the output file begins with an AI-oriented explanation, making it easier for AI models to understand the context and structure of the packed repository.

```
#### Plain Text Format (default)

```text
================================================================
REPOPACK OUTPUT FILE
================================================================
Expand All @@ -80,9 +82,6 @@ src/
index.ts
config/
configLoader.ts
configValidator.ts
defaultConfig.ts
index.ts
(...remaining directories)
Expand All @@ -100,9 +99,48 @@ File: src/utils.js
================
// File contents here
... (remaining files)
(...remaining files)
```

#### XML Format

To generate output in XML format, use the `--style xml` option:
```bash
repopack --style xml
```

The XML format structures the content in a hierarchical manner:

```xml
<summary>
(Metadata and usage AI instructions)
</summary>

<repository_structure>
src/
cli/
cliOutput.ts
index.ts

(...remaining directories)
</repository_structure>

<repository_files>
<file path="src/index.js">
// File contents here
</file>

(...remaining files)
</repository_files>
```

For those interested in the potential of XML tags in AI contexts:
https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/use-xml-tags

> When your prompts involve multiple components like context, instructions, and examples, XML tags can be a game-changer. They help Claude parse your prompts more accurately, leading to higher-quality outputs.
This means that the XML output from Repopack is not just a different format, but potentially a more effective way to feed your codebase into AI systems for analysis, code review, or other tasks.

### Prompt Examples

Once you have generated the packed file with Repopack, you can use it with AI tools like Claude or ChatGPT. Here are some example prompts to get you started:
Expand Down

0 comments on commit 92d0bc8

Please sign in to comment.