Getting Started Locally
Deploying Foyle locally is the quickest, easiest way to try out Foyle.
Installation
Prerequisites: VSCode & RunMe
Foyle relies on VSCode and Runme.dev to provide the frontend.
- If you don’t have VSCode visit the downloads page and install it
- Follow Runme.dev instructions to install the RunMe.dev extension in vscode
Install Foyle
Download the latest release from the releases page
On Mac you may need to remove the quarantine attribute from the binary
xattr -d com.apple.quarantine /path/to/foyle
Setup
Configure your OpenAPI key
foyle config set openai.apiKeyFile=/path/to/openai/apikey
- If you don’t have a key, go to OpenAI to obtain one
Start the server
foyle serve
By default foyle uses port 8877 for the http server
If you need to use a different port you can configure this as follows
foyle config set server.httpPort=<YOUR HTTP PORT>
Inside VSCode configure RunMe to use Foyle
- Open the VSCode settings palette
- Search for
Runme > Experiments: Ai Auto Cell
- Check the box to set the option to true
- Search for
Runme: Ai Base URL
- Set the address to
http://localhost:${HTTP_PORT}/api
- The default port is 8877
- If you set a non default value then it will be the value of
server.httpPort
Try it out!
Now that foyle is running you can open markdown documents in VSCode and start interacting with foyle.
Inside VSCode Open a markdown file or create a notebook; this will open the notebook inside RunMe
- Refer to RunMe’s documentation for a walk through of RunMe’s UI
- If the notebook doesn’t open in RunMe
- right click on the file and select “Open With”
- Select the option “Run your markdown” to open it with RunMe
You can now add code and notebook cells like you normally would in vscode
To ask Foyle for help do one of the following
- Open the command pallet and search for
Foyle generate a completion
- Use the shortcut key:
- “win;” - on windows
- “cmd;” - on mac
- Open the command pallet and search for
Customizing Foyle VSCode Extension Settings
Customizing the Foyle Server Address
- Open the settings panel; you can click the gear icon in the lower left window and then select settings
- Search for `Runme: Ai base URL
- Set
Runme: Ai base URL
to the address of the Foyle server to use as the Agent- The Agent handles requests to generate completions
Customizing the keybindings
If you are unhappy with the default key binding to generate a completion you can change it as follows
- Click the gear icon in the lower left window and then select “Keyboard shortcuts”
- Search for “Foyle”
- Change the keybinding for
Foyle: generate a completion
to the keybinding you want to use
Where to go next
- Learning from feedback - How to improve the AI with human feedback.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.