I have created solid-shell-client, a console-based version of solid-auth-client supporting login, persistent sessions, and fetch for the console with the same API as solid-auth-client but based on solid-cli.
I have also created sol, a command-line and interactive shell illustrating some of the capabilities of the console client. [Edit : new link to the solid-shell release which is sol but separated from its original home inside solid-file-client]
From the command line, you can do things like this:
sol upload /public/mysite file1 file2 folderX/*
To use it in the interactive shell
sol shell
If sol is found to be useful, I’m thinking it should be more of a group project than solely belonging to me. Lots of things to be done - internationalization, asci-tables, plugin API for including other apps, etc. etc.
I would also very much value suggestions on names and locations. It’s all bundled with solid-file-client for now, but sol and solid-shell-client probably deserve distros of their own.
You could for example have a sol login command which queries the credentials from the user and then just stores the token to a file, but not the password.
Good ideas, thanks! I am in the process of moving sol to its own repo and disentangling it from solid-file-client. And thanks for reminding me about the npx thing. I specifically put sol in as both bin and script in the package.json so it could work with npx but then forgot to document that.
I’ve implemented your suggestion - if no password is specified, sol will prompt you for one and hide your typing with asterisks to block people from reading over your shoulder.
I just wanted to try out the shell tool and I installed it globally. I did
npm install -g sol
and I got as response,
+ sol@0.3.0
updated 1 package in 0.368s.
But when I call sol, or npx sol it is not found. I’m using node 11.6.0 over nvm. I already installed separately the solid-auth.client and also solid-file-client.
Finally I tried installing locally with similar results, the sol shell script is somehow missing. Do you have any hints?