A beautiful, native SwiftUI macOS application for interacting with xAI's Grok AI model.
- Native macOS app built with SwiftUI
- Clean, modern chat interface
- Multiple chat sessions with history
- Real-time streaming responses
- Secure API key storage
- Customizable settings (model selection, temperature, font size)
- Full keyboard shortcuts support
- Dark mode support
- macOS 13.0 or later
- xAI API key (get yours at console.x.ai)
- Xcode 14.0+ (for building from source)
-
Open the pre-built app:
cd GrokChat open GrokChat.app -
On first launch, go to Settings (⌘,) and add your xAI API key
-
Start chatting with Grok!
-
Clone or download this repository
-
Build and run:
cd GrokChat ./build.sh open GrokChat.app
-
Open Terminal and run:
cd GrokChat swift package generate-xcodeproj open GrokChat.xcodeproj -
Build and run in Xcode (⌘R)
- Get your API key from console.x.ai
- Open GrokChat
- Go to Preferences (⌘,)
- Navigate to the API tab
- Enter your API key
During the beta period, you get $25 of free API credits per month.
grok-beta(default)grok-2(coming soon)grok-2-mini(coming soon)
- New Chat: ⌘N
- Settings: ⌘,
- Send Message: Return
- Copy Message: Right-click on any message
- Chat History: All conversations are saved locally
- Search: Find previous conversations quickly
- Streaming: See responses as they're generated
- Temperature Control: Adjust response creativity (0.0 - 2.0)
GrokChat/
├── Sources/
│ ├── Models/ # Data models
│ ├── Views/ # SwiftUI views
│ ├── ViewModels/ # View models
│ ├── Services/ # API service
│ └── GrokChatApp.swift
├── Package.swift
├── build.sh
└── README.md
To create a release build:
swift build -c releaseThe executable will be in .build/release/GrokChat
- Ensure your API key is valid and has available credits
- Check your internet connection
- Verify the API endpoint is accessible
- Ensure you have Xcode Command Line Tools installed
- Run
xcode-select --installif needed - Make sure you're on macOS 13.0 or later
This project is provided as-is for educational and personal use.
Built with SwiftUI and the xAI Grok API.