1 .\" Hey, EMACS: -*- nroff -*-
2 .\" First parameter, NAME, should be all caps
3 .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
4 .\" other parameters are allowed: see man(7), man(1)
5 .TH SQLCIPHER 1 "Thu Aug 31 12:00:00 EDT 2023"
6 .\" Please adjust this date whenever revising the manpage.
8 .\" Some roff macros, for reference:
9 .\" .nh disable hyphenation
10 .\" .hy enable hyphenation
11 .\" .ad l left justify
12 .\" .ad b justify to both left and right margins
13 .\" .nf disable filling
14 .\" .fi enable filling
15 .\" .br insert line break
16 .\" .sp <n> insert n+1 empty lines
17 .\" for manpage-specific macros, see man(7)
20 \- A command line interface for SQLCipher version 3
31 is a terminal-based front-end to the SQLCipher library that can evaluate
32 queries interactively and display the results in multiple formats.
34 can also be used within shell scripts and other applications to provide
35 batch processing features.
40 interactive session, invoke the
42 command and optionally provide the name of a database file. If the
43 database file does not exist, it will be created. If the database file
44 does exist, it will be opened.
46 For example, to create a new database file named "mydata.db", create
47 a table named "memos" and insert a couple of records into that table:
50 .B sqlcipher mydata.db
52 SQLite version 3.43.0 2023-08-11 17:45:23
54 Enter ".help" for usage hints.
57 .B create table memos(text, priority INTEGER);
60 .B insert into memos values('deliver project description', 10);
63 .B insert into memos values('lunch with Christine', 100);
66 .B select * from memos;
68 deliver project description|10
70 lunch with Christine|100
75 If no database name is supplied, the ATTACH sql command can be used
76 to attach to existing or create new database files. ATTACH can also
77 be used to attach to multiple databases within the same interactive
78 session. This is useful for migrating data between databases,
79 possibly changing the schema along the way.
81 Optionally, a SQL statement or set of SQL statements can be supplied as
82 a single argument. Multiple statements should be separated by
88 .B sqlcipher -line mydata.db 'select * from memos where priority > 20;'
90 text = lunch with Christine
96 .SS SQLITE META-COMMANDS
98 The interactive interpreter offers a set of meta-commands that can be
99 used to control the output format, examine the currently attached
100 database files, or perform administrative operations upon the
101 attached databases (such as rebuilding indices). Meta-commands are
102 always prefixed with a dot (.).
104 A list of available meta-commands can be viewed at any time by issuing
105 the '.help' command. For example:
114 <<<<<<< HEAD:sqlcipher.1
117 has the following options:
120 Stop after hitting an error.
126 Query results will be displayed in a table like form, using
127 whitespace characters to separate the columns and align the
136 Set output mode to CSV (comma separated values).
139 Print commands before execution.
142 Read and execute commands from
144 , which can contain a mix of SQL statements and meta-commands.
147 Turn headers on or off.
150 Show help on options and exit.
153 Query results will be output as simple HTML tables.
156 Force interactive I/O.
159 Query results will be displayed with one value per line, rows
160 separated by a blank line. Designed to be easily parsed by
161 scripts or other programs
164 Query results will be displayed with the separator (|, by default)
165 character between each field value. The default.
168 Set default mmap size to
172 .BI \-nullvalue\ string
173 Set string used to represent NULL values. Default is ''
176 .BI \-separator\ separator
177 Set output field separator. Default is '|'.
180 Print memory stats before each finalize.
191 The available commands differ by version and build options, so they
192 are not listed here. Please refer to your local copy for all available
194 >>>>>>> sqlite-release:sqlite3.1
199 reads an initialization file to set the configuration of the
200 interactive environment. Throughout initialization, any previously
201 specified setting can be overridden. The sequence of initialization is
204 o The default configuration is established as follows:
211 main prompt = "sqlite> "
212 continue prompt = " ...> "
218 .B ${XDG_CONFIG_HOME}/sqlite3/sqliterc
221 exists, the first of those to be found is processed during startup.
222 It should generally only contain meta-commands.
224 o If the -init option is present, the specified file is processed.
226 o All other command line options are processed.
229 <<<<<<< HEAD:sqlcipher.1
230 https://www.zetetic.net/sqlcipher
232 https://sqlite.org/cli.html
234 https://sqlite.org/fiddle (a WebAssembly build of the CLI app)
235 >>>>>>> sqlite-release:sqlite3.1
237 The sqlite3-doc package.
239 This manual page was originally written by Andreas Rottmann
240 <rotty@debian.org>, for the Debian GNU/Linux system (but may be used
241 by others). It was subsequently revised by Bill Bumgarner <bbum@mac.com>,
242 Laszlo Boszormenyi <gcs@debian.hu>, and the sqlite3 developers.