rlx-doc(3) -- document commands
===============================

## SYNOPSIS

Commands for operating on documents.

## COMMANDS

Document commands that accept a *database* option will use the currently selected database when the *database* option is not specified.

When the *id* option is not specified the currently selected document *id* is used.

* `doc ls [database]`:

List all documents.

* `doc list [database]`:

List all documents and include document contents in the result set, equivalent to `include_docs=true`.

* `doc design ls [database]`:

List design documents for the currently selected server, if the *database* option is not specified the selected database is used.

* `doc design list [database]`:

List design documents for the currently selected server and include document contents in the result set, equivalent to `include_docs=true`. If the *database* option is not specified the selected database is used.

* `doc add [id] [database]`:

Create a new document and open in an editor, if the document is saved it is sent to the server.

* `doc edit [id] [rev]`:

Edit a document.

* `doc rm [id] [database]`:

Delete a document.

* `doc get [id] [rev]`:

Show a document.

* `doc revs [id] [rev]`:

Show a document and include revision information, equivalent to the `revs` query string parameter.

* `doc revsinfo [id] [rev]`:

Show a document and include revision information, equivalent to the `revs_info` query string parameter.

* `doc openrevs [id] [rev...]`:

Fetch multiple revisions of a document. If no *rev* options are specified the
value *all* is used for the `open_revs` query string parameter.

* `doc conflicts [id] [rev]`:

Show a document and include conflict information, equivalent to the `conflicts` and `deleted_conflicts` query string parameters.

* `doc seq [id] [rev]`:

Show a document and include sequence information, equivalent to the `local_seq` query string parameter.

* `doc head [id] [database]`:

Print HTTP headers for a document.

* `doc etag [id] [database]`:

Print the document revision extracted from the `ETag` header. If no *id* is specified the currently selected document is used if a document is selected.

* `doc copy [source] [target] [rev]`:

Copy a document using the selected database, the *source* and *target* options are the document identifiers and must be specified. If *rev* is specified it is the revision to use for an existing target document.

If no revision is specified, a request is made first to test for existence of the target document, if it exists then the revision is extracted from the `ETag` header.

## BUGS

**rlx** is written in bash and depends upon `bash >= 4.2`.

## COPYRIGHT

**rlx** is copyright (c) 2013 muji <http://xpm.io>

## SEE ALSO

rlx(1), couchdb(3)
