Bid Command Reference¶
Command-line tool for bid proposal management.
Installation¶
After setup, run commands using:
Run bid setup to configure shell aliases.
| Global option | Description |
|---|---|
-h, --help |
Show help |
-v, --version |
Show version |
Commands¶
init¶
Create project folder structure in @rfqs.
Creates the following structure under @rfqs/<year>/<folder_name>/:
<folder_name>/
├── 00-ITB/<date>/
├── 01-Commercial/00-Arc/
├── 02-Technical/00-Arc/
├── 03-Supplier/00-Arc/
├── 04-Datasheet/00-Arc/
├── 05-Drawing/00-Arc/
├── 06-PO/00-Arc/
├── 07-VO/
└── 08-Toolkit/00-Arc/
Prompts to optionally create a Commercial Proposal Excel file from template.
clean¶
Normalize file names in a folder.
| Option | Description |
|---|---|
-d, --dry-run |
Preview changes without applying |
-y, --yes |
Skip confirmation prompts |
-r, --remove-git |
Remove .git folder and .gitignore |
What it cleans:
- Email prefixes (RE:, FW:, FWD:, EXTERNAL, URGENT)
- Uppercase extensions → lowercase
- Multiple dashes/underscores → single
- Brackets and extra whitespace
combine-pdf / cpdf¶
Merge PDFs in current directory.
| Option | Description |
|---|---|
-o, --outline |
Add bookmarks from filenames |
-t, --toc |
Add table of contents page |
-m, --manifest |
Use manifest file for custom order |
-c, --create-manifest |
Create manifest.md from all PDFs (recursive) |
-y, --yes |
Skip confirmation prompts |
Default output: 00-Combined.pdf
Creating a Manifest¶
Use -c to auto-generate a manifest.md draft from all PDFs in the current
directory (recursive). Edit it, then run with -m to combine.
bid cpdf -c # generates manifest.md
# edit manifest.md as needed
bid cpdf -m # combine using the manifest
00-Combined.pdf is excluded automatically. Files are listed as relative paths,
sorted alphabetically.
Manifest File Format¶
Create or edit a .md or .txt file in the directory:
# Title→ Output filename## Section→ Bookmark heading- file.pdf→ Files to include (searches locally, then@docs)
vo¶
Create a Variation Order folder structure under an existing project.
Searches for the project in @rfqs, then creates a numbered VO subfolder
inside 07-VO/ with the following structure:
07-VO/<nn>-VO <name>/
├── 00-ITB/<date>/
├── 01-Commercial/00-Arc/
├── 02-Technical/00-Arc/
├── 03-Supplier/00-Arc/
├── 04-Datasheet/00-Arc/
└── 05-PO/00-Arc/
VO folders are numbered automatically (01-VO, 02-VO, …). Prompts to optionally create a Commercial Proposal Excel file from template.
ho¶
Handover project or VO folders from @rfqs to @handover.
Performs a one-way mirror sync. Searches for the project in @rfqs, lets you
select the main project or a specific VO, then syncs to @handover/<project>/.
Folder mapping:
| Source (main) | Source (VO) | Destination |
|---|---|---|
00-ITB |
00-ITB |
00-ITB |
06-PO |
05-PO |
01-PO |
02-Technical |
02-Technical |
02-Technical |
03-Supplier |
03-Supplier |
03-Supplier |
04-Datasheet |
04-Datasheet |
04-Datasheet |
05-Drawing |
05-Drawing |
06-Drawing |
| — | — | 05-Cost (created empty) |
05-Cost must be populated manually after handover.
co¶
Create a costing folder in @costing for a project.
Searches for the project in @rfqs, lets you select the main project or a
specific VO, then creates the destination folder in @costing/<project>/.
Files must be copied manually.
audit¶
Track file contributions in a folder.
| Option | Description |
|---|---|
-f, --fetch URL |
Fetch from SharePoint URL (recommended) |
-l, --library |
SharePoint library title (default: Documents) |
--folder |
Folder path within library (e.g., @docs) |
--month |
Filter by month: YYYY-MM or range YYYY-MM:YYYY-MM |
--all-time |
Show all data without time filtering |
--person NAME |
Filter to specific person (or all for everyone) |
-i, --import-file |
Import from SharePoint exported CSV/Excel |
-o, --output |
Export report to CSV file |
--debug |
Show browser window (for troubleshooting) |
Default: Audits local @docs folder (no author info). When fetching from
SharePoint, defaults to current month and shows interactive contributor selection.
Modes¶
- Local filesystem (default) — basic stats without author info
- SharePoint fetch (
-f) — fetch via browser automation (recommended) - SharePoint import (
-i) — import from exported CSV/Excel
Examples¶
# Local folder audit (no author info)
bid audit
bid audit /path/to/folder
# Fetch from SharePoint (recommended - includes author info)
bid audit -f https://company.sharepoint.com/sites/Site --folder "@docs"
# All contributors, current month
bid audit -f URL --folder "@docs" --person all
# Specific month
bid audit -f URL --folder "@docs" --month 2025-12
# Month range (January to June 2025)
bid audit -f URL --folder "@docs" --month 2025-01:2025-06
# All time (no month filter)
bid audit -f URL --folder "@docs" --all-time
# Specific person, all time
bid audit -f URL --folder "@docs" --person "John Doe" --all-time
# Import from exported file
bid audit -i sharepoint.csv
bid audit -i export.xlsx -o report.csv
Setup for SharePoint Fetch¶
Requires Playwright (one-time setup):
First run: Browser window opens for Microsoft login. Session is saved for future runs.
Subsequent runs: Runs headless (no browser window) using saved session.
beautify¶
Apply formatting to Excel files.
| Option | Description |
|---|---|
-w, --width |
Apply smart width only (skip font formatting) |
-f, --font-only |
Apply font/size only (skip smart width) |
Default shows the font template menu first (select 0 to keep the current font/size), resets sheet view to Normal, then applies smart width. Sheet view reset always runs, regardless of flags.
haz¶
Explain a hazardous area equipment marking (ATEX/IECEx/Inmetro/NEC-CEC).
| Option | Description |
|---|---|
-r, --reference |
Also open a plain-English reference article in the browser |
Paste the marking as-is, in any order (e.g. Ex ib IIC T4 Gb) — it's
tokenized and re-ordered into canonical form regardless of input order.
Prompts for the marking if omitted, unless -r is used with no marking
argument, in which case it just opens the reference article and exits.
Certification scheme is inferred from certificate numbers, ATEX category
prefixes, or NEC/CEC markers found in the input. The bare Ex ... string
is identical across ATEX/IECEx/Inmetro, so if none of those markers are
present, all three are reported as possible schemes.
Every run also prints a reference link (Electrical equipment in hazardous areas) as a footer.
bid haz "Ex ib IIC T4 Gb"
bid haz "[EEx ia] IIC" # bracketed = associated apparatus rating
bid haz -r "Ex ib IIC T4 Gb" # also opens the reference article
bid haz -r # just opens the reference article
word2pdf¶
Batch convert Word documents to PDF in the current directory.
| Option | Description |
|---|---|
-y, --yes |
Skip confirmation prompts |
Converts all .docx files. Requires Microsoft Word to be installed.
rate¶
Calculate OT, Sun/PH, and Standby rates from a man-day rate.
bid rate --onshore RATE
bid rate --offshore RATE
bid rate --onshore RATE --offshore RATE
bid rate --specialist TIER
| Option | Description |
|---|---|
--onshore RATE |
Onshore day rate (Mon-Sat, 10 hrs/day) |
--offshore RATE |
Offshore day rate (Mon-Sun, 12 hrs/day) |
--specialist TIER |
Specialist tier rate card — see tiers below |
--tiers |
Show specialist tier definitions in SGD/USD/EUR/GBP |
--special |
MODEC/HOS rate structure, ×4/3 OT (default: ×3/2) |
--md |
Write selling rates to man-day-rates.md in current directory |
--currency SGD\|USD |
Currency for --md output (default: SGD) |
--loc LOC |
Location code for the rate row (default: SG; e.g. NL, DE) |
--valid YEARS\|DATE |
Validity period: years from publish date (e.g. 2) or fixed date (YYYY-MM-DD). Years snap to the last day of the publish month. |
--caveat |
Add clause that rates are subject to review if commencement is delayed past the validity date (requires --valid) |
--date YYYY-MM-DD |
Publish date written to the document header (default: today) |
Specialist tiers¶
| Tier | Supplier examples | Onshore sell | Offshore sell | Offshore multiplier |
|---|---|---|---|---|
standard |
TMS-DK, Rutter | USD 2,500 | USD 3,300 | ×1.3 (suppliers charge flat) |
premium |
S3 ID | USD 3,200 | USD 4,400 | ×1.35 (matches S3 ID ratio) |
super |
Kongsberg Maritime | USD 3,300 | USD 5,000 | ×1.5 (KM charges ×1.86) |
Output shows SGD and USD side by side. --specialist TIER includes day rate, OT, standby, and mob/demob. Combine with --onshore/--offshore to override the config selling price while keeping the tier's mob rates. Use --tiers to see supplier cost thresholds across SGD/USD/EUR/GBP.
Onshore Sun/PH rates (Seatrium structure):
| Line | Value | Rationale |
|---|---|---|
| Sun/PH Day Rate | Day rate × 1.5 | Full day at OT rate (10 hrs × OT/hr) |
| Sun/PH hr | = OT/hr | Sun/PH work is already OT — no additional multiplier |
Sun/PH applies to onshore only. Offshore rates are flat (Mon–Sun, no Sun/PH distinction).
Markdown export (--md)¶
Writes a customer-facing rate card to man-day-rates.md in the current directory — selling prices only. Run bid rate and bid mob in sequence to build up the document, then convert to PDF with docs.
The document has three parts written as independent named sections: a header (title, validity, tax clause), an Onshore table, and an Offshore table. Re-running any command updates only its own section/row; all other content is preserved.
Output table columns:
| Section | Columns |
|---|---|
| Onshore | Location, Designation, Cur, Day Rate, OT/hr, Standby, Mob, Demob, Mob/Demob, Sun/PH hr (= OT/hr) |
| Offshore | Location, Designation, Cur, Day Rate, OT/hr, Standby, Mob, Demob, Mob/Demob |
Document-level notes (auto-generated):
- All prices quoted are exclusive of applicable taxes. — always present
- Date: [publish date] — always present (defaults to today; override with
--date) - Rates are valid until [date]. — added when
--validis set; years snap to last day of publish month - Rates are subject to review should project commencement be delayed beyond [date]. — added when
--caveatis also set - Onshore footer: Mob/demob rates are based on a minimum 10-working-day deployment per engineer. Hotel and daily allowance of [CCY] 250 per day applies for each day exceeding 10 working days.
Typical workflow:
# 1. Create Onshore + Offshore tables (SG base row, validity, caveat)
bid rate --onshore 1100 --offshore 1650 --md --currency USD --valid 2028-12-31 --caveat
# 2. Add destination rows — mob/demob filled in from bid mob
bid mob NL --md # adds NL row to both Onshore and Offshore
bid mob DE --md # adds DE row to both tables
# 3. Add a location row directly (mob columns show — until bid mob is run)
bid rate --onshore 1100 --offshore 1650 --md --currency USD --loc NL
# 4. Standing rate card (years from today instead of fixed date)
bid rate --onshore 1100 --offshore 1650 --md --currency SGD --valid 1
--currency is set once on bid rate --md and stored in the file; subsequent bid mob --md calls inherit it automatically. Use bid mob --md-currency to override for a specific mob run.
Examples¶
# Standard Seatrium rates (×3/2 OT)
bid rate --onshore 1100
bid rate --offshore 1650
bid rate --onshore 1100 --offshore 1650
# MODEC/HOS special rates (×4/3 OT)
bid rate --onshore 875 --special
bid rate --offshore 1700 --special
# Show supplier day rate thresholds (SGD/USD/EUR/GBP)
bid rate --tiers
# Specialist tier rate cards (SGD + USD side by side)
bid rate --specialist standard
bid rate --specialist premium
bid rate --specialist super
# Custom selling price with tier mob rates
bid rate --onshore 3500 --specialist premium
mob¶
Estimate mob/demob costs for JEN engineer deployment (SGD, from Singapore) or third-party specialist deployment (USD, tier-based selling price).
bid mob COUNTRY [options] # JEN engineer
bid mob --batam [options] # JEN engineer via Batam ferry
bid mob --specialist TIER [COUNTRY] # specialist tier pricing
bid mob --day-rate RATE --currency CCY [COUNTRY] # specialist auto-classify
JEN engineer options¶
| Option | Description |
|---|---|
--offshore |
Offshore deployment — anchorage or sea trial (standard 10-day rate) |
--days DAYS |
Override mob period in working days (default: 10; ignored with --offshore) |
--batam |
Batam deployment via ferry (no country code needed) |
--buffer AMOUNT LABEL |
Add a manual cost item; repeatable |
--md |
Write mob/demob selling price to man-day-rates.md in current directory |
--md-currency SGD\|USD |
Override currency for --md output (default: reads from man-day-rates.md) |
Supported countries: AU, BR, CN, DE, GY, KR, MX, NA, NL, SN, SG, TW, US
JEN engineer cost components:
| Component | Notes |
|---|---|
| Airfare (RT) | Flexible return estimate, +20% buffer |
| Date Change Fee | SGD 250; assumed return date changes (not applicable for Batam or zero-fare) |
| Work Visa | Country-specific; warning shown when visa coordination required |
| Transport | SG taxi to/from Changi + destination land transport, arrival + departure |
| Travel Time | SGD 500/day engineer time cost (capped at 8 hrs/day) |
| Allowance | SGD 100/day abroad allowance |
| Hotel | Per-night rate × mob period |
Output label:
| Condition | Header |
|---|---|
| Default (10 working days) | Onshore / Offshore — applies to both |
--days specified |
Onshore only |
--offshore |
Offshore (anchorage / sea trial) |
Offshore: Always at standard 10-day rate. --days is ignored.
Singapore: Onshore absorbed in day rates; offshore quoted normally.
Batam: 2× one-way ferry tickets; no date change fee; no travel time.
Routing-heavy destinations (BR, GY, NA, SN) add 2 travel days automatically. In-country transit destinations (KR: Incheon → Geoje) add extra transit days.
Lumpsum ceiled to nearest SGD 500. BUC = lumpsum +5% GM; selling price = BUC +30% GM, split 50/50 Mob/Demob. USD figures ceiled to nearest USD 100.
Specialist options¶
| Option | Description |
|---|---|
--specialist TIER |
Tier: standard, premium, or super |
--day-rate RATE |
Supplier day rate — auto-classifies tier |
--currency CCY |
Currency of --day-rate: USD (default), SGD, EUR, GBP, NOK, DKK |
Specialist mob is priced in SGD with USD shown alongside. Tier is classified by the supplier's day rate converted to USD — use the onshore rate; for offshore-only suppliers (e.g. Kongsberg, whose onshore hourly rate understates deployment cost) use their offshore/accommodated rate instead. Destinations are split into short-haul (SG, CN, KR, TW) and long-haul (all others).
| Tier | Supplier onshore day rate | Short-haul mob/demob | Long-haul mob/demob |
|---|---|---|---|
standard |
≤ SGD 3,000 (≤ USD 2,200) | SGD 7,000 | SGD 10,500 |
premium |
SGD 3,001–4,600 (USD 2,201–3,400) | SGD 7,000 | SGD 10,500 |
super |
> SGD 4,600 (> USD 3,400) | SGD 9,000 | SGD 13,500 |
Mob/demob values are per leg (Mob and Demob each); combined total is 2×. Calibrated from TMS-DK (EUR 1,650/day), Rutter (USD 1,850/day), S3 ID (GBP 2,050–2,772/day), and Kongsberg Maritime (SGD 4,639–5,101/day, 2025 rates).
Examples¶
# JEN engineer — standard deployment
bid mob BR
bid mob US
# Offshore label — anchorage / sea trial
bid mob KR --offshore
bid mob SG --offshore
# Batam via ferry
bid mob --batam
# Additional cost items
bid mob BR --buffer 1000 "agent fee" --buffer 500 "medical clearance"
# Override mob period (onshore only)
bid mob CN --days 14
# Write to man-day-rates.md — adds row to Onshore + Offshore tables (inherits currency from file)
bid mob NL --md
bid mob DE --md
# Override currency for this mob run
bid mob NL --md --md-currency USD
# Specialist — direct tier
bid mob --specialist standard
bid mob --specialist super NA
bid mob --specialist premium BR
# Specialist — auto-classify from supplier quote
bid mob --day-rate 1650 --currency EUR NA # → Standard
bid mob --day-rate 2772 --currency GBP BR # → Premium
bid mob --day-rate 5101 --currency SGD NA # → Super
Adding a new country¶
Add a [countries.XX] block to util/mob_config.toml:
[countries.XX]
name = "Country Name"
airfare_roundtrip = 1500 # SGD round-trip flexible return estimate
visa = 100 # SGD visa cost (0 if not required)
transport_one_way = 80 # SGD destination land transport, one way
hotel_per_night = 150 # SGD per night
travel_days_one_way = 1 # calendar travel days one way
visa_note = "Work visa required" # optional; displays warning in output
routing = true # optional; adds +2 days for multi-stop routes
extra_days = 1 # optional; extra days for in-country transit
onshore_mob_absorbed = true # optional; suppress onshore output (e.g. SG)
Updating specialist tiers¶
Edit [specialist.tiers.*] blocks in util/mob_config.toml. Each tier requires:
[specialist.tiers.standard]
day_rate_usd_max = 2200 # upper bound for tier classification (USD)
onshore_sell = 2500 # USD selling day rate — use with bid rate --specialist
offshore_sell = 3300 # USD onshore × 1.3, ceil to 100
mob_short = 7000 # mob/demob selling price per leg (SGD)
mob_long = 10500
[specialist.fx]
# Units of each currency per 1 SGD (SGD = 1 as base)
SGD = 1.000
USD = 0.741 # 1 SGD ≈ 0.741 USD
EUR = 0.679
GBP = 0.583
NOK = 7.78
DKK = 5.10
Offshore multipliers are differentiated by tier based on actual supplier rate cards: - Standard (Trelleborg, Rutter): suppliers charge flat rate — ×1.3 is our own margin premium - Premium (S3 ID): supplier charges ×1.35 offshore vs onshore — we match this ratio - Super (Kongsberg): supplier charges ×1.86 — we use ×1.5 which clears their offshore cost by ~24%
mob-config¶
Export the mob/demob config to Excel for review or client sharing.
| Argument | Description |
|---|---|
OUTPUT |
Output path (default: mob_config.xlsx) |
Generates a workbook with three sheets:
| Sheet | Contents |
|---|---|
| Countries | Per-country airfare, visa, transport, hotel, and routing settings |
| Batam | Batam ferry-specific config |
| Defaults | Global defaults (mob days, GM rates, FX rate, etc.) |
schedule¶
Generate a Gantt chart Excel workbook from a markdown schedule file.
| Option | Description |
|---|---|
--start YYYY-MM-DD |
Override the start date (default: start: in file, or today) |
--open |
Open the generated Excel file after creation |
Output is saved as <input_file_stem>.xlsx in the same directory.
Markdown format¶
# Project Name
start: 2026-08-01
## Phase One
- milestone: Kickoff
- Item A: 4–6 wks EXW NO
- Item B: 2 wks
- milestone: Design Freeze
## Phase Two [after: Phase One]
- Item C: 8–10 wks EXW CN
- Item D: 4 wks EXW DE [air] [sync]
- Item E: 2 wks [after: Item C]
Top-level keys
| Line | Description |
|---|---|
# Title |
Project name — appears in Excel title row |
start: YYYY-MM-DD |
Calendar date of Week 1 |
Phase header (## Name)
A phase groups related items and occupies one row in the Gantt. By default phases run sequentially; annotations change this.
Item (- Name: N wks [origin])
Lead time can be a single value (4 wks) or a range (4–6 wks). The higher value is used for scheduling. Origin is free text; the last word is treated as a country code for sea freight calculation.
Milestone (- milestone: Label)
Places a ◆ marker in the Gantt. Position is determined by where it appears in the item list:
- Listed before any items → placed at the phase start week
- Listed after items (most common) → placed at the phase end week
## Engineering & Design
- milestone: Project Kickoff ← start week
- System design review: 2 wks
- Detailed engineering: 4–6 wks
- milestone: Design Freeze ← end week
Milestone names cannot be used as [after:] targets. Use the phase name instead — it resolves to the same week as the end milestone.
Annotations¶
Annotations are bracket tags appended to a phase header or item line. They are case-insensitive ([Air], [SYNC], [After: X] all work).
| Annotation | Applies to | Description |
|---|---|---|
[after: Name] |
phase, item | Start after the named phase or item finishes. For items, "finishes" means delivery (lead + freight). Comma-separate for multiple: [after: A, B] |
[start: WK15] |
phase, item | Force start at a specific week. WK prefix is optional and case-insensitive — [start: 15] is the same. On a phase: acts as a floor — [after:] wins if the dependency ends later. On an item: absolute override — the item starts at the specified week regardless of phase start. If [after:] is also present on the item, the later of the two wins. |
[air] |
item | Use 2-week airfreight instead of auto-detected sea freight. Transit band is shown in orange in the Gantt to flag higher shipping cost. |
[sync] |
item | Back-schedule this item so it arrives at the same week as the longest non-sync item in the phase (just-in-time ordering). Equivalent to [sync:1]. |
[sync:N] |
item | Back-schedule to arrive with the Nth longest non-sync item (e.g. [sync:2] = second longest, [sync:3] = third longest). Clamped to available items if N exceeds the count. |
Sea freight auto-detection¶
Freight weeks are added on top of the lead time and shown as a separate green band in the Gantt.
| Origin country code | Freight |
|---|---|
SG |
0 weeks |
CN |
2 weeks (short sea) |
| Any other | 4–6 weeks (long-haul sea) |
[air] annotation |
2 weeks (overrides auto-detect) |
For long-haul sea freight a range of 4–6 weeks is displayed; the maximum (6 weeks) is used for conservative scheduling. The transit band is shown in green for sea freight and orange for air freight.
The country code is the last word of the origin string (e.g. EXW NO, FOB CN, EXW DE).
Scheduling rules¶
- Phases with no annotation run sequentially (each starts when the previous ends).
[after: Name]resolves against both phase names and item names. Phase names take priority on collision. Unknown names are silently ignored.- Item-level
[after:]references are resolved in document order — earlier items in the file must appear before items that depend on them. - Item-level
[start: WKN]is an absolute override: the item starts at the given week regardless of when its phase starts. This allows early ordering ahead of the phase (e.g. long-lead procurement starting before Engineering & Design finishes). If[after:]is also set on the item, the later of the two wins. [sync]/[sync:N]items are scheduled in a second pass after all non-sync items in the phase are resolved.[sync]targets the longest;[sync:2]targets the second longest, and so on.- Phase
end_weekis the maximum delivery week across all items (lead + freight).
Examples¶
# Generate schedule, open immediately
bid schedule project.md --open
# Override start date
bid schedule project.md --start 2026-09-01 --open
Parallel phases:
Both phases start when Engineering & Design ends, running in parallel.
Item-level dependency:
## Yard Integration
- Equipment installation: 2–3 wks
- System integration: 2 wks [after: Equipment installation]
- Onshore commissioning: 2–3 wks [after: System integration]
Just-in-time procurement ([sync]):
## Procurement
- Navigation System: 12–14 wks EXW NO
- Oil Spill Detection: 10–12 wks EXW CA [air] [sync]
- Alarm Management: 6–8 wks EXW DE [sync]
Navigation System (longest) drives the delivery date. Both are back-scheduled to arrive the same week.
To stagger arrivals by rank instead:
## Procurement
- Navigation System: 12–14 wks EXW NO
- Oil Spill Detection: 10–12 wks EXW CA [air] [sync:1]
- Alarm Management: 6–8 wks EXW DE [sync:2]
Oil Spill Detection arrives with the longest (Navigation System); Alarm Management arrives with the second longest.
Fixed week + dependency floor:
Starts at WK15 unless Engineering & Design finishes later, in which case that takes over.
setup¶
Configure environment and shell aliases.
Installs dependencies, configures xlwings, copies Excel templates, and adds
the bid alias to your shell configuration.