Skip to content

Commit 8d035d8

Browse files
committed
improvements to the readme
1 parent 3aae8c2 commit 8d035d8

File tree

1 file changed

+25
-14
lines changed

1 file changed

+25
-14
lines changed

README.md

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,18 @@
1111
</a>
1212
</p>
1313

14-
[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.
15-
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.
14+
[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.
1615

17-
How to use Codeflash -
18-
- Optimize an entire existing codebase by running `codeflash --all`
19-
- Automate optimizing all __future__ code you will write by installing Codeflash as a GitHub action.
16+
How Codeflash works:
17+
1. LLMs generate multiple optimization candidates for your code
18+
2. Codeflash tests the optimization candidates for correctness
19+
3. Codeflash benchmarks the optimization candidates for performance
20+
21+
Should the optimization be valid and faster than the original code, Codeflash will create a pull request with the optimized code. You can now review and merge the code to make your codebase faster!
22+
23+
Ways to use Codeflash:
24+
- Optimize an entire codebase by running `codeflash --all`
25+
- Automatically optimize all __future__ code written by installing Codeflash as a GitHub action. Codeflash will try to optimize your new code before you merge it into the codebase.
2026
- Optimize a Python workflow end-to-end by tracing the workflow.
2127

2228
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.
@@ -35,21 +41,26 @@ Add codeflash as a development time dependency if you are using package managers
3541
## Quick Start
3642

3743

38-
1. To configure Codeflash for a project, at the root directory of your project where the pyproject.toml file is located, run:
44+
1. Run the following command at the root directory of your project where the pyproject.toml file is located
3945
```
4046
codeflash init
4147
```
42-
- It will ask you a few questions about your project like the location of your code and tests
43-
- Ask you to generate an [API Key](https://app.codeflash.ai/app/apikeys) to access Codeflash's LLMs
44-
- Install a [GitHub app](https://github.com/apps/codeflash-ai/installations/select_target) to open Pull Requests on GitHub.
45-
- Ask if you want to setup a GitHub actions which will optimize all your future code.
46-
- The codeflash config is then saved in the pyproject.toml file.
47-
48-
2. Optimize your entire codebase:
48+
This will set up basic configurations for your project, eg:
49+
- Input a Codeflash API key (for access to LLMs)
50+
- Enable a [GitHub app](https://github.com/apps/codeflash-ai/installations/select_target) to open Pull Requests on the repo
51+
- [Optional] Setup a GitHub actions which will optimize all your future code.
52+
53+
54+
55+
2. Optimize a file:
56+
57+
```
58+
codeflash --file <path/to/file.py>
4959
```
60+
3. Optimize your entire codebase: (This will run for a while and open PRs as it finds optimizations)
61+
```
5062
codeflash --all
5163
```
52-
This can take a while to run for a large codebase, but it will keep opening PRs as it finds optimizations.
5364

5465
## Documentation
5566
For detailed installation and usage instructions, visit our documentation at [docs.codeflash.ai](https://docs.codeflash.ai)

0 commit comments

Comments
 (0)