CipherStash Documentation

Export the Schema of a Collection with Stash CLI

You can export the current schema of a collection. The schema will be written to stdout as JSON. The output matches the shape of a JSON schema definition file, but also includes the collection name, the collection ID, and index meta ($indexId, $prpKey and $prfKey).

In order to successfully export a collection schema, you must be logged in.


stash export-schema <collection-name> [--profile <profile>] [--help]


The only argument is <collection-name>, the name of the collection to export the schema for. The collection must already exist with the given name within the workspace.


Export the schema for the movies collection:

$ stash export-schema movies

Exit Status

The exit status will be 0 if the schema was successfully exported. An exit status of 1 indicates a failure to retrieve the collection, most likely because the collection does not exist, credentials were invalid, or the server was unavailable.

Whenever a non-zero exit status is returned, a helpful error message is printed to standard error.