Skip to content

Faithful001/genit-all

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

genit-all

npm version License: MIT TypeScript

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.md files, saving you time on documentation.
  • Smart .gitignore Generation: Create effective .gitignore files 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-all

Or using Yarn:

yarn global add genit-all

⚙️ Configuration

genit-all requires a Google Gemini API key to interact with the AI model.

  1. Obtain a Google Gemini API Key:

  2. Set up your Environment Variable: Create a .env file in the directory where you plan to run genit-all (e.g., your project root) and add your API key:

    GEMINI_API_KEY="your gemini api key"
    GEMINI_MODEL="your gemini model"

    Important: Never commit your .env file or API keys to version control. Make sure .env is included in your .gitignore.

💡 Usage

Once installed and configured with your API key, you can run genit-all from your terminal:

genit-all

The 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 using ts-node. Ideal for local development and testing changes without a full build.

    npm run dev
  • npm run build: Compiles the TypeScript source code (src/) into JavaScript and places the output in the dist/ directory. This command must be run before npm start or publishing.

    npm run build
  • npm start: Executes the compiled CLI from the dist/ directory. This is how the tool runs in a production-like environment after building.

    npm start
  • npm run prepublishOnly: A lifecycle script that automatically runs npm run build before 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:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/your-feature-name).
  3. Make your changes.
  4. Commit your changes (git commit -m 'feat: Add new feature').
  5. Push to the branch (git push origin feature/your-feature-name).
  6. 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

About

AI-powered file generator for TypeScript projects - generates Dockerfiles, README, .gitignore and more

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors