The latest version of SQLite always comes pre-installed within Mac OSX or macOS. You don’t have to download or install anything else, it’s located in the directory: /usr/bin/.

To open SQLite on Mac

sqlite3

It should show something like this:

SQLite version 3.24.0 2018-06-04 14:10:15
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> 

If for any reasons, your Mac hasn’t installed SQLite, follow these steps to install it from Source:

  • Go to SQLite download page.
  • Download sqlite-autoconf-XXXXXXX.tar.gz from the source code section. At the time I’m writing this, it’s sqlite-autoconf-3240000.tar.gz.
  • Run these commands (open Terminal app):
cd ~/Downloads #or where you saved the tar file.
tar xvfz sqlite-autoconf-3240000.tar.gz
cd sqlite-autoconf-3240000
./configure --prefix=/usr/local
make
make install

And now SQLite is installed on your Mac.

If you have hombrew, you can install SQLite with the command:

brew install sqlite3

To create a new SQLite database from terminal:

  • Navigate to the target folder.
  • Run sqlite3 db_name.db or touch db_name.db to create a new database file.

Done!

To open, browse, edit and update data in your SQLite database, use TablePlus for SQLite. It’s a free, native, and intuitive GUI tool for relational database on Mac.

You can download it here.

TablePlus for SQLite