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.
- 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
aidernon-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").
Before running the kickstart.sh script, ensure you have the following installed and configured:
- Bash: The script is written for Bash.
- 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. - Aider:
aidermust be installed and accessible in your system's PATH.- Ensure
aideris 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.
- Ensure
-
Clone this repository (or copy
kickstart.sh): If you've cloned this repository, you can navigate into it. Otherwise, ensurekickstart.shis in the root directory of the new project you want to kickstart. -
Navigate to your new project's root directory:
cd /path/to/your/new-project -
Initialize a Git repository (if not already done):
git init
-
Make the script executable:
chmod +x kickstart.sh
-
Run the script:
./kickstart.sh
The script will then proceed to create the docs/ directory and generate each document, committing them one by one.
The kickstart.sh script performs the following steps:
- 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.
- Sets shell options for robust error handling (
- Document Generation:
- For each predefined document:
- Ensures the target file exists (using
touch). - Invokes
aiderwith 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>").
- Ensures the target file exists (using
- For each predefined document:
- 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.
The script will create and populate the following files within the target project:
docs/REQUIREMENTS.mddocs/DESIGN.mddocs/LIBRARIES.mddocs/TESTING.mdREADME.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.