/punsctl

POSIX User's Namespace Control

Primary LanguagePythonISC LicenseISC

The project is currently under development and is not ready for use in production.

punsctl - POSIX User's Namespace Control

PyPI Version PyPI - Downloads PyPI - Wheel PyPI - Python Version PyPI - Implementation

codecov License: ISC

The punsctl utility manages multiple namespaces (user environments) for the current POSIX user. That means the user can have multiple "profiles" for the same or different tool configurations in the same user account (~/.ssh, ~/.gitconfig, ~/.gnupg, ~/.config, ~/.config/nvim, ...). The user can create, delete, activate and deactivate namespaces without additional permissions.

Installation

pip install punsctl

Usage

punsctl <options>

options:
    -h                  Help menu
    -r                  Root path                 (Default: ~/.ns)
    -s                  Symlink path              (Default: ~/)
    -l                  List namespaces
    -n <namespace>      Create namespace
    -x <namespace>      Delete namespace
    -a <namespace>      Activate namespace
    -d                  Deactivate namespaces

List all namespaces

punsctl -l

List all namespaces from the non-default root path

punsctl -p <root_path> -l

Create new namespace

punsctl -n <namespace>

Create a new namespace in the non-default root path

punsctl -p <root_path> -n <namespace>

Delete namespace

punsctl -x <namespace>

Delete namespace in non-default root path

punsctl -p <root_path> -x <namespace>

Activate namespace

punsctl -a <namespace>

Activate the namespace from the non-default root path

punsctl -p <root_path> -a <namespace>

Activate the namespace from the non-default root path and change the symlink path

punsctl -p <root_path> -s <symlink_path> -a <namespace>

Deactivate namespaces

punsctl -d