Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ofek/userpath
Cross-platform tool for adding locations to the user PATH, no elevated privileges required!
https://github.com/ofek/userpath
cross-platform devops path system
Last synced: 6 days ago
JSON representation
Cross-platform tool for adding locations to the user PATH, no elevated privileges required!
- Host: GitHub
- URL: https://github.com/ofek/userpath
- Owner: ofek
- License: mit
- Created: 2017-09-21T01:48:04.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-06-10T19:40:39.000Z (8 months ago)
- Last Synced: 2025-01-31T05:54:37.731Z (13 days ago)
- Topics: cross-platform, devops, path, system
- Language: Python
- Homepage:
- Size: 83 KB
- Stars: 155
- Watchers: 7
- Forks: 21
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.rst
- Funding: .github/FUNDING.yml
- License: LICENSE.txt
Awesome Lists containing this project
README
# userpath
| | |
| --- | --- |
| CI/CD | [![CI - Test](https://github.com/ofek/userpath/actions/workflows/test.yml/badge.svg)](https://github.com/ofek/userpath/actions/workflows/test.yml) [![CD - Build](https://github.com/ofek/userpath/actions/workflows/build.yml/badge.svg)](https://github.com/ofek/userpath/actions/workflows/build.yml) |
| Package | [![PyPI - Version](https://img.shields.io/pypi/v/userpath.svg?logo=pypi&label=PyPI&logoColor=gold)](https://pypi.org/project/userpath/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/userpath.svg?logo=python&label=Python&logoColor=gold)](https://pypi.org/project/userpath/) |
| Meta | [![License - MIT](https://img.shields.io/badge/license-MIT-9400d3.svg)](https://spdx.org/licenses/) [![GitHub Sponsors](https://img.shields.io/github/sponsors/ofek?logo=GitHub%20Sponsors&style=social)](https://github.com/sponsors/ofek) |-----
This is a tool for modifying a user's `PATH`.
**Table of Contents**
- [Installation](#installation)
- [CLI](#cli)
- [API](#api)
- [License](#license)## Installation
```console
pip install userpath
```## CLI
```console
$ userpath -h
Usage: userpath [OPTIONS] COMMAND [ARGS]...Options:
--version Show the version and exit.
-h, --help Show this message and exit.Commands:
append Appends to the user PATH
prepend Prepends to the user PATH
verify Checks if locations are in the user PATH
```## API
```pycon
>>> import userpath
>>> location = r'C:\Users\Ofek\Desktop\test'
>>>
>>> userpath.in_current_path(location)
False
>>> userpath.in_new_path(location)
False
>>> userpath.append(location)
True
>>> userpath.in_new_path(location)
True
>>> userpath.need_shell_restart(location)
True
```## License
`userpath` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.