DEV Community

EffessDev
EffessDev

Posted on

I Made a VS Code Extension to Copy Your Repo to Your Clipboard as Clean Markdown Context for Your Chatbot

The UI:

An example output:

# Project structure

```
.gitattributes
.gitignore
AGENTS.md
CONTRIBUTING.md
LICENSE
README.md
assets/preview.webp
docs/me/prompt.md
docs/me/publishing.md
pyproject.toml
reptclip-config.toml
src/reptclip/__init__.py
src/reptclip/cli.py
src/reptclip/cli_parser.py
src/reptclip/clipboard.py
src/reptclip/config.py
src/reptclip/file_reader.py
src/reptclip/filters.py
src/reptclip/git_files.py
src/reptclip/markdown_builder.py
tests/test_cli.py
tests/test_config.py
tests/test_file_reader.py
tests/test_filters.py
tests/test_git_files.py
tests/test_markdown_builder.py
```

# AGENTS.md

```
Do not make mistakes.
```

# Prompt

<- Cursor lands here; you can quickly start typing!
Enter fullscreen mode Exit fullscreen mode

Basically, type whatever you want to copy, then press Enter. Context will be copied straight to your clipboard!

Also, you'll get suggestions as you type:

State is stored on a per-project basis. When you come back, your configuration will too!

It's inspired by my CLI app ReptClip, so I named it ReptClip for VS Code.

Here are the key improvements from the CLI version:

  • No need to provide quotes for glob patterns: This is impossible in the CLI
  • Get suggestions as you type
  • Syntax highlighting
  • Intuitive UI (README not required!)

It's really useful for me because this is my workflow when I finish my GitHub Copilot free credits:

  • Copy files
  • Paste them into gemini.google.com
  • Paste them back

And repeat:

If you also found this helpful, please consider giving a ⭐ on GitHub! It really helps A LOT!

Thank you for reading till the end! Please let me know what you think. I am really curious!

Issues and PRs are welcome too!

Top comments (2)

Collapse
 
piekwerk profile image
Piekwerk

Tree-first output is the right shape, it is close to what coding agents assemble for themselves. Two things from running the same shuttle to Gemini. Put the file you are asking about at the very end, just before your question. Long pastes degrade in the middle, so the tree can open the context but the working file should land closest to the prompt. And your example output shows the gotcha by accident: docs/me/prompt.md and docs/me/publishing.md are personal notes that ride along to a hosted chat the moment they match the pattern. A one-second skim of the generated markdown before pasting catches it. Per-project state would have saved me, redoing selections every session is what killed my manual version.

Collapse
 
effessdev profile image
EffessDev • Edited

Thanks for your comment! That's correct! I have to figure out a way to allow people to put certain files close to the prompt without making the UI complicated.

Another problem is that currently, all files not ignored by .gitignore will appear in the project structure. .gitignore is the only way to control what goes there. I have to fix that too. Thanks for the suggestion! Means a lot!