Skip to main content

Contains anything related to setting up a new computer (desktop) system

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

Contributing License pre-commit GitHub

cmstp - computer setup

Contains anything related to setting up a new computer (desktop) system.

Disclaimer - Use at your own risk

This project is currently (12.2025) coded solely by me. As a junior developer, there is probably a lot that can be improved and although I have tested each task, there may be some unforeseen issues. Please use with caution and report any issues you find (see the contributing section).

During this project's initial development, I recommend using it solely on fresh machines.

Installation

Prerequisites

Ubuntu 24.04+

We recommend installing pipx via apt:

sudo apt update && sudo apt install pipx

Older Ubuntu Versions

We recommend installing pipx via pip:

sudo apt update && sudo apt install python3 python3-pip && python3 -m pip install --user pipx

NOTE: The installation of pipx via pip (as opposed to apt) is recommended on older versions, as the apt version is often outdated.

MacOS

Not supported yet.

Windows

Not supported yet.

Main Installation

Then, install cmstp via pipx:

pipx install cmstp

Usage

Setup

We recommend setting up the following before running the main installation/configuration tasks:

  • Configuring SSH keys for git (GitHub, GitLab, etc.) - some tasks may require cloning private repositories
  • Disabling Secure Boot (e.g. for installing NVIDIA drivers)

You can use the provided helper to guide you through these steps:

cmstp setup [-s] [-g]

The helper also provides further possible manual setup steps for configuring fresh systems.

NOTE: You may also look up the general instructions for creating SSH keys here.

Info

This package provides a variety of tasks, which can install/configure/uninstall a variety of programs. To see all available tasks, use (flag shorthand: -a):

cmstp info --available-tasks

The info command also provides further options to see detailed information about tasks, how to use configuration files, and can print out system information. For this, use any of

cmstp info [-h] [-s] [-t TASKS [TASKS ...]] [-a] [-c] [-d]

If no flags are provided, only the system information is printed by default.

Core Commands

Each task can be run with the resp. command, which is one of:

  • install to install packages, programs, ...
  • configure to configure programs and settings
  • uninstall to uninstall packages, programs, ...

To use default tasks, simply use (without any flags):

cmstp <command> [-h] [-f CONFIG_FILE] [-d CONFIG_DIRECTORY] [-t TASKS [TASKS ...]] [--enable-all] [--enable-dependencies] [--disable-preparation] [-v] [-y]

To use custom task configuration files, use (flag shorthand: -d)

cmstp <command> --config-directory </path/to/configs/ | git_url>

where /path/to/configs/ is a directory containing multiple txt/json(c)/yaml/... configuration files (to be used by tasks as defined in this repo's config/default.yaml file) following this package's default config/ directory. Each file in that directory should have the same name and structure as in the default. We STRONGLY RECOMMEND saving a personalized config directory as a git repository and providing the git URL instead of a local path. The repository will be cloned and used for the configurations. For more details and examples of configs, see this README.

To easily specify multiple tasks to be run, use (flag shorthand: -f)

cmstp <command> --config-file /path/to/config.yaml

where the config file should be a yaml file following the structure of the config/enabled.yaml file in this package. That config file contains detailed explanations. Should a relative path be provided, the file will first be searched for locally and then in the config directory. Should a git reference be provided, the repository will be cloned and the file searched for there, as specified in the git reference.

To simply enable tasks with their default configurations, use (flag shorthand: -t)

cmstp <command> --tasks TASK1 TASK2 ...

where TASK1, TASK2, ... are the task names as specified in the config/enabled.yaml file in this package. Task arguments may optionally be passed via colon separation, e.g. --tasks task1:arg1:arg2 task2:arg1, in which case they will override any existing arguments for those tasks. Note that the precedence for any fields passed to tasks is as follows: CLI tasks > config file > default config.

Further options are

  • --enable-all to enable all tasks (takes precedence over config file)
  • --enable-dependencies to automatically enable dependencies of enabled tasks (takes precedence over config file)
  • --disable-preparation to disable updating/upgrading apt beforehand (not recommended)
  • -v, --verbose to enable verbose logging

Logs are saved to ~/.cmstp/logs/<timestamp>/.

Note on Git References

When providing a git reference (for --config-directory, --config-file or anywhere else), the format is as follows:

<git_url>[?<param>=<value>&...]

with supported query parameters:

  • branch: branch name
  • commit: commit hash (overrides branch if both provided)
  • path: subdirectory path within the repo
  • depth: clone depth (integer)

Examples are

https://github.com/user/repo.git
https://github.com/user/repo.git?branch=main
https://github.com/user/repo.git?commit=abc123&branch=dev&depth=1

Contributing

Please see CONTRIBUTING.md for contribution guidelines.

License

This project is licensed under the MIT License - see the LICENSE file for details.

TODO

Please see TODO.md for a list of planned improvements and features.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cmstp-1.2.0.tar.gz (79.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cmstp-1.2.0-py3-none-any.whl (98.2 kB view details)

Uploaded Python 3

File details

Details for the file cmstp-1.2.0.tar.gz.

File metadata

  • Download URL: cmstp-1.2.0.tar.gz
  • Upload date:
  • Size: 79.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for cmstp-1.2.0.tar.gz
Algorithm Hash digest
SHA256 dfb0c52b8d8b3ae217d44c0e6e2c2688303f52b7e1c90b30ccb3b98fbf9a638b
MD5 92f8e8fa654f4926e7b8d7213be91c14
BLAKE2b-256 dc949c07302a1f2f289b573180c4234f93eb8b335b051ee2e9e03806b0b6559c

See more details on using hashes here.

File details

Details for the file cmstp-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: cmstp-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 98.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for cmstp-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 68e64621b52c76e88cda5c98d814e210519d16cdb57311f2b844f028688fe173
MD5 ed8c67d5332a0d4e98d772367ae222c9
BLAKE2b-256 cfb34f0c50160a2d9df1136cb64a6d0accf51d86d539218298b879a86a6c210c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page