Skip to main content

Devloper shell for easy startup...

Project description

A "dev-shell" for Python projects ;)

pytest codecov

This small project is intended to improve the start-up for collaborators.

The idea is to make the project setup as simple as possible. Just clone the sources and start a script and you're done ;)

Run Tests? Just start the script and call the "run test command".

The "dev-shell" is the base to create a CLI and a shell. It also

It also shows how to make a project bootstrap as simply as possible, e.g.:

~$ git clone
~$ cd dev-shell
~/dev-shell$ ./ pytest

How it works

First start of the Python script ./ will bootstrap:

  • Generate a Python virtual environment (in short: venv)
  • Install poetry
  • Install project dependencies and the project himself

The output on first bootstrap start looks like:

~/dev-shell$ ./
Create venv here: ~/dev-shell/.venv
Collecting pip
Successfully installed pip-21.0.1
Collecting poetry
Installing dependencies from lock file

Package operations: 31 installs, 1 update, 0 removals


Installing the current project: dev-shell (0.0.1alpha0)

+ .venv/bin/python .venv/bin/devshell

Developer shell - dev_shell - v0.2.0

Documented commands (use 'help -v' for verbose/'help <topic>' for details):

dev-shell commands
fix_code_style  linting  list_venv_packages  publish  pytest  update


(dev_shell) quit

The first bootstrap start takes a few seconds. Each later startup detects the existing virtualenv and is very fast:

~/dev-shell$ ./

Developer shell - dev_shell - v0.2.0

(dev_shell) help

Info: The .venv will be automatically updated via poetry install call if the poetry.lock file has been changed.

A call with --update will force to call some create/update steps, e.g.:

~/dev-shell$ ./ --update

You can also just delete /.venv/ and start again ;)

(Using --update is not to be confused with the call of "update" command.)


dev-shell version OS Python version
>=v0.0.1 Linux + MacOS + Windows 3.9, 3.8, 3.7

See also github test configuration: .github/workflows/test.yml


  • dev
    • TBC
  • v0.2.2 - 2021-04-13
    • Include bootstrap file, to it's possible to use it in external projects, too.
  • v0.2.1 - 2021-04-12
    • Handle if "poetry-publish" is not installed, so a project that used "dev-shell" must not install it.
  • v0.2.0 - 2021-04-11
    • Rename: " =>" because of better autocomplete
    • Add DevShellConfig.base_path and use it in own commands like, pytest, linting etc. (So they are usable in external project, too.)
    • recognize "--update" and "--help" arguments better in ./ calls.
    • Update setuptools on .venv creation, too.
    • Fix Bugs/tests under Windows
  • v0.1.0 - 2021-03-22
    • Fix CI usage: Exit with correct return code if tests failed
    • Better "run as CLI" implementation via new run_cmd2_app()
    • Bugfix errors that only occur on Windows.
    • Simplify boot script and fix raise error if ensurepip missing
  • v0.0.2 - 2021-03-19
    • refactor colorful shortcuts
    • display subprocess calls with separated colors
  • v0.0.1 - 2021-03-19
    • first "useable" version

Project links

Project details

Download files

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

Files for dev-shell, version 0.2.2
Filename, size File type Python version Upload date Hashes
Filename, size dev_shell-0.2.2-py3-none-any.whl (32.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size dev-shell-0.2.2.tar.gz (28.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page