psql is the query tool supplied as a part of the core distribution of PostgreSQL, so it is available in all environments and works similarly in them all. This makes it an ideal choice for developing portable applications and techniques.
psql provides features for use as both an interactive query tool and a scripting tool.