Who it is forA developer maintaining a Python project who needs the same change made in many files, such as swapping one HTTP library for another.
The problemFinding and editing every usage of a library by hand is slow and easy to get wrong.
The outcomeBaize searches the repo, edits the matching files, and reports what it changed.
What you need first
- Python 3.10 or newer with pip
- An API key for DeepSeek or another supported backend, or a local Ollama install
- Optional: IBM SPSS Statistics or a reachable SQL database, depending on the use case
Steps
pip install https://github.com/Xu123-Bob/Baize.git- Open
~/.baize/config.toml, setactive_providerto the backend you have a key for, and save your key in~/.baize/.env. (inferred, check the README) - Change into the repository you want to edit, then run
baize. (inferred, check the README) - At the
>>> Decree:prompt, type: Find all places in this repository that use requests and change them to httpx - Run your tests or a
grepfor the old library name to confirm the change.
Prompt for your agent
Using the Baize CLI from the Xu123-Bob/Baize repo, run the instruction 'Find all places in <repo-path> that use requests and change them to httpx' inside <repo-path>. Expected output: a list of edited files. Verify that no file in <repo-path> still imports requests.
Caveat. Baize needs a working LLM backend, so you must add an API key or run Ollama before the first decree works.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for Xu123-Bob/Baize and "Refactor code across a whole repo from one plain-language request"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer