Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Project Kickstart Script using Aider

Description

This repository contains a Bash script, kickstart.sh, designed to automate the initial setup of standard project documentation for new software projects. It leverages aider, an AI pair programming tool, to generate content for these documents and uses Git for version control.

The script aims to quickly establish a baseline set of project files, allowing development teams to focus on building features rather than boilerplate documentation.

Features

  • Creates a docs/ directory if it doesn't exist.
  • Generates the following project documents with placeholder content:
    • docs/REQUIREMENTS.md: Outlines design requirements.
    • docs/DESIGN.md: Reflects the current project design.
    • docs/LIBRARIES.md: Lists considered and chosen libraries.
    • docs/TESTING.md: Describes testing strategy and methodology.
    • README.md: Provides a template for the new project's README.
    • TODO.md: Sets up a basic Kanban-style task tracker.
  • Ensures each generated file is created if it doesn't exist.
  • Uses aider non-interactively to populate the files based on predefined prompts.
  • Automatically adds and commits each generated document to the Git repository with a descriptive commit message (e.g., "AI: Create docs/REQUIREMENTS.md").

Prerequisites

Before running the kickstart.sh script, ensure you have the following installed and configured:

  1. Bash: The script is written for Bash.
  2. Git: The script must be run from the root of a Git repository. Initialize a new Git repository (git init) if one doesn't exist for your new project.
  3. Aider: aider must be installed and accessible in your system's PATH.
    • Ensure aider is configured with the necessary API keys (e.g., OpenAI API key) for it to function. Refer to the aider documentation for installation and configuration instructions.

Usage

  1. Clone this repository (or copy kickstart.sh): If you've cloned this repository, you can navigate into it. Otherwise, ensure kickstart.sh is in the root directory of the new project you want to kickstart.

  2. Navigate to your new project's root directory:

    cd /path/to/your/new-project
  3. Initialize a Git repository (if not already done):

    git init
  4. Make the script executable:

    chmod +x kickstart.sh
  5. Run the script:

    ./kickstart.sh

The script will then proceed to create the docs/ directory and generate each document, committing them one by one.

How It Works

The kickstart.sh script performs the following steps:

  1. Initialization:
    • Sets shell options for robust error handling (set -euo pipefail).
    • Checks if it's being run from within a Git repository.
    • Creates the docs/ directory.
  2. Document Generation:
    • For each predefined document:
      • Ensures the target file exists (using touch).
      • Invokes aider with a specific prompt for that document, the target filename, and flags (--message, --yes-always, --no-auto-commits) for non-interactive operation.
      • Adds the generated/modified file to Git staging (git add).
      • Commits the file with a standardized message (git commit -m "AI: Create <filename>").
  3. Completion:
    • Outputs a message indicating the process is complete.

The prompts used for aider are embedded within the kickstart.sh script and are designed to generate useful template structures for each document.

Generated Documents by kickstart.sh

The script will create and populate the following files within the target project:

  • docs/REQUIREMENTS.md
  • docs/DESIGN.md
  • docs/LIBRARIES.md
  • docs/TESTING.md
  • README.md (for the target project)
  • TODO.md

This README.md describes the kickstart.sh script itself. The script also generates a separate README.md for the project it is used to kickstart.

About

No description or website provided.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages