pistol terminal guide
installation
all of these installation methods apply to the newest version of pistol unless stated otherwise.
1. windows & linux/ubuntu install using gavel (most recommended):
- this method installs the newest version on github, so you'll be the first to receive new versions
step 1: make sure gavel is installed
git clone https://github.com/pixilll/gavel
pipx install ./gavel
step 2: install pistol
gavel install pixilll pistol
2. windows install using pip:
step 1: make sure pip is updated
python -m pip install --upgrade pip
step 2: install pistol
pip install pistol
3. new in 2.0: linux/ubuntu install using pipx:
step 1: make sure pipx is installed and updated
sudo apt install pipx
step 2: install pistol
pipx install pistol
4. linux/ubuntu install using pip and venv:
step 1: create a virtual environment using venv
python3 -m venv .venv
step 2: activate the environment
source .venv/bin/activate
step 3: make sure pip is updated
python3 -m pip install --upgrade pip
step 4: install pistol
python3 -m pip install pistol
5. windows fetch using git and install using pip:
step 1: clone the pistol repository
git clone https://github.com/pixilll/pistol
step 2: make sure pip is updated
python -m pip install --upgrade pip
step 3: install the pistol directory
pip install ./pistol
6. new in 2.0: linux/ubuntu fetch using git and install using pipx:
step 1: clone the pistol repository
git clone https://github.com/pixilll/pistol
step 2: make sure pipx is installed and updated
sudo apt install pipx
step 3: install the pistol directory
pipx install ./pistol
7. linux/ubuntu fetch using git and install using pip and venv:
step 1: create a virtual environment using venv
python3 -m venv .venv
step 2: activate the environment
source .venv/bin/activate
step 3: clone the pistol repository
git clone https://github.com/pixilll/pistol
step 4: make sure pip is updated
python3 -m pip install --upgrade pip
step 5: install the pistol directory
python3 -m pip install ./pistol
8. build from source:
pistol is open-source, and any source code files can be downloaded individually if needed. pistol can be built on your system relatively easily whether you're on windows or linux.
/!\ disclaimer: installing pistol on linux using the third and fifth methods will make pistol only accessible while in the venv environment where it has been installed. you may need to redo step 2 every time you restart your terminal.
which install method should i choose?
| os | recommended | supported |
|---|---|---|
| windows | 2nd | 1st, 2nd, 5th, 8th |
| ubuntu | 3rd | 1st, 3rd, 4th, 6th, 7th, 8th |
| linux* | 3rd | 1st, 3rd, 4th, 6th, 7th, 8th |
| macos | no install methods for macos |
*linux means linux distributions in general, except for ubuntu which was mentioned beforehand
os compatibility and availability
| os | availability | pistol versions compatible |
|---|---|---|
| windows 11 | tested, available | >=1.0 |
| windows 8-10 | not tested, should be available | >=1.0 |
| windows <=7 | tested, not available | no versions |
| ubuntu | tested, available | >=1.0 |
| linux* | not tested, should be available | >=1.0 |
| macos | tested, not available | no versions |
*linux means linux distributions in general, except for ubuntu which was mentioned beforehand
python compatibility and availability
| python version | availability | pistol versions compatible |
|---|---|---|
| python >=3.13 | not tested, should be available available | >=1.0 |
| python 3.12, 3.13 | tested, available | >=1.0 |
| python <=3.11 | tested, not available | no versions |
dependencies
- all dependencies should come preinstalled with pistol
- if a dependency is not installed, run
bucket dep install - if
bucketis not installed, runpython -m pip install --upgrade pip, thenpip install bkt(on windows) - if the issue persists, reinstall pistol by running
python -m pip install --upgrade pip, thenpip install pistol --force
how to start pistol
arguments
- all pistol start methods take one argument:
<location> <location>means where pistol will start.- if
<location>is not specified, it will be defaulted tolastas long aspersistent-locationis enabled. ifpersistent-locationis not enabled,<location>is defaulted to. - location can be for ex.
.,..,/home,/,~,C:/,./my_project,last - if
<location>is set tolast, it will use the location where you last logged off ofpistol. - location can also be
storage, which will enter storage mode instantly. - if you want to enter a directory named
storagein., specify./storageinstead.
method 1: windows, ubuntu/linux executable (recommended)
- use
pistol <location> - tested to work on both windows and linux if everything is set up correctly on the user's device.
- recommended for most use cases
-
- quick to type
-
- easy to remember
method 2: windows run as python module
- use
python -m pistol <location>orpy -m pistol <location>or similar - make sure
pythonorpyare linked to python 3.12 or higher usingpython --versionorpy --version - if the output shows that the python version is lower than python 3.12, try installing the newest version here
- once installed, or if you are sure you have python 3.12 or higher installed already, try running
python<version> -m pistol <location> <version>means the version of python you have installed.-
- examples:
python3.12,python3.13,python3.14
- examples:
- recommended for internal uses or debugging purposes
-
- if the executable (method 1) does not work, this method should almost always work.
-
- if it doesn't, try reinstalling or upgrading
pistolusingpip install --force pistol(to reinstall) orpip install --upgrade pistol(to upgrade)
- if it doesn't, try reinstalling or upgrading
-
- if you are starting
pistolfrom within a program, this method is recommended as it is more likely to work on other computers (assumingpistolis installed on that computer)
- if you are starting
method 3: ubuntu/linux run as python module
- basically the same at the method 2 (read above)
- run with
python3instead ofpythonorpy
method 4: windows, ubuntu/linux run from git clone
- applies only if you have run
git clone https://github.com/pixilll/pistolorgh repo clone pixilll/pistoland are in the same cwd as where you have run that command - same as method 2 (on windows) or method 3 (on ubuntu/linux) but you run
<executable> -m pistol.pistol <location>instead.
commands:
- cd - change current working directory
- ucd - undo last cd
-
- example:
posix: /home/astridot/Desktop> cd ..
posix: /home/astridot> cd Documents/MyProject
posix: /home/astridot/Documents/MyProject>cd /home/astridot
posix: /home/astridot> cd /
posix: /> ucd
posix: /home/astridot> ucd
posix: /home/astridot/Documents> ucd
posix: /home/astridot> ucd
posix: /home/astridot/Desktop> exit
➤➤ exited pistol
- exit - exit pistol. this can also be done faster by pressing ^D chord to ^C
- help - go to the pistol documentation page
- cls, clear - clears the screen
- version - returns the current running version of pistol
- search - open an url in your browser
-
- important: this may not work if you have a modified or manually built version of pistol. you can enable this using the following commands
solo git clone https://github.com/pixilll/pistol
buckshot install pistol/pistol/misc/plugins/search.js
- cdh - stands for cd history, displays your cd history and where the next
ucdwill take you - ccdh - stands for clear cd history, clears the cd history
- whereami - see your current location (even in storage mode)
-
- important: this may not work if you have a modified or manually built version of pistol. you can enable this using the following commands
solo git clone https://github.com/pixilll/pistol
buckshot install pistol/pistol/misc/plugins/whereami.js
- st - switch to storage mode
- pistol - only works in solo mode, executes commands in pistol
-
- example: while in solo mode:
pistol whereami
- example: while in solo mode:
-
- to start a pistol instance from solo mode, use
python3 -m pistolinstead
- to start a pistol instance from solo mode, use
- root - changes the cwd to
/or whatever the root directory of your system is - rs - stands for reverse search, works somewhat like ^R in bash
- cch - stands for clear command history, clears the command history
- rmc - stands for remove command, removes a command from the command history
- alias - creates an alias for a command
- rma - stands for remove alias, removes an alias
- ca - stands for clear aliases, clears all aliases
- rms - stands for remove suggestion, removes a
scscache item - cs - stands for clear suggestions, clears the
scscache - meta - analyses the size of pistol's meta file
- prop - changes small key-boolean pairs in the meta files called 'props'
-
- argument 1 is the name
-
- argument 2 is the value
-
- the value can be true, on, off, false, disabled, enabled, or similar
-
- example:
prop my_prop true
- example:
- prop (for plugins)
-
- same command as normal prop
-
- precede the plugin name with
plugin:
- precede the plugin name with
-
- example:
prop plugin:my_plugin true- enables a plugin namedmy_pluginif it is installed
- example:
-
- more info here
- shotgun - used to manage pistol plugins easily
-
- more info here
- re - refreshes the meta file, run automatically after every command by default (can be disabled using
prop auto-re false) -
solo
-
- solo uses the system's default shell to run further commands
-
- example:
<posix> /home/astridot/Desktop/Project> solo dir
pistol README.md setup.py
<posix> /home/astridot/Desktop/Project> solo ls
pistol README.md setup.py
<posix> /home/astridot/Desktop/Project> solo echo Hello, world!
Hello, world!
<posix> /home/astridot/Desktop/Project> solo cd ..
⚠️ warning: cd may not work properly when executing using solo
🚨 error: solo: [Errno 2] No such file or directory: 'cd'
<posix> /home/astridot/Desktop/Project> solo exit
⚠️ warning: exit may not work properly when executing using solo
🚨 error: solo: [Errno 2] No such file or directory: 'exit'
<posix> /home/astridot/Desktop/Project> solo help
⚠️ warning: help may not work properly when executing using solo
🚨 error: solo: [Errno 2] No such file or directory: 'help'
<posix> /home/astridot/Desktop/Project> solo
<posix> /home/astridot/Desktop/Project [solo]> echo hi
hi
<posix> /home/astridot/Desktop/Project [solo]> dir
pistol README.md setup.py
<posix> /home/astridot/Desktop/Project [solo]> ls
pistol README.md setup.py
<posix> /home/astridot/Desktop/Project [solo]> cd ..
⚠️ warning: cd may not work properly when executing using solo
🚨 error: solo: [Errno 2] No such file or directory: 'cd'
<posix> /home/astridot/Desktop/Project [solo]> exit
➤➤ Exited solo
<posix> /home/astridot/Desktop/Project> exit
➤➤ Exited pistol
note: the above terminal snippet may be out of date and some commands may behave differently then what is shown.
Metadata
Release files for pistol 2.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pistol-2.7.tar.gz | 20.7 kB | With provenance | Details for pistol-2.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pistol-2.7-py3-none-any.whl | Python 3 | none | any | Details for pistol-2.7-py3-none-any.whl |
Total release size: 41.4 kB
Release files / pistol-2.7.tar.gz
| Download URL | pistol-2.7.tar.gz |
|---|---|
| Size | 20.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ff4244ceacc2f66e8944c6ce1c7cac31df71e03005ff9147352e9810c12c3039
|
|
BLAKE2b-256 checksum How to use checksums |
482ad2ff4b12223da9fa85032fbea35b13f5433c75ea08ecbf74d667bf878f0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 11, 2025.
Transparency logRelease files / pistol-2.7-py3-none-any.whl
| Download URL | pistol-2.7-py3-none-any.whl |
|---|---|
| Size | 20.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
52179be1968573507119eb8229c00ac2376604696b54bc63f74355bf183cfb5e
|
|
BLAKE2b-256 checksum How to use checksums |
01052896a85a580f34e49f031751e8fd1a53f93332791d8187581b669d9219a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 11, 2025.
Transparency logSecurity for pistol 2.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for pistol-2.7.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 11, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.