The classic Half-Life games (and other games with the same engine) had a console and various cheat commands to enter there. Is this the case for Half-Life: Alyx as well?
Yes, Alyx has the same kind of cheats like the classic Half-Life games.
To enable them, launch the game with the command line arguments
-console -vconsole ("Set Launch Options" in the game properties in Steam). This will allow you to open the console using the ~ key (on an en_US keyboard; if you have a different one try whatever is left of 1).
When pressing they key, the console shows up on your screen, not inside VR - so you may want to pause the game (because after all) and take off your VR headset. Inside the console you can type various commands in the text field labelled "Commands".
First of all, you want to run
sv_cheats 1 to enable cheats. Once that's done, the following (and likely more!) cheats are available:
god- doesn't really need any explanation, but it makes you invulnerable. Time to cuddle some headcrabs?
buddha- you still take damage, but you won't die when losing all your health points
impulse 101- gives you all three weapons, and also 20 resin.
impulse 102- gives you all weapon upgrades
sv_infinite_ammo 1- gives you unlimited ammo, but you still need to reload
sv_infinite_clips 1- if you want a less fun game, and never reload, this one is for you. PS: you still can't kill Jeff.
hlvr_shotgun_grant_upgrades 3- get the shotgun with all upgrades
Infinite ammo or clip size can be disabled again by setting them to
0 instead of
1. God/Buddha mode are toggles, so just run those again.