For example, you can export only the schema of apple.db to backup.sql with .schema as shown below. *backup.sql is created if it doesn't exist and my answer explains how to export schema and data:
sqlite3 apple.db .schema > backup.sql
And, you can export only the schema of apple.db to backup.sql with the commands below. *.output creates and selects or only selects a file depending on the file existence and you must exit to close the file (e.g., .exit or .quit) otherwise the results of SQLite commands are output to the file:
sqlite3 apple.db
sqlite> .output backup.sql
sqlite> .schema
sqlite> .exit
And, you can export only the schema of the specific tables in apple.db to backup.sql with the commands below. *.schema exports the schema of only one specific table so you should run .schema multiple times if you want to export the schema of the specific multiple tables:
sqlite3 apple.db
sqlite> .output backup.sql
sqlite> .schema person
sqlite> .schema animal
sqlite> .exit