osctl
v1.0.0
Published
An interactive terminal client for OpenSearch operations
Readme
OSCTL
osctl is an interactive terminal interface, built with Ink,
for managing OpenSearch clusters. It is an alternative to curl and the REST API for routine
administration. It also removes some ceremony, like resolving seq_no and primary_term on policy
updates and carrying aliases over a rollover.
Quick start
Install with npm (Node 20 or later):
npm install -g osctlOr run it once without installing:
npx osctlStandalone binaries are also available. The installation script keeps versions side by side and
points a current symlink at the active one; run it again to update, or with -v <version> to pin
or roll back:
mkdir -p ~/.osctl && cd ~/.osctl
wget https://raw.githubusercontent.com/jboix/osctl/main/install-osctl.sh
chmod +x install-osctl.sh
./install-osctl.sh
export PATH="$HOME/.osctl/current:$PATH"To install by hand, take the archive for your platform from the
releases page and extract it. The archive carries the
execute bit, and SHA256SUMS lists the checksum of every archive:
tar -xzf osctl-linux-x64.tar.gz
./osctlThen start osctl and connect to a cluster:
osctl
> /profile addCommands
| Family | Commands |
|-------------|------------------------------------------------------------------------|
| /index | ls, create, rm, rollover, show, settings, settings apply |
| /alias | ls, apply, rm |
| /template | ls, show, apply, rm |
| /component| ls, show, apply, rm |
| /policy | ls, show, apply, rm, explain |
| /cluster | info, settings, settings apply, nodes, explain |
| /task | ls, show, cancel |
| /snapshot | repo ls, ls, show, create, restore, rm |
| /reindex | run a reindex as a background task |
| /backup | ls, show, apply, rm |
| /profile | add, ls, default, rm |
[!TIP] Listings and removals accept glob patterns:
/index ls core_*.
See docs/design/commands.md for the arguments, behavior, and backing API of each command.
Contributing
See the contributing guide. Participation is governed by the Code of Conduct.
License
MIT, see LICENSE.

