Regenerate for New Branches and Models
You want another docs variant from the same repository so you can cover a different branch or switch models without rebuilding everything by hand. In docsfy, branch changes and model changes behave differently, so the fastest path depends on what you are changing.
Prerequisites
- A running docsfy instance and a login with
useroradminaccess. If you still need setup help, see Generate Your First Docs Site or Install and Run docsfy Without Docker. - The repository URL you want to regenerate.
- A provider/model that already works in your environment.
- If you use the CLI, a configured
docsfyconnection.
Quick Example
# New branch
docsfy generate https://github.com/myk-org/for-testing-only \
--branch dev \
--provider gemini \
--model gemini-2.5-flash
# New model on the same branch
docsfy generate https://github.com/myk-org/for-testing-only \
--branch main \
--provider gemini \
--model gemini-2.0-flash
Tip: The branch and model fields are editable. Suggestions only come from ready variants, so you can type a value even when it is not listed yet.
Step-by-step
- Create a new branch variant.
docsfy generate https://github.com/myk-org/for-testing-only \
--branch dev \
--provider gemini \
--model gemini-2.5-flash \
--watch
Use the same repo URL and change only the branch. In the dashboard, do the same thing from New Generation: keep the repository URL, type the new branch, choose the provider/model, and click Generate.
Note: If you omit
--branch, docsfy usesmain.
- Create a new model variant on the same branch.
docsfy generate https://github.com/myk-org/for-testing-only \
--branch main \
--provider gemini \
--model gemini-2.0-flash
Keep the branch the same and change the model. In the dashboard, select the ready variant in the sidebar and use Regenerate Documentation; that form changes the provider/model but keeps the selected branch.
- Check the exact variant you started.
docsfy status for-testing-only \
--branch main \
--provider gemini \
--model gemini-2.0-flash
Use the branch, provider, and model together so you do not confuse one variant with another. In the dashboard, a new branch appears under its own @branch section in the sidebar.
- Choose whether you want reuse or a full rebuild.
| Situation | What docsfy does |
|---|---|
| Same branch, same model, no force | Updates the existing variant in place. If the repo is unchanged, the run finishes as already up to date. |
Same branch, same model, --force |
Rebuilds that variant from scratch. |
| Same branch, different model, no force | Reuses the newest ready variant on that branch when possible, then removes the older source variant after the new one is ready. |
Same branch, different model, --force |
Runs a full generation and keeps the existing variant, so both variants can remain. |
| Different branch | Creates a separate branch variant. Reuse starts only after that branch has its own ready variant. |
Warning: A non-force model switch is not additive. If you want to keep both the old and new model variants on the same branch, turn on
Force full regeneration.
- Confirm the result in the UI.
Select the ready variant and check its branch, provider/model, page count, and latest commit. If docsfy reused an unchanged variant, the ready view says the documentation is already up to date.
Advanced Usage
docsfy models --provider gemini
docsfy status for-testing-only
Troubleshooting
Clone failedor branch not found: verify the branch exists in the remote repository and that the server can access that repository.- A branch name like
release/v2.0is rejected: docsfy only accepts branch names without slashes. Use something likerelease-v2.0orrelease-1.x. - The model you want is not in the dropdown: type it manually or run
docsfy models --provider <provider>. The suggestion list only includes models from ready variants. - The regenerate controls are missing:
vieweraccess is read-only. See Manage Users, Roles, and Access for permission changes. - The previous model disappeared after a switch: that is expected after a non-force model change on the same branch. Rerun with
--forceif you want both variants to remain.