Sponsored by Deepsite.site

Ask m' AI

Created By
rainu6 months ago
A scriptable and powerful UI-Chat-Application for chatting with most Gen-AI LLMs
Content

Ask m' AI

Ask m' AI (ask my ai -> ask m' ai) is a little Desktop-Chat-Application for LargeLanguageModels (e.g. OpenAI's GPT).

Unlike many chat applications out there, this application aims to be scriptable. Which means you can call it from you terminal and gave all necessary options as arguments. The conversations will also be printed out in the terminal, so you can use it in your scripts.

https://github.com/user-attachments/assets/a6d16332-55a1-4866-9f3e-31490a488935

Quickstart

LocalAI

ask-mai -b localai --llm.localai.base-url=http://localhost:8080/v1 --llm.localai.model=gpt-4

OpenAI

ask-mai -b openai --llm.openai.api-key.plain=YOUR_OPENAI_API_KEY

Ollama

ask-mai -b ollama --llm.ollama.server-url=http://localhost:11434 --llm.ollama.model=llama3.2

Anthropic

ask-mai -b anthropic --llm.anthropic.api-key.plain=YOUR_ANTHROPIC_API_KEY

Mistral

ask-mai -b mistral --llm.mistral.api-key.plain=YOUR_MISTRAL_API_KEY --llm.mistral.model=mistral-small-latest

DeepSeek

ask-mai -b deepseek --llm.deepseek.api-key.plain=YOUR_DEEPSEEK_API_KEY

Google Gemini

ask-mai -b google --llm.google.api-key.plain=YOUR_GOOGLE_API_KEY

Features

  • Support different LLM provider
  • Tool Support
    • You can define your own tools which can be called from the LLM
    • There are some built-in tools:
      • "getSystemInformation" - Get some information about the system
      • "getEnvironment" - Read environment variables from the system
      • "getSystemTime" - Get the current system time
      • "getStats" - Get stats of a file or directory
      • "changeMode" - Changes the mode of file or directory
      • "changeOwner" - Changes the owner of file or directory
      • "changeTimes" - Changes the access and/or modification time of file or directory
      • "createFile" - Create a file on the system
      • "createTempFile" - Create a temporary file on the system
      • "appendFile" - Append content to an existing file
      • "readTextFile" - Read a text file from the system
      • "deleteFile" - Delete a file from the system
      • "createDirectory" - Creates a new directory on the system
      • "createTempDirectory" - Creates a new temporary directory on the system
      • "deleteDirectory" - Delete a directory from the system
      • "executeCommand" - Execute a command on the system
      • "callHttp" - Do a http call
  • Run as MCP-Server (see below)
    • Which allows you to use ask-mai' tools (even your custom tools) for other applications which support MCP-Server
  • MCP-Server support
    • You can define multiple MCP-Servers which can be used by the LLM (currently only tools)
  • Scriptable
    • All settings can be set via:
      • yaml configuration file
      • environment variables
      • command line arguments
    • The users questions and models answers will be printed out in the terminal
  • Customizable
    • Choose between two themes (light and dark)
    • Choose between different languages (english, german)
    • Choose between different code themes (see help for all available themes)

Install this application

AUR (Arch Linux)

yay -S ask-mai

Download this application

You can download the latest version of this application from the releases page. There are many different versions for different operating systems, architectures and feature sets.

The file names are structured as follows:

ask-mai-${OS}-${ARCH}-${FEATURE}.${EXTENSION}

Available OS:

  • darwin - MacOS
  • linux - Linux
  • windows - Windows

Available Architectures:

  • amd64 - 64bit
  • 386 - 32bit
  • arm64 - ARM 64bit

Available Features:

  • compressed - The binary is compressed (can be problematic for some antivirus software - especially on windows)
  • console - The binary is console application (only for windows)
  • debug - The binary contains devtools (you can inspect the GUI-Sources)

Start this application as mcp-server

You can start this application as an MCP server by using the ask-mai-mcp-server as first positional argument:

ask-mai ask-mai-mcp-server

Or you can rename the binary to ask-mai-mcp-server and start it like this:

ask-mai-mcp-server

How to build this application

  1. Install dependencies see wails documentation
  2. Build the application:
wails build

How to build and install this application (flatpak) by yourself

flatpak-builder .flatpak-build de.rainu.ask-mai.yml --repo=.flatpak-repo --install-deps-from=flathub --force-clean --default-branch=master --arch=x86_64 --ccache
flatpak build-bundle .flatpak-repo ask-mai.flatpak --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo --arch=x86_64 de.rainu.ask-mai master
sudo flatpak install --reinstall ask-mai.flatpak

Application starts not fast enough

If the application does not start fast enough for your needs, you can get the prompt by your own and use the -ui-prompt flag to start the application with that prompt. Here is an example with rofi:

#!/bin/sh

PROMPT=$(rofi -dmenu -p "Ask-mAI" -l 0 -location 2)
if [ $? -ne 0 ]; then
    exit 1
fi

ask-mai -ui-prompt "${PROMPT}"

Contributing

If you use nix, you can use nix develop to enter a shell with all dependencies you need for contributing. The flake also utilises treefmt to format all *.nix and *.go files. This can be done with nix fmt and checked with nix flake check.

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
DeepChatYour AI Partner on Desktop
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
WindsurfThe new purpose-built IDE to harness magic
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
CursorThe AI Code Editor
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Playwright McpPlaywright MCP server
Serper MCP ServerA Serper MCP Server
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
ChatWiseThe second fastest AI chatbot™
Amap Maps高德地图官方 MCP Server
Tavily Mcp