Metadata-Version: 2.1
Name: slap-cli
Version: 1.6.17
Summary: Slap is a command-line utility for developing Python applications.
License: MIT
Author: Niklas Rosenstein
Author-email: rosensteinniklas@gmail.com
Requires-Python: >=3.10,<4.0
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.10
Provides-Extra: docs
Requires-Dist: PyYAML (>=4.0)
Requires-Dist: beautifulsoup4 (>=4.10.0,<5.0.0)
Requires-Dist: cleo (>=1.0.0a4)
Requires-Dist: databind (>=2.0.0,<3.0.0)
Requires-Dist: flit (>=3.6.0,<4.0.0)
Requires-Dist: nr.util (>=0.8.4,<1.0.0)
Requires-Dist: poetry-core (>=1.1.0a6,<2.0.0)
Requires-Dist: ptyprocess (>=0.7.0,<0.8.0)
Requires-Dist: pygments (>=2.11.2,<3.0.0)
Requires-Dist: requests (>=2.27.1,<3.0.0)
Requires-Dist: setuptools (>=39.1.0)
Requires-Dist: tomli (>=2.0.0,<3.0.0)
Requires-Dist: tomlkit (>=0.10.1,<0.11.0)
Requires-Dist: tqdm (>=4.64.0,<5.0.0)
Requires-Dist: twine (>=3.7.0,<4.0.0)
Project-URL: Documentation, https://niklasrosenstein.github.io/slap/
Project-URL: Homepage, https://github.com/NiklasRosenstein/slap
Project-URL: Repository, https://github.com/NiklasRosenstein/slap.git
Description-Content-Type: text/markdown

# Slap

<img src="docs/content/img/logo.svg" style="height: 200px !important">

  [PEP 517]: https://peps.python.org/pep-0517/

Slap is a command-line tool to simplify command workflows in the development of Python projects
independent of the [PEP 517][] build backend being used, capable of managing single- and multi-project
repositories.

## Installation

I recommend installing Slap using Pipx. (Requires Python 3.10 or higher)

    $ pipx install slap-cli

> __Note__: Currently Slap relies on an alpha version of `poetry-core` (`^1.1.0a6`). If you install it into
> the same environment as Poetry itself, you may also need to use an alpha version of Poetry (e.g. `1.2.0a2`).
>
> If you use Slap in GitHub Actions, try one of the actions provided by Slap directly:
>
> * [`NiklasRosenstein/slap@gha/install/v1`](https://niklasrosenstein.github.io/slap/guides/github/#install-slap)
> * [`NiklasRosenstein/slap@gha/changelog/update/v1`](https://niklasrosenstein.github.io/slap/guides/github/#update-changelogs)

## Documentation

You can find the documentation for Slap here: <https://niklasrosenstein.github.io/slap/>

Check out the [Getting started](https://niklasrosenstein.github.io/slap/getting-started/) guide.

## Feature Matrix

| Feature | Poetry | Documentation |
| ------- | ------ | ------------- |
| Manage structured changelog entries | ❌ | [slap changelog](https://niklasrosenstein.github.io/slap/commands/changelog/) |
| Show project details | ❌ | [slap info](https://niklasrosenstein.github.io/slap/commands/info/) |
| Build and publish to PyPI using Twine | ✅ (single project only) | [slap publish](https://niklasrosenstein.github.io/slap/commands/publish/) |
| Create a new release (bump version numbersr)| ❌ (sub-par support) | [slap release](https://niklasrosenstein.github.io/slap/commands/release/) |
| Run a command configured in `pyproject.toml` | ❌ | [slap run](https://niklasrosenstein.github.io/slap/commands/run/) |
| Run tests configured in `pyproject.toml` | ❌ | [slap test](https://niklasrosenstein.github.io/slap/commands/test/) |
| Manage Python virtualenv's | ✅ (but out-of-worktree) | [slap venv](https://niklasrosenstein.github.io/slap/commands/venv/) |
| Generate a dependencies report | ❌ | [slap report dependencies](https://niklasrosenstein.github.io/slap/commands/report/) |

| Feature / Build backend | Flit  | Poetry  | Setuptools  | Documentation |
| ----------------------- | ----- | ------- | ----------- | --------- |
| Add dependency | ✅ | ✅ | ❌ | [slap add](https://niklasrosenstein.github.io/slap/commands/add/) |
| Sanity check project configuration | | ✅ | | [slap check](https://niklasrosenstein.github.io/slap/commands/check/) |
| Bootstrap project files | | ✅ | | [slap init](https://niklasrosenstein.github.io/slap/commands/init/) |
| Install projects using Pip | ✅ | ✅ | ✅ | [slap install](https://niklasrosenstein.github.io/slap/commands/install/) |
| Symlink projects (editable installs) | ✅ | ✅ | ✅ | [slap link](https://niklasrosenstein.github.io/slap/commands/link/) |
| Bump interdependencies in mono-repository | ✅ (not tested regularly) | ✅ | ✅ (partial) | [slap release](https://niklasrosenstein.github.io/slap/commands/release/) |

> __Legend__: ✅ explicitly supported, ❌ explicitly not supported, (blank) not relevant or currently not supported

## Issues / Suggestions / Contributions

  [GitHub Issues]: https://github.com/NiklasRosenstein/slap/issues
  [GitHub Discussions]: https://github.com/NiklasRosenstein/slap/discussions
  [GitHub Repository]: https://github.com/NiklasRosenstein/slap

Slap is currently very opinionated by the fact that I built it as my personal workflow tool, but I welcome
suggestions and contributions, and I am hopeful it will be useful to a wider audience than myself.

Please report any issues you encounter via [GitHub Issues][]. Feel free to use the [GitHub Discussions][] forum
to ask questions or make suggestions on new features (e.g. if you would like a new build backend to be supported?).
Lastly, feel free to submit pull requests to the [GitHub Repository][].

## FAQ

### Why "Slap"?

Finding a good, catchy name that also types easily in the terminal and is not already widely used isn't easy, ok?

### What makes this different to the Poetry CLI?

Some people might find this similar to tools like Poetry, and while there is some overlap in functionality, Slap is
**not a build backend** and is more targeted towards library development. In fact, most of my projects use Poetry as
the build backend but I never even once interact with the Poetry CLI throughout the lifetime of the project.

The most notable differences to Poetry are

* Supports mono-repositories (i.e. multiple related Python projects in the same repository), to the extent that it
  bumps version numbers of project inter-dependencies and installs your projects in topological order
* Supports development installs independent of the build backend (yes; this means you can install Poetry packages
  in editable mode even though the Poetry backend right now does not support editable installs)
* Slap's version bump command (`slap release`) updates the version not just in your `pyproject.toml` but also the
  `__version__` in your source code as well as in related projects (see mono-repositories above) and any additional
  references you can configure via Regex patterns
* Does not automagically create a virtual environment for you when instal your project(s); instead, it errors when
  you try to install into a non-virtual Python environment and gives you an easy-to-use tool to create and activate
  virtual environments (and allowing multiple environments per project as well as global environments)
* Uses Pip to install your project(s), unlike Poetry which comes with its own dependency resolver and package
  installer (which I personally have been having a lot of issues with in the past).
* Does not have a concept of lock files

