exsh — eXist-db Shell¶
exsh is a command-line tool to interact with an eXist-db server via its REST API. It is designed for shell scripting and pipe-friendly workflows.
Features¶
- Browse, read, upload, copy, edit, and delete documents on an eXist-db server
- Create and manage collections
- Bidirectional sync between local folders and remote collections
- Register multiple servers and collections with short nicknames
- Tab-completion for collection and document paths
- Usable as a Python library via
ExistClient
Quick start¶
# 1. Install
uv tool install git+https://github.com/ambs/exist-shell
# 2. Register your server
exsh server add localhost --port 8080 --user admin
# 3. Register a collection
exsh collection add mydata@localhost
# 4. Browse
exsh ls mydata
See Installation and Configuration for full details.
Commands at a glance¶
| Command | Description |
|---|---|
exsh ls <nick>[:<path>] |
List subcollections and documents |
exsh cat <nick>:<path> |
Print a document to stdout |
exsh put <file> <nick>:<path> |
Upload a local file |
exsh cp <src> <dst> |
Copy a document (local ↔ remote or remote ↔ remote) |
exsh edit <nick>:<path> |
Open a document in $EDITOR, re-upload if changed |
exsh rm <nick>:<path>... |
Delete one or more documents |
exsh mkdir <nick>:<path> |
Create a collection |
exsh sync <src> <dst> |
Sync a local folder and a remote collection |
exsh server add <host> |
Register a server |
exsh server ls |
List registered servers |
exsh server rm <nick> |
Remove a server |
exsh server rename <old> <new> |
Rename a server nick |
exsh collection add <name>[@<server>] |
Register a collection |
exsh collection new <name>[@<server>] |
Create and register a collection |
exsh collection ls |
List registered collections |
exsh collection rm <nick> |
Remove a collection from the config |