lethe – The command line interface

Lethe is implemented as a package with support for multiple user interfaces. This section describes using the command line interface.

There is also a Web interface that is recommended for typical use. Some features are available via only one interface.


write CLI interface extending documentation


write a tutorial

Command reference

Lethe provides one executable script: lethe. It runs a command that accesses a specific store with nodes.


links to user documentation for stores, nodes, DVCS backends, etc

The standard --help and --version options are supported. Run lethe -h to see all supported options and commands.

These options specify the store to use:

-s <store>, --store <store>

Use store as the path to the store DVCS repo.

-d <dvcs>, --dvcs <dvcs>

Use dvcs as the DVCS module handling the store data. Run lethe -h to see the list of supported DVCS backends.


link to their documentation

-i <index>, --index <index>

Access index file at specified path. This is needed for search and access to nodes not via their UUIDs.

-c <cache>, --cache <cache>

Use cache as temporary cache directory. This is not used in the current version of Lethe.


update when the cache is used

The command name follows them with command options and arguments after it. These commands are currently supported:


Initialize the store for an empty site.

sync [nodes [nodes ...]]

Update the index entries for given nodes or all.

If no nodes are specified, entries of removed nodes are deleted and all current nodes are updated. If a specified node is missing, its entry is removed from the index.

This command is required before any command can identify a node not by its UUID. For this reason only UUIDs are accepted as nodes here.

show <node>

Output the next of given node.

search [query]

List UUIDs and titles of all nodes matching query.

By default only titles, aliases and tags are searched for the node.

-f, --full

Use the full search: check also all property values and in future node text.


move short/full search definition elsewhere: Web UI will use it too

props <node>

List names and values of properties of the node.

-p <prop>

Output only the values of property named prop.

tags <node>

List tags of node.


Add a new node. See the section on editing nodes above.

edit <node>

Edit an existing node. See the section on editing nodes above.

All commands other than sync identify nodes by the same terms that a short search would find them. If such search would find multiple nodes, any of them will be used. Specify the node UUID to be certain that this node will be found.

Editing nodes

There are two commands for editing nodes via the command line interface: add and edit. The first adds a new node while the second edits an existing node. They both serialize the node to the multipart file format and open it in the text editor specified in the EDITOR environment variable.

A multipart file consists of parts separated by the exact line as the first line of the file (the separator). The content of the separator is not important, while it must be different from any line in any part of the file. The first part initially contains description of the following parts. Missing parts are treated as empty. (The multipart format is inspired by and different than the MIME multipart message format.)

Editing nodes with this interface requires the knowledge of node files format and props file format. Important wiki features like preview are not supported by this interface.

The Web interface has more complete support for editing with specific fields for known node properties.

Table Of Contents

Previous topic

Introduction and features

Next topic

The Web interface

This Page