Skip to main content

USER

Constant USER 

Source
pub const USER: &str = "# zag user\n\nManage user accounts on the zag server.\n\n## Synopsis\n\n    zag user <subcommand> [options]\n\n## Description\n\nManages user accounts used for authenticated `zag connect` sessions served by `zag serve`. Each user has a username, password, and a home directory that constrains the filesystem root the user sees once connected. When a remote client authenticates with `--username` / `--password`, their zag commands are proxied to the server and jailed to that home directory.\n\nPasswords are hashed on disk; plaintext passwords are never stored. If `--password` is omitted, it is prompted interactively and re-entered for confirmation.\n\nAll subcommands operate on the server-local user store.\n\n## Subcommands\n\n    add       Add a new user account\n    remove    Remove a user account\n    list      List all user accounts\n    passwd    Change a user\'s password\n\n## Flags\n\n    --json    Output as JSON (where applicable)\n\n## user add\n\nAdd a new user account.\n\n    zag user add -u <USERNAME> --home-dir <PATH> [--password <PASSWORD>]\n\nFlags:\n\n    -u, --username <USERNAME>    Username (required)\n        --home-dir <PATH>        Home directory the user is locked to (required)\n        --password <PASSWORD>    Password (prompted interactively if omitted)\n\nIf the home directory does not exist, it is created. A per-user log directory is also provisioned under `~/.zag/logs/users/<username>/`.\n\n## user remove\n\nRemove a user account.\n\n    zag user remove <USERNAME>\n\nRemoves the user from the store. Files inside the user\'s home directory are left intact.\n\n## user list\n\nList all user accounts.\n\n    zag user list [--json]\n\nPrints username, home directory, and creation time for each user.\n\n## user passwd\n\nChange a user\'s password.\n\n    zag user passwd <USERNAME> [--password <PASSWORD>]\n\nFlags:\n\n    --password <PASSWORD>    New password (prompted interactively if omitted)\n\n## Examples\n\n    # Add a user with an interactive password prompt\n    zag user add -u alice --home-dir /srv/zag/alice\n\n    # Add a user with a provided password\n    zag user add -u bob --home-dir /srv/zag/bob --password secret\n\n    # List all users\n    zag user list --json\n\n    # Change a password\n    zag user passwd alice\n\n    # Remove a user\n    zag user remove bob\n\n## See Also\n\n    zag man serve      Run the zag HTTPS/WebSocket server\n    zag man connect    Connect to a remote server (supports --username / --password)\n    zag man zag        Global flags and commands\n";