Automate your Proposals and Offers Part 2
You can only do this once you've created the templates and script with the help of clearxx Assistant and the clearxx Agent & Build Workspace & Cline. See the article Automate Your Proposal Creation Part 1 for that part.
Folder Structure
Locally on you computer, create a folder, e.g. YourFirstName_LastName.
Underneath it, create two folders: 1. Offers 2. Template
In the Template folder, save these files from the clearxx Agent & Build Workspace (in the EXPLORER, what Cline created):
- generate_proposal.py
- Template_Proposal_EN.docx
- start_mac.command (for Mac users)
- start.bat (for Windows users)
- Variables_Input_Template_EN.xlsx
- requirements.txt
- README_Universal (this file)
In the Offers folder, proceed as follows:
- Every time you create a new offer, create a folder with the customer name and date. E.g. "CustomerName_dd.mm.yyyy" (an underscore follows "CustomerName")
- In this customer folder, copy the empty Variables_Input_Template_EN.xlsx
- Give the Excel file the same name as the folder, but add "Input_" in front, so the file name is "Input_CustomerName_dd.mm.yyyy" (an underscore follows "Input")
- Fill in the Excel file

Running the start.bat or start_mac.command file:
- Windows users In the Template folder, double-click start.bat A window with a security question may appear. E.g.: "The publisher could not be verified. Do you want to run this software?" Uncheck "Always ask before opening this file". Then click "Run". A black terminal window will briefly open. You don't need to do anything.
- Mac users In the Template folder, double-click start_mac.command
- The very first time you double-click
start_mac.command: macOS may ask whether the file is allowed to open ("cannot be opened because it is from an unidentified developer"). If this happens: right-clickstart_mac.command→ select "Open", then confirm "Open" again in the dialog. This is only necessary the first time. - The script runs automatically.
Result:
- Go to your customer folder
- There you'll find a Word document titled Proposal_CustomerName_dd.mm.yyyy — all values have been filled in correctly.

One-Time Setup on Windows PC so the Script Can Run Locally on the Computer
Before first use: install Python and openpyxl and set up the required packages.
Instructions for Windows, all via the Command Prompt
- Open the Command Prompt: press
Windows key, typecmd, press Enter. A window with a black background opens (Command Prompt). You'll see the prompt: - C:\Users\YourUsername
- After the
>you can enter commands. - Check whether Python is already installed. Type this in, always
without the ' and ':
python --versionIf a version number appears, skip to step 4. If an error message appears ("'python' is not recognized as an internal or external command"), continue to step 3. - Install Python. Type this in (here and below always without ' and '
at the start and end) and press Enter:
winget install Python.Python.3.12If a security prompt appears asking to allow the installer to make changes, click "Yes". Text will scroll by — wait until a new line with a blinking cursor appears again (done). - Close the Command Prompt and reopen it (press
Windows key, typecmd, press Enter) — this is needed so Windows recognizes the newly installed Python. - Check that the installation worked. Type in:
python --versionA version number should appear (e.g. "Python 3.12.x"). If an error message appears instead, repeat step 3. - Change into the Template folder:
- In the Command Prompt, type:
cd(cd, then a space, don't press Enter yet). - In File Explorer, navigate to the
Templatefolder (the folder that containsgenerate_proposal.pyandrequirements.txt). - Drag the
Templatefolder directly from the File Explorer window into the Command Prompt window (drag & drop) — the full path will automatically appear aftercd. - Press Enter.
- Now install the required packages. Type this command in and press
Enter:
pip install -r requirements.txtText will scroll by — wait until a new line with a blinking cursor appears again (done). - Close the Command Prompt window.
One-Time Setup on MacBook so the Script Can Run Locally on the Computer
Before first use: install Python and openpyxl and set up the required packages.
Instructions for macOS, all via the Terminal command line
- Open Terminal: press
Cmd + Space, typeTerminal, press Enter. A window with a white/black background opens (Terminal). You'll then see the prompt: - YourMacBook ~ % (or possibly YourMacBook: yourname$ if the MacBook is older than 2019)
- after the % sign you can enter commands.
- Check whether Homebrew is already installed. Type this in, always
without the ' and ':
brew --versionIf a version number appears, skip to step 4. If an error message appears ("command not found"), continue to step 3. - Install Homebrew. Type this in (here and below always without ' and '
at the start and end) and press Enter:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"It may ask for the Mac password — type it in (nothing will be displayed as you type, that's normal) and press Enter. At the end the Terminal will show two to three lines starting withechoorexport— copy these exactly as shown and paste them into the Terminal one at a time, confirming each with Enter. This adds Homebrew to the system. - Close Terminal and reopen it (Cmd + Space,
Terminal, Enter) — necessary so Homebrew is recognized. - Install Python. Type this in and press Enter:
brew install pythonText will scroll by — wait until a new line with a blinking cursor appears again (done). - Check that the installation worked. Type in:
python3 --versionA version number should appear (e.g. "Python 3.12.x"). If an error message appears instead, repeat step 5. - Change into the Template folder:
- In Terminal, type:
cd(cd, then a space, don't press Enter yet). - In Finder, navigate to the
Templatefolder (the folder that containsgenerate_proposal.pyandrequirements.txt). - Drag the
Templatefolder directly from the Finder window into the Terminal window (drag & drop) — the full path will automatically appear aftercd. - Press Enter.
- Now install the required packages. Type this command in and press
Enter:
pip3 install -r requirements.txtText will scroll by — wait until a new line with a blinking cursor appears again (done). - Close the Terminal window.
Travel Costs — Two Options
In the input file, there are two ways to specify travel costs:
- Calculated: fill in
travel_hours(round-trip travel time combined, in hours). The travel cost is then calculated fromtravel_hourly_rate×travel_hours. - Flat rate: fill in
travel_flat_rate, leavetravel_hoursempty. The entered amount is used directly.
If both fields are left empty, the travel cost line is omitted entirely from the proposal.
Important
- If only 1 session is specified, the subtotal line "Total cost (net)" is omitted and the final line reads only "Total cost (gross)" instead of "Total cost for X sessions (gross)".
- Before sending, open the finished proposal in Word and check whether
all placeholders were correctly replaced (no
{{...}}and no blue text visible anymore). - The hourly rate (
Hourly_Rate) and the VAT rate (VAT_Rate) are semi-fixed — adjust them directly in the copy of the input file for the respective proposal if needed.