Create a stage where the output is a directory

I have a process that has a dependency on input.txt, and its output is a directory with files of the form outputs/*.txt.

What is the correct way to specify such a stage? I see from this tutorial that you can dvc add an entire directory. But is it possible to set this directory as the output from a dvc run stage?

It looks like DVC supports this feature transparently, without any extra configuration. I was able to use -o with a directory and it “just worked”. Nice!