Imported from ProgrammerGreenhorn/minisearch (
AGENTS.md). Install upstream withnpx skills add ProgrammerGreenhorn/minisearch. Copyright stays with the author.
Repository Guidelines
Project Structure & Module Organization
MiniSearch is a C++17 local file indexing and search tool built with CMake,
Protobuf, wxWidgets, and toml++. Public headers live under
include/minisearch/, grouped by module such as app, cli, config, gui,
index, search, shell, and util. Implementations mirror that structure
under src/. Protobuf schema lives in proto/index.proto; generated files are
written under build/<preset>/generated/ and should not be edited. Tests live
under test/, grouped by module. Build output belongs under build/.
Build, Test, and Development Commands
./build.sh debug: configure and build the debug preset inbuild/debug../build.sh release: configure and build the optimized release preset../build.sh all: build both debug and release presets.cmake --build --preset debug --target check-tests: build and run all GoogleTest/CTest tests../build/debug/minisearch: start the interactive CLI shell../build/debug/minisearch-gui: start the wxWidgets GUI.cmake --install build/debug: install the selected build to~/.local/bin.
Install system dependencies before building:
protobuf-compiler, libprotobuf-dev, and libwxgtk3.2-dev.
Coding Style & Naming Conventions
Use C++17, two-space indentation, #pragma once headers, and trailing return
types such as auto loadAppConfig() -> AppConfig. Keep code in the relevant
minisearch::<module> namespace. Use PascalCase for classes, lowerCamelCase for
functions and local variables, and trailing underscores for private members.
Run clang-format on modified C++ files before committing. Keep GNU/Clang
warnings clean; CMake enables -Wall -Wextra -Wpedantic.
Testing Guidelines
Tests use GoogleTest through CTest. Add new tests under test/<module>/ and
name files after the unit under test, for example app_config_test.cpp. Prefer
focused tests for persistence, parsing, and user-visible CLI/GUI behavior. Run
cmake --build --preset debug --target check-tests before submitting changes.
Commit & Pull Request Guidelines
Recent commits use short imperative subjects, for example
Add show command or Bootstrap config.toml and centralize logging config.
Keep each commit focused and avoid trailing punctuation. Pull requests should
include a concise summary, linked issues when applicable, build/test commands
run, and sample CLI or GUI behavior for user-visible changes.
Security & Configuration Tips
Runtime metadata is stored under ~/.minisearch/, including config.toml,
current.pb, indexes.pb, and indexes/*.pb. Do not commit local indexes,
generated build trees, machine-specific paths, or personal config files. Treat
proto/index.proto as the persistence contract and update schema compatibility
deliberately.