Skip to content
Merged
Show file tree
Hide file tree
Changes from 13 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
29 changes: 17 additions & 12 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
version: 2
updates:
# Update Python packages
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10

# Update GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
- package-ecosystem: "docker"
target-branch: "dev"
directory: "/"
schedule:
interval: "weekly"

- package-ecosystem: "uv"
target-branch: "dev"

directory: "/"
Comment on lines 14 to 16
Copy link

Copilot AI Nov 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Inconsistent blank line placement: there's a blank line between target-branch: \"dev\" and directory: \"/\" but not for the other package ecosystems. Remove the blank line on line 17 for consistency.

Copilot uses AI. Check for mistakes.
schedule:
interval: "weekly"
130 changes: 99 additions & 31 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,104 @@
name: Lint
name: checks
on:
push:
branches-ignore: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:

permissions: {}
pull_request:
workflow_dispatch:

jobs:
lint:
runs-on: ubuntu-latest

permissions:
contents: read
packages: read
statuses: write
setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: "Set up Python"
uses: actions/setup-python@v6
with:
python-version-file: "pyproject.toml"
Copy link

Copilot AI Nov 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The python-version-file should reference .python-version (which contains '3.13'), not pyproject.toml. The pyproject.toml specifies requires-python = \">=3.9\" which is a constraint, not a specific version to use for the action.

Copilot uses AI. Check for mistakes.
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
version: 0.8.*
- name: Install dependencies
run: uv sync --locked
- name: Cache dependencies
uses: actions/cache/save@v4
with:
path: |
.venv
~/.cache/uv
key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }}

steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
lint:
runs-on: ubuntu-latest
needs: setup
steps:
- uses: actions/checkout@v5
- name: "Set up Python"
uses: actions/setup-python@v6
with:
python-version-file: "pyproject.toml"
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
version: 0.8.*
- name: Restore dependencies
uses: actions/cache/restore@v4
with:
path: |
.venv
~/.cache/uv
key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }}
fail-on-cache-miss: true
- name: Run linting
run: |
uv run ruff check --fix
uv run ruff format

- name: Lint Code Base
uses: github/super-linter@v7
env:
VALIDATE_ALL_CODEBASE: true
FIX_PYTHON_RUFF: true
VALIDATE_PYTHON_RUFF: true
FIX_MARKDOWN_PRETTIER: true
VALIDATE_MARKDOWN_PRETTIER: true
VALIDATE_GITLEAKS: true
VALIDATE_GITHUB_ACTIONS: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
typecheck:
runs-on: ubuntu-latest
needs: setup
steps:
- uses: actions/checkout@v5
- name: "Set up Python"
uses: actions/setup-python@v6
with:
python-version-file: "pyproject.toml"
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
version: 0.8.*
- name: Restore dependencies
uses: actions/cache/restore@v4
with:
path: |
.venv
~/.cache/uv
key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }}
fail-on-cache-miss: true
- name: Run type checking
run: uv run ty check
vulture:
runs-on: ubuntu-latest
needs: setup
steps:
- uses: actions/checkout@v5
- name: "Set up Python"
uses: actions/setup-python@v6
with:
python-version-file: "pyproject.toml"
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
version: 0.8.*
- name: Restore dependencies
uses: actions/cache/restore@v4
with:
path: |
.venv
~/.cache/uv
key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }}
fail-on-cache-miss: true
- name: Run vulture
run: uv run vulture --min-confidence 100 --exclude ".venv" .
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.13
60 changes: 39 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,44 +64,62 @@ Explore the demo to see how KoalaKeys works and to get ideas for creating custom

1. Clone the repository:

```
git clone https://github.com/rtuszik/KoalaKeys
cd KoalaKeys
```
```
git clone https://github.com/rtuszik/KoalaKeys
cd KoalaKeys
```

2. Create and activate a virtual environment (optional):

```
python -m venv .venv
source .venv/bin/activate # On Windows, use `venv\Scripts\activate`
```
```
uv sync --locked
```

3. Install dependencies:

```
pip install -r requirements.txt
```

4. Set up the output directory:
3. Set up the output directory:
Create a `.env` file in the project root with:
```
CHEATSHEET_OUTPUT_DIR=path/to/your/output/directory
```
```
CHEATSHEET_OUTPUT_DIR=path/to/your/output/directory
```

## Usage

1. Create YAML files for your cheat sheets in the `cheatsheets` directory. For detailed instructions on how to format YAML files, please refer to the [YAML Cheat Sheet Specification Guide](yaml_cheatsheet_spec.md).

2. Generate cheat sheets:

```
python src/generate_cheatsheet.py
```
```
uv run src/generate_cheatsheet.py
```

3. Find the HTML cheat sheets in the specified output directory.

4. Open `index.html` to view the cheat sheet collection.

## Schema

Validate your YAML with the published JSON Schema:

- Public URL: https://rtuszik.github.io/KoalaKeys/schema/cheatsheet.schema.json
- Per-file modeline (first line in each YAML):

```
# yaml-language-server: $schema=https://rtuszik.github.io/KoalaKeys/schema/cheatsheet.schema.json
```

- Neovim yamlls mapping (optional):

```lua
require('lspconfig').yamlls.setup({
settings = {
yaml = {
schemas = {
["https://rtuszik.github.io/KoalaKeys/schema/cheatsheet.schema.json"] = "cheatsheets/*.yaml",
},
},
},
})
```

## Contributing

Contributions are welcome! Feel free to submit issues, feature requests, or pull requests.
Expand Down
25 changes: 13 additions & 12 deletions cheatsheets/example-cheatsheet.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# yaml-language-server: $schema=https://rtuszik.github.io/KoalaKeys/schema/cheatsheet.schema.json
title: "KoalaKeys"
RenderKeys: true # defaults to true
AllowText: false # defaults to false - requires RenderKeys: false
layout:
keyboard: US
system: Darwin
keyboard: US
system: Darwin
shortcuts:
General:
"CMD+C":
description: "Copy selected item"
"CMD+X":
description: "Cut selected item"
File and App Management:
"CMD+N":
description: "Open new window or document"
"CMD+O":
description: "Open selected item or display dialog to choose file to open"
General:
"CMD+C":
description: "Copy selected item"
"CMD+X":
description: "Cut selected item"
File and App Management:
"CMD+N":
description: "Open new window or document"
"CMD+O":
description: "Open selected item or display dialog to choose file to open"
Loading