Skip to main content

Context-aware cheatsheets that appear when you need them

Project description

Termcards

Context-aware cheatsheets that appear when you need them.

What it does

Termcards automatically detects your terminal environment and displays relevant keyboard shortcuts and code examples. No searching, no memorizing commands - just the right information at the right time.

$ termcards
Detected: tmux  micro  python

[Shows Python patterns, Micro shortcuts, and tmux commands in adaptive layout]

Installation

uv tool install termcards

Usage

# Auto-detect context and show relevant sheets
termcards

# Show specific sheet
termcards --sheet python

# Choose display mode (reference shortcuts or code examples)
termcards --mode code

# Live mode - continuously track active pane
termcards --live

# Analyze specific tmux pane
termcards --pane %26

# Focus on specific context when multiple detected
termcards --focus micro

Features

  • Smart Detection: Recognizes tmux, editors (Micro, Vim), languages (Python), and deployment tools (Fly.io)
  • Multiple Modes: Reference mode for shortcuts/commands, Code mode for examples
  • Live Tracking: Continuously updates display as you switch panes (--live)
  • Adaptive Layouts: Automatically adjusts to terminal width
  • Rich Formatting: Syntax highlighting and beautiful terminal UI
  • Zero Config: Works immediately without setup

How it works

Termcards uses a detection pipeline to identify nested contexts. When you're editing Python in Micro inside tmux, it shows all three relevant cheatsheets, prioritizing the innermost context.

Supported Contexts

  • tmux - Terminal multiplexer commands
  • Shell - Shell-specific commands (bash, zsh, fish)
  • Micro - Modern terminal editor shortcuts
  • Python - Code patterns and idioms (code mode in development)
  • Fly.io - Deployment commands

Adding Custom Sheets

Create YAML reference sheets or Python code examples:

# src/termcards/sheets/reference/tool.yaml
name: tool
sections:
  - name: essential
    items:
      - key: "Ctrl-X"
        desc: "Do something"
# src/termcards/sheets/code/language.py
# @section: patterns
# @title: Language Patterns
def example():
    pass

Development

# Clone and install
git clone https://github.com/angelsen/termcards
cd termcards
uv run termcards

# Validate sheets
uv run termcards --check

# Run with debug info
uv run termcards --debug

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

termcards-0.1.1.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

termcards-0.1.1-py3-none-any.whl (36.1 kB view details)

Uploaded Python 3

File details

Details for the file termcards-0.1.1.tar.gz.

File metadata

  • Download URL: termcards-0.1.1.tar.gz
  • Upload date:
  • Size: 24.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.12

File hashes

Hashes for termcards-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8fdae2413d5fc6ee04b94b7480c8415b234627a3f6c106da624599201a1e5db4
MD5 207bf93db558133f3f7a31f7d5eb43c7
BLAKE2b-256 6446a049bbcbded0eb28f16dca7e25111c274e13c86dbcc37e5d048040e1f234

See more details on using hashes here.

File details

Details for the file termcards-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: termcards-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 36.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.12

File hashes

Hashes for termcards-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e1267a2604da8229bc3e799ace044e3817e9965ed255fa8a81c9cba5364735a3
MD5 e6356f28ef376ab04ebc05ad226478e8
BLAKE2b-256 c8c2f2ad7572510773adf43cbd271c976e81b7c43c4aaa71759b941bfd4c6676

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page