Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,42 @@ uv run cheatbox

`cheatbox` is inspired by the common cheatsheet posts in the Linkedin feed and also [BENTOBOX](https://www.google.com/search?q=bento).

## Running the Application Globally

Install once, then run `cheatbox` from any directory.

**Install**

- pipx (recommended):
```bash
pipx install cheatbox
```
- From a cloned repo:
```bash
uv tool install .
```

**Set PATH**

- Windows (PowerShell): ensure `C:\Users\<you>\.local\bin` is on PATH. One-time helper:
```powershell
uv tool update-shell
```
Current session only:
```powershell
$env:PATH = "C:\Users\<you>\.local\bin;$env:PATH"
```
- Linux/macOS (bash/zsh): ensure `~/.local/bin` is on PATH:
```bash
export PATH="$HOME/.local/bin:$PATH"
```

**Run**

```bash
cheatbox
```

## License

GPL-3.0
Expand Down
3 changes: 2 additions & 1 deletion cheatbox/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

class Data:
def __init__(self):
self.base_dir = Path(__file__).parent.parent
# Keep data files alongside the package so installs include them
self.base_dir = Path(__file__).parent
self.data_dir = self.base_dir / "data"
self.domain: str = self.select_domain()

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions cheatbox/display.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ def display_bento(self, json_data):

logo_panel = self.get_ascii_panel(json_data, "LOGO")
title_panel = self.get_ascii_panel(json_data, "TITLE")

title_panel.subtitle = "CheatBox "
if title_panel:
title_panel.subtitle = "CheatBox "

# Display the Logo and title
if logo_panel or title_panel:
Expand Down
2 changes: 1 addition & 1 deletion cheatbox/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ def main(ctx: typer.Context):
list()

if __name__ == "__main__":
app()
app()
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ cheatbox = "cheatbox.main:app"
[tool.uv]
package = true

[tool.hatch.build]
include = ["cheatbox", "images/*", "README.md", "CHEATSHEET.md"]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"