Formulary is a package manager for Google Sheets that enables you to install, manage, and share reusable named functions across spreadsheets.
Key Features
- Package Installation: Install named functions from the Formulary registry
- Multi-Account Support: Manage multiple Google accounts with profile switching
- Dependency Resolution: Automatic dependency resolution with semantic versioning
- Private Sheets: Keep your sheets private - authentication is stored in profiles
- Local Caching: Downloaded packages are cached for faster subsequent installations
- Lockfile Management: Deterministic installations with integrity checks
Installation
Prerequisites
- Python 3.12 or higher
- Git
- Google account with access to Google Sheets
Install Formulary
macOS / Linux:
curl -fsSL https://raw.githubusercontent.com/Astral1119/formulary/main/scripts/install.sh | bashWindows (PowerShell):
First configure PowerShell execution policy (run as Administrator):
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUserThen run the installer:
irm https://raw.githubusercontent.com/Astral1119/formulary/main/scripts/install.ps1 | iexQuick Start
1. Create Authentication Profile
Create a profile to save your Google authentication:
formulary profile add personalThis opens a browser for Google sign-in. Your authentication is saved for future use.
2. Initialize a Project
Link your Google Sheet to Formulary:
formulary init "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit"3. Install Packages
Install packages from the registry:
formulary install hashMultiple packages:
formulary install hash repr dictCommands
Package Management
formulary install <package>- Install one or more packagesformulary remove <package>- Remove installed packagesformulary upgrade- Upgrade all packagesformulary upgrade <package>- Upgrade specific packageformulary info <package>- Show package information
Profile Management
formulary profile add <alias>- Create new profile (opens browser)formulary profile remove <alias>- Remove a profileformulary profile list- List all profilesformulary profile switch <alias>- Switch active profileformulary profile show- Show active profile details
Maintenance
formulary self-update- Update Formulary to latest versionformulary self-uninstall- Remove Formulary from your system
Configuration
Formulary stores configuration in ~/.formulary/:
profiles/- Authentication profiles for different Google accountscache/- Downloaded package artifactsconfig.toml- Active sheet URL and settings
Publishing Packages
To publish your own package to the registry:
formulary publishSee the registry repository for package structure and submission guidelines.