3f/eoc-cli

CouchDB Command-Line Client.

0.5.4 2018-03-06 11:56 UTC

This package is not auto-updated.

Last update: 2024-11-17 08:23:06 UTC


README

Latest Stable Version Latest Unstable Version Build Status Scrutinizer Code Quality License Total Downloads

Elephant on Couch Command-Line Interface

EoC CLI is a CouchDB's Command-Line Interface (CLI) made in PHP programming language.

Composer Installation

To install EoC CLI, you first need to install Composer, a Package Manager for PHP, following those few steps:

curl -s https://getcomposer.org/installer | php

You can run this command to easily access composer from anywhere on your system:

sudo mv composer.phar /usr/local/bin/composer

EoC CLI Installation

Once you have installed Composer, it's easy install Elephant on Couch CLI.

  1. Move into the directory where you prefer install EoC CLI:
cd /usr/local
  1. Create a project for EoC CLI:
sudo composer create-project 3f/eoc-cli
  1. For your convenience create a symbolic link for the couch executable in your /usr/local/bin directory:
sudo ln -s /user/local/eoc-cli/bin/couch.php /usr/local/bin/couch

Supported Commands

Lists commands.

couch list [--xml] [--raw] [--format="..."] [namespace]

Displays help for a command.

couch help [--xml] [--format="..."] [--raw] [command_name]

Connects to CouchDB server.

couch connect [-s|--server[="..."]] user

Uses the specified database.

couch use database

Alias of use.

couch select database

Creates a new database.

couch create database

Deletes the specified database, if not in use.

couch delete database

Displays information about the selected database.

couch info

Starts a compaction for the current selected database or just a set of views.

couch compact [--design-doc="..."]

Removes all outdated view indexes.

couch cleanup

Makes sure all uncommited database changes are written and synchronized to the disk.

couch commit

Returns the tail of the server's log file.

couch log [--bytes[="..."]]

Restarts CouchDB server.

couch restart

Gets the list of active tasks.

couch status

Returns a list of generated UUIDs.

couch uuids [--count[="..."]]

Displays CouchDB server and client versions.

couch version

Returns a list of all databases on this server.

couch alldbs

Queries a view and outputs the result.

couch query [--key="..."] [--startkey="..."] [--endkey="..."] [--startkey-docid="..."] 
[--endkey-docid="..."] [--limit="..."] [--group-results] [--group-level="..."] 
[--do-not-reduce] [--include-docs] [--exclude-results] [--exclude-endkey] 
[--reverse-order] [--skip="..."] [--include-conflicts] [--include-missing-keys] 
[--map="..."] [--reduce="..."] [--language="..."] design-doc/view-name [keys1] ... [keysN]

Requirements

PHP 5.4.7 or above. Shmop library is also required.

Authors

Filippo F. Fadda - filippo.fadda@programmazione.it - http://www.linkedin.com/in/filippofadda

License

Elephant on Couch Command-Line Interface is licensed under the Apache License, Version 2.0 - see the LICENSE file for details.