setting COLUMNS env var to a number greater than 0 will make the terminal resize to that number of columns.
COLUMNS=80 uvx --from rich-cli rich myscript.py
Note
Not all programs respct the COLUMNS env var, but rich does, and a lot of
stuff I’m building uses rich.
I discovered this when I was trying to make a low effort readme generated from the code, but did not depend on the size of terminal it was ran on.
# justfile
readme:
echo "# Workspaces" > README.md
echo "" >> README.md
echo '``` bash' >> README.md
COLUMNS=80 ./workspaces.py --help >> README.md
echo '```' >> README.md
The tea command for gitea (used by forgejo) has a flag for login. With gitea
you can have multiple accounts logged in. When you try to run a command such
as repo create it will prompt you which login to use, but I learned that you
can bake it in to all of them with --login <login-name>
❯ tea repo create --name deleteme --description 'for example'
┃ NOTE: no gitea login detected, whether falling back to login 'git.waylonwalker.com'?
tea repo create --name deleteme --description 'for example' --login git.wayl.one
2025-11-21 Notes
Learned about nginx_auth today. Feels good to unlock a new skill that I did not quite understand before. I don't think I grasped that there is a backend...
2025-11-19 Notes
Making progress on dropper this week.
Another Big Cloud Outage Nov 2025
Today I learned how to use AliasChoices with pydantic settings to setup common aliases for the same field. I’m bad about remembering these things, and hate looking up the docs. I like things to be intuitive and just do the thing I want it to do. Especially when they get configured through something like yaml and do not have a direct lsp look up right from my editor. I figured out how to support what might be common aliases for a storage directory. These can be set up as environment variables and used by config.
from pathlib import Path
from pydantic import Field
from pydantic import AliasChoices
from pydantic_settings import BaseSettings
class Settings(BaseSettings):
storage_dir: Path | None = Field(
default=None,
validation_alias=AliasChoices(
"STORAGE_DIR", "STORAGE_DIRECTORY", "STORAGE_PATH", "STORAGE_PATHNAME",
"DROPPER_STORAGE_DIR", "DROPPER_STORAGE_DIRECTORY", "DROPPER_STORAGE_PATH", "DROPPER_STORAGE_PATHNAME",
),
description="Directory for stored files",
)
3d-Printed Corner Clamp
Techbrophobic
Mcat Anything
Missing Thoughts
2025-11-04 Notes
Today I gave mcat a try and it's so sick. It can anything right in the terminal, pdf, image, even video. It even works inside tmux unlike almost anything...
