First-class non-interactive administrative CLI

I feel like there is one important piece missing from the current TS6 server tooling: a proper administrative CLI for managing a running server.

TS6 already provides ways to configure and start the server from the command line, as well as Query interfaces for interacting with a running instance. What seems to be missing is a first-class CLI that sits on top of those administrative capabilities.

For example, something along the lines of:

ts6ctl server list
ts6ctl client list --server 1
ts6ctl client kick 123 --reason "..."
ts6ctl channel create --name "..."

The important part is that this would be a non-interactive CLI designed for automation.

At the moment, if I want to automate server administration from something like a systemd service, I essentially have to either:

  • interact with a Query client;

  • implement a client for the WebQuery API myself; or

  • build/use some other application that wraps the Query interface.

None of these feels quite like the Unix-native experience I would expect from a server that is meant to be automated.

A proper administrative CLI could provide things like:

  • non-interactive authentication;

  • secure credential handling;

  • meaningful exit codes;

  • machine-readable output such as JSON;

  • consistent error handling;

  • Bash completion;

  • easy integration with systemd, cron, shell scripts, Ansible, etc.

For example:

ts6ctl client list --server 1 --output json | jq ...

would be much easier to integrate into an existing Linux environment than having every administrator write their own HTTP client and authentication layer.

I’m not suggesting replacing Query/WebQuery. Those interfaces are useful and should remain available for applications that need them.

What I’m suggesting is an official CLI that consumes those administrative capabilities and provides a stable, automation-oriented interface for administrators.

In other words:

TS6 has administrative APIs/interfaces, but it seems to be missing a first-class administrative CLI.

I think this would be particularly valuable for self-hosted Linux deployments and automation with systemd.

Is this something that is already planned, or is there a recommended approach for non-interactive server administration that I may have missed?

I’d support this as well. I know the basics of WebQuery and SSH, but for simple admin tasks an official CLI would still be much easier to use. Something like ts6ctl with JSON output and proper exit codes would make scripting and automation a lot easier, especially for smaller tasks where using WebQuery feels a bit overkill.

1 Like

Thank you for the input, I’ll forward it to the team to discuss.

5 Likes

Exactly. I imagine that, for Linux administration in general, this would end up being used more than the existing administration solutions themselves, simply because many Linux users/administrators are already accustomed to Bash scripting and CLI tools.

Being able to automate server tasks with Bash scripts would be a game changer for me. And it doesn’t seem like a particularly difficult or distant feature to implement, since the API is already there and the interactive commands through SSH Query are already quite similar to this.

I agree. On Linux especially, an official CLI would fit naturally into the way servers are already managed and automated.

The biggest advantage for me would be having a stable, supported interface for scripting common administrative tasks instead of building custom wrappers around WebQuery or SSH Query. Proper exit codes and machine-readable output such as JSON would also make it much easier to integrate with Bash scripts, systemd, cron or configuration management tools.

Since most of the underlying functionality already exists, a CLI could mainly act as an official layer on top of the existing APIs rather than introducing another completely separate administration interface.