Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
examples adding examples. Dec 30, 2015
rockspecs missed a fatal bug in luchia_get, trying again with 1.1.2 Dec 31, 2015
src missed a fatal bug in luchia_get, trying again with 1.1.2 Dec 31, 2015
tests add integration test for bad attachment file path. Jan 1, 2016
.gitignore adding ignore file. Jan 1, 2016
LICENSE fix links. Dec 30, 2015
config.ld specify ldoc output dir, clarify custom option. Jan 1, 2016
ldoc.custom.css pretty up nav headers. Jan 14, 2016


Lua API for CouchDB.

  • Compatible with Lua 5.1, 5.2, 5.3
  • 100% unit test coverage


It is recommended to install the LuaRocks package manager, as all required and optional dependencies are easy to install via this method.


  • lua-cjson
  • lualogging
  • luasocket


  • stdlib (prettier output for luchia_get)
  • ldoc (to generate local documentation)
  • lunatest (to run unit tests)
  • luacov (to view unit test coverage)

With LuaRocks, simply run:

luarocks install luchia

For manual installation, copy luchia.lua and the luchia directory from the source directory, and put them somewhere in your Lua package path.


See the online manual.

For local documentation, all documentation is inline, but is ldoc compatible.

To generate HTML documentation locally

  • Checkout this repository

  • Install ldoc luarocks install ldoc

  • In the root directory of the repository, run:

    ldoc .


The issue tracker for this project is provided to file bug reports, feature requests, and project tasks -- support requests are not accepted via the issue tracker. For all support-related issues, including configuration, usage, and training, consider hiring a competent consultant.

Unit tests

Luchia has full unit test coverage. They can be run with:

cd /path/to/luchia/tests
lua run_unit_tests.lua -v

Integration tests

The higher-level Luchia classes (luchia.database, luchia.document, luchia.utilities) have a full integration test suite. To run it, make sure that the default server settings in luchia.conf point to a valid, running CouchDB instance with full administrative access, and run:

cd /path/to/luchia/tests
lua run_integration_tests.lua -v