Skip to main content

Project globs

Most bleep commands take project names as arguments. Behind the obvious case (one name → one project) bleep ships a small vocabulary of project globs — named groups that expand to a set of projects. There are no wildcards: a glob is one of a fixed list of shapes, each deterministic, all surfaced via tab completion.

The shapes

GlobMatchesExample
<name>@<crossId>One specific cross-projection of one project.mylib@jvm213
<name>Every cross of that project.mylib
<crossId>Every project on that cross axis (explicit or derived).jvm3
javaEvery project with no Scala or Kotlin configured.java
kotlinEvery project with kotlin: configured.kotlin
<slashed-prefix>Every /-delimited prefix of a slashed project name.services/api

Multiple globs on the same command line are unioned.

A note on slashed project names

Project names are normally flat (mylib, mylib-test). If you name them with slashes — services/api/foo, services/web/admin — bleep automatically registers every /-delimited prefix of that name (services, services/api, services/web) as a glob that matches the projects beneath it. Flat names get no prefix globs; the mechanism only kicks in once you've put a / in a name.

CWD scoping is part of the glob system

Bleep has a second knob for narrowing the project set: the directory you run from. When your CWD sits inside the build root, bleep automatically restricts every command to projects whose folder is under that CWD — and globs resolve within that restricted set.

CWD and globs intersect, they don't replace each other. A glob never reaches outside the CWD's project subset, and the CWD never matches something a glob excludes.

bleep projects is the way to see what falls out at any given moment:

# at the build root: everything
$ bleep projects
services/api/foo
services/api/bar
services/web/admin
mylib@jvm213
mylib@jvm3

# narrow the glob: every project on the jvm3 cross
$ bleep projects jvm3
services/api/foo
services/api/bar
services/web/admin
mylib@jvm3

# narrow the cwd: only what's under services/
$ cd services
$ bleep projects
services/api/foo
services/api/bar
services/web/admin

# both at once: jvm3 AND under services/
$ bleep projects jvm3
services/api/foo
services/api/bar
services/web/admin

# CWD doesn't pin the glob — it just shrinks the universe.
# Asking for a glob outside your CWD returns nothing:
$ bleep projects mylib
(empty)

# Asking for a path prefix narrower than your CWD also works:
$ bleep projects services/api
services/api/foo
services/api/bar

The same intersection happens for bleep compile, bleep test, and every other command that takes project arguments.

Discovering globs

There's no command that prints the glob list directly — tab completion is the discovery surface. With shell completions installed (see Tab completions), pressing <Tab> after bleep compile, bleep test, or bleep projects shows every glob that resolves in your current CWD. Move into a subfolder and the list shrinks; move back to the root and it grows.

Where to go next