Lesson Goal: Prepare the addon for distribution, create metadata, and publish it on GitHub so that any FreeCAD user can install it with a single click.
- π¦ Part 1. What is the Addon Manager?
- π Part 2. Preparing the Repository Structure
- π Part 3. Creating
package.xml - π Part 4. The
LICENSEfile - π Part 5. The
README.mdfile - π Part 6. Publishing to GitHub
- π Part 7. Testing the Installation
- π§ͺ Practical Task
- β Summary
- π What’s next?
- π¬ Conclusion
π¦ Part 1. What is the Addon Manager?
The Addon Manager is a built-in FreeCAD tool (Tools β Addon Manager) that:
- Shows a catalog of 300+ official addons
- Allows you to install, update, and remove addons without manually copying files
- Works with GitHub repositories
For your addon to appear there, you need to:
- Upload it to GitHub
- Add a
package.xmlfile - (Optional) Send a PR to FreeCAD-addons
π Part 2. Preparing the Repository Structure
Your folder should look like this:
BoxBuilderAddon/ β repository root
βββ Resources/
β βββ icons/
β βββ box_builder.svg
β βββ create_box.svg
βββ InitGui.py
βββ box_builder_workbench.py
βββ package.xml β REQUIRED!
βββ README.md β recommended
βββ LICENSE β required for publication
π‘ Important: The name of the root folder must match the addon name and be the same as in
InitGui.py.
π Part 3. Creating package.xml
This file describes your addon for the Addon Manager.
Create a package.xml file in the root:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<package format="1" xmlns="https://wiki.freecad.org/Package_Metadata">
<name>BoxBuilderAddon</name>
<description>
A simple tool to create parametric boxes with custom dimensions and GUI.
Saves last used values between sessions.
</description>
<version>1.0.0</version>
<date>2025-04-05</date>
<maintainer email="your.email@example.com">Your Name</maintainer>
<license file="LICENSE">LGPL-2.1-or-later</license>
<url type="repository" branch="main">https://github.com/yourname/BoxBuilderAddon</url>
<url type="bugtracker">https://github.com/yourname/BoxBuilderAddon/issues</url>
<icon>Resources/icons/box_builder.svg</icon>
<content>
<workbench>BoxBuilderAddon</workbench>
</content>
<dependencies>
<freecad>0.20</freecad>
</dependencies>
</package>
π Required fields:
<name>β must match the folder name<version>β inX.Y.Zformat<license>β specify theLICENSEfile and license type<url type="repository">β link to your GitHub<icon>β path to the icon (relative to the root)<content><workbench>...</workbench></content>β indicates that this is a workbench
π‘ A license is mandatory. LGPL-2.1-or-later is recommended (like FreeCAD itself).
π Part 4. The LICENSE file
Create a LICENSE file with the license text.
Example for LGPL-2.1:
- Go to: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
- Copy the entire text
- Paste it into the
LICENSEfile
Or use GitHub: when creating a repository, you can choose a license automatically.
π Part 5. The README.md file
Create a simple README.md:
# Box Builder Addon for FreeCAD
A simple tool to create parametric boxes with custom dimensions.
## Features
- GUI dialog for entering length, width, height
- Saves last used values between sessions
- Unique object naming
- Optional centering on origin
## Installation
1. Open FreeCAD
2. Go to **Tools β Addon Manager**
3. Search for "BoxBuilderAddon"
4. Click **Install**
Or install manually by copying the folder to your `Mod` directory.
## Requirements
- FreeCAD 0.20 or newer
π Part 6. Publishing to GitHub
Steps:
- Register on GitHub
- Click New repository
- Name:
BoxBuilderAddon - Initialize without README (you’ve already created it)
- Click Create repository
- Follow the instructions to upload your local folder:
git init
git add .
git commit -m "Initial release"
git branch -M main
git remote add origin https://github.com/yourname/BoxBuilderAddon.git
git push -u origin main
π‘ Replace
yournamewith your GitHub username.
π Part 7. Testing the Installation
Now any user can:
- Open FreeCAD
- Go to Tools β Addon Manager
- Click Check for updates
- Find BoxBuilderAddon and click Install
β οΈ For the addon to appear in the official list, you need to submit a Pull Request to:
π https://github.com/FreeCAD/FreeCAD-addons
But even without this, users can install it via a direct link:
- In Addon Manager: Tools β Addon Manager β β¦ β Install custom addon
- Paste URL:
https://github.com/yourname/BoxBuilderAddon
π§ͺ Practical Task
- Create a GitHub account (if you don’t have one)
- Prepare the full addon structure with
package.xml,LICENSE,README.md - Upload the repository to GitHub
- Install your addon via the Addon Manager on a clean FreeCAD copy (or delete the folder from
Modbefore installation)
β Summary
Now you know how to:
- Create full-fledged addons with GUI and settings
- Add icons
- Prepare metadata
- Publish to GitHub
- Make your addon available to the world
π What’s next?
You’ve completed the entire course! π
Now you are a FreeCAD addon developer.
Possible next steps:
- Add centering support (from Lesson 5 task)
- Implement multiple input (creating a grid of boxes)
- Integrate with PartDesign to create bodies of revolution
- Write an addon for your own task: bolts, frames, calculations, etc.
π¬ Conclusion
FreeCAD is not just a CAD program.
It’s a platform for engineering creativity, and you now hold the key to expanding it.
Write addons. Share them. Change the world β one parametric object at a time. π οΈ
If you have an idea for a real addon β describe it, and I will help you implement it!