Extending sTeam shell commands

(ˢᵒᶜⁱᵉᵗʸserver) aims to be a platform for developing collaborative applications.
sTeam server project repository: sTeam.

Break the PR

A lot of new commands have been added to the sTeam-shell script.

The earlier PR sent  was addressing a lot of issue’s. As a result the PR was cherry picked and rebased to form smaller PR’s for each issue.

Issue. Github Issue Github PR
Add directory location for libxslt.so Issue-25 PR-66
Makefile.in changes to add the files in the tools directory to the installed location. Issue-27 PR-67

Import from git script

The import to git script was further enhanced to support the feature whereby a user can specify the name of the object in the sTeam directory when a single object is been imported.

The user can now import a single object to the steam work area using the import-from-git script.

The command works for objects of all mime-types.
Two formats for the command are supported.

Issue. Github Issue Github PR
Add utility to support single import in import-from-git script . Issue-16 PR-76

Format 1:

import-from-git.pike ~/gitfolder/zy.mp3 /home/sTeam/

This would create the object in the sTeam directory. The new object would have the same name as the object in the git directory.

Format 2:

import-from-git.pike ~/gitfolder/zy.mp3 /home/steam/ab.mp3

This would create an object with the name ab.mp3 in the sTeam directory. If the object exists from before, the contents of it will be over written with the contents of the object from the git-folder.

Note: Here ‘/’ at the end of the steam directory is used as a distinguishing factor between a directory and an object. Be careful while passing the steam directory in the command or it would throw error.

List User’s

The command to list all the existing user’s in the sTeam server was also added to the steam-shell.

Issue. Github Issue Github PR
List users. Issue-72 PR-78


The user after creation needs to be activated by the root user. Thus a user can then access his steam-shell command line by passing the parameters of user name, host name or port number.

./steam-shell.pike -u uname -h hname -p pno

Passing Arguments to the sTeam-shell

The sTeam shell was modified during it’s integration with vi. This had introduced a bug where by the above parameters where not been able to pass along when a command to the sTeam-shell was passed as an argument. The issue was addressed and resolved.

The user can pass arguments like user name, host and port-number to the steam-shell.pike along with the steam-commands.

Issue. Github Issue Github PR
Add utility to support passing arguments to the sTeam-shell. Issue-71 PR-75


./steam-shell.pike -u user -h host -p portno steam-command


Modularize the tasks

The commands for user manipulation were grouped under their operations like create, delete or list. Thus the commands were modularize.

Issue. Github Issue Github PR
The user commands have been modularized based on the actions they perform. Issue-73 PR-81

The action create, delete and list now support user operations.

To create a user.

create user test

The terminal would ask for password and email-id.

To delete a user

delete user test

To list all the users

list users

Modularize users

Create a file

The command to create a file of any type was added to the sTeam-shell. The code for creation and deletion of objects in the sTeam shell was modified and optimized.

The user can now create a file of any type from the command line.
The mime-type of the file is auto-detected.

Issue. Github Issue Github PR
Create a file from sTeam-shell Issue-79 PR-82


create file filename destination

This would create a file with file name as specified in the given destination. The file name can be like xyz.txt / xyz.pike / xyz.jpg / xyz.mp3. The destination " . " means the current destination.

More commands for groups

The commands to create, join, leave and list groups were added by my colleague Siddhant Gupta. The branch was merged with my working repo. The merge conflicts were successfully resolved. More commands for operations of a group were added.  A user can list all the members of a group, list groups that a user is member of and delete a group.

Issue. Github Issue Github PR
Create a file from sTeam-shell Issue-80 PR-84


  • To list all the groups that a user is member of.
list my groups
  • To view all the members of a group.
list groupname members
  • To delete a group
delete groupname

Support for sending mails

The steam-shell user can now send mails. The utility to support mails was added. The earlier web.spm package was analyzed to find the existing classes used in the web interface in order to support this utility. The browser.pike file can in handy.

Issue. Github Issue Github PR
Add utility to send emails. Issue-74 PR-85
 The user can now send emails from the steam-shell.pike.



This would ask the user to enter the recipients. The recipients can be a sTeam user, a group or an external email.

Note: The recipients should be separated by “,”.

Then the user has to write the email subject and the email body.
After this the user would be then notified about the status of the email.

Successfully sent mail


Mail failed due to wrong recipient


Mail failed due to empty subject


Finally, the command to display the logs of the sTeam server from the steam-shell command line was added.

The user can now see the logs of the sTeam server from the command line. The logs are stored in the /var/log/steam/ directory.

Issue. Github Issue Github PR
Open sTeam-server logs from sTeam-shell. Issue-83 PR-86



The user will be notified about the logs and would be asked to input the name of the logs to open.

The log files include errors, events, fulltext.pike, graphic.pike, http, search.pike, security, server, slow_requests, smtp, spm..pike and tex.pike.
Enter the name of the log files you want to open.
Note: The filenames should be separated by ",".

Input the name of the log files to open. The log files would be then opened in a vi window. User can open multiple logs.

Opened Logs


Checkout the FOSSASIA Idea’s page for more information on projects supported by FOSSASIA.