Skip to main content

Utility to prompt for and apply changes to a code base using prepdir and applydir.

Project description

VibeDir

VibeDir is a utility to facilitate code modifications by integrating with prepdir and applydir. It generates prompts for large language models (like Grok 3) to modify a codebase, producing a modified_prepped_dir.txt file that can be applied to update your project. VibeDir supports both manual workflows and future API integration with Grok 3.

Functionality is "COMING SOON"

Features

  • Generate prompts for code changes based on prepped_dir.txt from prepdir.
  • Support manual editing or API-driven workflows.
  • Preserve the structure of prepped_dir.txt for compatibility with applydir.
  • Configurable via a YAML file for custom prompt templates and logging.

Installation

pip install vibedir

Usage

  1. Generate a prepped_dir.txt file using prepdir (requires prepdir installed):
    prepdir --output prepped_dir.txt
    
  2. Use vibedir to create a prompt for Grok 3 or another LLM:
    vibedir prepped_dir.txt --request "Refactor test_file.py to use async functions" --output modified_prepped_dir.txt --manual
    
    • This outputs a prompt to copy into Grok 3. Save the response as modified_prepped_dir.txt.
  3. Apply changes using applydir (requires applydir installed):
    applydir modified_prepped_dir.txt
    

Configuration

VibeDir uses a vibedir.yaml file for settings. Example:

logging:
  level: INFO
prompt_template: |
  You are a code modification assistant. Below is the content of a prepped_dir.txt file generated by prepdir, listing files and additional commands for a project. Your task is to apply the following changes: {user_request}. Return the modified content in a file named modified_prepped_dir.txt, preserving the original format, including delimiters (e.g., =-=, ===---===), file markers (Begin File, End File), and additional commands section. Ensure filenames in Begin File and End File markers match exactly, and only include valid code changes.

  === prepped_dir.txt Content ===
  {prepped_dir_content}
  === End prepped_dir.txt Content ===

  Output the modified content as modified_prepped_dir.txt with the same structure.

Development

  • Clone the repository: git clone https://github.com/eyecantell/vibedir
  • Install with PDM: pdm install -G test
  • Run tests: pdm run pytest
  • Build and publish: pdm build && pdm publish

License

MIT License. See LICENSE for details.

Contributing

Issues and PRs are welcome at https://github.com/eyecantell/vibedir.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vibedir-0.1.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vibedir-0.1.0-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file vibedir-0.1.0.tar.gz.

File metadata

  • Download URL: vibedir-0.1.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.24.2 CPython/3.10.16 Linux/5.15.167.4-microsoft-standard-WSL2

File hashes

Hashes for vibedir-0.1.0.tar.gz
Algorithm Hash digest
SHA256 083c729ab23efd00ef5c8d73fbe2343dbaf5cdc22edd4c779245f57d2b2fe3a7
MD5 311ec95cf1493cdd72358237fe1ab86f
BLAKE2b-256 60f802b846ea8200bab544b30644e86950f3f1aa90b1d1a2d485e20be9121b64

See more details on using hashes here.

File details

Details for the file vibedir-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: vibedir-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.24.2 CPython/3.10.16 Linux/5.15.167.4-microsoft-standard-WSL2

File hashes

Hashes for vibedir-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f52a2f0fe4c508b21a96b4e0da38550f7c45cd932b552171723e1f56584a0f3d
MD5 7ae6a6ee55d819c1c4ff41f83436edc4
BLAKE2b-256 57a81ae6366c00a51a5dfdbed3663cae49b6b77426c40aec8a93d4fe88528fa5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page