wildling
C++ library and CLI for pattern-based string generation. Zero third-party dependencies (C++17 standard library only). Includes a minimal JSON parser for --template.
Docs: Website · Sandbox · Syntax · Source
Example
Install
From this repository:
cd cpp
./build.sh
./bin/wildling "Year 19##"
From a release tag:
git clone --branch v2.0.0 --depth 1 https://github.com/dotmonk/wildling.git
cd wildling
./build.sh cpp
Produces dist/wildling. Link against the sources under src/ (except cli.cpp) to use as a library:
#include "wildling.hpp"
wildling::Dictionaries dictionaries;
wildling::Wildling w({"Year 19##"}, dictionaries);
auto value = w.next();
while (value.has_value()) {
std::cout << *value << '\n';
value = w.next();
}
CLI
./bin/wildling "Year 19##"
./bin/wildling --dictionary planets:../dictionaries/planets.txt "%{'planets'}"
./bin/wildling --template ./config.json
Help text and --check output follow docs/cli.md / docs/help.txt.
Build
./build.sh # Docker (gcc:14-bookworm): g++ -std=c++17 → dist/wildling
Project tests live in ../tests/ and are run with ../test.sh.