-
Notifications
You must be signed in to change notification settings - Fork 22
Update README.md #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Update README.md #43
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,28 @@ | ||
| # Codeflash | ||
|  | ||
| <p align="center"> | ||
| <a href="https://github.com/codeflash-ai/codeflash"> | ||
| <img src="https://img.shields.io/github/commit-activity/m/codeflash-ai/codeflash" alt="GitHub commit activity"> | ||
| </a> | ||
| <a href="https://pypi.org/project/codeflash/"> | ||
| <img src="https://img.shields.io/pypi/dm/codeflash" alt="PyPI Downloads"> | ||
| </a> | ||
| <a href="https://pypi.org/project/codeflash/"> | ||
| <img src="https://img.shields.io/pypi/v/codeflash?label=PyPI%20version" alt="PyPI Downloads"> | ||
| </a> | ||
| </p> | ||
|
|
||
| Codeflash is an AI optimization tool that automatically improves the performance of your Python code while maintaining its correctness. | ||
| [Codeflash](https://www.codeflash.ai) is a general purpose optimizer for Python that automatically improves the performance of your Python code while maintaining its correctness. | ||
| It uses advanced LLMs to generate multiple optimization ideas for your code, tests them to be correct and benchmarks them for performance. It then creates merge-ready pull requests containing the best optimization found, which you can review and merge. | ||
|
|
||
|  | ||
| How to use Codeflash - | ||
| - Optimize an entire existing codebase by running `codeflash --all` | ||
| - Automate optimizing all __future__ code you will write by installing Codeflash as a GitHub action. | ||
| - Optimize a Python workflow end-to-end by tracing the workflow. | ||
|
|
||
| ## Features | ||
| Codeflash is used by top engineering teams at [Pydantic](https://github.com/pydantic/pydantic/pulls?q=is%3Apr+author%3Amisrasaurabh1+is%3Amerged), [Langflow](https://github.com/langflow-ai/langflow/issues?q=state%3Aclosed%20is%3Apr%20author%3Amisrasaurabh1), [Albumentations](https://github.com/albumentations-team/albumentations/issues?q=state%3Amerged%20is%3Apr%20author%3Akrrt7%20OR%20state%3Amerged%20is%3Apr%20author%3Aaseembits93%20) and many others to ship performant, expert level code. | ||
|
|
||
| Codeflash is great at optimizing AI Agents, Computer Vision algorithms, numerical code, backend code or anything else you might write with Python. | ||
|
|
||
| - Automatically optimizes your code using AI | ||
| - Maintains code correctness through extensive testing | ||
| - Opens a pull request for each optimization | ||
| - Continuously optimizes your codebase through CI | ||
| - Dynamically optimizes your real workflows through tracing | ||
|
|
||
| ## Installation | ||
|
|
||
|
|
@@ -19,38 +31,44 @@ To install Codeflash, run: | |
| ``` | ||
| pip install codeflash | ||
| ``` | ||
|
|
||
| Add codeflash as a development time dependency if you are using package managers like uv or poetry. | ||
| ## Quick Start | ||
|
|
||
| 1. Configure Codeflash for your project: | ||
| ``` | ||
| codeflash init | ||
| ``` | ||
|
|
||
| 2. Optimize a function: | ||
| 1. To configure Codeflash for a project, at the root directory of your project where the pyproject.toml file is located, run: | ||
| ``` | ||
| codeflash --file path/to/your/file.py --function function_name | ||
| codeflash init | ||
| ``` | ||
| - It will ask you a few questions about your project like the location of your code and tests | ||
| - Ask you to generate an [API Key](https://app.codeflash.ai/app/apikeys) to access Codeflash's LLMs | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It will ask you |
||
| - Install a [GitHub app](https://github.com/apps/codeflash-ai/installations/select_target) to open Pull Requests on GitHub. | ||
| - Ask if you want to setup a GitHub actions which will optimize all your future code. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. setup github actions |
||
| - The codeflash config is then saved in the pyproject.toml file. | ||
|
|
||
| 3. Optimize your entire codebase: | ||
| 2. Optimize your entire codebase: | ||
| ``` | ||
| codeflash --all | ||
| ``` | ||
| This can take a while to run for a large codebase, but it will keep opening PRs as it finds optimizations. | ||
|
|
||
| ## Documentation | ||
| For detailed installation and usage instructions, visit our documentation at [docs.codeflash.ai](https://docs.codeflash.ai) | ||
|
|
||
| ## Demo | ||
|
|
||
| ## Getting the Best Results | ||
|
|
||
| To get the most out of Codeflash: | ||
| - Optimizing the performance of new code for a Pull Request through GitHub Actions. This lets you ship code quickly while ensuring it remains performant. | ||
|
|
||
| 1. Install the Github App and actions workflow | ||
| 2. Find optimizations on your whole codebase with codeflash --all | ||
| 3. Find and optimize bottlenecks with the Codeflash Tracer | ||
| 4. Review the PRs Codeflash opens | ||
| https://github.com/user-attachments/assets/38f44f4e-be1c-4f84-8db9-63d5ee3e61e5 | ||
|
|
||
| ## Support | ||
|
|
||
| ## Learn More | ||
| Join our community for support and discussions. If you have any questions, feel free to reach out to us using one of the following methods: | ||
|
|
||
| - [Codeflash Website](https://www.codeflash.ai) | ||
| - [Documentation](https://docs.codeflash.ai) | ||
| - [Join our Discord](https://www.codeflash.ai/discord) | ||
| - [Follow us on Twitter](https://x.com/codeflashAI) | ||
| - [Follow us on Linkedin](https://www.linkedin.com/in/saurabh-misra/) | ||
| - [Email founders](mailto:[email protected]) | ||
|
|
||
| ## License | ||
|
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code optimizer for python
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that ensures correctness while improving the performance of your python code