Skip to content

alekbuza/punsctl

Repository files navigation

punsctl - POSIX User's Namespace Control

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

codecov License: ISC

The punsctl utility allows users to manage multiple namespaces (or profiles) for various tool configurations within a single POSIX user account. This enables users to maintain separate configurations for tools like ~/.ssh, ~/.gitconfig, ~/.gnupg, ~/.config, ~/.config/nvim, and others, all under the same user account. With punsctl, users can easily create, delete, activate, or deactivate namespaces without requiring additional system permissions, providing a flexible way to manage different environments or workflows.

Installation

pipx 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

About

POSIX User's Namespace Control

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages