Installation
Prerequisites
- Go: Version 1.21 or higher
- Git: For cloning the repository
Install via go install
The easiest way to install goxcel:
go install github.com/ryo-arima/goxcel/cmd/goxcel@latest
This will install the goxcel binary to $GOPATH/bin (usually ~/go/bin).
Verify Installation
goxcel --version
Build from Source
Clone Repository
git clone https://github.com/ryo-arima/goxcel.git
cd goxcel
Build Binary
make build
The binary will be created at .bin/goxcel.
Install Locally
make install
Or copy manually:
cp .bin/goxcel /usr/local/bin/
# or
cp .bin/goxcel $GOPATH/bin/
Docker (Optional)
Build Docker image:
docker build -t goxcel .
Run with Docker:
docker run -v $(pwd):/workspace goxcel \
generate \
--template /workspace/template.gxl \
--data /workspace/data.json \
--output /workspace/output.xlsx
Verify Setup
Test with sample files:
# Navigate to repository
cd goxcel
# Generate sample
.bin/goxcel generate \
--template .etc/sample.gxl \
--data .etc/sample.json \
--output sample.xlsx
# Check output
ls -lh sample.xlsx
Environment Setup
Add to PATH
If goxcel is not found, add Go bin to PATH:
Linux/macOS (bash/zsh):
echo 'export PATH=$PATH:$HOME/go/bin' >> ~/.bashrc
# or for zsh
echo 'export PATH=$PATH:$HOME/go/bin' >> ~/.zshrc
source ~/.bashrc # or source ~/.zshrc
Windows (PowerShell):
$env:PATH += ";$env:USERPROFILE\go\bin"
Configure Logging (Optional)
Set environment variables for logging:
export GOXCEL_LOG_LEVEL=DEBUG
export GOXCEL_LOG_STRUCTURED=true
Troubleshooting
Command Not Found
If goxcel command is not found:
- Check Go is installed:
go version - Verify GOPATH:
go env GOPATH - Check binary location:
ls $GOPATH/bin/goxcel - Ensure PATH includes Go bin directory
Build Errors
If build fails:
- Update Go:
go versionshould be 1.21+ - Clean and rebuild:
go clean -cache make clean make build
Permission Denied
On Linux/macOS, make binary executable:
chmod +x .bin/goxcel
# or for installed binary
chmod +x $GOPATH/bin/goxcel
Next Steps
- Quick Start Guide - Create your first template
- Basic Concepts - Understand GXL fundamentals
- Specification - Detailed format reference