Pistol

Latest version: v2.7

Safety actively analyzes 722491 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 4

2.7

- added new parameter to `.pistol`
- - if `sets-location` is mentioned anywhere in the file, the plugin will enter `alt mode`
- - `alt mode` means that all output will be captured and only outputted after the process has finished
- - the last line of output will not be outputted, but pistol will try to `cd` into that location.
- - built in `alt mode` plugins will be introduced in the future
- - disclaimer: user input is not supported in `alt mode`, and may cause issues while outputting.
- added new installation method using `gavel`
- - more info in `README.md`

2.6

- added `where` command to `shotgun` help message
- `whereami` and `search` commands are now plugins that are installed by default.
- - `whereami` can now be disabled using `shotgun disable whereami` or `prop plugin:whereami false`
- - `search` can now be disabled using `shotgun disable search` or `prop plugin:search false`
- added new argument for `.pistol` files: `$pistol.storage$` will now link to the absolute path of pistol's `storage` directory
- - this was added mainly for `whereami` functionality
- `prop` now has comparable functionality to `shotgun` in terms of plugin managing
- - here is the updated comparison table:

| feature | `shotgun` command | `prop` command |
|--------------------------------------------|--------------------------------------------|------------------------------------------------|
| install a plugin | `shotgun install my_plugin path/to/source` | `prop plugin:my_pluginpath/to/source install` |
| uninstall a plugin | `shotgun uninstall my_plugin` | `prop plugin:my_plugin uninstall` |
| upgrade a plugin | `shotgun upgrade my_plugin` | `prop plugin:my_plugin upgrade` |
| enable a plugin | `shotgun enable my_plugin` | `prop plugin:my_plugin true` |
| disable a plugin | `shotgun disable my_plugin` | `prop plugin:my_plugin false` |
| check if a plugin is enabled or disabled | not supported | `prop plugin:my_plugin check` |
| list all installed plugins | `shotgun list` | `prop plugin:* check` |
| enable all plugins | `shotgun enable *` | `prop plugin:* true` |
| disable all plugins | `shotgun disable *` | `prop plugin:* false` |
| check the absolute location of a plugin | `shotgun where my_plugin` | `prop plugin:my_plugin check` |
| check the absolute location of all plugins | not supported | `prop plugin:* check` |

- plugins can now be upgraded using `shotgun upgrade my_plugin` or `prop plugin:my_plugin upgrade`
- prop can now install and uninstall plugins
- `default-plugins` moved to `misc/plugins`
- fixed a bug where entering an invalid state for a prop would error out
- added a warning when dependencies aren't satisfied
- pistol now tracks how many times you've entered pistol.
- - this cannot be disabled for now
- added new argument for `.pistol` files: `$pistol.python$` will now link to the absolute path of python on your system.
- - this can be used as a python executable
- - python plugins now os independent :)
- `PATCH.md` renamed to `CHANGELOG.md`
- updated `README.md`
- added a way to forcefully reset the `meta.json` file
- - run `python3 -m pistol.reset_meta`
- - this can only be used in the `pip` (excluding `pipx`) versions of pistol
- - can also be used in version built from source if you include `/pistol/reset_meta.py`
- many other changes
- many bug fixes

2.5

- HUGE update
- added support for user-made plugins
- - there are currently two plugin managers that come with pistol:
- - `prop` and `shotgun`
- - here is a table to help you choose a plugin manager:
- - (plugin_name can be replaced with any other plugin)

| feature | `shotgun` command | `prop` command |
|------------------------------------------|-------------------------------|-------------------------------|
| install a plugin | `shotgun install my_plugin` | not supported |
| uninstall a plugin | `shotgun uninstall my_plugin` | not supported |
| enable a plugin | `shotgun enable my_plugin` | `prop plugin:my_plugin true` |
| disable a plugin | `shotgun disable my_plugin` | `prop plugin:my_plugin false` |
| check if a plugin is enabled or disabled | not supported | `prop plugin:my_plugin check` |
| list all installed plugins | `shotgun list` | `prop plugin:* check` |
| enable all plugins | `shotgun enable *` | `prop plugin:* true` |
| disable all plugins | `shotgun disable *` | `prop plugin:* false` |
| check the absolute location of a plugin | `shotgun where my_plugin` | not supported |

- - overall, it is recommended to use `shotgun` for regular tasks, as `prop` lacks some vital features in terms of plugin management
- - how to create a pistol plugin:

step 1: create a project structure:

my_plugin/
my_plugin/
... (enter files as needed)
.pistol

step 2: set up your `.pistol` file
- the `.pistol` file is the heart of your plugin as it decides the entrypoint.
- example `.pistol` file:

["python3", "$pistol.this$/my_plugin/main.py", "$pistol.args$", "--at", "$pistol.loc$"]

- the file should follow the shape of a python list object.
- the contents of the `.pistol` file will be run in the default terminal
- variables:
- - `$pistol.this$` links to the absolute path of the directory where the `.pistol` file lies when it has been installed. bad, unexpected things may happen if you don't use this in your paths.
- - `$pistol.args$` links to arguments provided after the keyword. this should be used in quotes.
- - `$pistol.loc$` links to the current working directory in pistol.
- other changes:
- `message-on-fallback` renamed to `disable-fallback-message` and is enabled by default
- more small changes
- more quality of life changes

2.4.3

- added `fallback solo`
- - if a command does not exist, pistol will automatically insert `solo ` before it
- - this can be disabled with `prop fallback-solo false`
- - a message will be displayed when `fallback solo` is activated.
- - this message can also be disabled with `prop message-on-fallback false`
- - disabling `message-on-fallback` will keep all other functionality, it will only disable that one message.

2.4.2

- fixed persistent locations

2.4.1

- -n|--new argument now works on `pipx` releases as well.

Page 1 of 4

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.