User Guide
UNIon is a desktop app for organizing various types of contacts, optimized for use for the vast majority of computing students. If you are already familiar with Unix commands, then UNIon will be easy for you to use.
- Quick start
- Features
- FAQ
- Command summary
Quick start
- Ensure you have Java
11
or above installed in your Computer - Download the latest JAR file from here
- Copy the file to the folder you want to use as the home folder for your UNIon
- Double-click the file to start the app. The GUI should appear in a few seconds, and it should look similar to this image below. Note how the app contains some sample contacts
- Type the command in the command box and press Enter to execute it. e.g. typing
help
and pressing Enter will open the help window.
Some example commands you can try:-
ls -contacts
: Lists all contacts -
touch -n John Doe -p 98765432 -e johnd@example.com -a John street, block 123, #01-01
: Adds a contact namedJohn Doe
to UNIon -
rm 3
: Deletes the 3rd contact shown in the current list -
rm -contacts
: Deletes all contacts -
exit
: Exits the app
-
- Refer to the Features below for details of each command.
Features
Notes about the command format:
-
Words in
UPPER_CASE
are the parameters to be supplied by the user
e.g. intouch -n NAME
,NAME
is a parameter which can be used astouch -n John Doe
-
Items in square brackets are optional
e.g.-n NAME [-t TAG]
can be used as-n John Doe -t friend
or as-n John Doe
-
Items with
…
after them can be used multiple times including zero times
e.g.[-t TAG]…
can be used as-t friend
,-t friend -t family
etc -
Parameters can be in any order
e.g. if the command specifies-n NAME -p PHONE
,-p PHONE -n NAME
is also acceptable -
If a parameter is expected only once in the command but you specified it multiple times, only the last occurrence of the parameter will be taken
e.g. if you specify-p 12341234 -p 56785678
, only-p 56785678
will be taken -
For commands that do not take in parameters (such as
help
andexit
) , extraneous parameters will be ignored
e.g. if the command specifieshelp 123
, it will be interpreted ashelp
-
Flags such as
-contacts
and-folders
are part of the command word and must be placed immediately after the main command word
e.g. (ls -contacts
notls -invalid_flag -contacts
)
Viewing help: help
Shows a message explaining how to access the help page.
Format: help
Managing contacts
Adding a contact: touch
Adds a contact to UNIon.
Format: touch -n NAME -p PHONE -e EMAIL -a ADDRESS [-t TAG]…
-
NAME
has a character limit of 70 characters -
NAME
is case-sensitive as John Doe and john doe will be treated as different contacts -
PHONE
accepts any length to allow for phone formats from different countries -
ADDRESS
is truncated by an ellipsis if the contents cannot fit in one line - Duplicate
TAG
s are ignored - We recommend that
TAG
s are kept to a maximum of 50 characters. If a tag has more than 50 characters, you may not be able to view the entire tag (depending on the size of the window)

Examples:
touch -n John Doe -p 98765432 -e johnd@example.com -a John street, block 123, #01-01
touch -n Betsy Crowe -t friend -e betsycrowe@example.com -a Newgate Prison -p 1234567 -t criminal
Listing all contacts: ls -contacts
Shows a list of all contacts in UNIon.
Format: ls -contacts
Editing a contact: vim
Edits an existing contact in the UNIon.
Format: vim INDEX [-n NAME] [-p PHONE] [-e EMAIL] [-a ADDRESS] [-t TAG]…
- Edits the contact at the specified
INDEX
. The index refers to the index number shown in the displayed contact list. The index must be a positive integer 1, 2, 3, … - At least one of the optional fields must be provided
-
NAME
has a character limit of 70 characters -
PHONE
accepts any length to allow for phone formats from different countries -
ADDRESS
is truncated by an ellipsis if the contents cannot fit in one line - Duplicate
TAG
s are ignored - We recommend that
TAG
s are kept to a maximum of 50 characters. If a tag has more than 50 characters, you may not be able to view the entire tag (depending on the size of the window) - Existing values will be updated to the input values
- When editing tags, the existing tags of the contact will be removed i.e. adding of tags is not cumulative
- You can remove all the contact’s tags by typing
-t
without specifying any tags after it
Examples:
-
vim 1 -p 91234567 -e johndoe@example.com
Edits the phone number and email address of the 1st contact to be91234567
andjohndoe@example.com
respectively -
vim 2 -n Betsy Crower -t
Edits the name of the 2nd contact to beBetsy Crower
and clears all existing tags
Locating contacts by name: find -contacts
Finds contacts whose names contain any of the given keywords.
Format: find -contacts KEYWORD [MORE_KEYWORDS]
- The search is case-insensitive. e.g.
hans
will matchHans
- The order of the keywords does not matter. e.g.
Hans Bo
will matchBo Hans
- Only the name is searched
- Only full words will be matched e.g.
Han
will not matchHans
- Contacts matching at least one keyword will be returned (i.e.
OR
search) e.g.Hans Bo
will returnHans Gruber
,Bo Yang
- All flags after
-contacts
will be ignored e.g.find -contacts -invalid_flag Hans
is equivalent tofind -contacts Hans
Examples:
-
find -contacts John
returnsjohn
andJohn Doe
-
find -contacts alex david
returnsAlex Yeoh
,David Li
Deleting a contact: rm
Deletes the specified contact from UNIon.
Format: rm INDEX
- Deletes the contact at the specified
INDEX
- The index refers to the index number shown in the displayed contact list
- The index must be a positive integer 1, 2, 3, …
Examples:
-
ls -contacts
followed byrm 2
deletes the 2nd contact in UNIon -
find -contacts Betsy
followed byrm 1
deletes the 1st contact in the results of thefind -contacts
command
Clearing all contacts: rm -contacts
Clears all contacts from UNIon.
Format: rm -contacts
Managing folders
Adding a folder: mkdir
Creates a folder for contacts to be added into.
Format: mkdir FOLDER_NAME
- Creates a folder with the name
FOLDER_NAME
-
FOLDER_NAME
has a maximum character limit of 30 - Duplicate folder names are not allowed
Examples:
-
mkdir CS2103
creates a folder with the nameCS2103
Adding contacts to a folder: echo
Adds existing contacts into a folder.
Format: echo INDEX [INDEX]... >> FOLDER_NAME
- Adds the contacts at the specified indices into the given folder. The index refers to the index number shown in the displayed contact list. The index must be a positive integer 1, 2, 3, …
-
INDEX
must be a valid index referring to an existing contact in the current list of contacts shown -
INDEX
must not already be in the folder - If multiple
INDEX
are passed, they must be unique and cannot contain duplicates -
FOLDER_NAME
must be an existing folder
Examples:
-
echo 3 >> CS2103
Adds contact 3 to CS2103 folder -
echo 3 4 1 9 10 >> CS2103
Add contacts 3, 4, 1, 9, 10 to CS2103 folder
Deleting a contact from folder: rm
Deletes the specified contact from the list of contacts from the folder.
Format: rm INDEX >> FOLDER_NAME
- Deletes contact at
INDEX
as seen on the contact list from the folder namedFOLDER_NAME
Examples:
-
rm 1 >> CS1010
deletes a contact that corresponds to index 1 in the contact list from the folderCS1010
Listing all folders: ls -folders
Retrieves list of all folders created.
Format: ls -folders
Editing a folder name: mv
Replaces the old folder name with the new folder name.
Format: mv OLD_FOLDER_NAME | NEW_FOLDER_NAME
-
NEW_FOLDER_NAME
has a maximum character limit of 30
Locating folders by name: find -folders
Finds folders whose name contains any of the given keywords.
Format: find -folders KEYWORD [MORE_KEYWORDS]
- The search is case-insensitive. e.g.
cs2103
will matchCS2103
- The order of the keywords does not matter. e.g.
Team Project CS2103
will matchCS2103 Team Project
- Partial words will be matched e.g.
CS
will matchCS2103
andCS2101
- Folders matching at least one keyword will be returned (i.e.
OR
search). e.g.CS2103 Team Project
will returnCS2103
,Team Project
- All flags after
-folders
will be ignored e.g.find -folders -invalid_flag CS2103
is equivalent tofind -contacts CS2103
Examples:
-
find -folders CS
returnsCS2103
andCS2101
-
find -folders CS2103 Team Project
returnsCS2103
,Team Project
Deleting a folder: rmdir
Deletes a specified folder
Format: rmdir FOLDER_NAME
- Deletes folder with the name
FOLDER_NAME
Examples:
-
rmdir CS1010
deletes a folder with the nameCS1010
Clearing all folders: rm -folders
Clears all folders from UNIon.
Format: rm -folders
Exiting the program: exit
Exits the program.
Format: exit
Saving the data
UNIon data are saved in the hard disk automatically after any command that changes the data. There is no need to save manually.
Editing the data file
UNIon data are saved as a JSON file [JAR file location]/data/addressbook.json
. Advanced users are welcome to update data directly by editing that data file.

FAQ
Q: How do I transfer my data to another Computer?
A: Install the app on the other computer and overwrite the empty data file it creates with the file that contains the data of your previous UNIon home folder.
Command summary
Action | Format, Examples |
---|---|
Help | help |
Add new contact |
touch -n NAME -p PHONE -e EMAIL -a ADDRESS [-t TAG] e.g., touch -n James Ho -p 22224444 -e jamesho@example.com -a 123, Clementi Rd, 1234665 -t friend -t colleague
|
List contacts | ls -contacts |
Edit contact |
vim INDEX [-n NAME] [-p PHONE] [-e EMAIL] [-a ADDRESS] [-t TAG] e.g., vim 2 -n James Lee -e jameslee@example.com
|
Find contact |
find -contacts KEYWORD [MORE_KEYWORDS] e.g., find -contacts James Jake
|
Delete contact |
rm INDEX e.g., rm 3
|
Clear contacts | rm -contacts |
Add new folder |
mkdir FOLDER_NAME e.g. mkdir CS2103
|
Add contact to folder |
echo INDEX >> FOLDER_NAME e.g., echo 3 >> CS2103
|
Add multiple contacts to folder |
echo INDEX [INDEX]... >> FOLDER_NAME e.g. echo 3 4 1 9 10 >> CS2103
|
Delete contact from folder |
rm INDEX >> FOLDER_NAME e.g., rm 1 >> CS2102
|
List folders | ls -folders |
Edit folder name |
mv OLD_FOLDER_NAME | NEW_FOLDER_NAME e.g., mv CS2103 | CS2102
|
Find folders |
find -folders KEYWORD [MORE_KEYWORDS] e.g., find -folders CS2103
|
Delete folder |
rmdir FOLDER_NAME e.g., rmdir CS1010
|
Clear folders | rm -folders |