Urgent.News

What's breaking now, across thousands of outlets.

Tech

I built a hiking guide that runs on a laptop with no internet — meet trailbrief

What I built trailbrief is a small Python CLI that writes you a personalized hiking briefing. You tell it the trail — name, distance, elevation gain, location, season, your experience level — and it hands back a practical plan: an overview, a pacing plan, a season-aware pack list, watch-outs, and a Leave No Trace reminder. The twist: the briefing is written by Gemma, running locally through…

Trailbrief is a Python command-line interface (CLI) that generates personalized hiking briefings. The user inputs information about the trail, such as its name, distance, elevation gain, location, season, and experience level, and the CLI outputs a practical plan. This plan includes an overview, pacing strategy, recommended gear, potential hazards, and a reminder about Leave No Trace principles.

The unique aspect of trailbrief is that it operates offline using the Gemma language model, which runs locally through Ollama. This means no data is transmitted, no API keys are needed, and there's no reliance on internet connectivity. If the local model is unavailable (for example, when offline on the trail with no bars), a built-in template engine still provides a useful briefing, ensuring the user receives helpful information even in low-connectivity situations.

The project's codebase is available on GitHub, and a demo is provided. For instance, running the command `python3 -m trailbrief --name Ricketts Glen Falls Trail --distance 7.2 --elevation 1200 --location Benton, PA --season fall --experience intermediate --offline` generates a briefing for the Ricketts Glen Falls Trail under specific conditions.

The output is structured, detailing the location, overview, detailed pacing strategy, suggested pack list, and safety warnings tailored to the fall season and a moderately experienced hiker.

The program's design is straightforward: it uses a basic Naismith-style rule to calculate difficulty and moving time. It employs a fixed prompt that guides the model, ensuring it relies on the provided data rather than inventing additional information. This approach avoids the pitfalls of AI models that might hallucinate features or details not present on the actual trail.

One of the core principles is the emphasis on open innovation, particularly through the use of open-weight models. This allows the application to function effectively even in areas with no internet access. By running locally, users maintain full control over their own data, which is particularly important for activities like hiking where personal safety and privacy are paramount.

Additionally, because the project is open-source, users can experiment with different models, such as swapping Gemma for another language model like llama3.2, without any modifications to the core functionality. This flexibility ensures that the tool remains adaptable and suited to the user's preferences.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

More from Saturday 10 October →