Repository Analysis

kovidgoyal/kitty

If you live in the terminal, kitty is made for you! Cross-platform, fast, feature-rich, GPU based.

4.4 Likely human-written View on GitHub
4.4
Adjusted Score
4.4
Raw Score
100%
Time Factor
2026-05-30
Last Push
33,184
Stars
Python
Language
301,800
Lines of Code
845
Files
1408
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 17MEDIUM 11LOW 1380

Pattern Findings

1408 matches across 10 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers510 hits · 414 pts
SeverityFileLineSnippet
LOWsetup.py778def get_source_specific_defines(env: Env, src: str) -> Tuple[str, List[str], Optional[List[str]]]:
LOWsetup.py797def get_source_specific_cflags(env: Env, src: str) -> List[str]:
LOWsetup.py1228def update_go_generated_files(args: Options, kitty_exe: str) -> None:
LOWsetup.py1780def create_quick_access_bundle(kapp: str, quake_desc: str = 'Quick access to kitty') -> None:
LOWsetup.py1798def create_minimal_macos_bundle(args: Options, launcher_dir: str, relocate: bool = False) -> None:
LOWpublish.py311 def make_request_with_retries(
LOWpublish.py348 def update_nightly_description(self, release_id: int) -> None:
LOWpublish.py397 def print_failed_response_details(self, r: HTTPResponse, msg: str) -> None:
LOWpublish.py411 def existing_assets_for_release(self, release: Dict[str, Any]) -> List[Dict[str, Any]]:
LOWpublish.py521def remove_pycache_only_folders() -> None:
LOWkittens/runner.py53def import_kitten_main_module(config_dir: str, kitten: str) -> dict[str, Any]:
LOWkittens/runner.py214def get_kitten_extra_cli_parsers(kitten: str) -> dict[str,str]:
LOWkittens/panel/main.py44def panel_kitten_options_spec() -> str:
LOWkittens/panel/main.py101def cli_option_to_lsc_configs_map() -> MappingProxyType[str, tuple[str, ...]]:
LOWkittens/panel/main.py119def incrementally_update_layer_shell_config(existing: dict[str, Any], cli_options: Iterable[str]) -> LayerShellConfig:
LOWkittens/panel/main.py144def have_config_files_been_updated(config_files: Iterable[str]) -> bool:
LOWkittens/panel/main.py157def handle_single_instance_command(boss: BossType, sys_args: Sequence[str], environ: Mapping[str, str], notify_on_os_win
LOWkittens/tui/handler.py89 def allow_indiscriminate_remote_control(self, enable: bool = True) -> None:
LOWkittens/tui/handler.py236 def perform_default_key_action(self, key_event: KeyEventType) -> bool:
LOWkittens/tui/handler.py290 def on_file_transfer_response(self, ftc: 'FileTransmissionCommand') -> None:
LOWkittens/tui/loop.py364 def total_pending_bytes_to_write(self) -> int:
LOWkittens/choose_files/main.py174def relative_path_if_possible(path: str, base: str) -> str:
LOWkittens/ssh/utils.py84def remove_env_var_from_cmdline(key: str, argv: list[str]) -> None:
LOWkittens/ssh/utils.py97def set_single_env_var_in_cmdline(key: str, val: str, argv: list[str]) -> None:
LOWkittens/ssh/utils.py122def read_data_from_shared_memory(shm_name: str) -> Any:
LOWkittens/ssh/utils.py218def set_server_args_in_cmdline(
LOWkittens/command_palette/main.py125def collect_keyboard_bindings(
LOWkittens/command_palette/main.py158def relocate_mode_entry_bindings(
LOWdocs/conf.py318def write_remote_control_protocol_docs() -> None: # {{{
LOWdocs/notifications.py21def on_notification_activated(nc: NotificationCommand, which: int) -> None:
LOWgen/go_code.py224def generate_kittens_completion() -> None:
LOWgen/go_code.py255def completion_for_launch_wrappers(*names: str) -> None:
LOWgen/go_code.py261def generate_completions_for_kitty() -> None:
LOWgen/go_code.py364def go_code_for_remote_command(name: str, cmd: RemoteCommand, template: str) -> str:
LOWgen/go_code.py461def generate_extra_cli_parser(name: str, spec: str) -> None:
LOWgen/go_code.py481def kittens_needing_cli_parsers() -> Iterator[str]:
LOWgen/go_code.py784def generate_readline_actions() -> str:
LOWgen/go_code.py855def generate_textual_mimetypes() -> str:
LOWgen/wcwidth.py206def parse_flag_emoji_sequence(spec: str) -> None:
LOWgen/wcwidth.py223def parse_emoji_modifier_sequence(spec: str) -> None:
LOWgen/wcwidth.py272def parse_grapheme_segmentation() -> None:
LOWgen/wcwidth.py689def bitfield_declaration_as_c(name: str, fields: dict[str, int], *alternate_fields: dict[str, int]) -> str:
LOWgen/wcwidth.py833def split_into_graphemes_with_table(
LOWgen/wcwidth.py848def test_grapheme_segmentation(split_into_graphemes: Callable[[str], Iterator[str]]) -> None:
LOWgen/key_constants.py304def generate_functional_table() -> None:
LOWgen/key_constants.py351def generate_legacy_text_key_maps() -> None:
LOW.github/workflows/macos_crash_report.py363 def application_specific_information(self) -> Optional[str]:
LOW.github/workflows/macos_crash_report.py426def get_crash_report_from_file(crash_report_file: IO) -> CrashReportBase:
LOWglad/generate.py32def strip_trailing_whitespace(c):
LOWshell-integration/ssh/bootstrap.py244def exec_zsh_with_integration():
LOWshell-integration/ssh/bootstrap.py259def exec_fish_with_integration():
LOWshell-integration/ssh/bootstrap.py268def exec_bash_with_integration():
LOWshell-integration/ssh/bootstrap.py277def exec_with_shell_integration():
LOWkitty/config.py20def option_names_for_completion() -> tuple[str, ...]:
LOWkitty/config.py66def commented_out_default_config() -> str:
LOWkitty/config.py71def prepare_config_file_for_editing() -> str:
LOWkitty/config.py171 def add_effective_config_line(key: str, line: str) -> None:
LOWkitty/window.py178 def modify_argv_for_launch_with_cwd(self, argv: list[str], env: dict[str, str] | None=None, hold_after_ssh: bool = F
LOWkitty/window.py525def transparent_background_color_control(cp: ColorProfile, responses: dict[str, str], index: int, key: str, sep: str, va
LOWkitty/window.py696 def set_ignore_focus_changes_for_new_windows(cls, value: bool = True) -> Generator[None, None, None]:
450 more matches not shown…
Over-Commented Block351 hits · 326 pts
SeverityFileLineSnippet
LOWdev.sh1#!/bin/sh
LOWkittens/tui/dircolors.py1#!/usr/bin/env python
LOWkittens/tui/dircolors.py41TERM vt100
LOWkittens/dnd/drop_test.go141 // sub/
LOWkittens/diff/diff.go21// Diff returns an anchored diff of the two texts old and new
LOWkittens/diff/diff.go181// tgs returns the pairs of indexes of the longest common subsequence
LOWtools/rsync/api.go1// License: GPLv3 Copyright: 2023, Kovid Goyal, <kovid at kovidgoyal.net>
LOWtools/utils/file_at_fd_test.go461// base/
LOWtools/utils/humanize/times.go21// Time formats a time into a relative string.
LOWtools/simdstring/generate.sh1#!/bin/sh
LOWtools/simdstring/benchmark.sh1#!/bin/sh
LOWtools/simdstring/test.sh1#!/bin/sh
LOWtools/fzf/types.go121
LOWdocs/conf.py81#
LOWgen/rowcolumn-diacritics.txt1# This file lists the diacritics used to indicate row/column numbers for
LOW3rdparty/verstable.h261 KEY_TY, and (optionally) VAL_TY, CTX_TY, and header guards, and including the library, e.g.:
LOW3rdparty/verstable.h441#define VT_CAT( a, b ) VT_CAT_( a, b )
LOW3rdparty/verstable.h601// In summary, instantiating a template also defines wrappers for the template's types and functions with names in the
LOW3rdparty/verstable.h621
LOW3rdparty/verstable.h641#define VT_R3_0( ty, fn )
LOW3rdparty/verstable.h741 // indicating whether the key in this bucket begins a chain associated with the bucket (Y), and
LOW3rdparty/verstable.h841
LOW3rdparty/verstable.h861#else
LOW3rdparty/verstable.h881_Pragma( "warning( pop )" )
LOW3rdparty/verstable.h921 #endif
LOW3rdparty/verstable.h1461 }
LOW3rdparty/verstable.h1861#elif VT_TEMPLATE_COUNT_D1 == 2
LOW3rdparty/verstable.h1881#define VT_TEMPLATE_COUNT_D2 1
LOW3rdparty/verstable.h1901#undef VT_TEMPLATE_COUNT_D2
LOW3rdparty/verstable.h1921#elif VT_TEMPLATE_COUNT_D3 == 6
LOW3rdparty/verstable.h1941#undef CTX_TY
LOW3rdparty/base64/include/libbase64.h1#ifndef LIBBASE64_H
LOW3rdparty/base64/include/libbase64.h21#endif
LOW3rdparty/base64/lib/env.h1#ifndef BASE64_ENV_H
LOW3rdparty/base64/lib/env.h21#endif
LOW3rdparty/base64/lib/env.h41# define BASE64_HTOBE32(x) (x)
LOW3rdparty/base64/lib/env.h61#define BASE64_AEOF 1
LOW3rdparty/base64/lib/lib.c1#include <stdint.h>
LOW3rdparty/base64/lib/codec_choose.c1#include <stdbool.h>
LOW3rdparty/base64/lib/codec_choose.c41 return ((uint64_t)edx << 32) | eax;
LOW3rdparty/base64/lib/codec_choose.c61#ifndef bit_SSE41
LOW3rdparty/base64/lib/lib_openmp.c1// This code makes some assumptions on the implementation of
LOW3rdparty/base64/lib/arch/avx2/codec.c1#include <stdint.h>
LOW3rdparty/base64/lib/arch/avx2/codec.c21#endif
LOW3rdparty/base64/lib/arch/avx2/enc_reshuffle.c21 5, 6, 4, 5));
LOW3rdparty/base64/lib/arch/avx2/enc_reshuffle.c41 // 0000eeee FF000000 DDDDDD00 00000000
LOW3rdparty/base64/lib/arch/avx2/enc_reshuffle.c61 // 00000000 00ffffff 000000dd EEEE0000
LOW3rdparty/base64/lib/arch/avx2/enc_loop_asm.c1// Apologies in advance for combining the preprocessor with inline assembly,
LOW3rdparty/base64/lib/arch/avx2/enc_loop_asm.c41 LOAD("a", 0, -4) \
LOW3rdparty/base64/lib/arch/avx2/enc_loop_asm.c101
LOW3rdparty/base64/lib/arch/avx2/dec_reshuffle.c1static inline __m256i
LOW3rdparty/base64/lib/arch/sse41/codec.c1#include <stdint.h>
LOW3rdparty/base64/lib/arch/sse41/codec.c21#endif
LOW3rdparty/base64/lib/arch/neon32/codec.c1#include <stdint.h>
LOW3rdparty/base64/lib/arch/neon32/codec.c41
LOW3rdparty/base64/lib/arch/neon32/enc_reshuffle.c1static inline uint8x16x4_t
LOW3rdparty/base64/lib/arch/sse42/codec.c1#include <stdint.h>
LOW3rdparty/base64/lib/arch/sse42/codec.c21#endif
LOW3rdparty/base64/lib/arch/avx512/codec.c1#include <stdint.h>
LOW3rdparty/base64/lib/arch/ssse3/codec.c1#include <stdint.h>
291 more matches not shown…
Deep Nesting249 hits · 230 pts
SeverityFileLineSnippet
LOWsetup.py265
LOWsetup.py317
LOWsetup.py369
LOWsetup.py728
LOWsetup.py797
LOWsetup.py840
LOWsetup.py865
LOWsetup.py914
LOWsetup.py1348
LOWsetup.py1371
LOWsetup.py2185
LOWsetup.py2270
LOWpublish.py150
LOWpublish.py311
LOWkittens/tui/handler.py252
LOWkittens/tui/dircolors.py294
LOWkittens/tui/operations.py291
LOWkittens/tui/utils.py18
LOWkittens/tui/images.py485
LOWkittens/tui/loop.py273
LOWkittens/tui/loop.py292
LOWkittens/tui/loop.py307
LOWkittens/remote_file/main.py53
LOWkittens/remote_file/main.py311
LOWkittens/ssh/utils.py84
LOWkittens/ssh/utils.py218
LOWkittens/ssh/utils.py282
LOWkittens/choose_fonts/backend.py151
LOWkittens/choose_fonts/backend.py204
LOWkittens/hints/main.py283
LOWkittens/hints/main.py339
LOWkittens/command_palette/main.py158
LOWdocs/conf.py233
LOWdocs/conf.py318
LOWdocs/conf.py721
LOWdocs/conf.py322
LOWdocs/conf.py381
LOWdocs/extract-rst-targets.py23
LOWgen/go_code.py100
LOWgen/go_code.py364
LOWgen/go_code.py492
LOWgen/wcwidth.py99
LOWgen/wcwidth.py232
LOWgen/wcwidth.py763
LOWgen/cursors.py60
LOWgen/key_constants.py351
LOWgen/key_constants.py356
LOWgen/__main__.py9
LOW.github/workflows/ci.py48
LOW.github/workflows/ci.py178
LOW.github/workflows/ci.py270
LOW.github/workflows/macos_crash_report.py272
LOW.github/workflows/macos_crash_report.py307
LOW.github/workflows/macos_crash_report.py363
LOWbypy/macos/__main__.py245
LOWbypy/macos/__main__.py344
LOWbypy/linux/__main__.py52
LOWbypy/linux/__main__.py68
LOWshell-integration/ssh/bootstrap.py115
LOWshell-integration/ssh/bootstrap.py172
189 more matches not shown…
Excessive Try-Catch Wrapping202 hits · 185 pts
SeverityFileLineSnippet
LOWsetup.py311 except Exception:
LOWsetup.py352 except Exception:
LOWsetup.py746 except Exception as e:
LOWsetup.py868 except Exception:
LOWpublish.py337 except Exception as e:
LOWpublish.py401 except Exception:
LOWkittens/runner.py226 except Exception:
MEDIUMkittens/runner.py222def main() -> None:
LOWkittens/panel/main.py128 except Exception as e:
LOWkittens/tui/images.py25except Exception:
LOWkittens/tui/images.py269 except Exception:
LOWkittens/tui/images.py493 except Exception:
LOWkittens/tui/images.py529 except Exception as e:
LOWkittens/tui/images.py545 except Exception as e:
LOWkittens/tui/loop.py241 except Exception:
LOWkittens/tui/loop.py266 except Exception:
LOWkittens/tui/loop.py303 except Exception:
LOWkittens/tui/loop.py314 except Exception:
LOWkittens/tui/loop.py327 except Exception:
LOWkittens/tui/loop.py458 except Exception:
LOWkittens/remote_file/main.py247 except Exception:
LOWkittens/ssh/utils.py146 except Exception:
LOWkittens/ssh/utils.py156 except Exception as e:
MEDIUMkittens/ssh/utils.py17def ssh_options() -> dict[str, str]:
LOWkittens/choose_fonts/backend.py40 except Exception:
LOWkittens/hints/main.py359 except Exception:
LOWdocs/conf.py218 except Exception:
LOW.github/workflows/ci.py76 except Exception as err:
LOWbypy/macos/__main__.py206 except Exception as e:
LOWshell-integration/ssh/bootstrap.py316 except Exception as err:
LOWkitty/config.py41 except Exception as err:
LOWkitty/config.py54 except Exception as err:
LOWkitty/config.py62 except Exception as err:
LOWkitty/config.py89 except Exception as err:
LOWkitty/config.py129 except Exception as err:
LOWkitty/os_window_size.py65 except Exception:
LOWkitty/window.py220 except Exception:
LOWkitty/window.py479 except Exception as e:
LOWkitty/window.py541 except Exception:
LOWkitty/window.py920 except Exception:
LOWkitty/window.py1284 except Exception:
LOWkitty/window.py1340 except Exception:
LOWkitty/window.py1350 except Exception:
LOWkitty/window.py1416 except Exception:
LOWkitty/window.py1589 except Exception:
LOWkitty/window.py1611 except Exception:
LOWkitty/window.py1642 except Exception:
LOWkitty/window.py1770 except Exception:
LOWkitty/window.py1921 except Exception:
LOWkitty/update_check.py45 except Exception:
LOWkitty/update_check.py65 except Exception:
LOWkitty/update_check.py114 except Exception as e:
MEDIUMkitty/update_check.py42def get_released_version() -> str:
MEDIUMkitty/update_check.py108def update_check() -> bool:
LOWkitty/tabs.py790 except Exception:
LOWkitty/tabs.py1255 except Exception:
LOWkitty/tabs.py1263 except Exception:
LOWkitty/tabs.py1350 except Exception:
LOWkitty/tabs.py1574 except Exception:
LOWkitty/render_cache.py36 except Exception:
142 more matches not shown…
Cross-Language Confusion17 hits · 89 pts
SeverityFileLineSnippet
HIGHsetup.py1464make && make docs
HIGHsetup.py1482make && make docs
HIGHgen/apc_parsers.py210 int64_t n = parser_buf[i] - '0'; if (n < 0 || n > 9) break; \\
HIGHlogo/make.py137 run('ssh', 'ox', 'zsh', '-ilc', '~/bin/update-kitty && python3 ~/kitty-src/logo/make.py remote-macos')
HIGHkitty/options/types.py785 val = options_dict.get(key, null)
HIGHkitty/conf/generate.py219 a(' val = options_dict.get(key, null)')
HIGHkitty/rc/set_spacing.py69 settings+/dict.spacing: An object mapping margins/paddings using canonical form {'margin-top': 50, 'padding-left': n
HIGHkitty_tests/dnd.py804 """URI file request for a non-regular file (e.g. /dev/null) returns EINVAL."""
HIGHkitty_tests/__init__.py236 ans.push(lb.line(i))
HIGHkitty_tests/datatypes.py705 hb.push(lb.line(1))
HIGHkitty_tests/datatypes.py706 hb.push(lb.line(2))
HIGHkitty_tests/datatypes.py713 hb.push(lb.line(2))
HIGHkitty_tests/datatypes.py722 hb.push(line)
HIGHkitty_tests/multicell.py382 # Erase characters (aka replace with null)
HIGHkitty_tests/shell_integration.py224 pty.send_cmd_to_child('mkdir test && ls -a')
HIGHkitty_tests/shell_integration.py227 self.ae(pty.callbacks.titlebuf[-2:], ['mkdir test && ls -a', '~'])
HIGHkitty_tests/shell_integration.py396 cmd = 'mkdir test && ls -a'
Unused Imports74 hits · 70 pts
SeverityFileLineSnippet
LOWkittens/tui/handler.py33
LOWkittens/tui/utils.py15
LOWkittens/tui/images.py17
LOWkittens/choose_fonts/backend.py34
LOWdocs/conf.py31
LOWkitty/window.py139
LOWkitty/window.py141
LOWkitty/render_cache.py6
LOWkitty/constants.py14
LOWkitty/session.py22
LOWkitty/session.py27
LOWkitty/file_transmission.py17
LOWkitty/file_transmission.py23
LOWkitty/keys.py30
LOWkitty/boss.py155
LOWkitty/boss.py182
LOWkitty/boss.py183
LOWkitty/types.py10
LOWkitty/remote_control.py39
LOWkitty/marks.py7
LOWkitty/cli.py8
LOWkitty/utils.py13
LOWkitty/utils.py13
LOWkitty/utils.py51
LOWkitty/utils.py51
LOWkitty/utils.py54
LOWkitty/utils.py56
LOWkitty/child.py21
LOWkitty/notifications.py12
LOWkitty/notifications.py13
LOWkitty/open_actions.py11
LOWkitty/options/parse.py5
LOWkitty/conf/types.py11
LOWkitty/rc/get_colors.py13
LOWkitty/rc/new_window.py9
LOWkitty/rc/run.py26
LOWkitty/rc/set_font_size.py9
LOWkitty/rc/detach_window.py9
LOWkitty/rc/send_key.py20
LOWkitty/rc/remove_marker.py10
LOWkitty/rc/get_text.py10
LOWkitty/rc/set_window_logo.py28
LOWkitty/rc/set_tab_color.py12
LOWkitty/rc/kitten.py9
LOWkitty/rc/last_used_layout.py10
LOWkitty/rc/close_tab.py10
LOWkitty/rc/scroll_window.py10
LOWkitty/rc/create_marker.py11
LOWkitty/rc/disable_ligatures.py10
LOWkitty/rc/resize_os_window.py20
LOWkitty/rc/goto_layout.py10
LOWkitty/rc/detach_tab.py9
LOWkitty/rc/resize_window.py9
LOWkitty/rc/focus_tab.py10
LOWkitty/rc/set_background_image.py28
LOWkitty/rc/ls.py13
LOWkitty/rc/set_user_vars.py9
LOWkitty/rc/action.py21
LOWkitty/rc/select_window.py11
LOWkitty/rc/select_window.py12
14 more matches not shown…
AI Slop Vocabulary2 hits · 4 pts
SeverityFileLineSnippet
LOWkitty/utils.py978 # platform.mac_ver does not work thanks to Apple's stupid "hardening", so just use sw_vers
MEDIUMglfw/cocoa_init.m1078 // avoid killing helpers from other processes. This is obviously not robust
Decorative Section Separators1 hit · 3 pts
SeverityFileLineSnippet
MEDIUMkittens/command_palette/main.go238// sectionHeader returns a separator line like " ── label ─────────".
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippet
MEDIUMkitty_tests/dnd.py3103 # Create a directory entry (X=2 means directory handle=2)
Redundant / Tautological Comments1 hit · 1 pts
SeverityFileLineSnippet
LOWkitty_tests/dnd.py2205 # Read file from directory