Using Crosshatch in iTerm2
Last updated
Last updated
iTerm2 is a popular terminal emulator for macOS that recently introduced several new AI integrations.
Because iTerm's AI features allow you to customize the API base URL, it's simple to set up with Crosshatch.
First, create a free Crosshatch account, and visit the API Keys page.
Generate a new API Key for "iTerm2" and copy the key to your clipboard
Open the iTerm2 "Settings" menu and go to the "AI" tab within "General":
Install the required plugins and check the "Enable Generative AI features" checkbox.
In the "OpenAI API Key" field, enter the Crosshatch API Key you generated in step 2
Next, find the Model Mix from the Crosshatch Mixes directory that you wish to use.
Copy the mix name and the "Base URL" from the Crosshatch site. For this example, we'll use the LMSys Coding Leaderboard mix.
Paste those values into the "Model" and "Custom URL" fields in the iTerm2 settings.
Add /chat/completions
to the end of the Custom URL. The result should look like this:
To test, you can press Edit -> Engage Artificial Intelligence (or ⌘Y
) to bring up an editor where you can ask using human language, or use the "Codecierge" feature in the Toolbelt for a copilot experience.
Now you're free to use the great AI features in iTerm2 with the powerful Model Mixes from Crosshatch!
If something didn't quite work, we're ready to help on Discord and X.