Sympl CLI - Feature Discussion

Something new in Sympl compared to Symbiosis is the CLI.

There’s a pre-release version included at the moment, which has support for a few services, notable web (creating/enabling/disabling/deleting sites), mysql (creating/enabling/disabling/deleting databases) and backups (taking/listing) backups, with similar plans for FTP, DNS and email.

Similarly, there will be options to change settings, and enable/disable things as well as check the confguration of various things.

You can try it out with sympl on any Sympl release, but post here if you have any specific requests and I’ll see if I can work them in!

How is this going? Is there a list of available commands anywhere, other than sympl --help?
I do hope this isn’t another Bytemark-style code-led thing with no documentation!

Sorry this doesn’t do anything yet, but it may be in a new version.
Run ‘sympl update’ for an updated version.

There’s an update on the testing branch at the moment from @6np, which adds FTP configuration. The original plan was to add to this as and when I could, but have been focussing on fixing bugs and dealing with technical debt.

The long term plan is to update the CLI and wiki documentation as things are updated.

If there’s specific functionality you’re looking for, I could bump that up the list though.

Sounds great. A list of the current possible commands would be good.

It’s quite basic at the moment, but the supported commands are now on the wiki at Sympl Command Line - Sympl Wiki.

1 Like

I’m not really looking for anything in particular, but it was difficult to know what’s available without a list! The command I tried was to create a mailbox. But that wasn’t a runner.
My primary plea is that you should write the documentation (or at least some of it) before you write the code. Otherwise it ends up an undocumented puzzle and may not end up doing what it was intended for.
If you start by sharing the functional idea, people might be able to offer tweaks that would make it better at no coding cost. Leave it till after the code is written, and you’re facing lots of rework, so changes don’t happen.
Guess who spent many years working as a technical author!

That’s exactly what I’ve done with the sympl-ssl re-implimentation, documenting exactly how it worked previously (and finding quite some bugs while doing so), fixing it in the documentation, and using that as comments for the new code.

I’m hoping to be able to document how all the current packages and scripts function now I’ve got a batter handle on how they are actually working (versus how they are expected to work), so the workload can be spread around a bit more in the future.

I tried sympl web create just now.
It worked, but I had done sudo sympl web create domain.com which left me with /srv/domain.com owned by root:sympl
I guess I shouldn’t have used sudo, but how can you tell?

It should be creaing things as the Sympl user either if using sudo or not, and everything using the Sympl CLI should be okay to run as the Sympl user.

I’ll add a bug for that, but you’ll want to sudo chown sympl /srv/domain.com or you’ll get some panicy sounding emails from cron.

I was exploring the sympl wiki today and just, to my shame, discovered the Sympl Command Line tools! What a discovery - I’ve been doing everything the Symbiosis way and creating folders and using phpMyAdmin (and getting frustrated) creating databases for WordPress sites

This will now take seconds with the command line tools versus about 15 to 30 minutes (depending on interruptions!) using the file/folder + phpMyAdmin method of old.

I was just wondering, what are the plans for the FTP and Mailbox tools? Any ETA? I’d contribute if my skills weren’t confined to PHP and frontend design.

There is FTP functionality in the Buster version, but it needs testing and copying over to Stretch at the moment.

Mail functionality is a bit more complex, although the FTP stuff should be be a good start, and there may be some news on that front reasonably soon…

The idea of the new CLI is to make the common things easier to use, making them a single line where needed, and making it easier to script things.

1 Like

Just a quick update: The FTP functionality for the Sympl command line is now live on all Sympl versions, so give it a try.

Assuming no significant issues, I should be able to roll out an equivalent for the mailbox admin functionality soon.