Crates.io | larn |
lib.rs | larn |
version | 0.1.2 |
source | src |
created_at | 2024-10-21 04:27:10.97014 |
updated_at | 2024-10-21 13:42:36.671414 |
description | Larn is a command-line tool designed to help software engineers improve their coding skills through AI-driven feedback. It analyzes code changes, identifies areas of improvement, and generates personalized programming exercises. |
homepage | |
repository | |
max_upload_size | |
id | 1416910 |
size | 52,162 |
Larn is a command-line tool designed to help software engineers improve their coding skills through AI-driven feedback. It analyzes code changes, identifies areas of improvement, and generates personalized programming exercises based on those weaknesses.
To run this project, you will need:
Install Larn via Cargo:
Run the following command to install Larn globally:
cargo install larn
Set up Redis:
Make sure Redis is installed and running on your local machine.
Initialize a Git repository:
Larn requires an initialized Git repository to track code changes. In the root directory of your project, run:
git init
Set up GPT-4 API:
You need to have access to the GPT-4 API. Set up your environment variable for the API key:
export OPENAI_API_KEY="your-gpt4-api-key"
Larn provides two main commands: add
and learn
.
add
CommandThis command collects code changes from the current directory and retrieves feedback.
larn add
What happens:
.rs
, .py
, .js
, .cpp
, etc.).git diff
to capture modifications (hence, Git initialization is required).learn
CommandThis command generates programming challenges based on previous feedback.
larn learn
What happens:
add
command to get feedback on those changes.learn
command to receive personalized exercises to improve your skills.# Get feedback on code changes
larn add
# Generate a learning exercise based on feedback
larn learn
Larn is configured to work with multiple programming languages, including:
You can modify the supported file extensions in the source code if needed.
Contributions are welcome! If you find any bugs or have feature requests, please open an issue or submit a pull request.
Larn is licensed under the MIT License. See the LICENSE file for more details.
Happy coding with Larn!