Skip to content

Commit d11dab6

Browse files
committed
chore: retrieve the old faulty README and add the latest, bump to version 2.1.2 to reflect this
1 parent b8304f4 commit d11dab6

2 files changed

Lines changed: 61 additions & 35 deletions

File tree

README.md

Lines changed: 60 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,31 @@
11
# DiffCraft
2-
> Craft the perfect git commit, instantly.
2+
> CLI co-pilot for Git and repository management
33
44
[![PyPI version](https://badge.fury.io/py/diffcraft.svg)](https://badge.fury.io/py/diffcraft)
55
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
66
[![GitHub Repo](https://img.shields.io/badge/GitHub-Repo-purple?logo=github)](https://github.com/bvrvl/diffcraft)
77

8-
DiffCraft is a smart command-line tool that uses Google's Gemini to instantly generate high-quality, conventional commit messages from your staged code changes.
8+
DiffCraft is a smart command-line tool that uses Google's Gemini to streamline your development workflow. It started as a tool to craft the perfect git commit and has evolved into a powerful assistant for bootstrapping and managing your repository.
9+
- `craft`: Instantly generate high-quality, conventional commit messages from your code changes.
10+
- `gencraft`: Generate essential repository files like README.md, LICENSE, and .gitignore with AI assistance.
911

1012
Install:
1113
```bash
1214
pip install diffcraft
1315
```
1416

1517
## Features:
16-
17-
* 🤖 **AI-Powered Commits:** Analyzes your `git diff` to create meaningful and descriptive commit messages that truly reflect your changes.
18-
***Enforce Best Practices:** Automatically follows the [Conventional Commits](https://www.conventionalcommits.org/) standard, improving your project's readability and making it easier to automate releases.
19-
* ⚙️ **You're Always in Control:** Interactively **[A]ccept** the suggestion, **[E]dit** it in your own editor, **[R]egenerate** a new one, or **[Q]uit**.
18+
`craft`: AI-Powered Commits
19+
* 🤖 **Intelligent Commit Generation:** Analyzes your `git diff` to create meaningful and descriptive commit messages that truly reflect your changes.
20+
***Conventional Commits Standard:** Automatically follows the [Conventional Commits](https://www.conventionalcommits.org/) standard, improving your project's readability and making it easier to automate releases.
21+
* ⚙️ **Full User Control:** Interactively **[A]ccept** the suggestion, **[E]dit** it in your own editor, **[R]egenerate** a new one, or **[Q]uit**.
2022
* 🌍 **Flexible & Powerful:** Generate commits in different languages (`--lang`), provide context from your commit history (`--history`), and force specific types (`--type`).
2123

24+
`gencraft`: AI-Powered Repository Scaffolding
25+
- 📄 **Smart README Generation:** Scans your project's file structure (respecting `.gitignore`) to create a comprehensive and well-structured `README.md` file automatically.
26+
- ⚖️ **License Generation:** Quickly generate a `LICENSE` file from a list of popular open-source licenses (MIT, Apache 2.0, GPLv3, and more) with your name and the current year.
27+
- 🙈 **`.gitignore` Creation:** Bootstrap a robust `.gitignore` file with sensible defaults for Python projects, and easily append your own custom rules.
28+
2229
## Installation
2330

2431
DiffCraft is available on PyPI and can be installed with a single pip command.
@@ -43,10 +50,7 @@ This method is easy and keeps your API key specific to your project.
4350
GEMINI_API_KEY="YOUR_API_KEY_HERE"
4451
```
4552
🔒 Important Security Note
46-
Remember to add the .env file to your project's .gitignore to ensure your secret API key is never committed to your repository! If your .gitignore doesn't have it, add this line:
47-
```code
48-
.env
49-
```
53+
Remember to add `.env` file to ensure your secret API key is never committed to your repository!
5054

5155
### Method 2: Environment Variable (Advanced)
5256

@@ -71,43 +75,65 @@ set GEMINI_API_KEY="YOUR_API_KEY_HERE"
7175
*For permanent setup on Windows, search for "Edit the system environment variables" in the Start Menu. You will need to close and reopen your terminal for the changes to take effect.*
7276

7377
## Usage
74-
The workflow is designed to be seamless.
78+
DiffCraft provides two primary commands: `craft` for commits and `gencraft` for file generation.
7579

76-
1. Stage your files as you normally would:
77-
```Bash
78-
git add README.md
79-
git add .
80-
git add src/
81-
```
82-
2. Run the craft command:
83-
```Bash
80+
### Using `craft`
81+
The `craft` workflow is designed to be seamless
82+
1. Stage your files as you normally would: (`git add ...`)
83+
2. Run the `craft` command
84+
```bash
85+
# Generate a commit for already-staged changes
8486
craft
85-
```
86-
This will generate a commit message and present you with the interactive prompt.
8787

88-
Or,
89-
```Bash
90-
craft README.md
88+
# Stage all files and then generate a commit
9189
craft .
92-
craft src/
90+
91+
# Stage specific files and generate a commit
92+
craft src/main.py
9393
```
94-
This will both stage the files and generate a commit message.
95-
### Command-Line Options
96-
For a full list of commands and detailed explanations, use the `--help` flag:
94+
This will generate a commit message and present you with the interactive prompt.
95+
96+
### `craft` Command-Line Options
9797
```Bash
98+
# Generate a 'fix' commit and open it directly in your editor
99+
craft --type fix --edit
100+
101+
# Generate a commit in Spanish using the last 3 commits for context
102+
craft --lang Spanish --history 3
103+
104+
# For a full list of commands, use the --help flag
98105
craft --help
99106
```
100-
**Example: Generate a 'fix' commit and edit it immediately**
101-
```Bash
102-
craft --type fix --edit
107+
### Using `gencraft`
108+
The `gencraft` command helps you create essential project files.
109+
Generate a `.gitignore`
110+
```bash
111+
# Create a .gitignore with Python defaults
112+
gencraft gitignore
113+
114+
# Add custom entries to the .gitignore
115+
gencraft gitignore node_modules/ .env.local
103116
```
104-
**Example: Generate a commit in Spanish using the last 3 commits for context**
105-
```Bash
106-
craft --lang Spanish --history 3
117+
If a `.gitignore` already exists, gencraft will intelligently append new rules.
118+
### Generate a `LICENSE` file
119+
```bash
120+
# See a list of available licenses
121+
gencraft license
122+
123+
# Generate an MIT license (will prompt for author name)
124+
gencraft license mit
107125
```
126+
### Generate a `README.md`
127+
```bash
128+
# Let the AI scan your project and generate a standard README
129+
gencraft readme
108130

131+
# Provide the AI with a custom prompt for more specific results
132+
gencraft readme "A short and friendly one-paragraph readme"
133+
```
109134
## Contributing
110135
Found a bug or have a feature request? We'd love your help! Please open an issue or submit a pull request on our [GitHub Repository](https://github.com/bvrvl/diffcraft)
111136

137+
> Led and maintained by [@bvrvl](https://github.com/bvrvl/)
112138
## License
113139
This project is licensed under the MIT License. See the LICENSE file for details.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "DiffCraft"
7-
version = "2.1.1"
7+
version = "2.1.2"
88
authors = [
99

1010
{ name="Saurabh Baral (bvrvl)", email="saurabh@bvrvl.com" },

0 commit comments

Comments
 (0)