Codegen requires you to explicitly commit changes by calling codebase.commit(). You can manage your codebase’s state with two core APIs:Documentation Index
Fetch the complete documentation index at: https://codegeninc-fix-system-prompt-typo.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
- Codebase.commit() - Commit changes to disk
- Codebase.reset() - Reset the
codebaseand filesystem to its initial state
Committing Changes
When you make changes to your codebase through Codegen’s APIs, they aren’t immediately written to disk. You need to explicitly commit them with codebase.commit():Resetting State
The codebase.reset() method allows you to revert the codebase to its initial state:reset() reverts both the in-memory state and any uncommitted filesystem
changes. However, it preserves your codemod implementation in .codegen/.