Skip to content

A CLI tool to automate the setup of development environments, create GitHub repositories, and generate comprehensive project READMEs using AI.

License

Notifications You must be signed in to change notification settings

pythonicforge/Dev-Craft

Repository files navigation

Dev-Craft

image

Dev-Craft is a powerful CLI tool designed to streamline the setup and management of development environments for various types of projects. It ensures that necessary software is installed, creates GitHub repositories, sets up project directories, and generates initial README files using AI.

Features

  • Automatically installs necessary software (VSCode, Git, Python)
  • Creates GitHub repositories
  • Sets up project directories with common subfolders
  • Generates comprehensive README files using AI
  • Installs base packages for various project templates
  • Opens project in VSCode

Installation

Prerequisites: Python 3.6+

  1. Clone the repository:

    git clone https://github.com/yourusername/dev-craft.git
    cd dev-craft
  2. Run the install script:

    chmod +x install.sh
    ./install.sh
  3. Install dependencies manually (if not using the install script):

    pip install .

Usage/Examples

After installation, you can use the dev-craft command to initialize your projects. The CLI provides various commands to automate the setup process.

dev-craft create_repo my-new-project "A description of my new project" "web application" --private --env-file /path/to/.env

This command will:

  • Create a new private GitHub repository named my-new-project
  • Set up a project folder with necessary subfolders
  • Generate a comprehensive README file
  • Initialize a Git repository and push the initial commit
  • Create a Python virtual environment
  • Install base packages for a web application
  • Open the project in VSCode

Project Structure

After running dev-craft, your project directory will look like this:

my-new-project/
├── README.md
├── env/
├── src/
├── tests/
└── docs/

Run Locally

Follow the steps below to run Dev-Craft locally

  1. Clone the project
  git clone https://github.com/pythonicforge/Dev-Craft.git
  1. Go to the project directory
  cd Dev-Craft
  1. Install dependencies
  pip install -r reuqirements.txt
  1. Run the App
  python dev_craft/cli.py --help

Environment Variables

Ensure you have a .env file in the root of your project or specify its path using the --env-file option. The .env file should contain the following variables:

GITHUB_TOKEN = <your_github_personal_access_token>
EMAIL_ADDRESS = <your_email_address>
PASSWORD = <your_password>

Commands

create_repo

Creates a new GitHub repository and sets up the project directory.

Arguments:

  • repo_name: Name of the repository
  • description: Description of the repository
  • template: Project template type (choose from: "web application", "data science", "machine learning")

Options:

  • --private: Create a private repository
  • --env-file: Path to the .env file (default: .env)

Tech Stack

Client: Python-argparse, Shell scripting

Server: Python

Contributing

We welcome contributions to Dev-Craft! Please follow these steps to contribute:

  1. Fork the repository
  2. Create a new branch (git checkout -b feature-branch)
  3. Make your changes
  4. Commit your changes (git commit -m 'Add some feature')
  5. Push to the branch (git push origin feature-branch)
  6. Open a pull request

License

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

About

A CLI tool to automate the setup of development environments, create GitHub repositories, and generate comprehensive project READMEs using AI.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks