A command-line tool that converts CSV employee data into organizational charts as PDF files.
- CSV to PDF: Converts employee CSV data directly to PDF organizational charts
- Cross-platform: Works on macOS, Linux, and Windows
- Flexible output: Optional intermediate DOT file generation for debugging
- Automatic layout: Uses Graphviz for professional organizational chart layout
- Windows drag-and-drop: On Windows, you can drag and drop a CSV file onto the executable to generate a PDF instantly (no command line needed)
- Go 1.24+: Required to build the program
- Graphviz: Required for PDF generation (the
dotcommand must be available)
brew install graphvizsudo apt-get install graphviz# Using Chocolatey
choco install graphviz
# Or download from https://graphviz.org/download/go build orgchart.goThis creates an executable named orgchart (or orgchart.exe on Windows).
Generate a PDF from a CSV file:
./orgchart fcbh.csvThis creates fcbh.pdf in the same directory.
Specify a custom output filename:
./orgchart fcbh.csv my_organization.pdfTo debug or inspect the generated graph structure, keep the intermediate DOT file:
./orgchart fcbh.csv --keep-dot
# or
./orgchart fcbh.csv -kThis creates both fcbh.pdf and fcbh.dot files.
./orgchart fcbh.csv my_org_chart.pdf --keep-dotCreates:
my_org_chart.pdf- The organizational chartmy_org_chart.dot- The Graphviz DOT file (for inspection)
- On Windows, you can drag and drop a CSV file onto the executable (
orgchart_win64.exe) to generate a PDF in the same folder. - You can also double-click a CSV file (after file association) or right-click → "Open with" → select the executable.
- All command line options are also available.
The input CSV should be exported from the UKG "Title name supervisor" report (export without Display Header/Footer).
"Employee Status","Date Hired","Default Jobs (HR) Full Path","Employee Name","Supervisor Name","Manager / Director Name","Cost Centers(Department)"
"Active","09/01/1972","President","GERALD A. JACKSON","GERALD A. JACKSON","","69_Corporate"
"Active","06/08/2015","Vice President of Technology","JONATHAN R. STEARLEY","JOSHUA A. MEE","CLAY JACKSON","771_Technology Development"The program generates an organizational chart showing:
- Employee boxes: Each supervisor's direct reports in a table format
- Hierarchy: Lines connecting supervisors to their managers
- Edge labels: Number of direct reports and total reports (direct + indirect)
- Statistics: Summary information including total people, average span of control, and job title count
| Option | Description |
|---|---|
--keep-dot or -k |
Keep the intermediate DOT file for inspection |
[output-pdf] |
Specify custom output filename (optional) |
The program provides helpful error messages for common issues:
- Missing CSV file: "Error opening CSV file: ..."
- Invalid CSV format: "Error reading CSV: ..."
- Graphviz not found: "Error converting to PDF: ..." (with manual conversion instructions)
From macOS/Linux:
./build_windows.shFrom Windows (PowerShell):
.\build_windows.ps1From Windows (Command Prompt):
build_windows.batThese scripts build for multiple Windows architectures:
- Windows 64-bit (
orgchart_win64.exe) - Most common - Windows 32-bit (
orgchart_win32.exe) - For older systems - Windows ARM64 (
orgchart_win_arm64.exe) - For Windows on ARM
For detailed Windows installation instructions, including drag-and-drop functionality, see WINDOWS_INSTALL.md.
From macOS/Linux, build a Windows executable:
GOOS=windows GOARCH=amd64 go build orgchart_dragdrop.goThis creates orgchart_dragdrop.exe for Windows.
# Windows 64-bit
GOOS=windows GOARCH=amd64 go build orgchart_dragdrop.go
# Windows 32-bit
GOOS=windows GOARCH=386 go build orgchart_dragdrop.go
# Linux 64-bit
GOOS=linux GOARCH=amd64 go build orgchart.go
# macOS ARM (Apple Silicon)
GOOS=darwin GOARCH=arm64 go build orgchart.goInstall Graphviz on your system (see Requirements section).
The program will save the DOT file and provide manual conversion instructions:
dot -Tpdf fcbh.dot -o fcbh.pdfFor very large organizations, consider:
- Using
--keep-dotto inspect the DOT file - Manually editing the DOT file for custom layouts
- Using Graphviz's layout engines:
dot,neato,fdp,sfdp,twopi,circo
This program is provided as-is for organizational chart generation.