wildling 2.0.3 copy "wildling: ^2.0.3" to clipboard
wildling: ^2.0.3 copied to clipboard

Pattern based string generator library and CLI

wildling #

Dart library and CLI for pattern-based string generation. Zero third-party packages (dart:convert / dart:io / dart:core only). Requires Dart SDK 3.0+.

Docs: Website · Sandbox · Syntax · Source

Registry: pub.dev

Example #

http://${'dev,stage,prod'}\-${'api,web'}#{0-2}.example.${'com,net,org'}/@.html

(The \- is a literal hyphen; bare - would mean “one letter or digit”. @ is one lowercase letter.)

That builds URL-shaped candidates: scheme http://, then environment × service × optional digits × TLD, then a one-letter path page. Three environments, two services, zero–two digits ('', 09, 0099), three TLDs, and az51948 strings — the kind of list you generate for fuzzing links or probing staging hosts, not type out.

A few of them:

  • http://dev-api.example.com/a.html / http://stage-web.example.com/z.html
  • http://dev-api0.example.net/a.html / http://prod-web9.example.org/m.html
  • http://dev-api00.example.com/a.html / http://prod-web99.example.org/z.html

Named dictionaries (%{'hosts'}) work the same way when the word lists live in files.

Try it in the sandbox, or see pattern syntax for length ranges, dictionaries, and escapes.

Install #

From this repository:

cd dart
./build.sh
./bin/wildling "Year 19##"

Produces a standalone AOT binary at dist/wildling.

Git:

dart pub add wildling \
  --git-url=https://github.com/dotmonk/wildling.git \
  --git-path=dart \
  --git-ref=v2.0.3

Registry: dart pub add wildling

import 'package:wildling/wildling.dart';

final wildling = Wildling(['Year 19##']);
var value = wildling.next();
while (value != false) {
  print(value);
  value = wildling.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 (dart:stable): dart pub get + compile exe → dist/wildling

Project tests live in ../tests/ and are run with ../test.sh.

0
likes
130
points
--
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Pattern based string generator library and CLI

Repository (GitHub)
View/report issues
Contributing

License

MIT (license)

More

Packages that depend on wildling