Announcing the CMIS Shell (cmissh) - command-line client for CMIS


We’ve been working recently on a CMIS command-line client, called “cmissh”, based on the Apache Chemistry client code.

We have decided to donate the code to the Apache Chemistry project, as there are no dependencies on Nuxeo code in it.

cmissh can be used interactively (with a nice autocompletion console) to explore and run CRUD operations on a CMIS server, or as a testing tool. We’ve included, for instance, a test script in the distribution, called ‘testscript’, that can be run against the Nuxeo demo server and will fail on errors. I’ve also been able to use cmissh against the Chemistry test server.

If you are busy, you can download a binary distribution (built just before the migration to Apache) from here:

(or look for a later build here:

and test it against our public CMIS demo server (available here: using the “testscript” script included in the distribution.

Here is a sample session:

SFs-macbook% cmissh
CMIS Shell by Nuxeo ( Type 'help' for help.
|:> help
Usage: help [command]

To get help of a specific command, type 'help name_of_command'.

List of available commands:

cat - Read the stream of the target document to the console
cd - Change working item
connect [open] - Open a new session
disconnect [close] - Close current session
dump [tree] - Dump a subtree
exit [bye|quit] - Exit
get [getstream] - Downloads the stream of the target document
help - Help
id - Identity of the specified entry
lcd - Change local working directory
lls [ll] - List local directory content
lpopd - Pop local directory stack
lpushd - Push local directory stack
lpwd - Print local working directory
ls - List entries in working directory
match - Fails if last command result doesn't match the pattern
mkdir - Create a folder given its name
mkfile [mkdoc] - Create a document of the given name
popd - Pop directory stack
propget - Print the value of the given property on the current context object
props - (Obsolete) Print the value of all the properties of the current context object
propset - Set the value of a property on the current context object
pushd - Push directory stack
put - Uploads the stream of the target document
pwd - Print working directory
rm [del] - Removes an object of the given name
setstream - Set the given file content as a stream on the current context object

|> connect

|> ls

|> cd default

|> ls

|> cd default-domain

|> ls

|> cd workspaces

|> ls

|> cd demo-workspace

|> ls

|> cd pictures

|> ls

|> put /Users/fermigier/Pictures/sf-square.jpg 

|> ls

|> propget sf-square.jpg
cmis:baseTypeId = cmis:document
cmis:changeToken = [null]
cmis:checkinComment = [null]
cmis:contentStreamFileName = sf-square.jpg
cmis:contentStreamId = [null]
cmis:contentStreamLength = [null]
cmis:contentStreamMimeType = [null]
cmis:createdBy = Administrator
cmis:creationDate = GregorianCalendar(2010-01-21T16:14:05.000+01:00)
cmis:isLatestMajorVersion = false
cmis:isLatestVersion = true
cmis:isMajorVersion = false
cmis:isVersionSeriesCheckedOut = false
cmis:lastModificationDate = GregorianCalendar(2010-01-21T16:14:05.000+01:00)
cmis:lastModifiedBy = Administrator
cmis:name = sf-square.jpg
cmis:objectId = 01e009cc-11fd-4f84-a710-5af9cc12a97c
cmis:objectTypeId = File
cmis:versionLabel = [null]
cmis:versionSeriesCheckedOutBy = [null]
cmis:versionSeriesCheckedOutId = [null]
cmis:versionSeriesId = 01e009cc-11fd-4f84-a710-5af9cc12a97c
dc:contributors = [Ljava.lang.String;@555c07d8
dc:coverage = [null]
dc:description = [null]
dc:expired = [null]
dc:format = [null]
dc:issued = [null]
dc:language = [null]
dc:rights = [null]
dc:source = [null]
dc:subjects = [null]
dc:title = sf-square.jpg
dc:valid = [null]
filename = [null]
icon = /icons/file.gif
icon-expanded = [null]
major_version = 1
minor_version = 0
size = [null]
uid = [null]

|> get sf-square.jpg
Object stream saved to local file: ./sf-square.jpg

|> lls

|> id
Object 0a37ffea-fd65-4e78-b3bc-074168dd99f9 of type PictureBook

|> quit