From ad35f999742df2a3e63b6e4bdcf3101d3cce2490 Mon Sep 17 00:00:00 2001 From: Alban Date: Mon, 23 Sep 2013 02:43:56 -0700 Subject: [PATCH] Created Command-Line Interface (markdown) --- Command-Line-Interface.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Command-Line-Interface.md diff --git a/Command-Line-Interface.md b/Command-Line-Interface.md new file mode 100644 index 0000000..af03b78 --- /dev/null +++ b/Command-Line-Interface.md @@ -0,0 +1,37 @@ +The command-line interface (or CLI, *cli.py*) is Python script allowing administration operations without +the use of the web interface. It can either be run in interactive mode (`python cli.py`) or to issue a +single command (`python cli.py `). + +Command reference +----------------- + +* **help**: displays the list of available commands + * **help command [..]**: displays the help on a specific command (or subcommand) +* **user args...**: User management + * **list**: lists users + * **add name [-a] [-p pass] [-e email]**: adds a user + * **-a/--admin**: gives admin rights to the new user + * **-p/--password pass**: specifies the user's password. Will be prompted if omitted. + * **-e/--email email**: sets the user's email address + * **delete user**: deletes the user + * **setadmin user [--off]**: grants/revoke admin rights + * **--off**: revokes admin rights if present, grants them otherwise + * **changepass user [password]**: changes a user's password + * **password**: specifies the new password. Will be prompted if omitted +* **folder args**: Folder management + * **list**: lists folders + * **add name path**: adds a folder + * **delete folder**: deletes a folder + * **scan [folder [folder ...]]**: runs a scan on specified folders + * **folder ...**: folders to be scanned. If none, all folders are scanned. + +Examples +-------- + +Examples are given as if issued in interactive mode (including the CLI prompt). + + supysonic> help + supysonic> help user + supysonic> user add spl0k -a -p MyAwesomePassword + supysonic> folder add MyLibrary /home/spl0k/Music + supysonic> folder scan MyLibrary \ No newline at end of file