This happens because, in multi-module setups, the tag query (like tuist generate tag:Analytics) only works if the targets with the matching tag are visible to the project graph loaded from the current directory. When you run the command from the root, Tuist may not recursively discover targets in nested Project.swift files for tag filtering, so it can’t find any targets with the requested tag and shows the error. When you specify the path to the nested project, Tuist loads that specific module and its targets, so the tag query works as expected.
This is a limitation in how Tuist’s project graph loader and tag filtering logic work: the tag query depends on the graph traversal including all nested modules, but in practice, it may only apply the filter to the immediate project or not recurse deeply enough to find tagged targets in submodules. There are no recent tickets or documentation updates addressing this specific behavior.
As a workaround, continue specifying the path to the nested module when using tag queries, or consider restructuring your manifests if you need tag queries to work from the root. For more details on how tags are used for filtering, see the TargetMetadata documentation and the generate command reference.
To reply, just mention @dosu.
Docs are dead. Just use Dosu.