Installation
How to install the Weco CLI
Prerequisites
The weco
CLI currently supports Python version 3.8 and above.
Installation
Install the weco
CLI using pip
:
Install from source:
Tip: We recommend using a virtual environment.
API Key Configuration
Weco requires API keys for the Large Language Models (LLMs) it uses internally. Set the following environment variables based on the LLM you want to use:
-
OpenAI:
-
Anthropic:
-
Google DeepMind:
Google AI Studio has a free API usage quota. Create a key here to use
weco
for free.
Weco Account (Optional)
To associate your optimization runs with your Weco account and view them on the Weco dashboard, you can log in.
Login Process
Weco uses a device authentication flow:
- When you first run
weco run
, you'll be prompted if you want to log in or proceed anonymously. - If you choose to log in (by pressing
l
), you'll be shown a URL andweco
will attempt to open it in your default web browser. - You then authenticate in the browser. Once authenticated, the CLI will detect this and complete the login.
- This saves a Weco-specific API key locally (typically at
~/.config/weco/credentials.json
).
If you choose to skip login (by pressing Enter or s
), weco
will still function using the environment variable LLM keys, but the run history will not be linked to a Weco account.
Logging Out
To log out and remove your saved Weco API key, use the following command:
Next Steps
Once you've installed Weco and configured your API keys, you're ready to start optimizing your code:
- Check out the Getting Started guide to learn how to use the Weco CLI
- Check out the CLI Reference to learn more about the commands and options available
- Explore our Examples to see Weco in action