kovidgoyal/kitty · error · SystemExit
No kitten named {original_kitten_name}
Error message
No kitten named {original_kitten_name} What it means
kitty's kitten runner raises SystemExit('No kitten named ...') when the requested kitten name cannot be resolved to an existing file. It first checks the literal path, then tries path_to_custom_kitten() in the config dir, then resolves builtin kitten names; if none exist, it prints all available builtin kitten names to stderr and exits. Note the SOURCE shadows the loop variable (`for kitten in all_kitten_names()`), but the message uses the original name, so it is purely informational.
Source
Thrown at kittens/runner.py:161
kitten = resolved_kitten(kitten)
set_debug(kitten)
if kitten in all_kitten_names():
runpy.run_module(f'kittens.{kitten}.main', run_name=run_name)
return
kitten = original_kitten_name
# Look for a custom kitten
if not kitten.endswith('.py'):
kitten += '.py'
from kitty.constants import config_dir
path = path_to_custom_kitten(config_dir, kitten)
if not os.path.exists(path):
path = path_to_custom_kitten(config_dir, resolved_kitten(kitten))
if not os.path.exists(path):
print('Available builtin kittens:', file=sys.stderr)
for kitten in all_kitten_names():
print(kitten, file=sys.stderr)
raise SystemExit(f'No kitten named {original_kitten_name}')
m = runpy.run_path(path, init_globals={'sys': sys, 'os': os}, run_name='__run_kitten__')
from kitty.fast_data_types import set_options
try:
m['main'](sys.argv)
finally:
set_options(None)
@run_once
def all_kitten_names() -> frozenset[str]:
ans = []
for name in list_kitty_resources('kittens'):
if '__' not in name and '.' not in name and name != 'tui':
ans.append(name)
return frozenset(ans)
View on GitHub (pinned to 6d5d0c4406)
Solutions
- Check the stderr output that precedes the exit — it lists all valid builtin kitten names; correct the name or typo.
- If it's a custom kitten, place the .py file at ~/.config/kitty/kittens/<name>.py (or pass an existing file path).
- Verify the kitty version (kitty --version) supports the kitten; consult the changelog for renamed/removed kittens.
- If calling run_kitten programmatically, validate the name against all_kitten_names() plus your custom kitten dir before invoking it.
Example fix
# before
run_kitten('themes2', ['themes2']) # typo -> SystemExit: No kitten named themes2
# after
from kittens.runner import all_kitten_names
if 'themes2' not in all_kitten_names() and not os.path.exists(custom_path):
# pick a valid kitten
... Defensive patterns
Strategy: validation
Validate before calling
from kittens.runner import all_kitten_names
import os
def kitten_exists(name: str, config_dir: str) -> bool:
if os.path.exists(name):
return True
return name in all_kitten_names() or os.path.exists(
os.path.join(config_dir, 'kittens', resolved := f'{name}.py')
)
if not kitten_exists('icat', '/home/me/.config/kitty'):
print('unknown kitten; choose from:', *all_kitten_names()) Prevention
- Validate kitten names against all_kitten_names() before invoking them from config or scripts.
- Pin your kitty version in CI/scripts so renamed kittens don't break invocations.
- Keep custom kittens in ~/.config/kitty/kittens/<name>.py with a unique name that can't collide with builtins.
When it happens
Trigger: Running `kitten <name>` (or calling run_kitten directly, as get_kitten_cli_docs/get_kitten_wrapper_of/get_kitten_completer/get_kitten_conf_docs/get_kitten_extra_cli_parsers do) where <name> is neither a builtin kitten, nor a file path that exists, nor a custom kitten python file in ~/.config/kitty/kittens/. Also happens with typos or after a kitten was renamed/removed between kitty versions.
Common situations: Typo in kitten name in a shortcut/action in kitty.conf (e.g. launch kitten icat vs icat path issues); using a kitten name from a newer/older kitty version; custom kitten file not placed in the expected config_dir/kittens directory; scripts invoking run_kitten() with a programmatically-built name that resolves to nothing.
Related errors
- This should be run as kitten ssh
- This should be run as kitten show_key
- This must be run as kitten themes
- This should be run as kitten transfer
- Remote control not enabled, this kitten should be run via a
AI-assisted analysis of kovidgoyal/kitty@6d5d0c4406 (2026-08-27).
Data as JSON: /api/errors/7402a26a690d9da7.
Report an issue: GitHub.