PHPackages                             dotmonk/wildling - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. dotmonk/wildling

ActiveLibrary

dotmonk/wildling
================

Pattern based string generator library and CLI

00

Since Jul 20Compare

[ Source](https://github.com/dotmonk/wildling)[ Packagist](https://packagist.org/packages/dotmonk/wildling)[ RSS](/packages/dotmonk-wildling/feed)WikiDiscussions Synced today

READMEChangelog (1)DependenciesVersions (1)Used By (0)

wildling
========

[](#wildling)

 [![wildling](assets/logo.svg)](assets/logo.svg)

 [![Test](https://github.com/dotmonk/wildling/actions/workflows/test.yml/badge.svg)](https://github.com/dotmonk/wildling/actions/workflows/test.yml) [![Docs](https://camo.githubusercontent.com/7399a313ebcd931c47a2a092b7bdfe2a64edab9f87d940a11b7f22d03e7420cc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f63732d47697448756225323050616765732d6338663534323f6c6162656c436f6c6f723d306331323130)](https://dotmonk.github.io/wildling/) [![MIT](https://camo.githubusercontent.com/54d18efac5353ee238651cd0c710540c0674a98a54d6782ac71e097503c5ecde/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d6335643463383f6c6162656c436f6c6f723d306331323130)](LICENSE)

 [Website](https://dotmonk.github.io/wildling/) · [Syntax](https://dotmonk.github.io/wildling/syntax.html) · [Sandbox](https://dotmonk.github.io/wildling/sandbox.html) · [Contributing](CONTRIBUTING.md)

Pattern-based string generator — library and CLI in many languages, one shared grammar. Enumerate combinations for wordlists, domain brainstorming, test data, and similar tasks.

**Requirements:** Docker for language builds; Node 18+ only for the JavaScript port and the documentation site.

Website
-------

[](#website)

Docs and a live browser sandbox are published with GitHub Pages:

- [Home (language wall)](https://dotmonk.github.io/wildling/)
- [Pattern syntax](https://dotmonk.github.io/wildling/syntax.html)
- [Sandbox](https://dotmonk.github.io/wildling/sandbox.html)

Build the site locally with `./scripts/build-site.sh` (output in `_site/`). In the repo **Settings → Pages**, set the source to **GitHub Actions**.

Status
------

[](#status)

LanguageLibraryCLI[JavaScript / TypeScript](javascript/)YesYes[Python](python/)YesYes[Java](java/)YesYes[C#](csharp/)YesYes[Visual Basic / VB.NET](visualbasic/)YesYes[C++](cpp/)YesYes[PHP](php/)YesYes[C](c/)YesYes[Go](go/)YesYes[Rust](rust/)YesYes[Kotlin](kotlin/)YesYes[Ruby](ruby/)YesYes[Swift](swift/)YesYes[Scala](scala/)YesYes[Dart](dart/)YesYes[POSIX shell](posix-shell/)YesYes[PowerShell](powershell/)YesYes[Lua](lua/)YesYes[Assembly (x86-64 NASM)](assembly/)YesYes[R](r/)YesYes[Groovy](groovy/)YesYes[Perl](perl/)YesYes[Elixir](elixir/)YesYes[Pascal / Free Pascal](pascal/)YesYes[Zig](zig/)YesYes[Fortran](fortran/)YesYes[Ada](ada/)YesYes[F#](fsharp/)YesYes[Haskell](haskell/)YesYesQuick start (JavaScript)
------------------------

[](#quick-start-javascript)

```
cd javascript && npm ci --include=dev && npm run build
./bin/wildling "foo#"
```

```
foo0
foo1
…
foo9

```

As a library (from this repo):

```
const createWildling = require("./javascript/dist/index.js").default;

const wildling = createWildling({
  patterns: ["foo#"],
  dictionaries: {},
});

let value;
while ((value = wildling.next())) {
  console.log(value);
}
```

Quick start (Python)
--------------------

[](#quick-start-python)

```
cd python && ./build.sh
./bin/wildling "foo#"
```

```
from wildling import create_wildling

wildling = create_wildling(patterns=["foo#"])
value = wildling.next()
while value is not False:
    print(value)
    value = wildling.next()
```

Quick start (Java)
------------------

[](#quick-start-java)

```
cd java && ./build.sh
./bin/wildling "foo#"
```

```
import wildling.Wildling;
import java.util.List;

Wildling wildling = Wildling.create(List.of("foo#"));
Object value = wildling.next();
while (!Boolean.FALSE.equals(value)) {
    System.out.println(value);
    value = wildling.next();
}
```

Quick start (C#)
----------------

[](#quick-start-c)

```
cd csharp && ./build.sh
./bin/wildling "foo#"
```

```
using WildlingLib;

var wildling = Wildling.Create(new[] { "foo#" });
object value = wildling.Next();
while (value is not false)
{
    Console.WriteLine(value);
    value = wildling.Next();
}
```

Quick start (Visual Basic / VB.NET)
-----------------------------------

[](#quick-start-visual-basic--vbnet)

```
cd visualbasic && ./build.sh
./bin/wildling "foo#"
```

```
Imports WildlingLib

Dim wildling = Wildling.Create({"foo#"})
Dim value As Object = wildling.Next()
While Not (TypeOf value Is Boolean AndAlso Not CBool(value))
    Console.WriteLine(value)
    value = wildling.Next()
End While
```

Quick start (C++)
-----------------

[](#quick-start-c-1)

```
cd cpp && ./build.sh
./bin/wildling "foo#"
```

```
#include "wildling.hpp"
#include

wildling::Dictionaries dictionaries;
wildling::Wildling w({"foo#"}, dictionaries);
auto value = w.next();
while (value.has_value()) {
    std::cout
