When i started using the Sponge version of PEX i was quite confused, after some testing and constantly re-reading the wiki page that @zml quickly created i have gotten a fair understanding of how commands work, seeing that other are having issues i have decided to write this reference guide to help you out.
It is likely that this will become obsolete once @zml changes the command structure so i will be linking his instructions when the time comes but for now here are some examples (updated for newer system from build #89 afaik):
create an admin group that has all permissions:
/pex group Admin def true
make yourself an Admin:
/pex user MoeBoy76 parent add group Admin
creating a group with no permissions:
/pex group Default def 0
assigning the default group to be used by players:
/pex default user parent add group Default
creating a child group with a permission that inherits:
/pex group Trainer parent add group Default
/pex group Trainer perm pixelmon.command.pokeheal true
add a group to a ladder (lowest rank first):
/pex rank default add group Trainer
promoting a user within their rank:
/promote user MoeBoy76
demote a group:
/demote group Trainer
adding a player to a group:
/pex user MoeBoy76 parent add group Trainer
adding a permission directly to a player:
/pex user MoeBoy76 perm pixelmon.command.pokebattle true
denying a permission:
/pex user MoeBoy76 perm pixelmon.command.pokegive false
removing a parent group:
/pex group Trainer parent remove group Default
adding a prefix (requires a chat plugin to display, old colour format used for ease of use, user prefix overrides group prefix):
/pex group Trainer option prefix &7[&4Trainer&7]
/pex user MoeBoy76 option prefix &7[&5Galactus'&7_&2Herald&7]
check permissions, options, parent group(s) of a user (does not display parent info):
/pex user MoeBoy76 info
delete a group:
/pex group Trainer delete
using a context, contexts are a very specific place for a permission, eg a world, a dimension, a claim (Note: world and dimension are the only ones that i know to work, claim is used as GriefPrevention adds context permissions when claiming):
/pex user MoeBoy76 perm minecraft.command.kill 1 --context world=DIM-1
As you may have noticed groups and users are interchangable so you could give yourself default true permissions to make you โOPโ. i would also like to note that i am using Pixelmon as an example since it is a mod and always has permissions defined like so: <modid>.command.<command name>
(How Sponge handles vanilla, mod and Sponge command permissions)
EDIT: added console permission setting
EDIT2: updated for some changes that came at the same time as the Great Sponge Event Refactor, added some additional info
EDIT3: added ranking commands
EDIT4: fixed default group assignment example
EDIT5: added info and delete examples
EDIT6: added context example
EDIT7: made a note that ranks must be added from the bottom up
EDIT8: added note not to default permissions to false