How do I automatically set meta commands when starting psql?
You are looking for the .psqlrc file. Per documentation:


  psqlrc and ~/.psqlrc
  
  Unless it is passed an -X or -c option, psql attempts to read and execute commands from the system-wide startup file (psqlrc) and then the user's personal startup file (~/.psqlrc), after connecting to the database but before accepting normal commands. These files can be used to set up the client and/or the server to taste, typically with \set and SET commands.