genit-all
v1.0.1
Published
AI-powered file generator for TypeScript projects - generates Dockerfiles, README, .gitignore and more
Maintainers
Readme
genit-all
genit-all is an AI-powered command-line interface (CLI) tool designed to streamline the initial setup of TypeScript projects by generating essential project files like Dockerfiles, READMEs, .gitignore, and more, using the power of Google's Gemini AI.
✨ Features
- AI-Powered File Generation: Leverage the Google Gemini AI model to intelligently generate project configuration files.
- Dynamic Dockerfile Creation: Automatically create optimized Dockerfiles tailored to your project's needs.
- Comprehensive README Generation: Generate professional and detailed
README.mdfiles, saving you time on documentation. - Smart .gitignore Generation: Create effective
.gitignorefiles to keep your repository clean and focused. - Interactive CLI Experience: Enjoy a user-friendly and guided experience through interactive prompts.
- TypeScript First: Built with TypeScript for type safety, maintainability, and scalability.
- Extensible: Designed to be easily extended for generating other project files in the future.
🚀 Installation
To use genit-all, you need Node.js (v18 or higher recommended) and npm or Yarn installed.
Install genit-all globally via npm:
npm install -g genit-allOr using Yarn:
yarn global add genit-all⚙️ Configuration
genit-all requires a Google Gemini API key to interact with the AI model.
Obtain a Google Gemini API Key:
- Go to Google AI Studio.
- Create a new API key.
Set up your Environment Variable: Create a
.envfile in the directory where you plan to rungenit-all(e.g., your project root) and add your API key:GOOGLE_API_KEY=YOUR_GEMINI_API_KEY_HEREImportant: Never commit your
.envfile or API keys to version control. Make sure.envis included in your.gitignore.
💡 Usage
Once installed and configured with your API key, you can run genit-all from your terminal:
genit-allThe CLI will then guide you through an interactive process, asking questions to understand your project and what files you want to generate.
Example: Generating a Dockerfile
$ genit-all
? Welcome to genit-all! What would you like to generate today? (Use arrow keys)
❯ Dockerfile
README.md
.gitignore
...Follow the prompts to specify your project type, language, and other relevant details, and genit-all will generate the file for you.
📦 Project Structure
.
├── dist/ # Compiled JavaScript output
├── src/ # Source code directory
│ ├── cli/
│ │ └── main.ts # Main entry point for the CLI
│ ├── types/
│ │ └── index.ts # TypeScript type definitions and interfaces
│ └── utils/
│ ├── ai.util.ts # Utility functions for AI model interaction
│ ├── helpers.util.ts # General helper utility functions
│ └── ui.util.ts # Utility functions for user interface and prompts
├── .gitignore # Files and directories ignored by Git
├── .npmignore # Files and directories ignored by npm when publishing
├── package.json # Project metadata, dependencies, and scripts
├── package-lock.json # Dependency tree lock file
└── tsconfig.json # TypeScript compiler configuration📜 Available Scripts
In your project's package.json, the following scripts are defined for development and building:
npm run dev: Runs the CLI directly from the TypeScript source files usingts-node. Ideal for local development and testing changes without a full build.npm run devnpm run build: Compiles the TypeScript source code (src/) into JavaScript and places the output in thedist/directory. This command must be run beforenpm startor publishing.npm run buildnpm start: Executes the compiled CLI from thedist/directory. This is how the tool runs in a production-like environment after building.npm startnpm run prepublishOnly: A lifecycle script that automatically runsnpm run buildbefore the package is published to npm. This ensures that only compiled and ready-to-use code is published.npm test: Currently a placeholder script. Future updates will include comprehensive tests here.
🙌 Contributing
We welcome contributions to genit-all! If you'd like to contribute, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature-name). - Make your changes.
- Commit your changes (
git commit -m 'feat: Add new feature'). - Push to the branch (
git push origin feature/your-feature-name). - Open a Pull Request.
Please ensure your code adheres to the existing style and conventions.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
👤 Author
King Faithful
- GitHub: Faithful001
- Email: [email protected]
