@@ -61,7 +61,7 @@ SCRIPT_FILENAME = 'padlock-script'
 
 # ---- DebOps environment setup ----
 
-def main(recipients):
+def main(subcommand_func, **kwargs):
     debops_root = find_debops_project(required=True)
     # :todo: Source DebOps configuration file
     #[ -r ${debops_config} ] && source ${debops_config}
@@ -82,7 +82,10 @@ def main(recipients):
                                    ENCFS_PREFIX + SECRET_NAME)
     encfs_decrypted = os.path.join(os.path.dirname(inventory_path),
                                    SECRET_NAME)
+    subcommand_func(encfs_decrypted, encfs_encrypted, **kwargs)
 
+
+def init(encfs_decrypted, encfs_encrypted, recipients):
     # EncFS cannot create encrypted directory if directory with
     # decrypted data is not empty
     if not os.path.exists(encfs_decrypted):
@@ -143,12 +146,16 @@ def main(recipients):
 
 
 parser = argparse.ArgumentParser()
-parser.add_argument('recipients', nargs='*',
-                    help=("GPG recipients for which the secret key should be "
-                          "encrypted for (name, e-mail or key-id)"))
+subparsers = parser.add_subparsers(help='action to perform. Use `%(prog)s --help <action>` for further help.')
+p = subparsers.add_parser('init')
+p.add_argument('recipients', nargs='*',
+               help=("GPG recipients for which the secret key should be "
+                     "encrypted for (name, e-mail or key-id)"))
+p.set_defaults(subcommand_func=init)
+
 args = parser.parse_args()
 
 try:
-    main(args.recipients)
+    main(**vars(args))
 except KeyboardInterrupt:
     raise SystemExit('... aborted')