diff --git a/codeflash/code_utils/env_utils.py b/codeflash/code_utils/env_utils.py index f4991bef0..d74c99408 100644 --- a/codeflash/code_utils/env_utils.py +++ b/codeflash/code_utils/env_utils.py @@ -76,7 +76,7 @@ def get_codeflash_api_key() -> str: # within the same process, the environment variable could become outdated. api_key = shell_api_key or env_api_key if is_LSP_enabled() else env_api_key or shell_api_key - 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 + 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 if not api_key: msg = ( "I didn't find a Codeflash API key in your environment.\nYou can generate one at " diff --git a/docs/getting-started/local-installation.mdx b/docs/getting-started/local-installation.mdx index 9474bb014..ab4952974 100644 --- a/docs/getting-started/local-installation.mdx +++ b/docs/getting-started/local-installation.mdx @@ -55,20 +55,6 @@ poetry add codeflash@latest --group dev - -Codeflash uses cloud-hosted AI models and integrations with GitHub. You'll need an API key to authorize your access. - -1. Visit the [Codeflash Web App](https://app.codeflash.ai/) -2. Sign up with your GitHub account (free) -3. Navigate to the [API Key](https://app.codeflash.ai/app/apikeys) page to generate your API key - - -**Free Tier Available** - -Codeflash offers a **free tier** with a limited number of optimizations. Perfect for trying it out on small projects! - - - Navigate to your project's root directory (where your `pyproject.toml` file is or should be) and run: @@ -95,10 +81,38 @@ When running `codeflash init`, you will see the following prompts: 5. Which test framework do you use? (pytest/unittest) 6. Install GitHub actions for Continuous optimization? ``` + + After you have answered these questions, the Codeflash configuration will be saved in the `pyproject.toml` file. + + +Codeflash uses cloud-hosted AI models and integrations with GitHub. You'll need an API key to authorize your access. + +1. Visit the [Codeflash Web App](https://app.codeflash.ai/) +2. Sign up with your GitHub account (free) +3. Navigate to the [API Key](https://app.codeflash.ai/app/apikeys) page to generate your API key + + +**Free Tier Available** + +Codeflash offers a **free tier** with a limited number of optimizations. Perfect for trying it out on small projects! + + + + + +{/* TODO: Justify to users Why we need the user to install Github App even in local Installation or local optimization? */} +Finally, if you have not done so already, Codeflash will ask you to install the GitHub App in your repository. +The Codeflash GitHub App allows access to your repository to the codeflash-ai bot to open PRs, review code, and provide optimization suggestions. + +Please [install the Codeflash GitHub +app](https://github.com/apps/codeflash-ai/installations/select_target) by choosing the repository you want to install +Codeflash on. + + + -After you have answered these questions, the Codeflash configuration will be saved in the `pyproject.toml` file. To understand the configuration options, and set more advanced options, see the [Manual Configuration](/configuration) page. ### Step 4: Install the Codeflash GitHub App