BoltAI Blog
BoltAI HomepageBlogDocumentation
  • BoltAI Blog
  • What is ChatGPT o1? Understanding Its Features, Benefits, and Uses
  • Claude 3.5 Sonnet vs GPT-4o: A Comprehensive Comparison
  • ChatGPT API Cost: Features, Plans, Pros and Cons
  • How to Use ChatGPT API: A Comprehensive Guide
  • Top AI Tools for Developers: Boost Productivity and Code Smarter
  • How to Run LLM Locally on Mac: A Step-by-Step Guide
  • How to Use ChatGPT as a Search Engine: A Complete Guide
  • ChatGPT vs Claude: Which AI Tool Fits Your Needs?
  • ChatGPT vs Gemini: Which AI Tool Is Right For You?
  • Perplexity vs. ChatGPT: Our In-Depth Comparison
  • How to Train ChatGPT on Your Own Data: Enhance AI Accuracy & Relevance
  • DeepSeek vs. ChatGPT: Which AI Model Is Right for You?
  • Exploring the Top 10 ChatGPT Alternatives for Better AI Conversations in 2025
  • Top 7 AI Tools for Students to Boost Productivity and Success in 2025
  • How to Get a ChatGPT API Key: Step-by-Step Guide
  • Tech Stack Analysis for a Cross-Platform Offline-First AI Chat Client
  • BoltAI Projects, DeepSeek support and more
  • A Developer’s Guide to Bard vs. ChatGPT for Coding
  • ChatGPT Keyboard Shortcuts for Mac: Enhance Your Workflow with Quick Commands
  • ChatGPT for Programmers: How to Boost Productivity and Efficiency
  • Here’s Our Step-by-Step Guide on How to Use Mistral 7B
  • Claude vs. ChatGPT for Coding: Which AI Assistant is Best for You?
  • Amazon Bedrock & xAI support, cache breakpoint and more
  • Advanced Voice Mode, Improved Document Analysis and more
  • How to use local Whisper instance in BoltAI
  • Optimize Ollama Models for BoltAI
  • How to use xAI in BoltAI?
  • How BoltAI handles your API keys
  • How to build an AI Coding Assistant with BoltAI
  • Best Black Friday Deals 2024 for Mac
  • A simple A/B testing setup with Simple Analytics
Powered by GitBook
On this page
  • Set up the Gilfoyle AI
  • Use it in your favorite text editor
  • Advanced Configuration
  • How does it work under the hood?
  • And that's it for now

Was this helpful?

How to build an AI Coding Assistant with BoltAI

Build your own AI Assistants in 2 minutes

PreviousHow BoltAI handles your API keysNextBest Black Friday Deals 2024 for Mac

Last updated 7 months ago

Was this helpful?

BoltAI's inline feature is very powerful. It allows you create your own AI Assistants that work across multiple mac apps.

In this post, I'm going to build an AI Coding Assistant called Gilfoyle AI with BoltAI

PREREQUISITE:

This feature requires the macOS Accessibility Permission. If you haven't granted the permission yet, follow .

Set up the Gilfoyle AI

This is the preferred way to create an AI Assistant. To start, go to Settings > Commands. Click the Plus button at the bottom left, and fill the form as follow:

  1. Label: Give it a friendly name. Let's call him "Gilfoyle AI".

  2. Template: Enter the prompt template. I use a this simple prompt template below.

  3. Behavior: Select "Replace current selection".

  4. API Provider & Model: Select the AI service & model you want to use. Personally, I find Claude 3.5 Sonnet is the best at coding tasks.

  5. Icon: Give it an easy to recognize icon.

  6. Click "Add Command"

Promtp Template:

Finish the code below.
Strictly answer with the new code, do not explain.
Do not wrap the code inside backticks.

```
{input}
```

Sweet. Now you should find the newly added AI Command. Double-clicking it to edit advanced configurations. Assign a keyboard shortcut to this command. I use Command+Shift+Option+G

Use it in your favorite text editor

Now your Gilfoyle AI is ready to use. Open your favorite text editor and find the piece of code you want to help with.

  1. Write your prompt in the comment section.

  2. Highlight your prompt and relevant code.

  3. Press the trigger keyboard you set previously. BoltAI should show a loading indicator and paste the AI answer back in the editor.

In this demo video, I convert the whole file from JavaScript to TypeScript in VSCode. I've tested with multiple other text editors, including Xcode and Android Studio. If it doesn't work on your favorite editor, please let me know.

Advanced Configuration

So you're a power user? No problem. BoltAI allows you to customize multiple parameters to tweak the AI response to your liking.

Edit the AI Command, navigate to tab "Advanced". Here you can customize the System Instruction, other GPT paramers such as temperature, max tokens and others...

How does it work under the hood?

After you trigger the keyboard shortcut, BoltAI does the following:

  1. BoltAI reads the content you've highlighted. It may use either Accessibility API or Clipboard API to do it. You can customize this behavior per app in Settings > Advanced > App Specific Settings.

  2. It takes your Prompt Template and replaces the placeholder {input} with the highlighted text. Protip: you can use {clipboard} placeholder for content in your clipboard instead.

  3. Then it sends the request to the AI service/model that we've configured.

  4. Then finally, it attempts to paste the AI answer back into the original app.

And that's it for now

Have a wonderful weekend 👋

this guide
Create a new AI Command
AI Command Keyboard Shortcut