rlx-shell v0.0.26
rlx(1)
Deprecated, see the node version rlx
Command line interface for couchdb.
Features
- UNIX style commands such as
cd,pwd,lsandrm. - Pretty print JSON documents with support for
perl,python,nodeandruby, configurable with thelangsetting. - Validate JSON before sending to a server, configurable with the
lintsetting. - Syntax highlighting is available using either
source-highlightorpygmentize. - View large documents using
less, disabled by default but may be toggled with theusepagersetting. - Toggle display of network requests with the
verbosesetting. - Configure default server and database with the
serveranddatabasesettings. - Use the
savecommand to save response documents to files. - Familiar readline line editing with command history
- Inline manual with the
helpcommand.
Authentication API
- Login and logout from servers using the
loginandlogoutcommands. - Create, edit and delete from the users database with the
usercommands. - Retrieve information about the current session with the
whoamiandsessioncommands. - Switch between authenticated servers within the same terminal session.
- Create, list and delete server administrators with the
admincommands. - Modify database-level administrators and members with the
securitycommands. - Use the
passwdcommand to change passwords.
Note that no client-side password generation is performed so you must be using couchdb 1.2.0 or later to be able to generate hashed passwords on the server.
Server API
- View server statistics with the
statscommand. - View server logs with the
logcommand. - Restart a server with the
restartcommand. - View active tasks with the
taskscommand. - Generate uuids with the
uuidscommand. - View server version with the
versioncommand.
Configuration API
- View server configuration with the
config getcommand. - Edit server configuration keys with the
config setcommand. - Delete server configuration keys with the
config rmcommand.
Database API
- Select a database with the
dbcommand. - List databases with the
db lscommand. - Add databases with the
db addcommand. - Delete databases with the
db rmcommand. - View database information with the
db infocommand. - Compact a database with the
db compactcommand. - Perform view cleanup with the
db cleanupcommand. - Synchronize uncommitted changes with the
db commitcommand. - View changes with the
db changescommand. - Get and set the revisions limit with the
db revslimitcommand.
Document API
- List document with the
doc lscommand. - Create documents with the
doc addcommand. - Edit documents with the
doc editcommand. - Delete documents with the
doc rmcommand. - View documents with the
doc getcommand. - Inspect HTTP headers with the
doc headcommand. - Retrieve the revision with the
doc etagcommand. - Copy documents with the
doc copycommand. - Add, update and delete documents in bulk using the
bulkcommands. Include more information about documents using the
revs,revsinfo,conflictsandseqsub-commands of thedoccommand.
Attachments API
- Attach a file with the
attachcommand. - Attach multiple files with the
attach filescommand, supports simple directory globbing. - Delete multiple attachments with the
attach rmcommand. - Download multiple attachments with the
attach getcommand.
Note that only standalone attachments are supported, there are no plans to support inline attachments.
Replication API
- Use the
replsub-commandsadd,ls,edit,rmandgetto manipulate replications. - Determines replication database name from the server configuration and verifies the database exists.
- Use
repl filterto create a replication document that represents a filtered replication. - Use
repl docsto create a replication document that only replicates specific documents.
Note that only the modern replication API that operates on the replicator database is supported, there are no plans to support the previous replication API.
Alias
- Use the
aliascommands to create, update and delete aliases for frequently used servers (and databases). - Use alias references with the
cdcommand to connect to a server by alias. - Use alias references with the
replcommands to replicate by alias.
Settings
- Configure settings at runtime with the
settings setcommand. - Save and load settings with the
settings saveandsettings loadcommands. - Restore to default settings with the
settings resetcommand. - Shortcut commands for frequently used settings.
Templates
- Write document templates using
perl,python,nodeandrubyor just write JSON if you prefer. - Test templates with the
tpl parsecommand. - Modify and inspect template environment variables with the
tpl set,tpl get,tpl cleanandtpl printcommands. - Generate a user template set from the system templates using
tpl copy. - Configure the language used for template parsing with the
templatelangsetting. - Configure the default templates used with the
tpl*settings.
Syntax Highlight
- Switch between the default settings using the
hiliteandpygmentscommands. - Configure a different highlighter using the
hiliteandhiliteoptssettings. - Use different style and language files for
source-highlightwith theshstyleandshlangsettings.
Note that the default (and recommended) highlighter is source-highlight as it is significantly faster than pygmentize and easier to customize.
Bugs
Bug reports are welcome, please raise an issue if you encounter a bug.
Dependencies
Optional Dependencies
These dependencies are optional as rlx(1) works without them but some functionality will not work as expected.
- vim for document creation and editing
- perl, python, node or ruby for pretty printing JSON documents
- less for displaying large documents
- source highlight or pygmentize for highlighting JSON documents
- w3m The default browser for launching HTML pages, configurable with the
browsersetting.
Database Version
- Initially tested with couchdb
1.2.1and subsequently migrated to using1.3.0.
Languages
These are the language versions used for testing external JSON interpreters:
perl >= 5.16.3withURI::Escape(runcpan URI::Escapeto install)python >= 2.7.3, untested with python 3.x.xruby >= 1.9.3is required to enable JSON quirks mode so that primitive types are available for parsing and generationnode >= 0.8.21
11 years ago