npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

formify-ai

v1.0.0

Published

AI-powered Google Forms auto-fill tool with realistic contextual responses using Gemini AI

Readme

🤖 Formify

npm version Node.js License: MIT

Formify is an intelligent AI-powered tool that automatically fills and submits Google Forms with realistic, contextually consistent responses. Perfect for testing, data generation, and form automation.

✨ Features

  • 🧠 AI-Powered Responses - Uses Google's Gemini AI to generate contextually accurate answers
  • 🇱🇰 Realistic Data - Pre-configured with authentic Sri Lankan names, cities, and demographic data
  • 🔄 Multiple Submissions - Automatically generate and submit multiple unique responses
  • 🎯 Smart Form Detection - Intelligently detects all form field types (text, radio, checkbox, dropdown, etc.)
  • 🔐 Persistent Authentication - One-time Google sign-in with session persistence
  • Rate Limiting - Built-in retry logic with exponential backoff for API stability
  • 🎨 Beautiful CLI - Colorful terminal interface with progress indicators
  • 📊 Detailed Logging - Real-time feedback on form filling progress

🚀 Quick Start

Prerequisites

  • Node.js (v18.0.0 or higher)
  • Google Chrome browser installed
  • Google Gemini API Key - Get one here

Installation

Option 1: Using npx (Recommended - No Installation Required)

npx formify-ai

Option 2: Using npm (Global Installation)

npm install -g formify-ai
formify-ai

Option 3: Clone and Run

git clone https://github.com/yourusername/formify.git
cd formify
npm install
npm start

📖 Usage

  1. Run the tool:

    npm start
  2. Provide the required information:

    • Google Form URL
    • Gemini API Key
    • Number of responses to generate
  3. First-time setup:

    • The browser will open automatically
    • Complete Google sign-in once (if required)
    • Your session will be saved for future use
  4. Watch the magic:

    • Formify will automatically fill and submit each response
    • Progress is displayed in real-time
    • Results summary is shown at the end

Example Session

📝 Enter Google Form URL: https://docs.google.com/forms/d/e/your-form-id/viewform
🔑 Enter Gemini API Key: AIzaSyXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
🔢 How many responses to generate? 5

🚀 Starting Formify...

✓ Using model: gemini-2.0-flash
✓ Using Chrome with persistent profile

✅ Response 1: Saman Perera, 28yo, Software Engineer, Colombo
✅ Response 2: Nimesha Silva, 35yo, Doctor, Kandy
✅ Response 3: Rohan Fernando, 42yo, Teacher, Galle
✅ Response 4: Sanduni Wickramasinghe, 25yo, Designer, Negombo
✅ Response 5: Chaminda Jayawardena, 51yo, Manager, Jaffna

╔═══════════════════════════════════════╗
║         SUBMISSION COMPLETE           ║
╚═══════════════════════════════════════╝
✅ Successful: 5/5
❌ Failed: 0/5

🎯 Supported Form Field Types

Formify automatically detects and handles:

  • Text inputs - Short answer fields
  • Text areas - Paragraph/long answer fields
  • Email fields - With validation
  • Phone numbers - Sri Lankan format
  • Numbers - Age, quantity, etc.
  • Radio buttons - Single choice questions
  • Checkboxes - Multiple choice questions
  • Dropdowns - Selection lists
  • Date fields - Calendar inputs
  • Time fields - Time picker inputs

🔧 Configuration

Environment Variables

You can set default values using environment variables:

export GEMINI_API_KEY=your_api_key_here
export FORMIFY_CHROME_PATH=/path/to/chrome

Customizing Data Pools

Edit the data pools in index.js to customize generated names and locations:

const sriLankanNamePool = {
  male: {
    first: ['Your', 'Custom', 'Names'],
    last: ['Your', 'Surnames']
  },
  // ... add your custom data
};

const cities = ['Your', 'Custom', 'Cities'];

🛠️ How It Works

  1. Form Analysis - Puppeteer loads the form and extracts all questions and field types
  2. AI Generation - Gemini AI creates a consistent profile with contextually appropriate answers
  3. Form Filling - Automated browser interaction fills each field accurately
  4. Submission - Smart detection and clicking of submit buttons
  5. Verification - Confirms successful submission
  6. Repeat - Clears session and repeats for next response

🔐 Privacy & Security

  • ✅ All data is generated by AI - no real personal information is used
  • ✅ Authentication cookies are stored locally on your machine
  • ✅ No data is sent to external servers (except Google Forms and Gemini API)
  • ✅ Open source - inspect the code yourself!

⚠️ Important Notes

Rate Limiting

  • Google Forms may have rate limits on submissions
  • Built-in delays between submissions help prevent blocking
  • The tool includes exponential backoff for API retries

Form Restrictions

  • Some forms allow only one response per account
  • Some forms require specific authentication
  • The tool will notify you if it encounters these restrictions

API Costs

🐛 Troubleshooting

"Invalid API Key" Error

  • Verify your API key starts with AIzaSy
  • Generate a new key at https://aistudio.google.com/app/apikey
  • Ensure the key has access to Gemini models

Chrome Not Found

  • Install Google Chrome browser
  • Or set the path manually using FORMIFY_CHROME_PATH

Submit Button Not Found

  • Check if the form has a custom submit button
  • Review the debug screenshot in the temp directory
  • Some forms may need manual submission

Form Already Submitted

  • Clear browser cookies
  • Use a different Google account
  • Check if the form allows multiple submissions

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

⭐ Star History

If you find this project useful, please consider giving it a star! ⭐

📧 Contact

For questions, suggestions, or issues:

🙏 Acknowledgments

🗺️ Roadmap

  • [ ] Support for more countries and locales
  • [ ] GUI interface option
  • [ ] Custom AI prompt templates
  • [ ] Export generated data to CSV
  • [ ] Form response analytics
  • [ ] Multi-language support
  • [ ] Cloud deployment option

Disclaimer: This tool is for educational and testing purposes only. Always respect form creators' terms of service and use responsibly. Do not use this tool for spam, abuse, or any malicious purposes.