Comparing version
{ | ||
"name": "aicommits", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Writes your git commit messages for you with AI", | ||
@@ -17,3 +17,3 @@ "keywords": [ | ||
], | ||
"bin": "dist/cli.mjs", | ||
"bin": "./dist/cli.mjs", | ||
"scripts": { | ||
@@ -23,3 +23,4 @@ "prepare": "simple-git-hooks", | ||
"lint": "eslint --cache .", | ||
"type-check": "tsc" | ||
"type-check": "tsc", | ||
"prepack": "pnpm build" | ||
}, | ||
@@ -50,4 +51,20 @@ "simple-git-hooks": { | ||
"eslintConfig": { | ||
"extends": "@pvtnbr" | ||
"extends": "@pvtnbr", | ||
"rules": { | ||
"unicorn/no-process-exit": "off" | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": "./src/commands/prepare-commit-msg-hook.ts", | ||
"rules": { | ||
"unicorn/prevent-abbreviations": "off" | ||
} | ||
} | ||
] | ||
}, | ||
"release": { | ||
"branches": [ | ||
"main" | ||
] | ||
} | ||
} |
@@ -8,5 +8,2 @@ <div align="center"> | ||
<a href="https://www.npmjs.com/package/aicommits"><img src="https://img.shields.io/npm/v/aicommits" alt="Current version"></a> | ||
<a href="https://twitter.com/nutlope"> | ||
<img src="https://img.shields.io/twitter/follow/nutlope?style=flat&label=nutlope&logo=twitter&color=0bf&logoColor=fff" alt="Hassan Twitter follower count" /> | ||
</a> | ||
</div> | ||
@@ -16,24 +13,29 @@ | ||
## Installation and Usage | ||
## Setup | ||
1. Install the CLI: | ||
> The minimum supported version of Node.js is the latest v14. Check your Node.js version with `node --version`. | ||
```sh | ||
npm install -g aicommits | ||
``` | ||
1. Install _aicommits_: | ||
```sh | ||
npm install -g aicommits | ||
``` | ||
2. Retrieve your API key from [OpenAI](https://platform.openai.com/account/api-keys) | ||
> Note: If you haven't already, you'll have to create an account and set up billing. | ||
> Note: If you haven't already, you'll have to create an account and set up billing. | ||
3. Set the key so aicommits can use it: | ||
```sh | ||
echo "OPENAI_KEY=<your token>" >> ~/.aicommits | ||
``` | ||
```sh | ||
aicommits config set OPENAI_KEY=<your token> | ||
``` | ||
4. You're ready to go! | ||
This will create a `.aicommits` file in your home directory. | ||
Run `aicommits` in any Git repo and it will generate a commit message for you. | ||
4. Start committing! | ||
Go make some changes in any Git repo, stage them, run `aicommits`, and see your AI generated message! | ||
## How it works | ||
@@ -60,3 +62,5 @@ | ||
- **Hassan El Mghari**: [GitHub](https://github.com/Nutlope) | [Twitter](https://twitter.com/nutlope) | ||
- **Hiroki Osame**: [GitHub](https://github.com/privatenumber) | [Twitter](https://twitter.com/privatenumbr) | ||
- **Hassan El Mghari**: [@Nutlope](https://github.com/Nutlope) [<img src="https://img.shields.io/twitter/follow/nutlope?style=flat&label=nutlope&logo=twitter&color=0bf&logoColor=fff" align="center">](https://twitter.com/nutlope) | ||
- **Hiroki Osame**: [@privatenumber](https://github.com/privatenumber) [<img src="https://img.shields.io/twitter/follow/privatenumbr?style=flat&label=privatenumbr&logo=twitter&color=0bf&logoColor=fff" align="center">](https://twitter.com/privatenumbr) |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
299815
1.43%1194
1.62%64
6.67%