.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "RLX" "1" "April 2013" "" "" . .SH "NAME" \fBrlx\fR \- couchdb command line interface . .SH "SYNOPSIS" A command line interface for couchdb(7)\. . .SH "USAGE" . .nf rlx [options\|\.\|\.\|\.] . .fi . .SH "MANUAL" This manual page describes some of the available commands, each command set is described in an individual manual page which can be accessed by running \fBhelp [command]\fR\. The list of manual page identifiers is: . .IP "\[ci]" 4 \fBalias\fR Commands for aliases (frequently used servers and databases)\. . .IP "\[ci]" 4 \fBattach\fR Commands for adding, listing and deleting attachments\. . .IP "\[ci]" 4 \fBauth\fR Commands used for authentication\. . .IP "\[ci]" 4 \fBbulk\fR Commands for adding, updating and deleting documents in bulk\. . .IP "\[ci]" 4 \fBconfig\fR Commands for inspecting and modifying server configuration\. . .IP "\[ci]" 4 \fBdb\fR Commands for adding, deleting and listing databases\. . .IP "\[ci]" 4 \fBdebug\fR Commands for debugging the environment and network requests\. . .IP "\[ci]" 4 \fBdesign\fR Commands for working with design documents and view queries\. . .IP "\[ci]" 4 \fBdoc\fR Commands for adding, deleting and listing documents\. . .IP "\[ci]" 4 \fBpage\fR Commands for moving between view result set pages\. . .IP "\[ci]" 4 \fBrepl\fR Commands for adding, deleting and listing replication documents\. . .IP "\[ci]" 4 \fBserver\fR Commands for inspecting server information such as statistics and logs\. . .IP "\[ci]" 4 \fBsettings\fR Commands for configuring the runtime behaviour\. . .IP "\[ci]" 4 \fBtpl\fR Commands for manipulating templates\. . .IP "" 0 . .SH "COMMANDS" . .TP \fBcd [url] [id]\fR: . .P Change directory, this command sets the server and database context and allows switching between servers\. You may use an alias reference for the \fIurl\fR\. . .P If an error occurs connecting to the server no change will be made to the current working directory\. . .P You can select databases (and documents) that do not exist and create them afterwards with the \fBdb add\fR and \fBdoc add\fR commands\. . .P To switch between databases on the current server use the \fBdb\fR command, to change the selected document use the \fBdoc\fR command\. . .P Use the \fB/\fR value to clear any currently selected database or document\. . .TP \fBpwd\fR: . .P Print a URL describing the currently selected server, database, document and revision\. . .TP \fBsave [file]\fR: . .P Save the last server response to a file\. If \fIfile\fR is not specified you will be prompted to enter a file name or file path, if the entered file does not contain \fB/\fR then the file will be saved in the directory specified by the \fBdownloads\fR setting; otherwise the path is treated as absolute\. . .P If the file already exists then a prompt asks for confirmation to overwrite the file\. It is an error if the target is a directory\. . .P When specifying paths tilde expansion is performed and spaces and other shell meta characters are permitted\. . .P Use the exit commands to return to the normal command prompt\. . .TP \fBhostname\fR: . .P Print the host name for the currently selected server or nothing if no server is selected\. . .TP \fBhelp [command]\fR: . .P Display help for \fIcommand\fR, if no command is specified this manual page is displayed\. . .TP \fBq | quit | exit\fR: . .P Quit the interactive shell\. . .SH "OPTIONS" . .TP \fB\-\-version\fR: . .P Print the program version and exit\. . .SH "ENVIRONMENT" Files are segregated in the program and user data categories\. . .IP "\[ci]" 4 \fBrlx_home\fR Temporary program data used while the program is running . .IP "\[ci]" 4 \fBrlx_user\fR User configuration such as settings, editor configuration, aliases, custom templates etc . .IP "" 0 . .P If either \fBrlx_home\fR or \fBrlx_user\fR are set they must be a writable directory or rlx(1) will refuse to start with an error\. . .P Tilde expansion is performed on these variables so you may specify a quoted tilde path and provided it exists and is writable it will be used\. . .P The rule of thumb is that program data can be safely deleted and will only affect any currently running sessions whilst more care should be taken with user data\. If the user data directory is deleted you will lose custom configuration, templates and other potentially valuable information\. . .P Settings are also exported as environment variables but it is recommended that you use the \fBsettings\fR command to modify these variables, see rlx\-settings(3)\. . .TP \fBrlx_home\fR: . .P This environment variable sets the directory where rlx(1) will store program data, the default value is \fB~/\.strike/rlx\fR\. . .TP \fBrlx_user\fR: . .P This environment variable sets the directory where rlx(1) will store user data, the default value is \fB~/\.rlx\fR\. . .SH "EDITOR" The editor is used for creating and editing JSON documents\. It is an important component of rlx(1) and without an editor installed rlx(1) is not very useful\. . .P Currently, the only supported editor is \fBvim\fR as other editors do not have the flexibility to cope with the editing requirements such as being able to read from stdin and write to a named file\. . .P A setting \fBeditopts\fR is exposed which allows configuration of the options passed to the editor command\. However, it is not recommended that this setting is changed if you wish to modify the editor behaviour change the \fB\.vimrc\fR file installed into \fB${rlx_home}\fR, see \fBvimrc\fR\. . .P See rlx\-settings(3) for more information on the \fBeditopts\fR setting\. . .P Note that in order to load a custom configuration for editor sessions that the environment is modified temporarily\. The \fBHOME\fR variable is assigned to the \fBUSER_HOME\fR environment variable and then given the value of \fBrlx_home\fR prior to launching the editor\. When the editor exits the \fBHOME\fR environment variable is restored to it\'s previous value\. . .SS "vimrc" If you wish to change the editor behaviour you should modify the \fB\.vimrc\fR file installed into \fB${rlx_home}\fR\. This file by default performs the following actions: . .IP "\[ci]" 4 Loads a user vimrc file from \fB$HOME/\.vimrc\fR if the file exists . .IP "\[ci]" 4 Configure \fBvim\fR to not use swap files . .IP "\[ci]" 4 Configure \fBvim\fR to not use backups . .IP "\[ci]" 4 Sets the filetype to \fBjson\fR . .IP "\[ci]" 4 Invokes \fBNERDTreeClose\fR if the command exists . .IP "" 0 . .P The last action is a preference that you can remove by deleting or commenting the appropriate line in the \fB\.vimrc\fR file\. . .P It is not recommended that you enable swap or backup files as you may expose sensitive information, see the \fBSECURITY\fR section of rlx\-auth(3)\. . .P If you wish to restore the \fB\.vimrc\fR file to it\'s defaults delete it from \fB${rlx_home}\fR and it will be copied over the next time rlx(1) is run\. . .SH "FILES" Temporary files are stored in the writable directory defined by \fB${rlx_home}\fR with the location \fB${rlx_home}/tmp/session/$$\fR\. If either directory is deleted while the program is running the next command will quit the program with an error message\. . .P User data is stored in the writable directory defined by \fB${rlx_user}\fR\. . .SS "HISTORY" Command line history is stored in \fB${rlx_user}/history\.log\fR\. . .SH "BUGS" \fBrlx\fR is written in bash and depends upon \fBbash >= 4\.2\fR\. . .SH "COPYRIGHT" \fBrlx\fR is copyright (c) 2013 muji \fIhttp://xpm\.io\fR . .SH "SEE ALSO" couchdb(7), couchdb(3), http(3), json(3), curl(1), file(1), openssl(1), curl(1), tee(1), man(1)