DSH - the absent minded developer's shell
Organize the stuff you do via command line
You might use this if you:
- Forget how you did that stuff in that project from a while back
- Forget where stuff is
- Want a single, tab-completed view of the stuff you do
- Want to store credentials and stuff outside of project config
- Need to do sutff in separate contexts/environments such as development vs production
- Want a consistent 'api' for doing stuff
What it does
- At the most basic level, it executes commands expressed in yaml
- Creates a tree of 'contexts' which consist of vars, commands, and subcontexts
- Locates and merges contexts defined in .dsh.*.yml files
- Provides nested contexts/subshells for projects/environments under a root shell
- Changes current working directory to that of active shell
- Provides variable substitution
- Provides inherited variables with override
Sample .dsh.yml:
dsh: personal.python.proj
vars:
app_name: projectX
test:
- pytest
install:
- pip list installed | grep {{app_name}} && pip uninstall -y {{app_name}}
- pip install -e .
release:
- tox -r
- rm -rf build && rm -rf dist
- python setup.py sdist bdist_wheel
- twine upload -r pypi -u {{PYPI_USER}} -p {PYPI_PASS} dist/{{app_name}}*
Demo
With dsh.yml files similar to the above, a dsh session might look like this:
Installation
pip install dsh
Metadata
Release files for dsh 2.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dsh-2.2.1.tar.gz | 19.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dsh-2.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 40.6 kB
Release files / dsh-2.2.1.tar.gz
| Download URL | dsh-2.2.1.tar.gz |
|---|---|
| Size | 19.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f5f6a2317f04b5a37b4b071cdd7f78cfb47cb93ae9da6ba1890db6493989f657
|
|
BLAKE2b-256 checksum How to use checksums |
0e74e6b5a23d6e00b4888b9c73139bb2571fb78f263e41accfab8a3d67824bcb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
|
Release files / dsh-2.2.1-py3-none-any.whl
| Download URL | dsh-2.2.1-py3-none-any.whl |
|---|---|
| Size | 21.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3e34e15391ae1741210776cf83015bcc372bc37939318967bfee40c187209945
|
|
BLAKE2b-256 checksum How to use checksums |
461e7090174fbc61b5077a6c0bc466f740125d18ae2f5389c0e44e50137e6743
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
|