code
is most likely only a link anyway or a shell script pointing to the executable.
Anyway, look in /Applications/Visual Studio Code.app/Contents/MacOS
. You should find an executable there which you can reference.
I don’t use Visual Studio, thus I can’t give you the exact answer. Btw, SublimeText cannot be installed via MacPorts or Homebrew.
Check your Visual Studio Code menu. Maybe there’s an item called something like 'install command line tool`.
Maybe someone who’s using Visual tuidio Code can give you a more definitive answer.