Skip to content

Commit 92f1e96

Browse files
authored
Initialize (#1)
* CLI, config and pr generation * Repo setup * README * README * README * Improve config command * New version and fix config command in readme
1 parent 03eefd3 commit 92f1e96

15 files changed

+2667
-0
lines changed

.flake8

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[flake8]
2+
max-line-length = 88
3+
extend-ignore = E203

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,3 +158,6 @@ cython_debug/
158158
# and can be added to the global gitignore or merged into this file. For a more nuclear
159159
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
160160
#.idea/
161+
162+
.credentials.json
163+
.vscode

.pre-commit-config.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.0.1
4+
hooks:
5+
- id: check-added-large-files
6+
- id: check-toml
7+
- id: check-yaml
8+
- id: end-of-file-fixer
9+
- id: trailing-whitespace
10+
- repo: https://github.com/pycqa/isort
11+
rev: 5.12.0
12+
hooks:
13+
- id: isort
14+
name: isort
15+
- repo: https://github.com/psf/black
16+
# Replace by any tag/version:
17+
# https://github.com/psf/black/tags
18+
rev: 23.3.0
19+
hooks:
20+
- id: black
21+
language_version: python3
22+
- repo: https://github.com/pycqa/flake8
23+
rev: 6.0.0 # pick a git hash / tag to point to
24+
hooks:
25+
- id: flake8
26+
- repo: https://github.com/pre-commit/mirrors-mypy
27+
rev: v0.910-1
28+
hooks:
29+
- id: mypy
30+
# - repo: local
31+
# hooks:
32+
# - id: pytest
33+
# name: Check pytest unit tests pass
34+
# # entry: poetry run duty test
35+
# entry: poetry run duty test
36+
# pass_filenames: false
37+
# language: system
38+
# types: [python]
39+
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
40+
rev: v2.8.0
41+
hooks:
42+
- id: pretty-format-toml
43+
args: [--autofix]
44+
- id: pretty-format-yaml
45+
args: [--autofix]
46+
exclude: .copier-answers.yml
47+
# based on
48+
# https://gitlab.com/smop/pre-commit-hooks/-/blob/master/.pre-commit-hooks.yaml
49+
- repo: local
50+
hooks:
51+
- id: check-poetry
52+
name: Poetry check
53+
description: Validates the structure of the pyproject.toml file
54+
entry: poetry check
55+
language: system
56+
pass_filenames: false
57+
files: pyproject.toml

README.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# LazyCodr 🚀
2+
3+
A CLI tool designed to help lazy coders get their work done with AI! LazyCodr automates tasks such as generating pull requests, and more, using our beloved AI models.
4+
5+
## Features 💡
6+
7+
- Generate pull request descriptions
8+
- Automate commit messages (incoming ...)
9+
- Easy configuration
10+
- Works with GitHub API
11+
- Powered by LLMs (for now only OpenAI)
12+
13+
## Installation 💻
14+
15+
```bash
16+
pip install lazycodr
17+
```
18+
19+
## Requirements 🔑
20+
21+
Before you can use LazyCodr, you'll need to create an OpenAI API key and a GitHub token. Here's how to do both:
22+
23+
### OpenAI API Key
24+
25+
1. Sign up for an account on the [OpenAI website](https://beta.openai.com/signup/) if you don't have one already.
26+
2. Once logged in, go to the [API Keys page](https://beta.openai.com/account/api-keys).
27+
3. Click on "Create an API key" and copy the generated key.
28+
29+
### GitHub Token
30+
31+
1. Log in to your GitHub account and go to the [Personal Access Tokens page](https://github.com/settings/tokens).
32+
2. Click on "Generate new token" in the top right corner.j
33+
3. Give your token a descriptive name and select the required scopes (for LazyCodr, you'll need `repo` and `user` scopes.
34+
4. Click "Generate token" at the bottom of the page and copy the generated token.
35+
36+
After you have both your OpenAI API key and GitHub token, you can configure LazyCodr by running the following command:
37+
38+
```bash
39+
lazycodr config credentials
40+
```
41+
42+
This command will prompt you to enter your API key and GitHub token, which will be securely stored for future use.
43+
44+
Now you're all set to use LazyCodr! 🚀
45+
46+
47+
## Usage 📚
48+
49+
1. Configure LazyCodr with your OpenAI API key and GitHub token:
50+
51+
```bash
52+
lazycodr config credentials
53+
```
54+
55+
2. Use LazyCodr to generate a pull request description:
56+
57+
```bash
58+
lazycodr pr generate <repo_name> <pr_number>
59+
```
60+
61+
## Roadmap 🗺️
62+
63+
> "A lazy programmer is a great programmer"
64+
65+
We're on a mission to make all of us even lazier 😅!
66+
There is no clear roadmap, but here are some ideas for LazyCodr's future:
67+
68+
🚀 **Commit Message Generation**: <br />
69+
Automatically generate meaningful commit messages based on your code changes, so you can save time and focus on coding.
70+
71+
🚀 **Codebase Conversations**: <br />
72+
Chat with your codebase to get AI-powered recommendations and insights about your code, helping you make informed decisions as you work.
73+
74+
🚀 **AI-driven Guidance**: <br />
75+
Receive step-by-step guidance from AI on how to write new features or implement specific functionality, making it easier to tackle challenging tasks.
76+
77+
🚀 **README Generation**: <br />
78+
Automatically generate well-structured and informative README files for your projects, ensuring that your documentation is always up to date.
79+
80+
🚀🚀 ... replace yourself entirely so you can take 10 jobs in parallel 🤑🤑🤑
81+
82+
Remember, even though I'm aiming to make you the laziest 😜 programmer possible, I still appreciate your help.
83+
If you have any ideas, suggestions, or improvements, feel free to contribute and help make LazyCodr even better for your fellow lazy programmers.
84+
85+
Together, we can redefine the art of lazy programming! 😎
86+
87+
## Contributing 🤝
88+
89+
Contributions are welcome! Feel free to submit a pull request or open an issue.
90+
91+
## License 📄
92+
93+
This project is licensed under the [MIT License](LICENSE).
94+
95+
Happy coding! 🎉

0 commit comments

Comments
 (0)