A simple, privacy-first toolkit for converting office documents to PDF and merging PDFs.
filegoblin helps you handle everyday document tasks without relying on online converters or complex software installations. It runs entirely on your local machine - no cloud services, no data upload, no privacy concerns.
Phase 1 Status (Current):
- ✅ CLI structure is complete and usable
- ✅
convertcommand accepts input/output files and flags - ✅
mergecommand exists but is not yet implemented ⚠️ No real document conversion happens in Phase 1- The
nooprenderer logs conversion requests but doesn't transform files
Phase 1 is about infrastructure, not features. The goal is a clean, well-tested CLI that's ready for real conversion logic in Phase 2.
Requirements:
- Go 1.20 or later
# Clone the repository
git clone https://github.com/hey-granth/filegoblin.git
cd filegoblin
# Build the binary
make build
# Or build directly with go
go build -o filegoblin ./cmd/filegoblinRun without arguments to see help:
./filegoblinConvert a document to PDF:
./filegoblin convert --input document.docx --output document.pdfShort flags:
./filegoblin convert -i slides.pptx -o slides.pdfSpecify format explicitly:
./filegoblin convert -i report.docx -o report.pdf --format pdfNote: In Phase 1, this only logs the conversion request. No actual file transformation occurs.
The merge command is planned for a future phase:
./filegoblin merge --inputs file1.pdf file2.pdf --output combined.pdfCurrently returns: "not yet implemented in Phase 1"
make testOr directly:
go test ./...make lintThis runs:
gofmtto check code formattinggo vetto catch common mistakes
make buildmake cleanfilegoblin/
├── cmd/ # CLI commands (Cobra)
│ ├── root.go # Root command and context wiring
│ ├── convert.go # Convert command implementation
│ └── merge.go # Merge command (stub)
├── internal/
│ ├── conversion/ # Conversion abstraction layer
│ │ ├── renderer.go # Renderer interface and Request type
│ │ ├── factory.go # Factory for creating renderers
│ │ ├── noop.go # No-op renderer (Phase 1)
│ │ └── conversion_test.go # Tests
│ └── logx/ # Logging package
│ ├── logx.go # Logger implementation
│ └── logx_test.go # Tests
└── cmd/filegoblin/
└── main.go # Application entry point
-
Interface-based architecture: The
Rendererinterface allows swapping conversion backends without changing CLI code. -
Context everywhere: All operations accept a
context.Contextfor future cancellation/timeout support. -
No external dependencies for conversion: Phase 1 deliberately avoids LibreOffice, cloud APIs, or platform-specific automation.
-
Comments for beginners: Code is heavily commented to help new Go developers understand patterns and idioms.
This is Phase 1 infrastructure. Here's what's explicitly NOT included:
- ❌ Real document conversion (DOCX → PDF, PPTX → PDF, etc.)
- ❌ PDF merging
- ❌ LibreOffice integration
- ❌ Cloud/external conversion services
- ❌ GUI or web interface
These will be addressed in future phases once the foundation is solid.
Contributions are welcome! When contributing:
- Follow existing code style (run
make lint) - Add tests for new functionality
- Comment your code heavily (assume readers are new to Go)
- Keep functions small and focused
- Avoid adding external dependencies without discussion
MIT License - see LICENSE file for details.
filegoblin is built around three principles:
- Privacy: All processing happens locally. Your documents never leave your machine.
- Simplicity: Clean CLI, clear errors, no surprises.
- Clarity: Code is written to be learned from, not just used.
Phase 1 is deliberately minimal - we build a solid foundation before adding features.