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:

http://www.nuxeo.org/static/cmis/cmissh-20100115.zip

(or look for a later build here: http://www.nuxeo.org/static/cmis/).

and test it against our public CMIS demo server (available here:
http://cmis.demo.nuxeo.org/) using the “testscript” script included
in the distribution.

Here is a sample session:

SFs-macbook% cmissh
CMIS Shell by Nuxeo (www.nuxeo.com). 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 http://Administrator:[email protected]/nuxeo/site/cmis/repository
|> ls
default
|> cd default
|cmis.demo.nuxeo.org:default> ls
default-domain
|cmis.demo.nuxeo.org:default> cd default-domain
|cmis.demo.nuxeo.org:default-domain> ls
workspaces
sections
templates
|cmis.demo.nuxeo.org:default-domain> cd workspaces
|cmis.demo.nuxeo.org:workspaces> ls
demo-workspace
|cmis.demo.nuxeo.org:workspaces> cd demo-workspace
|cmis.demo.nuxeo.org:demo-workspace> ls
pictures
|cmis.demo.nuxeo.org:demo-workspace> cd pictures
|cmis.demo.nuxeo.org:pictures> ls
pony-jpg
dog-jpg
cat-jpg
|cmis.demo.nuxeo.org:pictures> put /Users/fermigier/Pictures/sf-square.jpg
|cmis.demo.nuxeo.org:pictures> ls
pony-jpg
dog-jpg
cat-jpg
sf-squared.jpg
|cmis.demo.nuxeo.org:pictures> 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]
|cmis.demo.nuxeo.org:pictures> get sf-square.jpg
Object stream saved to local file: ./sf-square.jpg
|cmis.demo.nuxeo.org:pictures> lls
sf-square.jpg
|cmis.demo.nuxeo.org:pictures> id
Object 0a37ffea-fd65-4e78-b3bc-074168dd99f9 of type PictureBook
|cmis.demo.nuxeo.org:pictures> quit
Bye