A comprehensive browser extension that generates fake data for web forms using the Gofakeit library. This extension provides multiple ways to generate realistic fake data for testing and development purposes, supporting both Chrome and Firefox browsers.
See CHANGELOG.md for release history.
- Smart Form Detection: Automatically detects and fills form fields with appropriate fake data
- Multiple Input Types: Supports text, email, phone, password, date/time, number, color, checkbox, radio, and select inputs
- Right-Click Context Menu: Quick access to 200+ Gofakeit functions via right-click menu
- Interactive Selection Mode: Click to select specific areas for data generation
- Popup Interface: Bulk form filling with autofill options and settings
- Password Generator: Built-in secure password generation
- UUID Generator: Generate UUIDs for testing purposes
- Real-time Notifications: Visual feedback for successful and failed operations
- Cross-Browser Support: Works on both Chrome (Manifest V3) and Firefox (Manifest V2)
- Settings Persistence: Save autofill preferences across browser sessions
Firefox Add-ons: Install from Firefox Add-ons Chrome Web Store: Install from Chrome Web Store (coming soon)
git clone https://github.com/brianvoe/gofakeit_extension.git
cd gofakeit_extension
npm install
npm run dev # For Chrome development with hot reload
npm run dev:firefox # For Firefox development with hot reload- Clone this repository
- Run
npm installto install dependencies - Run
npm run build:chromefor Chrome ornpm run build:firefoxfor Firefox - Load the appropriate
distfolder as an unpacked extension:- Chrome:
dist/chrome-mv3/ - Firefox:
dist/firefox-mv2/
- Chrome:
npm run dev- Start Chrome development server with hot reloadnpm run dev:firefox- Start Firefox development server with hot reloadnpm run build- Build for both Chrome and Firefoxnpm run build:chrome- Build for Chrome onlynpm run build:firefox- Build for Firefox onlynpm run zip- Create zip files for both browsersnpm run clean- Remove the dist foldernpm test- Run test suite
entrypoints/
βββ background/
β βββ index.ts # Background script entry point
β βββ context-menu.ts # Context menu creation and handling
βββ content/
β βββ index.ts # Content script entry point
β βββ autofill-service.ts # Autofill logic and gofakeit integration
β βββ message-handler.ts # Message handling between popup and content
β βββ notifications.ts # Toast notification system
β βββ selection.ts # Interactive selection mode
β βββ styles.css # Content script styles
βββ popup/
βββ index.html # Popup HTML
βββ main.ts # Popup script
βββ autofill-options.ts # Autofill settings modal
βββ password-generator.ts # Password generator functionality
βββ uuid-generator.ts # UUID generator functionality
βββ styles.css # Popup styles
public/
βββ images/ # Extension icons and assets
βββ variables.css # CSS variables for consistent styling
AutofillService: Handles all autofill operations using the Gofakeit libraryMessageHandler: Manages communication between popup and content scriptsNotification: Provides visual feedback for user actionsSelection: Interactive mode for selecting specific form areas
- WXT: Modern web extension framework for cross-browser compatibility
- TypeScript: Full type safety and modern JavaScript features
- Vite: Fast build tool with hot module replacement
- Gofakeit: Comprehensive fake data generation library
- Text Inputs:
text,email,tel,password,search,url,color - Date/Time:
date,time,datetime-local,month,week - Numbers:
number,range - Selections:
checkbox,radio,select,textarea
- Click the Gofakeit extension icon
- Choose "Autofill All" to fill all form fields on the page
- Choose "Autofill Selected" to enter selection mode
- Use the password generator and UUID generator tools
- Access autofill settings to customize behavior
- Right-click on any form field
- Select "Gofakeit" from the context menu
- Choose from popular functions or browse the full list
- Select a specific function to apply to that field
- Click the extension icon and select "Autofill Selected"
- Click on form fields or containers to generate data
- The extension will detect the field type and apply appropriate data
- Auto Mode: Automatically detects field types and applies appropriate data
- Manual Mode: Requires explicit user selection for each field
- Stagger Timing: Control the delay between filling multiple fields
- Badge Duration: Set how long success/error badges are displayed
- Debug: Log how each field was resolved (function, source, score) to the page console
The extension uses the Gofakeit library to generate realistic fake data. The library provides 200+ functions for generating various types of test data.
- Personal:
firstname,lastname,email,phone,address,city,state,zip,ssn,date,age - Business:
company,job,department,url,username - Financial:
creditcard,currency,account,routing - Technical:
uuid,ipv4,ipv6,mac,password - Text:
word,sentence,paragraph,lorem - Numbers:
number,digit,price - Colors:
hexcolor,rgb - Entertainment:
moviename,gamertag,animal,color
The extension fetches the complete list of available functions from the Gofakeit API to populate the right-click context menu, ensuring users always have access to the latest data generation capabilities.
- Build the extension:
npm run build:chromeornpm run build:firefox - Load in browser as unpacked extension
- Navigate to any form-heavy website
- Test various input types and functions
- Test both popup and right-click functionality
- Use
npm run devfor Chrome ornpm run dev:firefoxfor Firefox development - Use
npm run cleanto remove the dist folder if needed - Check browser console for detailed logging
- Test cross-browser compatibility between Chrome and Firefox
- Run
npm testto execute the test suite - Tests cover core functionality, error handling, and edge cases
- Continuous integration ensures code quality
Deploy builds and publishes the extension to the Chrome Web Store and Firefox Add-ons in a single command.
Credentials live in a gitignored .env.submit file. Copy the committed
template and fill in the blanks:
cp .env.submit.example .env.submitFill in these values:
| Key | Where to get it |
|---|---|
CHROME_EXTENSION_ID |
Chrome Web Store developer dashboard, under the extension name (or the item URL) |
CHROME_CLIENT_ID / CHROME_CLIENT_SECRET |
Google Cloud Console β Credentials β OAuth client ID (type Web application, with redirect URI https://developers.google.com/oauthplayground), after enabling the Chrome Web Store API |
CHROME_REFRESH_TOKEN |
OAuth 2.0 Playground using your own client ID/secret and the chromewebstore scope |
FIREFOX_EXTENSION_ID |
Already known (extension@gofakeit.com) and derivable from the manifest |
FIREFOX_JWT_ISSUER / FIREFOX_JWT_SECRET |
https://addons.mozilla.org/developers/addon/api/key/ |
Chrome refresh token: do not use the tool's built-in
Generate new refresh token?step β it relies on Google's retired out-of-band OAuth flow and fails withredirect_uri_mismatch. Instead:
- Open https://developers.google.com/oauthplayground
- Gear icon β check "Use your own OAuth credentials" β paste your client ID and secret
- Add scope
https://www.googleapis.com/auth/chromewebstore- Authorize APIs β sign in β "Exchange authorization code for tokens"
- Copy the
refresh_tokenintoCHROME_REFRESH_TOKENIf your OAuth consent screen is still in Testing status, Google expires the refresh token after 7 days. Move the app to In production for a token that keeps working.
The very first upload of each extension must be done by hand in the store dashboards. Automated deploys only work for updating an existing listing.
Verify the credentials and check for a duplicate version without uploading anything:
npm run deploy:check # report only; exits non-zero on a duplicatenpm run deploy # build, zip, and submit to both stores
npm run deploy:dry # validate credentials without uploading anythingDeploy prompts before each irreversible step:
- Whether to run a dry run first (defaults to yes)
- Whether to submit for real (defaults to yes)
It also refuses to upload a version that already exists, checking the local git tags, its own deploy history, and the live stores:
npm run deploy -- --yes # no prompts (CI); duplicates still abort
npm run deploy -- --force # override the duplicate guard
npm run deploy -- --firefox-only # only Firefox Add-ons
npm run deploy -- --chrome-only # only Chrome Web Store
npm run deploy -- --skip-checks # skip the duplicate checksBoth stores reject a version that has already been uploaded, so bump the version and commit it before deploying:
npm run release # prompts for a new version, builds, and zips
npm run deploy- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes and test thoroughly
- Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- Follow TypeScript best practices
- Use WXT framework conventions for cross-browser compatibility
- Add proper error handling and user feedback
- Include console logging for debugging
- Test with multiple input types and browsers
- Update documentation for new features
- Ensure all new features work in both Chrome and Firefox
This project is licensed under the MIT License - see the LICENSE file for details.