Launch Emacs command line over Emacs GUI version from Terminal

I have installed both Emacs command line and the Emacs GUI version with homebrew:

brew install emacs
brew cask install emacs

At the command line on macOS Catalina, when I use:

emacs <filename>

The GUI version is launched, but I would prefer if the command line version is launched. How can I make this change with Homebrew? Thank you.

Homebrew doesn’t determine this. This is probably something in your shell config

I’ll look around. The only reason I suspected Homebrew is because when I only brew install emacs, then use emacs command on command line, then the command line version comes up. But if it follow it with a brew cask install emacs, it then changes to opening the GUI version when using the emacs command.