Command line tool to interact with exist-db instances (pre-release)

Overview

xst [ĭg-zĭst′]

Command line tool to interact with exist-db instances.

Built on top of @existdb/node-exist.

Installation

Until this package is officially released you can already use it by following the steps below

  1. clone this repository

    git clone https://github.com/line-o/xst
  2. change to the working directory

    cd xst
  3. install package dependencies

    npm install
  4. link this package into your global packages directory

    npm link

Usage

xst <command>

You can verify your installation is working with

xst --version

This will output 0.0.0-development for the moment.

xst --help

will output all available commands and

xst <command> --help

will output useful information how to use each of the commands.

Available Commands

Currently all command line examples from node-exist were ported over:

  • list list the contents of a collection in eXist-db
  • tree list the contents of a collection in eXist-db as a tree
  • upload upload a files and folders to a collection in eXist-db
  • install upload and install a package into eXist-db
  • execute execute queries in an eXist-db

Example

xst install path/to/my-package.xar

Installs a local XAR package into any database you have access to (with all its declared dependencies).

Configuration

By default xst connects to https://localhost:8443 as user admin.

NOTE: The instance you want to connect to must be running and XML-RPC has to be enabled.

Override any of the default connection parameters by setting environment variables prefixed with EXISTDB. In the following table you see a list of the parameters with their default values and a description.

variable name default description
EXISTDB_USER admin the user used to connect to the database and to execute queries with
EXISTDB_PASS empty the password to authenticate the user against the database
EXISTDB_SERVER https://localhost:8443 the URL of the database instance to connect to (only http and https protocols are allowed)

Example

EXISTDB_SERVER=http://127.0.0.1:8080 xst ls /db/apps

dotenv

dotenv(-cli) is a small script that allows you to read environment variables from a file in the filesystem.

preparation

  • Install dotenv-cli globally

    npm install -g dotenv-cli
  • create .env file in a folder with the settings that you need

    EXISTDB_USER=admin
    EXISTDB_PASS=my super secret p455w0rd!
    EXISTDB_SERVER=http://localhost:8080

use

prepend command line script with dotenv in the folder you created the .env file in

Examples

dotenv xst ls /db/apps

Note in order to pass options to xst you will need to separate dotenv with -- from the actual command.

dotenv -- xst ls --extended --color /db/apps

That also works when running the tests (on a remote server maybe or a different user)

dotenv npm test

You might also like...

Prismatic's CLI tool for managing prismatic.io resources from the command line

@prismatic-io/prism Prism is Prismatic's CLI tool that allows you to build, deploy, and support integrations in Prismatic from the comfort of your com

Oct 4, 2022

CloudCrafter CLI is a command-line interface tool that provides templates for common cloud resources to help you get started quickly.

CloudCrafter CLI CloudCrafter CLI is a command-line interface tool that provides templates for common cloud resources to help you get started quickly.

May 5, 2023

A minimalistic yet efficient way to stringify and revive instances via JSON.

json-instances Social Media Photo by Francisco J. Villena on Unsplash A minimalistic yet efficient way to stringify and revive instances via JSON. If

Jun 23, 2022

🐞 A NodeJS module to access Bugzilla instances through the REST API.

Bugzilla | Typesafe access to Bugzilla's REST API. Very early work in progress, getting info from a bug or searching bugs is the main priority right n

Nov 1, 2022

Experience Lab is a set of utilities that assist in creating instances of Microsoft Energy Data Services, performing data loads, and performing basic management operations.

Experience Lab - Microsoft Energy Data Services Build Status About Experience Lab is an automated, end-to-end deployment accelerator for Microsoft Ene

Dec 14, 2022

Synchronize multiple Pi-hole instances

Orbital Sync Orbital Sync synchronizes multiple Pi-hole instances for high availability (HA) using the built-in "teleporter". In other words, it perfo

Dec 30, 2022

An open-source, pretty, simple and fast meilisearch UI for managing your meilisearch instances

Meilisearch-UI An open-source, pretty, simple and fast meilisearch UI for managing your meilisearch instances [IMPORTANT] The main branch may be unsta

Dec 29, 2022

A simple web server exposing Hetzner cloud instances for consumption by the Prometheus HTTP service discovery.

Prometheus: Hetzner Service Discovery A server to provide automatic node discovery for Hetzner Cloud to Prometheus via HTTP service discovery. In cont

Oct 10, 2022

Argon - extension for VS Code and plugin for Roblox allowing easy two-way sync of code and instances

Argon - extension for VS Code and plugin for Roblox allowing easy two-way sync of code and instances

About Argon is a simple two-way sync plugin for Roblox and extension for Visual Studio Code allowing developers not only to sync code but every possib

Dec 29, 2022
Owner
Juri Leino
Freelance web-developer from Berlin. Writes JavaScript and XQuery for a living.
Juri Leino
GitHub Action to create a release PR using cargo-release

Action: (Cargo) release-pr A GitHub Action for creating "Release PRs" for Cargo projects. Purpose This action uses cargo-release to perform a release

null 18 Nov 16, 2022
Automated testing for single-page applications (SPAs). Small, portable, and easy to use. Click on things, fill in values, await for things exist, etc.

SPA Check Automated testing for single-page applications (SPAs). Small, portable, and easy to use. Click on things, fill in values, await for things e

Cory Leigh Rahman 5 Dec 23, 2022
AWS Lambda & Serverless - Developer Guide with Hands-on Labs. Develop thousands line of aws lambda functions interact to aws serverless services with real-world hands-on labs

AWS Lambda & Serverless - Developer Guide with Hands-on Labs UDEMY COURSE WITH DISCOUNTED - Step by Step Development of this Repository -> https://www

awsrun 35 Dec 17, 2022
🦄 A command line tool to get tokens on testnets quickly!

?? faucetli A command line tool to get tokens on testnets quickly! Usage Commands Usage $ npm install -g faucetli $ faucetli COMMAND running command..

Kira 60 Jan 1, 2023
A command-line tool to convert Project Zomboid map data into Deep Zoom format

pzmap2dzi pzmap2dzi is a command-line tool running on Windows to convert Project Zomboid map data into Deep Zoom format. Features Supports both python

Min Xiang 14 Dec 31, 2022
Command line tool that automatically migrates tests from protractor to playwright.

Protractor to Playwright migration tool This tool is designed to automatically migrate code from Protractor to Playwright. It is inspired by the "Migr

Amadeus IT Group 9 Nov 20, 2022
Command line tool that converts HTML to markdown.

@wcj/html-to-markdown HTML conversion tool to markdown. command line tool => @wcj/html-to-markdown-cli. Installation This package is ESM only: Node 14

小弟调调™ 11 Nov 6, 2022
📸 A command-line tool to generate code images of your local code right away from the terminal

?? rayli ?? A command-line tool to generate code images of your local code right away from the terminal Usage Commands Usage $ npm install -g rayli $

buidler's hub 45 Nov 4, 2022
🦄 A command line tool to get tokens on testnets quickly!

?? faucetli ?? A command line tool to get tokens on testnets quickly! Usage Commands Usage $ npm install -g faucetli $ faucetli COMMAND running comman

buidler's hub 56 May 11, 2022
A command-line tool to manage Deno scripts installed via deno install

??️ nublar nublar is a command-line tool to manage your scripts installed via deno install. ??️ Installation deno install --allow-read --allow-write -

Shun Ueda 16 Dec 26, 2022