User Guide
CLI-nic is an application to help medical supply managers keep track of medical products and storage. It is optimized for these managers to update product supply conditions and access critical product information quickly via fast typing and efficient Graphical User Interface interaction.
- Quick start
-
Features
- Viewing help :
help - Accessing command history
- Adding a supplier :
add - Adding a warehouse :
add - Assigning macro to selected command string:
assignmacro - Autocomplete
- Clearing all entries :
clear - Deleting a supplier :
delete - Deleting a warehouse :
delete - Deleting a product sold by a supplier :
delete - Deleting a product stored in a warehouse :
delete - Editing a supplier :
edit - Editing a warehouse :
edit - Exiting the program :
exit - Finding relevant supplier(s):
find - Finding relevant warehouse(s):
find - Listing all macros :
listmacro - Listing all suppliers and warehouses entries :
list - Redoing :
redo - Removing macro:
removemacro - Saving the data
- Undoing :
undo - Updating the quantity and/or tags of a product sold by a supplier:
update - Updating the quantity and/or tags of a product stored in a warehouse:
update - Viewing a specific supplier:
view - Viewing a specific warehouse:
view
- Viewing help :
- To be implemented in future iterations
- FAQ
- Command summary
Quick start
-
Ensure you have Java
11or above installed in your Computer. -
Download the latest
CLI-nic.jarfrom here. -
Copy the file to the folder you want to use as the home folder for your CLI-nic system.
-
Double-click the file to start the app. The GUI similar to the below should appear in a few seconds. Note how the app contains some sample data.

-
Type the command in the command box and press Enter to execute it. e.g. typing
helpand pressing Enter will display instructions for the various commands. Typinghelp deleteand pressing Enter will display in-depth instructions for thedeletecommand.
Here are some sample commands to try:-
addct/w n/warehouseA p/00000000 addr/John street, block 123, #01-01 r/First warehouse: Adds a warehouse namedwarehouseAlocated atJohn street, block 123, #01-01to CLI-nic. This warehouse is theFirst warehouse. -
addct/s n/Philips Pharmaceutical p/00000000 e/philipsPharm@gmail.com r/Largest contractor: Adds a supplier namedPhilips Pharmaceuticalwith the phone number00000000and emailphilipsPharm@gmail.comto CLI-nic. This supplier is theLargest contractor. -
assignmacroa/findsup cs/find ct/s pd/panadol: Assigns a macro that pairs the aliasfindsupto the command stringfind ct/s pd/panadol. -
clear: Deletes all suppliers and warehouses entries in CLI-nic. -
deletect/s i/3: Deletes the supplier at index 3 from the list of displayed suppliers in the GUI. -
editct/s i/1 n/Alice p/68574214: Edits the name and phone number of the supplier at index 1 from the list of displayed suppliers in the GUI to beAliceand685742141. -
exit: Exits the app. -
findct/w pd/panadol: Displays all warehouse(s) that has a product namedpanadol. -
list: Displays all the suppliers and warehouses in CLI-nic. -
listmacro: Displays all the macros saved in CLI-nic. -
redo: Restores the data in CLI-nic before anundocommand was executed. -
removemacrofindsup: Removes the macro with the aliasfindsup. -
undo: Recovers the previous version of CLI-nic data. -
updatect/w i/2 pd/Panadol q/10 t/Fever: Updates the quantity ofPanadolstored in the warehouse at index 2 from the list of displayed warehouses in the GUI to10and assigns the tag ofFeverto the product. -
viewct/w i/3: Displays all the information associated with the warehouse at index 3 from the list of displayed warehouses in the GUI such as the name, address, phone number, products stored in the warehouse etc.
-
-
Refer to the Features section below for more details of each command.
Features
Notes about the command format:
-
Words in
UPPER_CASEare the parameters to be supplied by the user.
e.g. indelete ct/TYPE i/INDEX,TYPEandINDEXare parameters which can be used asdelete ct/w i/1. - Items in square brackets are optional
e.g.add ct/s n/NAME p/PHONE e/EMAIL [r/REMARK]can be used as:-
add ct/s n/Philips Pharmaceutical p/00000000 e/philipsPharm@gmail.com r/fast replyor as -
add ct/s n/Philips Pharmaceutical p/00000000 e/philipsPharm@gmail.com.
-
- Items with
… after them can be used multiple times.
- e.g.
[pd/PRODUCT_NAME…]can be used aspd/panadol,pd/panadol needle syringeand so on. - Note that only one prefix is used with multiple keywords if necessary.
- e.g.
-
Parameters can be in any order.
e.g. if the command specifiesn/NAME p/PHONE,p/PHONE n/NAMEis also acceptable. -
If multiple arguments with the same prefix are present in the input, and if all the values are valid, only the last prefix value is chosen.
e.g. if a user entersn/Alice n/Bobwhere bothAliceandBobare valid, no error will be thrown. Instead, the nameBobwill be used instead ofAlice. -
Usage of irrelevant prefixes or forward slashes
/are not allowed by default except when the user chooses to define it in their assigned Macro commands.
e.g.delete ct/TYPE i/INDEX pd/PRODUCT_NAMEcan be used asdelete ct/pw i/1 pd/Panadolbut notdelete ct/pw i/1 pd/Panadol r/Fast reliefnordelete ct/pw i/1 pd/Panadol/Panadol Strong. - For single word commands that do not take in arguments such as
clear,list,redoandundo, trailing keywords after the command word will be ignored.
Viewing help : help
Displays a list of available commands and their utility descriptions. Narrows down to a specific command and its input format and sample commands if specified. The link to the user guide can also be accessed by pressing F1. Note that an active Internet connection is needed to view the user guide.

Format: help [COMMAND]
Examples:
-
help: Displays a list of available commands and their descriptions.
-
help add: Displays the detailed description, input format and sample commands for theaddcommand.
Accessing command history
Accesses valid commands that have been previously used.
Use the ↑ and ↓ keys on the keyboard to iterate through the command history.
Note that all valid commands will be stored in the command history, including duplicates.
Adding a supplier : add
Adds a supplier to the CLI-nic application.
Format: add ct/s n/NAME p/PHONE e/EMAIL [r/REMARK]
-
NAMEshould start with an alphanumeric character. -
PHONEshould not have a spacing in between.p/98761234is allowed, butp/9876 1234is not allowed. Only numbers are allowed. - To add a product to a supplier, refer to the update supplier section for more details.
Example:
-
add ct/s n/Philips Pharmaceutical p/00000000 e/philipsPharm@gmail.com r/Largest contractor: Adds a supplier namedPhilips Pharmaceuticalwith the phone number00000000and emailphilipsPharm@gmail.com. This supplier is theLargest contractor.
Adding a warehouse : add
Adds a warehouse to the CLI-nic application.
Format: add ct/w n/NAME p/PHONE addr/ADDRESS [r/REMARK]
-
NAMEshould start with an alphanumeric character. -
PHONEshould not have a spacing in between.p/98761234is allowed, butp/9876 1234is not allowed. Only numbers are allowed. - To add a product to a warehouse, refer to the update warehouse section for more details.
Example:
-
add ct/w n/WarehouseA p/00000000 addr/John street, block 123, #01-01 r/First warehouse: Adds a warehouse namedWarehouseAlocated atJohn street, block 123, #01-01with the phone number00000000. This warehouse is theFirst warehouse.
Assigning macro to selected command string: assignmacro
Assigns a macro that pairs the specified alias to the specified command string. This is especially useful for running commands that need to be used frequently. By assigning a command string to an alias, users can enter the alias keyword instead of the command string to run the same command (along with any additional prefixes supplied).
Format: assignmacro a/ALIAS cs/COMMAND_STRING
-
ALIAScannot be an existing command word such asadd,deleteetc. -
ALIAScannot be already used for an existing macro. -
ALIASshould only consist of alphanumeric characters and/or underscores (case-sensitive). -
COMMAND_STRINGcan consist of any number of prefixes (can be a partial command), but the first word has to be a pre-defined command word. -
COMMAND_STRINGcannot take in anotherassignmacrocommand e.g.assignmacro a/asgmac cs/assignmacro a/asgmac ...as this is recursive. - Even if the macro is valid, running the macro does not guarantee a valid command.
Examples:
-
assignmacro a/findsup cs/find ct/s pd/panadol: Assigns a macro that pairs the aliasfindsupto the command stringfind ct/s pd/panadol. With this macro set up, users can now enterfindsupinstead offind ct/s pd/panadolto find the relevant supplier(s).
-
assignmacro a/uwp cs/update ct/w pd/panadol t/fever: Assigns a macro that pairs the aliasuwpto the command stringupdate ct/w pd/panadol t/fever. Note that this is just a partial command string. With this macro set up, users can now enteruwp i/1 q/123instead ofupdate ct/w i/1 pd/panadol q/123 t/feverto update the quantity for thePanadolproduct under the first warehouse from the list of displayed warehouses in the GUI to123.
Autocomplete
Helps users complete their commands faster with the compulsory prefixes.
Users will be able to see a list of autocomplete options which is constantly updated while typing. Once the autocomplete context menu is displayed, users can use the arrow keys to choose the option that they desire and upon pressing Enter, they will be able to select the autocomplete option.
Example:
- User enters “add” in the command box and a list of autocomplete options is displayed.
Clearing all entries : clear
Deletes all suppliers and warehouses entries in CLI-nic.
Format: clear

Deleting a supplier : delete
Deletes a supplier that is not needed anymore.
Format: delete ct/s i/INDEX
-
INDEXmust be a positive integer, not exceeding the total length of the displayed supplier list in the GUI.
Example:
-
delete ct/s i/1: Removes the supplier at index 1 in the list of displayed suppliers in the GUI.
Deleting a warehouse : delete
Deletes a warehouse that is not needed anymore.
Format: delete ct/w i/INDEX
-
INDEXmust be a positive integer, not exceeding the total length of the displayed warehouse list in the GUI.
Example:
-
delete ct/w i/1: Removes the warehouse at index 1 in the list of displayed warehouses in the GUI.
Deleting a product sold by a supplier : delete
Deletes a product entry no longer sold by a specific supplier.
Format: delete ct/ps i/INDEX pd/PRODUCT_NAME
-
INDEXmust be a positive integer, not exceeding the total length of the displayed supplier list in the GUI. -
PRODUCT_NAMEmust be an identifiable full name of the product, and it must start with an alphanumeric character. -
PRODUCT_NAMEis case-insensitive. -
PRODUCT_NAMEmust exist in the current supplier before it can be deleted.
Example:
-
delete ct/ps i/3 pd/Panadol: Removes thePanadolproduct sold by the supplier at index 3 of the list of displayed suppliers in the GUI.
Deleting a product stored in a warehouse : delete
Deletes a product entry no longer stored in a specific warehouse.
Format: delete ct/pw i/INDEX pd/PRODUCT_NAME
-
INDEXmust be a positive integer, not exceeding the total length of the displayed warehouse list in the GUI. -
PRODUCT_NAMEmust be an identifiable full name of the product, and it must start with an alphanumeric character. -
PRODUCT_NAMEis case-insensitive. -
PRODUCT_NAMEmust exist in the current warehouse before it can be deleted.
Example:
-
delete ct/pw i/1 pd/Panadol: Removes thePanadolproduct stored in the warehouse at index 1 of the list of displayed warehouses in the GUI.
pd/ will not be allowed when the ct/ given is s (supplier) or w (warehouse).
Editing a supplier : edit
Edits a supplier at the specified index (based on the displayed supplier list shown in the GUI). Only its name, phone, email and remark can be edited. Note that no two suppliers can share the same name in CLI-nic.
Format: edit ct/s i/INDEX [n/NAME] [p/PHONE] [e/EMAIL] [r/REMARK]
- At least one of the optional parameters have to be specified in the input.
- Edited supplier must be different from the one started with.
Example:
-
edit ct/s i/1 n/Alice p/85236417 e/alicekoh@example.com r/Largest supplier: Edits the name, phone, email and remark of the first supplier in the list of displayed suppliers in the GUI to beAlice,85236417,alicekoh@example.comandLargest supplier.
Editing a warehouse : edit
Edits a warehouse at the specified index (based on the displayed warehouse list shown in the GUI). Only its name, phone, address and remark can be edited. Note that no two warehouses can share the same name in CLI-nic.
Format: edit ct/w i/INDEX [n/NAME] [p/PHONE] [addr/ADDRESS] [r/REMARK]
- At least one of the optional parameters have to be specified in the input.
- Edited warehouse must be different from the one started with.
Example:
-
edit ct/w i/2 n/Bob p/67851234 addr/Jurong Street 11 r/Largest warehouse: Edits the name, phone, address and remark of the second warehouse in the list of displayed warehouses in the GUI to beBob,67851234,Jurong Street 11andLargest warehouse.
Exiting the program : exit
Exits the program.
Format: exit
Finding relevant supplier(s): find
Finds all supplier(s) whose name, remark and/or products sold matches any of the provided keywords.
Format: find ct/s [n/NAME…] [pd/PRODUCT_NAME…] [r/REMARK…]
-
NAME,PRODUCT_NAMEandREMARKare case-insensitive. - Note that only full words will be matched.
needlewill matchneedlebut notneedles. - Any combination of the
NAME,PRODUCT_NAMEandREMARKparameters can be provided but at least one of the parameters with its corresponding prefix must be specified.
Example:
-
find ct/s pd/mask: Displays all the supplier(s) that sellmask.
Finding relevant warehouse(s): find
Finds all warehouse(s) whose name, remark and/or products stored matches any of the provided keywords.
Format: find ct/w [n/NAME…] [pd/PRODUCT_NAME…] [r/REMARK…]
-
NAME,PRODUCT_NAMEandREMARKare case-insensitive. - Note that only full words will be matched.
needlewill matchneedlebut notneedles. - Any combination of the
NAME,PRODUCT_NAMEandREMARKparameters can be provided but at least one of the parameters with its corresponding prefix must be specified.
Example:
-
find ct/w pd/panadol r/biggest: Displays all the warehouse(s) that stores products with names matchingpanadolor with remark matchingbiggest.
Listing all macros : listmacro
Lists all saved macros in CLI-nic.
Format: listmacro

Listing all suppliers and warehouses entries : list
Lists all suppliers and warehouses’ entries in CLI-nic.
Format: list

Redoing : redo
Restores the data in CLI-nic to the version before an undo command was done.
Format: redo

assignmacro and removemacro do not modify CLI-nic data directly, and hence are not
redoable.
Removing macro: removemacro
Removes the macro with the specified alias.
Format: removemacro ALIAS
-
ALIASspecified must exist to be deleted. -
ALIASis case-sensitive.
Example:
-
removemacro findsup: Removes the macro with the aliasfindsup.

Saving the data
CLI-nic data are saved in the hard disk automatically after any command that changes the data. There is no need to save manually.
Undoing : undo
Recovers a previous version of CLI-nic data if data has been changed.
Format: undo

assignmacro and removemacro do not modify CLI-nic data directly, and hence are not
undoable.
Updating the quantity and/or tags of a product sold by a supplier: update
Updates the quantity and/or tags of the product with the specified name at the specified supplier index. If the product does not exist, a new product will be created for that supplier.
Format: update ct/s i/INDEX pd/PRODUCT_NAME [q/QUANTITY] [t/TAG…]
-
INDEXmust be a positive integer, not exceeding the total length of the displayed supplier list in the GUI. -
PRODUCT_NAMEspecified is case-insensitive. -
QUANTITYshould be a non-negative unsigned integer. -
TAGshould be alphanumeric. Multiple keyword tags can be supplied under the same prefix. - If
PRODUCT_NAMEalready exists in the supplier, at least one optional argument has to be entered. - Note that the name of the product cannot be updated.
Example:
-
update ct/s i/4 pd/Panadol q/10 t/fever cold: Updates the quantity ofPanadolsold by the supplier at index 4 from the list of displayed suppliers in the GUI to10and givesPanadol2 tags:feverandcold.
Updating the quantity and/or tags of a product stored in a warehouse: update
Updates the quantity and/or tags of the product with the specified name at the specified warehouse index. If the product does not exist, a new product will be created for that warehouse.
Format: update ct/w i/INDEX pd/PRODUCT_NAME [q/QUANTITY] [t/TAG…]
-
INDEXmust be a positive integer, not exceeding the total length of the displayed supplier list in the GUI. -
PRODUCT_NAMEspecified is case-insensitive. -
QUANTITYshould be a non-negative unsigned integer. -
TAGshould be alphanumeric. Multiple keyword tags can be supplied under the same prefix. - If
PRODUCT_NAMEalready exists in the warehouse, at least one optional argument has to be entered. - Note that the name of the product cannot be updated.
Example:
-
update ct/w i/1 pd/Panadol q/10 t/fever cold: Updates the quantity ofPanadolstored in the warehouse at index 1 from the list of displayed warehouses in the GUI to10and givesPanadol2 tags:feverandcold.
Viewing a specific supplier: view
Shows a specific supplier at the specified index with their relevant information e.g. products sold, phone, remark etc.
Format: view ct/s i/INDEX
-
INDEXmust be a positive integer, not exceeding the total length of the displayed supplier list in the GUI.
Example:
-
view ct/s i/1: Displays all the information associated with the supplier at index 1 in the supplier list.
Viewing a specific warehouse: view
Shows a specific warehouse at the specified index with their relevant information e.g. products stored, phone, remark etc.
Format: view ct/w i/INDEX
-
INDEXmust be a positive integer, not exceeding the total length of the displayed warehouse list in the GUI.
Example:
-
view ct/w i/2: Displays all the information associated with the warehouse at index 2 in the warehouse list.
view command is optimised for users who prefer to use the keyboard.
Using the view command, users can view the products associated with a specific supplier or warehouse without needing
to use the mouse.
Alternatively, users can click on the products pane in the GUI using the mouse to view the products associated.
Users might also find it useful to use the view command in conjunction with the find command.
To be implemented in future iterations
Creating a purchase order : create
Creates a purchase order to track the purchase of products from a supplier to a warehouse.
Format: create s/SUPPLIER_NAME w/WAREHOUSE_NAME pd/PRODUCT_NAME… q/QUANTITY… date/EXPECTED_DELIVERY_DATE
-
SUPPLIER_NAME,WAREHOUSE_NAMEandPRODUCT_NAMEmust be identifiable. - The number of arguments specified for
QUANTITYandPRODUCT_NAMEmust match. -
EXPECTED_DELIVERY_DATEmust be after current time and of the form YYYY-MM-DD.
Examples:
-
create s/SupplierA w/WarehouseA pd/Panadol1 Panadol2 q/100 200 date/2020-12-12: Creates a purchase order for the delivery of100Panadol1and200Panadol2fromSupplierAtoWarehouseAbyDecember 12, 2020.
FAQ
Q: How do I transfer my data to another computer?
A: Install the app in the other computer and overwrite the empty data file it creates with the file that contains
the data of your previous CLI-nic home folder.
Command summary
| Action | Format | Example |
|---|---|---|
| Add Supplier | add ct/s n/NAME p/PHONE e/EMAIL [r/REMARK] |
add ct/s n/Philips Pharmaceutical p/00000000 e/philipsPharm@gmail.com r/Largest contractor |
| Add Warehouse | add ct/w n/NAME p/PHONE addr/ADDRESS [r/REMARK] |
add ct/w n/warehouseA p/00000000 addr/John street, block 123, #01-01 r/First warehouse |
| Assign Macro | assignmacro a/ALIAS cs/COMMAND_STRING |
assignmacro a/findsup cs/find ct/s pd/panadol |
| Clear | clear |
|
| Delete Supplier | delete ct/s i/INDEX |
delete ct/s i/1 |
| Delete Warehouse | delete ct/w i/INDEX |
delete ct/w i/2 |
| Delete Product From Supplier | delete ct/ps i/INDEX pd/PRODUCT_NAME |
delete ct/ps i/1 pd/Panadol |
| Delete Product From Warehouse | delete ct/pw i/INDEX pd/PRODUCT_NAME |
delete ct/pw i/2 pd/Panadol |
| Edit Supplier | edit ct/s i/INDEX [n/NAME] [p/PHONE] [e/EMAIL] [r/REMARK] |
edit ct/s i/1 n/Alice Pte Ltd p/98765432 e/alice@supplier.com r/Fastest deliveries |
| Edit Warehouse | edit ct/w i/INDEX [n/NAME] [p/PHONE] [addr/ADDRESS] [r/REMARK] |
edit ct/w i/1 n/Alice Warehouse p/98765432 addr/21 Lower Kent Ridge Rd r/Second largest warehouse |
| Exit | exit |
|
| Find Supplier(s) | find ct/s [n/NAME…] [pd/PRODUCT_NAME…] [r/REMARK…] |
find ct/s pd/panadol face mask needle |
| Find Warehouse(s) | find ct/w [n/NAME…] [pd/PRODUCT_NAME…] [r/REMARK…] |
find ct/w pd/panadol face mask needle |
| Help | help [COMMAND] |
help add |
| List All Suppliers and Warehouses | list |
|
| List All Macros | listmacro |
|
| Redo | redo |
|
| Remove Macro | removemacro ALIAS |
removemacro findsup |
| Undo | undo |
|
| Update Product Sold by Supplier | update ct/s i/INDEX pd/PRODUCT_NAME [q/QUANTITY] [t/TAG…] |
update ct/s i/1 pd/Panadol q/10 t/fever cold |
| Update Product Stored in Warehouse | update ct/w i/INDEX pd/PRODUCT_NAME [q/QUANTITY] [t/TAG…] |
update ct/w i/2 pd/Panadol q/10 t/fever cold |
| View Supplier | view ct/s i/INDEX |
view ct/s i/1 |
| View Warehouse | view ct/w i/INDEX |
view ct/w i/2 |