A powerful CLI tool to profile your OS by saving, applying, exporting, and importing system configurations as named profiles. Designed to manage dot files and service configurations in a centralized Git repository (local or remote), dotctl enables seamless system replication across machines. Supports pre/post hook scripts, making it ideal for setting up servers or desktops with consistent environments.
Project description
DotCtl
dotctl is a powerful CLI tool to manage, save, apply, export, and import system configurations as named profiles.
It helps centralize dotfiles and service configurations in Git repositories for seamless replication across systems.
Designed for developers and sysadmins, it supports pre/post hook scripts and is ideal for setting up consistent environments across desktops and servers.
๐ Table of Contents
- DotCtl
๐ Features
- ๐ฆ Profile Management โ Create, switch, save, remove, and apply system profiles.
- ๐ Pre/Post Hooks โ Run scripts before or after activating a profile (e.g., install packages, restart services).
- ๐ Git Integration โ Sync profiles with local or remote Git repositories.
- ๐ Portable Configs โ Export/import profiles using
.dtsvfiles for easy backups and sharing. - โ๏ธ Custom Configs โ Define tracking rules via
dotctl.yaml.
๐ง Installation
pip install dotctl
๐ Usage
dotctl [OPTIONS] <COMMAND> [ARGS]
Run dotctl -h for global help or dotctl <COMMAND> -h for command-specific help.
๐ ๏ธ Commands
๐ init
Initialize a new profile.
dotctl init [-h] [-u <git-url>] [-p <profile>] [-c <config-path>] [-e <env>]
Examples:
dotctl init -e kde
dotctl init -u https://github.com/user880/dots.git -p mydesktop
dotctl init -c ./my_custom_config.yaml
Options:
-e, --envโ Target environment (e.g., kde, gnome, server).-u, --urlโ Git URL to clone profile from.-p, --profileโ Activate this profile after init.-c, --configโ Path to custom YAML config.
๐พ save
Save current system state to the active profile.
dotctl save [-h] [-p <password>] [--skip-sudo] [profile]
Examples:
dotctl save
dotctl save my_web_server --skip-sudo
dotctl save my_web_server -p mYsecretp@ssw0rd
Options:
--skip-sudoโ Ignore restricted resources.-p, --passwordโ Password for restricted resources.
๐ list / ls
List all profiles.
dotctl list [-h] [--details] [--fetch]
Examples:
dotctl list
dotctl list --details
dotctl list --fetch
Options:
--detailsโ Show extended info.--fetchโ Refresh remote data.
๐ switch / sw
Switch to another profile.
dotctl switch [-h] [--fetch] [profile]
Examples:
dotctl switch MyProfile
dotctl sw MyProfile --fetch
Options:
--fetchโ Refresh profile info before switching.
๐ create / new
Create a new, empty profile.
dotctl create [-h] [--fetch] <profile>
Examples:
dotctl create myserver
dotctl new myserver --fetch
Options:
--fetchโ Sync with remote before creating.
โ remove / rm / delete / del
Remove a profile locally and/or remotely.
dotctl remove [-h] [-y] [--fetch] <profile>
Examples:
dotctl rm MyProfile
dotctl del MyProfile --fetch
dotctl del MyProfile -y
Options:
--fetchโ Refresh data before removal.-y, --no-confirmโ Skip confirmation prompt.
๐งช apply
Apply a saved profile.
dotctl apply [-h] [-p <password>] [--skip-sudo] [--skip-hooks] [--skip-pre-hooks] [--skip-post-hooks] [--ignore-hook-errors] [profile]
Examples:
dotctl apply
dotctl apply mydesktop --skip-hooks
dotctl apply MyProfile --skip-pre-hooks --ignore-hook-errors
Options:
--skip-sudoโ Ignore restricted resources.--skip-hooksโ Skip all hooks.--skip-pre-hooksโ Skip only pre-hooks.--skip-post-hooksโ Skip only post-hooks.--ignore-hook-errorsโ Donโt abort if hooks fail.-p, --passwordโ Password for restricted actions.
๐ค export
Export a profile to .dtsv.
dotctl export [-h] [-p <password>] [--skip-sudo] [profile]
Examples:
dotctl export
dotctl export my_web_server --skip-sudo
dotctl export my_web_server -p mYsecretp@ssw0rd
Options:
--skip-sudo,-psame as above.
๐ฅ import
Import a .dtsv profile.
dotctl import [-h] [-p <password>] [--skip-sudo] <file.dtsv>
Examples:
dotctl import my_web_server.dtsv
dotctl import /data/backup/web.dtsv --skip-sudo
Options:
--skip-sudo,-psame as above.
๐ฅ wipe
Remove all local profiles.
dotctl wipe [-h] [-y]
Examples:
dotctl wipe
dotctl wipe -y
Options:
-y, --no-confirmโ Do not prompt before wiping.
๐งโ๐ป Development & Publishing
Setup Development Environment
python -m venv venv
source venv/bin/activate # Linux/macOS
venv\Scripts\activate # Windows
pip install -r requirements.txt
Build the Package
python -m build
Publish to TestPyPI
twine upload --repository testpypi dist/*
Publish to PyPI
twine upload --repository pypi dist/*
๐ Contact
- Maintainer: Pankaj Jackson
- Support: Open an Issue
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dotctl-1.0.3.tar.gz.
File metadata
- Download URL: dotctl-1.0.3.tar.gz
- Upload date:
- Size: 23.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07800211414c9cf1e238946a65c7f6b6f157e03375bf9c35be3afcf26432297d
|
|
| MD5 |
747e109a8d2dab768e0f7aa69d563391
|
|
| BLAKE2b-256 |
208379fab90c3aa3ef9bbb6151e7e7cce8c32688c8a080b546c1295f5ec043ed
|
File details
Details for the file dotctl-1.0.3-py3-none-any.whl.
File metadata
- Download URL: dotctl-1.0.3-py3-none-any.whl
- Upload date:
- Size: 29.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b043f0df175911b2a4db7542c8ac66b055d66b1b73a9ced6de5980a3125c94ac
|
|
| MD5 |
773c1b16f6261188c13168278648aa53
|
|
| BLAKE2b-256 |
a899cda6e30f1077845188201fd81398c30711ee67ae02cdd45fc96bcd5a2b6e
|