An LLM-based help app that uses the official Ubuntu documentation.
This app can answer your queries about Ubuntu based on the documentation database created with ubuntu-docs-indexer. The chat is powered by a local or cloud LLM. You can choose at startup:
- A local model of your choice served through Ollama. Note that local models are resource-intensive. For example,
deepseek-r1:1.5brequires at least 2 GB of RAM and ~2 GB of disk space. - A remote model via GitHub Copilot and the GitHub Models API. A free GitHub account is enough.
The app is written in Rust with the help of Copilot and Claude. It has a GTK4 graphical interface and a command-line interface.
Use this mode for a remote model via the GitHub Models API.
This can feel faster than running a local model because the inference work does not happen on your machine, though the result still depends on network latency.
The app uses the gpt-4o-mini model via the GitHub Models API.
-
Install Ask the Docs from Snapcraft:
sudo snap install ask-ubuntu-docs
-
Install the GitHub CLI:
sudo snap install gh
-
Authenticate with GitHub:
gh auth login
-
Verify the authentication:
gh auth token
-
Run Ask the Docs from your desktop interface, or launch it from the command line:
ask-ubuntu-docs gui --copilot
Alternatively, you can set COPILOT_TOKEN manually. This takes precedence over the GitHub CLI.
-
Generate a token at https://github.com/settings/tokens with the
models:readscope, or use a token from an existing GitHub Copilot subscription. -
Set your token as an environment variable:
In Bash:
export COPILOT_TOKEN=your_token_hereIn Fish:
set -x COPILOT_TOKEN your_token_here
-
Run the app from the command line:
ask-ubuntu-docs gui --copilot
Note that if you run the app from the desktop launcher or a different terminal session, it won't detect your token variable.
The app talks to a local model through Ollama. You must choose and install the model separately.
-
Install Ask the Docs from Snapcraft:
sudo snap install ask-ubuntu-docs
-
Choose a model from the Ollama library. In this example, we're using the small, text-optimized
deepseek-r1:1.5bmodel. This is currently the default. -
Install Ollama:
sudo snap install ollama
-
Download your chosen model:
ollama pull deepseek-r1:1.5b
-
Start the app, passing the chosen model:
ask-ubuntu-docs gui --model deepseek-r1:1.5b
You can also set the model and server URL via environment variables. For example:
MODEL=deepseek-r1:1.5b OLLAMA_URL=http://localhost:11434 ask-ubuntu-docs gui-
Install the Rust toolchain:
sudo snap install rustup --classic rustup toolchain install stable
-
Compile the app in debug mode (faster build):
cargo build
-
Download the latest
index.lance.tar.gzarchive: -
Unpack the archive and place the resulting directory under
target/. -
Make sure that you're authenticated with
gh. See earlier. -
Run the app with Copilot and the graphical interface:
cargo run gui --copilot