Tools for low-vision coders
Shell Chat
A wrapper for your shell that lets you talk to ChatGPT about the recent interactions.
- Wraps bash or another shell you pass in, so that it behaves exactly like what you'd expect.
- Except that when you run the
chatcommand, it switches into a separate mode where you're talking to ChatGPT about the past 3k (configurable) characters of interaction. - You have a back and forth conversation, and all of ChatGPT's responses are read aloud.
- You can
Ctrl-Cto interrupt and go back to the chat prompt. - You type
exitto go back to your shell.
Installation
From the Python environment that will be activated when your chosen shell starts, run
pip install lowvision
Then set your OpenAI API key
export OPENAI_API_KEY='whatever'
NOTE: The reason for installing in the Python environment active when your shell starts is because a chat command is
installed by lowvision that activates chat mode, and it must be available inside your wrapped shell.
if you've installed in a virtualenv instead, you'll need to activate that virtualenv after running the shell wrapper,
or chat won't properly activate chat mode.
Usage
See the help with
python -m lowvision.shell -h
Without arguments, it will
- launch Bash
- with a 3000 character scrollback buffer
- use
espeakfor text-to-speech - and
gpt-3.5-turboas the ChatGPT model
Here's an example that changes those defaults:
python -m lowvision.shell --shell /bin/sh \
--scrollback 5000 \
--tts 'say -v Daniel --rate 220' \
--model gpt-4
sh-3.2$ ping -c 3 google.com
PING google.com (142.251.163.100): 56 data bytes
64 bytes from 142.251.163.100: icmp_seq=0 ttl=106 time=18.316 ms
^C
--- google.com ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 18.316/18.316/18.316/0.000 ms
sh-3.2$ chat
?> what happened?
The user performed a ping test to google.com by sending 3 packets, and received a reply from one packet. The response shows the IP address of google.com and the round-trip time for the packet. The test was interrupted with ^C after receiving one response.
?> exit
sh-3.2$
Installing as the default shell
If you want to use this as your default shell, you could create a script like this (replacing the path to the Python
environment where you installed lowvision) and then set your default shell to that script.
#!/bin/sh
export OPENAI_API_KEY="whatever"
/opt/homebrew/Caskroom/mambaforge/base/bin/python3 -m lowvision.shell
Then make it executable, and set it as your default shell with chsh -s /path/to/your/script.sh.
Metadata
Release files for lowvision 0.3.0
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 | |
|---|---|---|---|---|
| lowvision-0.3.0.tar.gz | 6.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lowvision-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.0 kB
Release files / lowvision-0.3.0.tar.gz
| Download URL | lowvision-0.3.0.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ef331a2a1b0ee602dd683b1789942ff0d22a452ddbb304d60d9de22da6f9c663
|
|
BLAKE2b-256 checksum How to use checksums |
91f3fd5ae1555c46da12342b233a9048857413770c37c94648e3d807335c5478
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.9
|
Release files / lowvision-0.3.0-py3-none-any.whl
| Download URL | lowvision-0.3.0-py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
225cdeb10947ce3f252c8914fccdd49870b31abef1a54f006f82aee85bb7adcc
|
|
BLAKE2b-256 checksum How to use checksums |
0d01017cce66d285775b3b6b2c16c3ef011a3e0209faf5e198358059354b2862
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.9
|
Security for lowvision 0.3.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.