Skip to content

Commit 4cf4e9e

Browse files
Merge branch 'main' into lsp/config-suggestions-configured-values
2 parents 79a4a4a + 3a0f372 commit 4cf4e9e

File tree

2 files changed

+24
-19
lines changed

2 files changed

+24
-19
lines changed

codeflash/code_utils/env_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def get_codeflash_api_key() -> str:
7676
# within the same process, the environment variable could become outdated.
7777
api_key = shell_api_key or env_api_key if is_LSP_enabled() else env_api_key or shell_api_key
7878

79-
api_secret_docs_message = "For more information, refer to the documentation at [https://docs.codeflash.ai/getting-started/codeflash-github-actions#add-your-api-key-to-your-repository-secrets]." # noqa
79+
api_secret_docs_message = "For more information, refer to the documentation at [https://docs.codeflash.ai/optimizing-with-codeflash/codeflash-github-actions#manual-setup]." # noqa
8080
if not api_key:
8181
msg = (
8282
"I didn't find a Codeflash API key in your environment.\nYou can generate one at "

docs/getting-started/local-installation.mdx

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -55,20 +55,6 @@ poetry add codeflash@latest --group dev
5555
</Tip>
5656
</Step>
5757

58-
<Step title="Generate a Codeflash API Key">
59-
Codeflash uses cloud-hosted AI models and integrations with GitHub. You'll need an API key to authorize your access.
60-
61-
1. Visit the [Codeflash Web App](https://app.codeflash.ai/)
62-
2. Sign up with your GitHub account (free)
63-
3. Navigate to the [API Key](https://app.codeflash.ai/app/apikeys) page to generate your API key
64-
65-
<Note>
66-
**Free Tier Available**
67-
68-
Codeflash offers a **free tier** with a limited number of optimizations. Perfect for trying it out on small projects!
69-
</Note>
70-
</Step>
71-
7258
<Step title="Run Automatic Configuration">
7359
Navigate to your project's root directory (where your `pyproject.toml` file is or should be) and run:
7460

@@ -95,13 +81,25 @@ When running `codeflash init`, you will see the following prompts:
9581
5. Which test framework do you use? (pytest/unittest)
9682
6. Install GitHub actions for Continuous optimization?
9783
```
84+
85+
After you have answered these questions, the Codeflash configuration will be saved in the `pyproject.toml` file.
9886
</Step>
99-
</Steps>
10087

101-
After you have answered these questions, the Codeflash configuration will be saved in the `pyproject.toml` file.
102-
To understand the configuration options, and set more advanced options, see the [Manual Configuration](/configuration) page.
88+
<Step title="Generate a Codeflash API Key">
89+
Codeflash uses cloud-hosted AI models and integrations with GitHub. If you haven't created one already, you'll need to create an API key to authorize your access.
10390

104-
### Step 4: Install the Codeflash GitHub App
91+
1. Visit the [Codeflash Web App](https://app.codeflash.ai/)
92+
2. Sign up with your GitHub account (free)
93+
3. Navigate to the [API Key](https://app.codeflash.ai/app/apikeys) page to generate your API key
94+
95+
<Note>
96+
**Free Tier Available**
97+
98+
Codeflash offers a **free tier** with a limited number of optimizations. Perfect for trying it out on small projects!
99+
</Note>
100+
</Step>
101+
102+
<Step title="Install the Codeflash GitHub App">
105103

106104
{/* TODO: Justify to users Why we need the user to install Github App even in local Installation or local optimization? */}
107105
Finally, if you have not done so already, Codeflash will ask you to install the GitHub App in your repository.
@@ -110,6 +108,13 @@ The Codeflash GitHub App allows access to your repository to the codeflash-ai bo
110108
Please [install the Codeflash GitHub
111109
app](https://github.com/apps/codeflash-ai/installations/select_target) by choosing the repository you want to install
112110
Codeflash on.
111+
</Step>
112+
113+
114+
</Steps>
115+
116+
To understand the configuration options, and set more advanced options, see the [Manual Configuration](/configuration) page.
117+
113118

114119
## Try It Out!
115120

0 commit comments

Comments
 (0)