diff --git "a/github_code_sample_1000.csv" "b/github_code_sample_1000.csv" new file mode 100644--- /dev/null +++ "b/github_code_sample_1000.csv" @@ -0,0 +1,19530 @@ +id,file_path,file_name,file_extension,file_size,language,code,repo_name,repo_owner,repo_stars,repo_forks,repo_description,repo_topics,license,commit_sha,commit_message,commit_author,commit_date,data_quality_score,source,timestamp,word_count,char_count,line_count +github_huggingface_transformers_61763e19c0801c4026673a9ea8e25893f0105301,src/transformers/backbone_utils.py,backbone_utils.py,,16948,Python,"# Copyright 2026 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:17:46.994367,1690,16948,377 +github_huggingface_transformers_95a47ae39fdfc10cd9da9f3336afb84b2bfa57f5,src/transformers/cache_utils.py,cache_utils.py,,74556,Python,"from abc import ABC, abstractmethod +from collections.abc import Iterable + +import torch + +from .configuration_utils import PreTrainedConfig +from .utils import ( + is_hqq_available, + is_optimum_quanto_available, + is_quanto_greater, + is_torch_greater_or_equal, + is_torchdynamo_compiling, + logging, +) + + +if is_hqq_available(): + from hqq.core.quantize import Quantizer as HQQQuantizer + +_is_torch_greater_or_equal_than_2_7 = is_torch_greater_or_equal(""2.7"", accept_dev=True) + + +logger = lo...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:17:47.566642,7484,74556,1575 +github_huggingface_transformers_46886e6fc0396cff06719e2613358df984a9f565,src/transformers/convert_slow_tokenizers_checkpoints_to_fast.py,convert_slow_tokenizers_checkpoints_to_fast.py,,5790,Python,"# Copyright 2018 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:17:49.890272,480,5790,150 +github_huggingface_transformers_971e4fc08905b67d97118a4030544c4ea3b9185e,src/transformers/video_utils.py,video_utils.py,,34395,Python,"# Copyright 2025 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:18:15.046076,3679,34395,892 +github_huggingface_transformers_cd0710649c918549c3b91268b63366df5a9f1355,src/transformers/core_model_loading.py,core_model_loading.py,,66300,Python,"# Copyright 2025 The HuggingFace Inc. team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or i...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:17:50.275342,6469,66296,1491 +github_huggingface_transformers_38ff0399641bf1b006125153db5296e1554928bb,src/transformers/debug_utils.py,debug_utils.py,,12964,Python,"# Copyright 2020 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:17:50.685615,1415,12964,349 +github_huggingface_transformers_9f9edb40eb51bf1907c9f575cdb4c9424ec967d5,src/transformers/dependency_versions_check.py,dependency_versions_check.py,,2099,Python,"# Copyright 2020 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:17:50.979051,263,2099,63 +github_huggingface_transformers_14a8548d03997fa2b9ceb63c8ac3b6e63f5d4ca7,src/transformers/__init__.py,__init__.py,,40510,Python,"# Copyright 2020 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:17:45.121146,2847,40510,853 +github_huggingface_transformers_399b0be222e9abd78f529463cc240856a57f813e,src/transformers/dependency_versions_table.py,dependency_versions_table.py,,3335,Python,"# THIS FILE HAS BEEN AUTOGENERATED. To update: +# 1. modify the `_deps` dict in setup.py +# 2. run `make fix-repo`` +deps = { + ""Pillow"": ""Pillow>=10.0.1,<=15.0"", + ""accelerate"": ""accelerate>=1.1.0"", + ""av"": ""av"", + ""beautifulsoup4"": ""beautifulsoup4"", + ""blobfile"": ""blobfile"", + ""codecarbon"": ""codecarbon>=2.8.1"", + ""datasets"": ""datasets>=2.15.0"", + ""deepspeed"": ""deepspeed>=0.9.3"", + ""dill"": ""dill<0.3.5"", + ""evaluate"": ""evaluate>=0.4.6"", + ""faiss-cpu"": ""faiss-cpu"", + ""fastapi...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:17:51.804375,205,3335,96 +github_huggingface_transformers_a51ebca341d4940b6b2cb28e5f4513b5a72b35f8,src/transformers/activations.py,activations.py,,13184,Python,"# Copyright 2020 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:17:45.785624,1309,13182,361 +github_huggingface_transformers_c89618f2d9cb57fab1f949e41edf6ede7c8c9a14,src/transformers/audio_utils.py,audio_utils.py,,55156,Python,"# Copyright 2023 The HuggingFace Inc. team and the librosa & torchaudio authors. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, eit...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:17:46.670667,6653,55154,1249 +github_huggingface_transformers_45e43fdaf3aa81e121267762c557a2764af07798,src/transformers/masking_utils.py,masking_utils.py,,76703,Python,"# Copyright 2025 HuggingFace Inc. team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or impli...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:17:57.925350,8766,76514,1609 +github_huggingface_transformers_5b230836c6e7ec63a83b276e3ced23e30e6dd300,src/transformers/model_debugging_utils.py,model_debugging_utils.py,,17044,Python,"# Copyright 2025 The HuggingFace Inc. team. +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:17:58.711761,1644,17044,456 +github_huggingface_transformers_e833a5a8a2abb0965b8c6cf9129e6e198e9c599d,src/transformers/modelcard.py,modelcard.py,,22230,Python,"# Copyright 2018 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:17:59.021530,1883,22230,587 +github_huggingface_transformers_93a91989853e2aec37bc2615ad6a09fdfd02766d,src/transformers/image_processing_base.py,image_processing_base.py,,23124,Python,"# Copyright 2020 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:17:55.490795,2157,23124,495 +github_huggingface_transformers_704001c476a6d4d4397dbf22a2de6fa1ca00b1d7,src/transformers/image_processing_utils.py,image_processing_utils.py,,29590,Python,"# Copyright 2022 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:17:56.332584,2989,29556,689 +github_huggingface_transformers_cc4c724c501749e5c71638840b685f6478f6750a,src/transformers/image_transforms.py,image_transforms.py,,45094,Python,"# Copyright 2022 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:17:56.825543,5245,45094,1072 +github_huggingface_transformers_d733e70b728d63a13befc3a920acb3b982a91a13,src/transformers/file_utils.py,file_utils.py,,2935,Python,"# Copyright 2020 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:17:53.257722,229,2935,106 +github_huggingface_transformers_dcf4da2696c2623b2c5d8ee5bf57bfa79e8a1a75,src/transformers/video_processing_utils.py,video_processing_utils.py,,39198,Python,"# Copyright 2025 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:18:14.698820,3710,39198,846 +github_huggingface_transformers_c3e0157024a35d753f67099cbf4b128ea2acc8e8,src/transformers/fusion_mapping.py,fusion_mapping.py,,10582,Python,"# Copyright 2026 The HuggingFace Inc. team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or i...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:17:54.134904,961,10582,271 +github_huggingface_transformers_b9e6f99b041d6fdb7b9986f06bbb9db5383d5073,src/transformers/hf_argparser.py,hf_argparser.py,,19734,Python,"# Copyright 2020 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:17:54.423272,2073,19734,427 +github_huggingface_transformers_267bb36a8e6eff68a7207a09eb32018d8ca532cd,src/transformers/hyperparameter_search.py,hyperparameter_search.py,,3684,Python,"# Copyright 2023-present the HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:17:54.780676,342,3684,124 +github_huggingface_transformers_9936486c1edb0d6d1dffeb905f59e73c69da231a,src/transformers/image_processing_backends.py,image_processing_backends.py,,26940,Python,"# Copyright 2025 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:17:55.112961,2351,26940,690 +github_huggingface_transformers_984d80964fad087d77ac9ce3984a7b390915080e,src/transformers/image_utils.py,image_utils.py,,41640,Python,"# Copyright 2021 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:17:57.177007,4489,41640,1070 +github_huggingface_transformers_dfe26aec2391bde9d1842706c7c6fe1e9b7a2a0b,conftest.py,conftest.py,,7806,Python,"# Copyright 2020 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:17:44.216338,740,7806,182 +github_huggingface_transformers_d5daf2875bf8c479e029db8823b6e168ad97e06c,setup.py,setup.py,,13167,Python,"# Copyright 2021 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:17:44.633826,1246,13167,362 +github_huggingface_transformers_b0ebb053086ba5de4ae59a99fc021526acec231e,src/transformers/initialization.py,initialization.py,,12277,Python,"# Copyright 2025 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:17:57.548933,1223,12277,334 +github_huggingface_transformers_bf5e0c431e42b0a4aef80141fd6b9ae609843e87,src/transformers/processing_utils.py,processing_utils.py,,101104,Python,"# Copyright 2022 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:18:04.265084,9197,101102,2029 +github_huggingface_transformers_444c8bc457bb131806ac6b9cc0a0517fcf21b137,src/transformers/pytorch_utils.py,pytorch_utils.py,,10077,Python,"# Copyright 2022 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:18:04.661795,1000,10077,261 +github_huggingface_transformers_1012606fcaaf37c7104c97e9c9f587401805a858,src/transformers/modeling_layers.py,modeling_layers.py,,11476,Python,"# Copyright 2025 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:18:01.167987,982,11476,289 +github_huggingface_transformers_fdb5e0dec65804b2b03135cd055051a4eded3527,src/transformers/modeling_attn_mask_utils.py,modeling_attn_mask_utils.py,,21843,Python,"# Copyright 2023 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:17:59.401841,2172,21843,504 +github_huggingface_transformers_9211ccb19a9e10a997e42283296b394e141ac115,src/transformers/modeling_flash_attention_utils.py,modeling_flash_attention_utils.py,,37129,Python,"# Copyright 2025 The Fairseq Authors and the HuggingFace Inc. team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY K...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:17:59.779267,3662,37129,808 +github_huggingface_transformers_2de6cc13fc85f5228a4ca2a16185e80e432b23f1,src/transformers/modeling_gguf_pytorch_utils.py,modeling_gguf_pytorch_utils.py,,35487,Python,"# Copyright 2024 The ggml.ai team and The HuggingFace Inc. team. and pygguf author (github.com/99991) +# https://github.com/99991/pygguf +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BAS...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:18:00.303212,3074,35483,807 +github_huggingface_transformers_25619ca55b3ffa5311a3acfabce11267e93fab23,src/transformers/tokenization_utils_base.py,tokenization_utils_base.py,,175204,Python,"# base +# Copyright 2020 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See ...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:18:07.736255,17351,175204,3578 +github_huggingface_transformers_82856de433c66bbe7dcb90552a1bb34fac33eefc,src/transformers/tokenization_utils_sentencepiece.py,tokenization_utils_sentencepiece.py,,13649,Python,"# Copyright 2020 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:18:08.132785,1314,13643,316 +github_huggingface_transformers_5365e9c1b6e1fab8afee53cfb601e73e235d524b,src/transformers/tokenization_utils_tokenizers.py,tokenization_utils_tokenizers.py,,65803,Python,"# Copyright 2020 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:18:09.142988,5527,65787,1395 +github_huggingface_transformers_9afa36a924ac21f418104bc6d0d6eca57d6702d9,src/transformers/trainer_optimizer.py,trainer_optimizer.py,,23966,Python,"# Copyright 2024 The HuggingFace Inc. team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or i...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:18:10.902445,1871,23966,628 +github_huggingface_transformers_30377f5f5a6193a477b1be987b499c777566f455,src/transformers/trainer_pt_utils.py,trainer_pt_utils.py,,57264,Python,"# Copyright 2020-present the HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:18:11.932416,6280,57264,1337 +github_huggingface_transformers_4f58a230e352eb121a81ee4f8edd6c849c681422,src/transformers/configuration_utils.py,configuration_utils.py,,63447,Python,"# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. +# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:17:48.085361,6349,63447,1356 +github_huggingface_transformers_400268de8180530ad963327c13047633f1bb1cf2,src/transformers/trainer_utils.py,trainer_utils.py,,49862,Python,"# Copyright 2020-present the HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:18:12.843528,4686,49862,1255 +github_huggingface_transformers_1f218fe408733a3b40699be163950c578d979a55,src/transformers/tokenization_mistral_common.py,tokenization_mistral_common.py,,80186,Python,"# Copyright 2025 Mistral AI and The HuggingFace Inc. team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, eith...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:18:06.911609,7415,80184,1686 +github_huggingface_transformers_5254dd89ecd2fbad6e16b88dcd73de2a7ccde0f4,src/transformers/tokenization_python.py,tokenization_python.py,,62393,Python,"# Copyright 2020 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:18:07.248313,6292,62381,1419 +github_huggingface_transformers_eb092019b678715c623fde1a98c5709637174cdd,src/transformers/modeling_utils.py,modeling_utils.py,,258912,Python,"# Copyright 2018 The Google AI Language Team Authors, Facebook AI Research authors and The HuggingFace Inc. team. +# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under th...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:18:02.568380,25034,258902,4999 +github_huggingface_transformers_c64124c289fa21e05f0744fa3f781be5bfc88c8d,src/transformers/monkey_patching.py,monkey_patching.py,,13972,Python,"# Copyright 2026 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:18:02.878323,1386,13970,358 +github_huggingface_transformers_ada588adbd215cb6b2c1c1f970a48ffbb0275a5e,src/transformers/trainer_seq2seq.py,trainer_seq2seq.py,,18217,Python,"# Copyright 2020 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:18:12.293505,1698,18217,393 +github_huggingface_transformers_f434d78d404083ce9fc322fdd9dd07bb9259d863,src/transformers/trainer.py,trainer.py,,215739,Python,"# Copyright 2020-present the HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:18:09.796337,17793,215703,4419 +github_huggingface_transformers_4db902237b50bb92649b43ebecb3f1bd11421a5d,src/transformers/modeling_outputs.py,modeling_outputs.py,,108678,Python,"# Copyright 2020 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:18:01.622510,11404,108678,1707 +github_huggingface_transformers_3a0dcf345280fcb13dd9cb73b4493aec0cc2e0b6,src/transformers/modeling_rope_utils.py,modeling_rope_utils.py,,58030,Python,"# Copyright 2024 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:18:02.114163,5737,58028,1044 +github_huggingface_transformers_863242a695c639a3dac008b8d65ac670eef8cfdf,src/transformers/testing_utils.py,testing_utils.py,,159254,Python,"# Copyright 2020 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:18:05.620948,15788,159243,4389 +github_huggingface_transformers_ebe1a2cbd3c2819276a0cd0d6105caa5a6397f0d,src/transformers/time_series_utils.py,time_series_utils.py,,7480,Python,"# Copyright 2023 The HuggingFace Inc. team. +# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARR...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:18:06.446103,760,7480,226 +github_huggingface_transformers_9c9e7b929f6f08242eab29f15c6be97d7022a047,src/transformers/dynamic_module_utils.py,dynamic_module_utils.py,,34752,Python,"# Copyright 2021 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:17:52.197835,3602,34752,811 +github_huggingface_transformers_5e346d3e15e5a956785df989e20f624590be249c,src/transformers/feature_extraction_sequence_utils.py,feature_extraction_sequence_utils.py,,18846,Python,"# Copyright 2021 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:17:52.508342,1868,18846,383 +github_huggingface_transformers_f69b3fdfd9b0ab70220f0b41e15c6a66f91652ad,src/transformers/feature_extraction_utils.py,feature_extraction_utils.py,,30125,Python,"# Copyright 2021 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:17:52.908631,2775,30125,673 +github_huggingface_transformers_598f24a604c9bcb1acec6341be13ac3ad8a2aa5a,src/transformers/trainer_callback.py,trainer_callback.py,,34363,Python,"# Copyright 2020-present the HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:18:10.203741,3359,34363,785 +github_huggingface_transformers_90bbdcc25151ac54d6e603bc8aed8bcbc70f711f,src/transformers/trainer_jit_checkpoint.py,trainer_jit_checkpoint.py,,5274,Python,"import os +import signal +import threading + +from .trainer_callback import TrainerCallback +from .trainer_utils import PREFIX_CHECKPOINT_DIR +from .utils import logging + + +logger = logging.get_logger(__name__) + + +class CheckpointManager: + def __init__(self, trainer, kill_wait: int = 3): + """""" + Initialize the CheckpointManager for Just-In-Time checkpoint handling. + + Args: + trainer: The Trainer instance that will be used to save checkpoints when SIGTERM is received. + ...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:18:10.516818,402,5274,126 +github_huggingface_transformers_aebe6fb76f8ecfdb9321895d115fcc347dee7449,src/transformers/conversion_mapping.py,conversion_mapping.py,,35238,Python,"# Copyright (C) 2025 the HuggingFace Inc. team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:17:48.697035,1610,35238,688 +github_huggingface_transformers_62fac901ae843386777f9595066d25c30f58791a,src/transformers/convert_slow_tokenizer.py,convert_slow_tokenizer.py,,78179,Python,"# Copyright 2018 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:17:49.557254,5403,78147,2152 +github_huggingface_transformers_eb5ff6119a841b834555dc796c0c13b2ad12e255,src/transformers/training_args_seq2seq.py,training_args_seq2seq.py,,4308,Python,"# Copyright 2020 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:18:13.829442,500,4308,95 +github_huggingface_transformers_64559c9b591059431a6274f7f2d970c768b94dea,src/transformers/optimization.py,optimization.py,,55023,Python,"# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, ...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:18:03.711636,5202,55023,1343 +github_huggingface_transformers_193ca14b503c60f036785928a5f4d29ef5484cf7,src/transformers/_typing.py,_typing.py,,6534,Python,"# Copyright 2026 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:17:45.419454,839,6530,173 +github_huggingface_transformers_1a5924c723ab52c85a26d821b37c6c2408c47b48,src/transformers/training_args.py,training_args.py,,142678,Python,"# Copyright 2020 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:18:13.493503,14603,142567,2869 +github_huggingface_transformers_8089b3ec3ac68241e0f99159e4366372f26d9ad8,src/transformers/safetensors_conversion.py,safetensors_conversion.py,,4541,Python,"from typing import Optional + +import httpx +from huggingface_hub import Discussion, HfApi, get_repo_discussions + +from .utils import cached_file, http_user_agent, logging + + +logger = logging.get_logger(__name__) + + +def previous_pr(api: HfApi, model_id: str, pr_title: str, token: str) -> Optional[""Discussion""]: + main_commit = api.list_repo_commits(model_id, token=token)[0].commit_id + for discussion in get_repo_discussions(repo_id=model_id, token=token): + if discussion.title == pr_title an...[truncated]",huggingface/transformers,huggingface,159743,32972,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:18:04.940163,399,4541,118 +github_huggingface_transformers_b9e6f99b041d6fdb7b9986f06bbb9db5383d5073,src/transformers/hf_argparser.py,hf_argparser.py,,19734,Python,"# Copyright 2020 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:05.994653,2073,19734,427 +github_huggingface_transformers_61763e19c0801c4026673a9ea8e25893f0105301,src/transformers/backbone_utils.py,backbone_utils.py,,16948,Python,"# Copyright 2026 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:40:59.196499,1690,16948,377 +github_huggingface_transformers_c3e0157024a35d753f67099cbf4b128ea2acc8e8,src/transformers/fusion_mapping.py,fusion_mapping.py,,10582,Python,"# Copyright 2026 The HuggingFace Inc. team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or i...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:05.623905,961,10582,271 +github_huggingface_transformers_b0ebb053086ba5de4ae59a99fc021526acec231e,src/transformers/initialization.py,initialization.py,,12277,Python,"# Copyright 2025 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:09.113449,1223,12277,334 +github_huggingface_transformers_984d80964fad087d77ac9ce3984a7b390915080e,src/transformers/image_utils.py,image_utils.py,,41640,Python,"# Copyright 2021 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:08.698567,4489,41640,1070 +github_huggingface_transformers_cc4c724c501749e5c71638840b685f6478f6750a,src/transformers/image_transforms.py,image_transforms.py,,45094,Python,"# Copyright 2022 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:08.308906,5245,45094,1072 +github_huggingface_transformers_704001c476a6d4d4397dbf22a2de6fa1ca00b1d7,src/transformers/image_processing_utils.py,image_processing_utils.py,,29590,Python,"# Copyright 2022 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:07.942984,2989,29556,689 +github_huggingface_transformers_95a47ae39fdfc10cd9da9f3336afb84b2bfa57f5,src/transformers/cache_utils.py,cache_utils.py,,74556,Python,"from abc import ABC, abstractmethod +from collections.abc import Iterable + +import torch + +from .configuration_utils import PreTrainedConfig +from .utils import ( + is_hqq_available, + is_optimum_quanto_available, + is_quanto_greater, + is_torch_greater_or_equal, + is_torchdynamo_compiling, + logging, +) + + +if is_hqq_available(): + from hqq.core.quantize import Quantizer as HQQQuantizer + +_is_torch_greater_or_equal_than_2_7 = is_torch_greater_or_equal(""2.7"", accept_dev=True) + + +logger = lo...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:40:59.572390,7484,74556,1575 +github_huggingface_transformers_4f58a230e352eb121a81ee4f8edd6c849c681422,src/transformers/configuration_utils.py,configuration_utils.py,,63447,Python,"# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. +# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:40:59.959410,6349,63447,1356 +github_huggingface_transformers_2a6dc23ba9d0209d7fd653128e32048b51627970,src/transformers/conversion_mapping.py,conversion_mapping.py,,33562,Python,"# Copyright (C) 2025 the HuggingFace Inc. team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:00.450154,1588,33562,682 +github_huggingface_transformers_62fac901ae843386777f9595066d25c30f58791a,src/transformers/convert_slow_tokenizer.py,convert_slow_tokenizer.py,,78179,Python,"# Copyright 2018 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:01.376705,5403,78147,2152 +github_huggingface_transformers_46886e6fc0396cff06719e2613358df984a9f565,src/transformers/convert_slow_tokenizers_checkpoints_to_fast.py,convert_slow_tokenizers_checkpoints_to_fast.py,,5790,Python,"# Copyright 2018 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:01.672111,480,5790,150 +github_huggingface_transformers_45e43fdaf3aa81e121267762c557a2764af07798,src/transformers/masking_utils.py,masking_utils.py,,76703,Python,"# Copyright 2025 HuggingFace Inc. team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or impli...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:09.486334,8766,76514,1609 +github_huggingface_transformers_9f9edb40eb51bf1907c9f575cdb4c9424ec967d5,src/transformers/dependency_versions_check.py,dependency_versions_check.py,,2099,Python,"# Copyright 2020 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:02.696536,263,2099,63 +github_huggingface_transformers_5254dd89ecd2fbad6e16b88dcd73de2a7ccde0f4,src/transformers/tokenization_python.py,tokenization_python.py,,62393,Python,"# Copyright 2020 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:18.584945,6292,62381,1419 +github_huggingface_transformers_e66af264b89a6a4775ddf2ec50ce0ac3e524c8f2,src/transformers/training_args.py,training_args.py,,142219,Python,"# Copyright 2020 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:24.266176,14560,142108,2857 +github_huggingface_transformers_444c8bc457bb131806ac6b9cc0a0517fcf21b137,src/transformers/pytorch_utils.py,pytorch_utils.py,,10077,Python,"# Copyright 2022 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:16.308382,1000,10077,261 +github_huggingface_transformers_5b230836c6e7ec63a83b276e3ced23e30e6dd300,src/transformers/model_debugging_utils.py,model_debugging_utils.py,,17044,Python,"# Copyright 2025 The HuggingFace Inc. team. +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:10.384957,1644,17044,456 +github_huggingface_transformers_dfe26aec2391bde9d1842706c7c6fe1e9b7a2a0b,conftest.py,conftest.py,,7806,Python,"# Copyright 2020 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:40:56.682272,740,7806,182 +github_huggingface_transformers_de16abf8654fadf1a2a32e59881cceb0b213a159,setup.py,setup.py,,13103,Python,"# Copyright 2021 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:40:57.071163,1242,13103,359 +github_huggingface_transformers_14a8548d03997fa2b9ceb63c8ac3b6e63f5d4ca7,src/transformers/__init__.py,__init__.py,,40510,Python,"# Copyright 2020 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:40:57.419066,2847,40510,853 +github_huggingface_transformers_193ca14b503c60f036785928a5f4d29ef5484cf7,src/transformers/_typing.py,_typing.py,,6534,Python,"# Copyright 2026 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:40:57.702968,839,6530,173 +github_huggingface_transformers_3a0dcf345280fcb13dd9cb73b4493aec0cc2e0b6,src/transformers/modeling_rope_utils.py,modeling_rope_utils.py,,58030,Python,"# Copyright 2024 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:13.804513,5737,58028,1044 +github_huggingface_transformers_2e98863a762df8666b1eb7996dd63ec6361b3002,src/transformers/modeling_utils.py,modeling_utils.py,,255274,Python,"# Copyright 2018 The Google AI Language Team Authors, Facebook AI Research authors and The HuggingFace Inc. team. +# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under th...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:14.318925,24701,255264,4921 +github_huggingface_transformers_971e4fc08905b67d97118a4030544c4ea3b9185e,src/transformers/video_utils.py,video_utils.py,,34395,Python,"# Copyright 2025 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:25.751008,3679,34395,892 +github_huggingface_transformers_e833a5a8a2abb0965b8c6cf9129e6e198e9c599d,src/transformers/modelcard.py,modelcard.py,,22230,Python,"# Copyright 2018 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:10.770242,1883,22230,587 +github_huggingface_transformers_fdb5e0dec65804b2b03135cd055051a4eded3527,src/transformers/modeling_attn_mask_utils.py,modeling_attn_mask_utils.py,,21843,Python,"# Copyright 2023 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:11.157007,2172,21843,504 +github_huggingface_transformers_9211ccb19a9e10a997e42283296b394e141ac115,src/transformers/modeling_flash_attention_utils.py,modeling_flash_attention_utils.py,,37129,Python,"# Copyright 2025 The Fairseq Authors and the HuggingFace Inc. team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY K...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:11.692747,3662,37129,808 +github_huggingface_transformers_c89618f2d9cb57fab1f949e41edf6ede7c8c9a14,src/transformers/audio_utils.py,audio_utils.py,,55156,Python,"# Copyright 2023 The HuggingFace Inc. team and the librosa & torchaudio authors. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, eit...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:40:58.910606,6653,55154,1249 +github_huggingface_transformers_c64124c289fa21e05f0744fa3f781be5bfc88c8d,src/transformers/monkey_patching.py,monkey_patching.py,,13972,Python,"# Copyright 2026 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:14.635566,1386,13970,358 +github_huggingface_transformers_64559c9b591059431a6274f7f2d970c768b94dea,src/transformers/optimization.py,optimization.py,,55023,Python,"# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, ...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:15.483874,5202,55023,1343 +github_huggingface_transformers_bf5e0c431e42b0a4aef80141fd6b9ae609843e87,src/transformers/processing_utils.py,processing_utils.py,,101104,Python,"# Copyright 2022 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:15.981183,9197,101102,2029 +github_huggingface_transformers_1012606fcaaf37c7104c97e9c9f587401805a858,src/transformers/modeling_layers.py,modeling_layers.py,,11476,Python,"# Copyright 2025 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:12.941118,982,11476,289 +github_huggingface_transformers_66306b6f71f6e868ec0c16f11811c0496b72b038,src/transformers/modeling_gguf_pytorch_utils.py,modeling_gguf_pytorch_utils.py,,28240,Python,"# Copyright 2024 The ggml.ai team and The HuggingFace Inc. team. and pygguf author (github.com/99991) +# https://github.com/99991/pygguf +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BAS...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:12.101387,2465,28240,653 +github_huggingface_transformers_b08aa558d795a61c0ad1c7c5015b63bb48608a32,src/transformers/dependency_versions_table.py,dependency_versions_table.py,,3276,Python,"# THIS FILE HAS BEEN AUTOGENERATED. To update: +# 1. modify the `_deps` dict in setup.py +# 2. run `make fix-repo`` +deps = { + ""Pillow"": ""Pillow>=10.0.1,<=15.0"", + ""accelerate"": ""accelerate>=1.1.0"", + ""av"": ""av"", + ""beautifulsoup4"": ""beautifulsoup4"", + ""blobfile"": ""blobfile"", + ""codecarbon"": ""codecarbon>=2.8.1"", + ""datasets"": ""datasets>=2.15.0"", + ""deepspeed"": ""deepspeed>=0.9.3"", + ""dill"": ""dill<0.3.5"", + ""evaluate"": ""evaluate>=0.4.6"", + ""faiss-cpu"": ""faiss-cpu"", + ""fastapi...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:03.515410,203,3276,95 +github_huggingface_transformers_9c9e7b929f6f08242eab29f15c6be97d7022a047,src/transformers/dynamic_module_utils.py,dynamic_module_utils.py,,34752,Python,"# Copyright 2021 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:03.852960,3602,34752,811 +github_huggingface_transformers_5e346d3e15e5a956785df989e20f624590be249c,src/transformers/feature_extraction_sequence_utils.py,feature_extraction_sequence_utils.py,,18846,Python,"# Copyright 2021 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:04.192753,1868,18846,383 +github_huggingface_transformers_f69b3fdfd9b0ab70220f0b41e15c6a66f91652ad,src/transformers/feature_extraction_utils.py,feature_extraction_utils.py,,30125,Python,"# Copyright 2021 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:04.533969,2775,30125,673 +github_huggingface_transformers_8089b3ec3ac68241e0f99159e4366372f26d9ad8,src/transformers/safetensors_conversion.py,safetensors_conversion.py,,4541,Python,"from typing import Optional + +import httpx +from huggingface_hub import Discussion, HfApi, get_repo_discussions + +from .utils import cached_file, http_user_agent, logging + + +logger = logging.get_logger(__name__) + + +def previous_pr(api: HfApi, model_id: str, pr_title: str, token: str) -> Optional[""Discussion""]: + main_commit = api.list_repo_commits(model_id, token=token)[0].commit_id + for discussion in get_repo_discussions(repo_id=model_id, token=token): + if discussion.title == pr_title an...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:16.638852,399,4541,118 +github_huggingface_transformers_863242a695c639a3dac008b8d65ac670eef8cfdf,src/transformers/testing_utils.py,testing_utils.py,,159254,Python,"# Copyright 2020 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:17.021877,15788,159243,4389 +github_huggingface_transformers_b43d5354e8ac1e368579ab1009d4539700c41337,src/transformers/core_model_loading.py,core_model_loading.py,,61994,Python,"# Copyright 2025 The HuggingFace Inc. team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or i...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:02.068590,5992,61990,1400 +github_huggingface_transformers_4db902237b50bb92649b43ebecb3f1bd11421a5d,src/transformers/modeling_outputs.py,modeling_outputs.py,,108678,Python,"# Copyright 2020 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:13.336601,11404,108678,1707 +github_huggingface_transformers_9afa36a924ac21f418104bc6d0d6eca57d6702d9,src/transformers/trainer_optimizer.py,trainer_optimizer.py,,23966,Python,"# Copyright 2024 The HuggingFace Inc. team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or i...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:22.262725,1871,23966,628 +github_huggingface_transformers_ebe1a2cbd3c2819276a0cd0d6105caa5a6397f0d,src/transformers/time_series_utils.py,time_series_utils.py,,7480,Python,"# Copyright 2023 The HuggingFace Inc. team. +# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARR...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:17.811739,760,7480,226 +github_huggingface_transformers_1f218fe408733a3b40699be163950c578d979a55,src/transformers/tokenization_mistral_common.py,tokenization_mistral_common.py,,80186,Python,"# Copyright 2025 Mistral AI and The HuggingFace Inc. team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, eith...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:18.214199,7415,80184,1686 +github_huggingface_transformers_d733e70b728d63a13befc3a920acb3b982a91a13,src/transformers/file_utils.py,file_utils.py,,2935,Python,"# Copyright 2020 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:04.833337,229,2935,106 +github_huggingface_transformers_a51ebca341d4940b6b2cb28e5f4513b5a72b35f8,src/transformers/activations.py,activations.py,,13184,Python,"# Copyright 2020 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:40:58.004605,1309,13182,361 +github_huggingface_transformers_f7980a2bce2529fa00688afe01aa9638eb022bf0,src/transformers/tokenization_utils_base.py,tokenization_utils_base.py,,175325,Python,"# base +# Copyright 2020 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See ...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:19.282667,17356,175325,3580 +github_huggingface_transformers_82856de433c66bbe7dcb90552a1bb34fac33eefc,src/transformers/tokenization_utils_sentencepiece.py,tokenization_utils_sentencepiece.py,,13649,Python,"# Copyright 2020 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:19.592166,1314,13643,316 +github_huggingface_transformers_5365e9c1b6e1fab8afee53cfb601e73e235d524b,src/transformers/tokenization_utils_tokenizers.py,tokenization_utils_tokenizers.py,,65803,Python,"# Copyright 2020 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:20.441955,5527,65787,1395 +github_huggingface_transformers_eb5ff6119a841b834555dc796c0c13b2ad12e255,src/transformers/training_args_seq2seq.py,training_args_seq2seq.py,,4308,Python,"# Copyright 2020 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:24.556309,500,4308,95 +github_huggingface_transformers_dcf4da2696c2623b2c5d8ee5bf57bfa79e8a1a75,src/transformers/video_processing_utils.py,video_processing_utils.py,,39198,Python,"# Copyright 2025 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:25.413523,3710,39198,846 +github_huggingface_transformers_38ff0399641bf1b006125153db5296e1554928bb,src/transformers/debug_utils.py,debug_utils.py,,12964,Python,"# Copyright 2020 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:02.383039,1415,12964,349 +github_huggingface_transformers_93a91989853e2aec37bc2615ad6a09fdfd02766d,src/transformers/image_processing_base.py,image_processing_base.py,,23124,Python,"# Copyright 2020 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:07.081175,2157,23124,495 +github_huggingface_transformers_9936486c1edb0d6d1dffeb905f59e73c69da231a,src/transformers/image_processing_backends.py,image_processing_backends.py,,26940,Python,"# Copyright 2025 The HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the Lic...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:06.684485,2351,26940,690 +github_huggingface_transformers_8665b27acfa9f7f59713e5bc3b907ed75832c00b,src/transformers/trainer.py,trainer.py,,215620,Python,"# Copyright 2020-present the HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:21.141858,17785,215584,4417 +github_huggingface_transformers_6c4f72859264871a0f4a50bf5a7e00400e479216,src/transformers/trainer_callback.py,trainer_callback.py,,34361,Python,"# Copyright 2020-present the HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:21.634152,3359,34361,785 +github_huggingface_transformers_90bbdcc25151ac54d6e603bc8aed8bcbc70f711f,src/transformers/trainer_jit_checkpoint.py,trainer_jit_checkpoint.py,,5274,Python,"import os +import signal +import threading + +from .trainer_callback import TrainerCallback +from .trainer_utils import PREFIX_CHECKPOINT_DIR +from .utils import logging + + +logger = logging.get_logger(__name__) + + +class CheckpointManager: + def __init__(self, trainer, kill_wait: int = 3): + """""" + Initialize the CheckpointManager for Just-In-Time checkpoint handling. + + Args: + trainer: The Trainer instance that will be used to save checkpoints when SIGTERM is received. + ...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:21.932968,402,5274,126 +github_huggingface_transformers_267bb36a8e6eff68a7207a09eb32018d8ca532cd,src/transformers/hyperparameter_search.py,hyperparameter_search.py,,3684,Python,"# Copyright 2023-present the HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:06.289737,342,3684,124 +github_huggingface_transformers_30377f5f5a6193a477b1be987b499c777566f455,src/transformers/trainer_pt_utils.py,trainer_pt_utils.py,,57264,Python,"# Copyright 2020-present the HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:23.136910,6280,57264,1337 +github_huggingface_transformers_ada588adbd215cb6b2c1c1f970a48ffbb0275a5e,src/transformers/trainer_seq2seq.py,trainer_seq2seq.py,,18217,Python,"# Copyright 2020 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:23.514342,1698,18217,393 +github_huggingface_transformers_400268de8180530ad963327c13047633f1bb1cf2,src/transformers/trainer_utils.py,trainer_utils.py,,49862,Python,"# Copyright 2020-present the HuggingFace Inc. team. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See...[truncated]",huggingface/transformers,huggingface,159498,32898,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:41:23.858682,4686,49862,1255 +github_huggingface_transformers_dfe26aec2391bde9d1842706c7c6fe1e9b7a2a0b,conftest.py,conftest.py,.py,7806,Python,"# Copyright 2020 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159297,32858,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.95,GitHub Public Repositories,2026-04-13T13:39:51.079577,740,7806,182 +github_huggingface_transformers_de16abf8654fadf1a2a32e59881cceb0b213a159,setup.py,setup.py,.py,13103,Python,"# Copyright 2021 The HuggingFace Team. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie...[truncated]",huggingface/transformers,huggingface,159297,32858,"🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. ","['audio' 'deep-learning' 'deepseek' 'gemma' 'glm' 'hacktoberfest' 'llm' + 'machine-learning' 'model-hub' 'natural-language-processing' 'nlp' + 'pretrained-models' 'python' 'pytorch' 'pytorch-transformers' 'qwen' + 'speech-recognition' 'transformer' 'vlm']",Apache-2.0,,,,,0.95,GitHub Public Repositories,2026-04-13T13:39:51.456168,1242,13103,359 +github_golang_go_1a7d7a444667a9f9644f7ba929fbb4bfb9b63fb2,lib/hg/goreposum.py,goreposum.py,,2483,Python,"# Copyright 2025 The Go Authors. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. + +# Mercurial extension to add a 'goreposum' command that +# computes a hash of a remote repo's tag state. +# Tag definitions can come from the .hgtags file stored in +# any head of any branch, and the server protocol does not +# expose the tags directly. However, the protocol does expose +# the hashes of all the branch heads, so we can use a hash ...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:24.873581,378,2483,65 +github_rust-lang_rust_28d432736ed661af8e13ece3de4f74f7e2b6cd25,src/bootstrap/bootstrap.py,bootstrap.py,,54146,Python,"from __future__ import absolute_import, division, print_function +import argparse +import contextlib +import datetime +import hashlib +import os +import re +import shutil +import subprocess +import sys +import sysconfig +import tarfile +import tempfile + +from time import time +from multiprocessing import Pool, cpu_count + +try: + import lzma +except ImportError: + lzma = None + + +def platform_is_win32(): + return sys.platform == ""win32"" + + +if platform_is_win32(): + EXE_SUFFIX = "".exe"" +else: + EXE_SUFFIX =...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:40.501836,4881,54146,1447 +github_rust-lang_rust_928a7496cb70ef2a6caf8e890fb09f12883a26e3,x.py,x.py,,2007,Python,"#!/usr/bin/env python3 +# Some systems don't have `python3` in their PATH. This isn't supported by x.py directly; +# they should use `x` or `x.ps1` instead. + +# This file is only a ""symlink"" to bootstrap.py, all logic should go there. + +# Parts of `bootstrap.py` use the `multiprocessing` module, so this entry point +# must use the normal `if __name__ == '__main__':` convention to avoid problems. +if __name__ == ""__main__"": + import os + import sys + import warnings + from inspect import cleand...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:55.858313,254,2007,54 +github_rust-lang_rust_fda8f004eff42acbbb0ae2059d39062d02fb0e6b,src/bootstrap/configure.py,configure.py,,28230,Python,"#!/usr/bin/env python + +# ignore-tidy-linelength + +from __future__ import absolute_import, division, print_function +import shlex +import sys +import os +import re + +rust_dir = os.path.dirname(os.path.abspath(__file__)) +rust_dir = os.path.dirname(rust_dir) +rust_dir = os.path.dirname(rust_dir) +sys.path.append(os.path.join(rust_dir, ""src"", ""bootstrap"")) +import bootstrap # noqa: E402 + + +class Option(object): + def __init__(self, name, rustbuild, desc, value): + self.name = name + self.rustbu...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:41.725403,2723,28230,829 +github_rust-lang_rust_1dbe997d23f3afa9208e7e12c5bd70272ac0c7c1,src/bootstrap/bootstrap_test.py,bootstrap_test.py,,10386,Python,"""""""Bootstrap tests + +Run these with `x test bootstrap`, or `python -m unittest src/bootstrap/bootstrap_test.py`."""""" + +from __future__ import absolute_import, division, print_function +import os +import unittest +from unittest.mock import patch +import tempfile +import hashlib +import sys + +from shutil import rmtree + +# Allow running this from the top-level directory. +bootstrap_dir = os.path.dirname(os.path.abspath(__file__)) +# For the import below, have Python search in src/bootstrap first. +sys.path.inser...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:40.866082,835,10386,254 +github_rust-lang_rust_bd27998b377068bd0d0c65dc7f9e463422b39dc8,src/etc/gdb_providers.py,gdb_providers.py,,16067,Python,"from sys import version_info + +import gdb + +if version_info[0] >= 3: + xrange = range + +ZERO_FIELD = ""__0"" +FIRST_FIELD = ""__1"" + + +def unwrap_unique_or_non_null(unique_or_nonnull): + # BACKCOMPAT: rust 1.32 + # https://github.com/rust-lang/rust/commit/7a0911528058e87d22ea305695f4047572c5e067 + # BACKCOMPAT: rust 1.60 + # https://github.com/rust-lang/rust/commit/2a91eeac1a2d27dd3de1bf55515d765da20fd86f + ptr = unique_or_nonnull[""pointer""] + return ptr if ptr.type.code == gdb.TYPE_CODE_PT...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:43.820417,1199,16067,504 +github_rust-lang_rust_3688513987dc8e5b7e6cc5eb253be525a8c19495,src/tools/publish_toolstate.py,publish_toolstate.py,,10560,Python,"#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# This script computes the new ""current"" toolstate for the toolstate repo (not to be +# confused with publishing the test results, which happens in `src/bootstrap/toolstate.rs`). +# It gets called from `src/ci/publish_toolstate.sh` at the end of an `auto` build. + +from __future__ import print_function + +import sys +import re +import os +import json +import datetime +import collections +import textwrap + +try: + import urllib2 + from urllib2 import HTTPError...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:55.054903,998,10547,326 +github_rust-lang_rust_407e87cdf785b3cb5754b7a4ef466a33baa5b78d,src/etc/lldb_providers.py,lldb_providers.py,,48985,Python,"from __future__ import annotations +import sys +from typing import Generator, List, TYPE_CHECKING + +from lldb import ( + SBData, + SBError, + eBasicTypeLong, + eBasicTypeUnsignedLong, + eBasicTypeUnsignedChar, + eFormatChar, + eTypeIsInteger, +) + +from rust_types import is_tuple_fields + +if TYPE_CHECKING: + from lldb import SBValue, SBType, SBTypeStaticField, SBTarget + +# from lldb.formatters import Logger + +################################################################################...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:46.223573,4068,48985,1433 +github_rust-lang_rust_19a39f349532cecd359cf14ce4de5084af22d80e,src/ci/cpu-usage-over-time.py,cpu-usage-over-time.py,,6112,Python,"#!/usr/bin/env python3 +# ignore-tidy-linelength + +# This is a small script that we use on CI to collect CPU usage statistics of +# our builders. By seeing graphs of CPU usage over time we hope to correlate +# that with possible improvements to Rust's own build system, ideally diagnosing +# that either builders are always fully using their CPU resources or they're +# idle for long stretches of time. +# +# This script is relatively simple, but it's platform specific. Each platform +# (OSX/Windows/Linux) h...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:42.032240,662,6112,178 +github_rust-lang_rust_73d1e79f9617d13bd13032131b58fcd90f6fdf30,src/etc/gdb_load_rust_pretty_printers.py,gdb_load_rust_pretty_printers.py,,504,Python,"# Add this folder to the python sys path; GDB Python-interpreter will now find modules in this path +import sys +from os import path + +self_dir = path.dirname(path.realpath(__file__)) +sys.path.append(self_dir) + +# ruff: noqa: E402 +import gdb +import gdb_lookup + +# current_objfile can be none; even with `gdb foo-app`; sourcing this file after gdb init now works +try: + gdb_lookup.register_printers(gdb.current_objfile()) +except Exception: + gdb_lookup.register_printers(gdb.selected_inferior().progspa...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:43.198474,58,504,17 +github_rust-lang_rust_ecfdacc1f3115a25627b3ed4568d7c5677e25e59,src/etc/dec2flt_table.py,dec2flt_table.py,,3448,Python,"#!/usr/bin/env python3 + +"""""" +Generate powers of five using Daniel Lemire's ``Eisel-Lemire algorithm`` for use in +decimal to floating point conversions. + +Specifically, computes and outputs (as Rust code) a table of 10^e for some +range of exponents e. The output is one array of 128 bit significands. +The base two exponents can be inferred using a logarithmic slope +of the decimal exponent. The approximations are normalized and rounded perfectly, +i.e., within 0.5 ULP of the true value. + +Adapted from D...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:42.890732,436,3444,112 +github_rust-lang_rust_c70944790d2b58ac5b96cb6f6db88e287704ff83,src/etc/gdb_lookup.py,gdb_lookup.py,,3782,Python,"import gdb +import gdb.printing +import re + +from gdb_providers import * +from rust_types import RustType, classify_struct, classify_union + + +_gdb_version_matched = re.search(""([0-9]+)\\.([0-9]+)"", gdb.VERSION) +gdb_version = ( + [int(num) for num in _gdb_version_matched.groups()] if _gdb_version_matched else [] +) + + +def register_printers(objfile): + objfile.pretty_printers.append(printer) + + +# BACKCOMPAT: rust 1.35 +def is_hashbrown_hashmap(hash_map): + return len(hash_map.type.fields()) == 1 + + +de...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:43.485392,287,3782,122 +github_rust-lang_rust_46a3a1602ac71c003c2f8bca4436903d2f7f9674,src/etc/htmldocck.py,htmldocck.py,,20398,Python,"#!/usr/bin/env python +# -*- coding: utf-8 -*- + +r"""""" +For documentation and usage instructions, please see +https://rustc-dev-guide.rust-lang.org/rustdoc-internals/rustdoc-test-suite.html +"""""" + +from __future__ import absolute_import, print_function, unicode_literals + +import codecs +import io +import sys +import os.path +import re +import shlex +from collections import namedtuple +from pathlib import Path + +try: + from html.parser import HTMLParser +except ImportError: + from HTMLParser import HTMLParser +...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:45.130469,2007,20398,648 +github_rust-lang_rust_67194a09ec4ce2599ded6784c45ee48efe939fcc,src/etc/lldb_lookup.py,lldb_lookup.py,,6649,Python,"from __future__ import annotations +from typing import List + + +import lldb + +from lldb_providers import * +from rust_types import ( + ENUM_DISR_FIELD_NAME, + ENUM_LLDB_ENCODED_VARIANTS, + RustType, + classify_union, + is_tuple_fields, +) + +#################################################################################################### +# This file contains lookup functions that associate rust types with their synthetic/summary +# providers. +# +# LLDB caches the results of the the commands i...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:45.766042,685,6649,149 +github_rust-lang_rust_28f932acd9d5f5180d56e4ecda481d468ec40c53,src/etc/generate-keyword-tests.py,generate-keyword-tests.py,,1044,Python,"#!/usr/bin/env python + +"""""" +This script takes a list of keywords and generates a testcase, that checks +if using the keyword as identifier fails, for every keyword. The generate +test files are set read-only. +Test for https://github.com/rust-lang/rust/issues/2275 + +sample usage: src/etc/generate-keyword-tests.py as break +"""""" + +import sys +import os +import stat + + +template = """"""\ +// This file was auto-generated using 'src/etc/generate-keyword-tests.py %s' + +fn main() { + let %s = ""foo""; //~ error: expe...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:44.316189,125,1044,39 +github_rust-lang_rust_1ed68458ae3a5cd1bcfc66a2f5713d991c5f5ab5,src/etc/rust_types.py,rust_types.py,,4106,Python,"from enum import Enum +from typing import List +import re + + +class RustType(Enum): + Other = 0 + Struct = 1 + Tuple = 2 + CStyleVariant = 3 + TupleVariant = 4 + StructVariant = 5 + Enum = 6 + Empty = 7 + SingletonEnum = 8 + RegularEnum = 9 + CompressedEnum = 10 + Union = 11 + Indirection = 12 + + StdString = 13 + StdOsString = 14 + StdStr = 15 + StdSlice = 16 + StdVec = 17 + StdVecDeque = 18 + StdBTreeSet = 19 + StdBTreeMap = 20 + StdHashMap = 21 + StdHa...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:46.512263,329,4106,134 +github_rust-lang_rust_8728ddec8e6a633ba418c4c26a4987b099a8c46c,src/etc/lldb_batchmode.py,lldb_batchmode.py,,8795,Python,"# This script allows to use LLDB in a way similar to GDB's batch mode. That is, given a text file +# containing LLDB commands (one command per line), this script will execute the commands one after +# the other. +# LLDB also has the -s and -S commandline options which also execute a list of commands from a text +# file. However, this command are execute `immediately`: the command of a `run` or `continue` +# command will be executed immediately after the `run` or `continue`, without waiting for the ne...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:45.442334,891,8795,260 +github_NousResearch_hermes-agent_ec5e86d7869e06701e5600c60edefbc540128dfd,run_agent.py,run_agent.py,,617708,Python,"#!/usr/bin/env python3 +"""""" +AI Agent Runner with Tool Calling + +This module provides a clean, standalone agent that can execute AI models +with tool calling capabilities. It handles the conversation loop, tool execution, +and response management. + +Features: +- Automatic tool calling loop until completion +- Configurable model parameters +- Error handling and recovery +- Message history management +- Support for multiple model providers + +Usage: + from run_agent import AIAgent + + agent = AIAgent(ba...[truncated]",NousResearch/hermes-agent,NousResearch,110040,15931,The agent that grows with you,"['ai' 'ai-agent' 'ai-agents' 'anthropic' 'chatgpt' 'claude' 'claude-code' + 'clawdbot' 'codex' 'hermes' 'hermes-agent' 'llm' 'moltbot' + 'nous-research' 'openai' 'openclaw']",MIT,,,,,0.98,GitHub Public API,2026-04-22T14:51:44.385197,48704,614504,12054 +github_NousResearch_hermes-agent_e0aeb706191141f58eb2efb7650da83e508a9487,mcp_serve.py,mcp_serve.py,,30701,Python,""""""" +Hermes MCP Server — expose messaging conversations as MCP tools. + +Starts a stdio MCP server that lets any MCP client (Claude Code, Cursor, Codex, +etc.) list conversations, read message history, send messages, poll for live +events, and manage approval requests across all connected platforms. + +Matches OpenClaw's 9-tool MCP channel bridge surface: + conversations_list, conversation_get, messages_read, attachments_fetch, + events_poll, events_wait, messages_send, permissions_list_open, + permiss...[truncated]",NousResearch/hermes-agent,NousResearch,110040,15931,The agent that grows with you,"['ai' 'ai-agent' 'ai-agents' 'anthropic' 'chatgpt' 'claude' 'claude-code' + 'clawdbot' 'codex' 'hermes' 'hermes-agent' 'llm' 'moltbot' + 'nous-research' 'openai' 'openclaw']",MIT,,,,,0.98,GitHub Public API,2026-04-22T14:51:42.157057,2654,30684,868 +github_NousResearch_hermes-agent_ff2dcc6266f282e451d46dd06ef844edba963bf1,trajectory_compressor.py,trajectory_compressor.py,,65305,Python,"#!/usr/bin/env python3 +"""""" +Trajectory Compressor + +Post-processes completed agent trajectories to compress them within a target +token budget while preserving training signal quality. + +Compression Strategy: +1. Protect first turns (system, human, first gpt, first tool) +2. Protect last N turns (final actions and conclusions) +3. Compress MIDDLE turns only, starting from 2nd tool response +4. Compress only as much as needed to fit under target +5. Replace compressed region with a single human summary me...[truncated]",NousResearch/hermes-agent,NousResearch,110040,15931,The agent that grows with you,"['ai' 'ai-agent' 'ai-agents' 'anthropic' 'chatgpt' 'claude' 'claude-code' + 'clawdbot' 'codex' 'hermes' 'hermes-agent' 'llm' 'moltbot' + 'nous-research' 'openai' 'openclaw']",MIT,,,,,0.98,GitHub Public API,2026-04-22T14:51:45.605735,5031,64922,1509 +github_NousResearch_hermes-agent_f1dc7fca1c1ec41992f4ebe050eec41c9ea6feb0,toolsets.py,toolsets.py,,23247,Python,"#!/usr/bin/env python3 +"""""" +Toolsets Module + +This module provides a flexible system for defining and managing tool aliases/toolsets. +Toolsets allow you to group tools together for specific scenarios and can be composed +from individual tools or other toolsets. + +Features: +- Define custom toolsets with specific tools +- Compose toolsets from other toolsets +- Built-in common toolsets for typical use cases +- Easy extension for new toolsets +- Support for dynamic toolset resolution + +Usage: + from tools...[truncated]",NousResearch/hermes-agent,NousResearch,110040,15931,The agent that grows with you,"['ai' 'ai-agent' 'ai-agents' 'anthropic' 'chatgpt' 'claude' 'claude-code' + 'clawdbot' 'codex' 'hermes' 'hermes-agent' 'llm' 'moltbot' + 'nous-research' 'openai' 'openclaw']",MIT,,,,,0.98,GitHub Public API,2026-04-22T14:51:45.093451,2228,23237,721 +github_NousResearch_hermes-agent_b2a5657ab8fc1fc160914cfe2e02f832179d795b,toolset_distributions.py,toolset_distributions.py,,12332,Python,"#!/usr/bin/env python3 +"""""" +Toolset Distributions Module + +This module defines distributions of toolsets for data generation runs. +Each distribution specifies which toolsets should be used and their probability +of being selected for any given prompt during the batch processing. + +A distribution is a dictionary mapping toolset names to their selection probability (%). +Probabilities should sum to 100, but the system will normalize if they don't. + +Usage: + from toolset_distributions import get_distr...[truncated]",NousResearch/hermes-agent,NousResearch,110040,15931,The agent that grows with you,"['ai' 'ai-agent' 'ai-agents' 'anthropic' 'chatgpt' 'claude' 'claude-code' + 'clawdbot' 'codex' 'hermes' 'hermes-agent' 'llm' 'moltbot' + 'nous-research' 'openai' 'openclaw']",MIT,,,,,0.98,GitHub Public API,2026-04-22T14:51:44.705694,1328,12309,365 +github_NousResearch_hermes-agent_35dbf86ab229545b15effa9b57fe09ca5977a367,hermes_constants.py,hermes_constants.py,,10400,Python,"""""""Shared constants for Hermes Agent. + +Import-safe module with no dependencies — can be imported from anywhere +without risk of circular imports. +"""""" + +import os +from pathlib import Path + + +def get_hermes_home() -> Path: + """"""Return the Hermes home directory (default: ~/.hermes). + + Reads HERMES_HOME env var, falls back to ~/.hermes. + This is the single source of truth — all other copies should import this. + """""" + val = os.environ.get(""HERMES_HOME"", """").strip() + return Path(val) if v...[truncated]",NousResearch/hermes-agent,NousResearch,110040,15931,The agent that grows with you,"['ai' 'ai-agent' 'ai-agents' 'anthropic' 'chatgpt' 'claude' 'claude-code' + 'clawdbot' 'codex' 'hermes' 'hermes-agent' 'llm' 'moltbot' + 'nous-research' 'openai' 'openclaw']",MIT,,,,,0.98,GitHub Public API,2026-04-22T14:51:40.144984,1130,10130,296 +github_NousResearch_hermes-agent_03bf015c262fe2b6645c6ef056d70c378b9a3dc3,rl_cli.py,rl_cli.py,,16286,Python,"#!/usr/bin/env python3 +"""""" +RL Training CLI Runner + +Dedicated CLI runner for RL training workflows with: +- Extended timeouts for long-running training +- RL-focused system prompts +- Full toolset including RL training tools +- Special handling for 30-minute check intervals + +Usage: + python rl_cli.py ""Train a model on GSM8k for math reasoning"" + python rl_cli.py --interactive + python rl_cli.py --list-environments + +Environment Variables: + TINKER_API_KEY: API key for Tinker service (required)...[truncated]",NousResearch/hermes-agent,NousResearch,110040,15931,The agent that grows with you,"['ai' 'ai-agent' 'ai-agents' 'anthropic' 'chatgpt' 'claude' 'claude-code' + 'clawdbot' 'codex' 'hermes' 'hermes-agent' 'llm' 'moltbot' + 'nous-research' 'openai' 'openclaw']",MIT,,,,,0.98,GitHub Public API,2026-04-22T14:51:43.346804,1609,16199,447 +github_NousResearch_hermes-agent_c4345150450e1de593a5d74d99443dd01e931e2f,mini_swe_runner.py,mini_swe_runner.py,,28449,Python,"#!/usr/bin/env python3 +"""""" +SWE Runner with Hermes Trajectory Format + +A runner that uses Hermes-Agent's built-in execution environments +(local, docker, modal) and outputs trajectories in the Hermes-Agent format +compatible with batch_runner.py and trajectory_compressor.py. + +Features: +- Uses Hermes-Agent's Docker, Modal, or Local environments for command execution +- Outputs trajectories in Hermes format (from/value pairs with / XML) +- Compatible with the trajectory compres...[truncated]",NousResearch/hermes-agent,NousResearch,110040,15931,The agent that grows with you,"['ai' 'ai-agent' 'ai-agents' 'anthropic' 'chatgpt' 'claude' 'claude-code' + 'clawdbot' 'codex' 'hermes' 'hermes-agent' 'llm' 'moltbot' + 'nous-research' 'openai' 'openclaw']",MIT,,,,,0.98,GitHub Public API,2026-04-22T14:51:42.552327,2302,28384,737 +github_NousResearch_hermes-agent_9f172d28ffb1400e1b43e505bc8c3212fc03a515,hermes_time.py,hermes_time.py,,3209,Python,""""""" +Timezone-aware clock for Hermes. + +Provides a single ``now()`` helper that returns a timezone-aware datetime +based on the user's configured IANA timezone (e.g. ``Asia/Kolkata``). + +Resolution order: + 1. ``HERMES_TIMEZONE`` environment variable + 2. ``timezone`` key in ``~/.hermes/config.yaml`` + 3. Falls back to the server's local time (``datetime.now().astimezone()``) + +Invalid timezone values log a warning and fall back safely — Hermes never +crashes due to a bad timezone string. +"""""" + +import ...[truncated]",NousResearch/hermes-agent,NousResearch,110040,15931,The agent that grows with you,"['ai' 'ai-agent' 'ai-agents' 'anthropic' 'chatgpt' 'claude' 'claude-code' + 'clawdbot' 'codex' 'hermes' 'hermes-agent' 'llm' 'moltbot' + 'nous-research' 'openai' 'openclaw']",MIT,,,,,0.98,GitHub Public API,2026-04-22T14:51:41.852615,372,3199,105 +github_NousResearch_hermes-agent_7413ad59f481d2a265d943adc37ef3d603e64849,batch_runner.py,batch_runner.py,,55631,Python,"#!/usr/bin/env python3 +"""""" +Batch Agent Runner + +This module provides parallel batch processing capabilities for running the agent +across multiple prompts from a dataset. It includes: +- Dataset loading and batching +- Parallel batch processing with multiprocessing +- Checkpointing for fault tolerance and resumption +- Trajectory saving in the proper format (from/value pairs) +- Tool usage statistics aggregation across all batches + +Usage: + python batch_runner.py --dataset_file=data.jsonl --batch_siz...[truncated]",NousResearch/hermes-agent,NousResearch,110040,15931,The agent that grows with you,"['ai' 'ai-agent' 'ai-agents' 'anthropic' 'chatgpt' 'claude' 'claude-code' + 'clawdbot' 'codex' 'hermes' 'hermes-agent' 'llm' 'moltbot' + 'nous-research' 'openai' 'openclaw']",MIT,,,,,0.98,GitHub Public API,2026-04-22T14:51:38.906765,4590,55391,1292 +github_NousResearch_hermes-agent_0ea9815b5a157ec438801876830c3ecc134568d5,hermes_state.py,hermes_state.py,,65585,Python,"#!/usr/bin/env python3 +"""""" +SQLite State Store for Hermes Agent. + +Provides persistent session storage with FTS5 full-text search, replacing +the per-session JSONL file approach. Stores session metadata, full message +history, and model configuration for CLI and gateway sessions. + +Key design decisions: +- WAL mode for concurrent readers + one writer (gateway multi-platform) +- FTS5 virtual table for fast text search across all session messages +- Compression-triggered session splitting via parent_sessi...[truncated]",NousResearch/hermes-agent,NousResearch,110040,15931,The agent that grows with you,"['ai' 'ai-agent' 'ai-agents' 'anthropic' 'chatgpt' 'claude' 'claude-code' + 'clawdbot' 'codex' 'hermes' 'hermes-agent' 'llm' 'moltbot' + 'nous-research' 'openai' 'openclaw']",MIT,,,,,0.98,GitHub Public API,2026-04-22T14:51:41.065932,6335,65511,1592 +github_NousResearch_hermes-agent_f3d38006d1455909f6edb5106d7138b9dd841b68,utils.py,utils.py,,9301,Python,"""""""Shared utility functions for hermes-agent."""""" + +import json +import logging +import os +import stat +import tempfile +from pathlib import Path +from typing import Any, Union +from urllib.parse import urlparse + +import yaml + +logger = logging.getLogger(__name__) + + +TRUTHY_STRINGS = frozenset({""1"", ""true"", ""yes"", ""on""}) + + +def is_truthy_value(value: Any, default: bool = False) -> bool: + """"""Coerce bool-ish values using the project's shared truthy string set."""""" + if value is None: + return defaul...[truncated]",NousResearch/hermes-agent,NousResearch,110040,15931,The agent that grows with you,"['ai' 'ai-agent' 'ai-agents' 'anthropic' 'chatgpt' 'claude' 'claude-code' + 'clawdbot' 'codex' 'hermes' 'hermes-agent' 'llm' 'moltbot' + 'nous-research' 'openai' 'openclaw']",MIT,,,,,0.98,GitHub Public API,2026-04-22T14:51:45.905806,905,8837,272 +github_NousResearch_hermes-agent_9d87ff3562864ee9a728c39cff7547ca2aa8a187,cli.py,cli.py,,495423,Python,"#!/usr/bin/env python3 +"""""" +Hermes Agent CLI - Interactive Terminal Interface + +A beautiful command-line interface for the Hermes Agent, inspired by Claude Code. +Features ASCII art branding, interactive REPL, toolset selection, and rich formatting. + +Usage: + python cli.py # Start interactive mode with all tools + python cli.py --toolsets web,terminal # Start with specific toolsets + python cli.py --skills hermes-agent-dev,github-auth + python cli.py -q ""your quest...[truncated]",NousResearch/hermes-agent,NousResearch,110040,15931,The agent that grows with you,"['ai' 'ai-agent' 'ai-agents' 'anthropic' 'chatgpt' 'claude' 'claude-code' + 'clawdbot' 'codex' 'hermes' 'hermes-agent' 'llm' 'moltbot' + 'nous-research' 'openai' 'openclaw']",MIT,,,,,0.98,GitHub Public API,2026-04-22T14:51:39.736705,42446,491994,11046 +github_NousResearch_hermes-agent_0ebc450a22e4b92db93e6807eed115fb78ffe10f,hermes_logging.py,hermes_logging.py,,13620,Python,"""""""Centralized logging setup for Hermes Agent. + +Provides a single ``setup_logging()`` entry point that both the CLI and +gateway call early in their startup path. All log files live under +``~/.hermes/logs/`` (profile-aware via ``get_hermes_home()``). + +Log files produced: + agent.log — INFO+, all agent/tool/session activity (the main log) + errors.log — WARNING+, errors and warnings only (quick triage) + gateway.log — INFO+, gateway-only events (created when mode=""gateway"") + +All files us...[truncated]",NousResearch/hermes-agent,NousResearch,110040,15931,The agent that grows with you,"['ai' 'ai-agent' 'ai-agents' 'anthropic' 'chatgpt' 'claude' 'claude-code' + 'clawdbot' 'codex' 'hermes' 'hermes-agent' 'llm' 'moltbot' + 'nous-research' 'openai' 'openclaw']",MIT,,,,,0.98,GitHub Public API,2026-04-22T14:51:40.682396,1317,13588,391 +github_NousResearch_hermes-agent_db4b46326b754b353750fcfdcdfcbe4644af6755,model_tools.py,model_tools.py,,25198,Python,"#!/usr/bin/env python3 +"""""" +Model Tools Module + +Thin orchestration layer over the tool registry. Each tool file in tools/ +self-registers its schema, handler, and metadata via tools.registry.register(). +This module triggers discovery (by importing all tool modules), then provides +the public API that run_agent.py, cli.py, batch_runner.py, and the RL +environments consume. + +Public API (signatures preserved from the original 2,400-line version): + get_tool_definitions(enabled_toolsets, disabled_tool...[truncated]",NousResearch/hermes-agent,NousResearch,110040,15931,The agent that grows with you,"['ai' 'ai-agent' 'ai-agents' 'anthropic' 'chatgpt' 'claude' 'claude-code' + 'clawdbot' 'codex' 'hermes' 'hermes-agent' 'llm' 'moltbot' + 'nous-research' 'openai' 'openclaw']",MIT,,,,,0.98,GitHub Public API,2026-04-22T14:51:42.924821,2409,25148,612 +github_NousResearch_hermes-agent_8db57a703e5147ce9d79791eb70364e6b1e930f5,run_agent.py,run_agent.py,,593880,Python,"#!/usr/bin/env python3 +"""""" +AI Agent Runner with Tool Calling + +This module provides a clean, standalone agent that can execute AI models +with tool calling capabilities. It handles the conversation loop, tool execution, +and response management. + +Features: +- Automatic tool calling loop until completion +- Configurable model parameters +- Error handling and recovery +- Message history management +- Support for multiple model providers + +Usage: + from run_agent import AIAgent + + agent = AIAgent(ba...[truncated]",NousResearch/hermes-agent,NousResearch,96139,13465,The agent that grows with you,"['ai' 'ai-agent' 'ai-agents' 'anthropic' 'chatgpt' 'claude' 'claude-code' + 'clawdbot' 'codex' 'hermes' 'hermes-agent' 'llm' 'moltbot' + 'nous-research' 'openai' 'openclaw']",MIT,,,,,0.98,GitHub Public API,2026-04-17T15:22:14.306921,46397,591248,11651 +github_NousResearch_hermes-agent_b2a5657ab8fc1fc160914cfe2e02f832179d795b,toolset_distributions.py,toolset_distributions.py,,12332,Python,"#!/usr/bin/env python3 +"""""" +Toolset Distributions Module + +This module defines distributions of toolsets for data generation runs. +Each distribution specifies which toolsets should be used and their probability +of being selected for any given prompt during the batch processing. + +A distribution is a dictionary mapping toolset names to their selection probability (%). +Probabilities should sum to 100, but the system will normalize if they don't. + +Usage: + from toolset_distributions import get_distr...[truncated]",NousResearch/hermes-agent,NousResearch,96139,13465,The agent that grows with you,"['ai' 'ai-agent' 'ai-agents' 'anthropic' 'chatgpt' 'claude' 'claude-code' + 'clawdbot' 'codex' 'hermes' 'hermes-agent' 'llm' 'moltbot' + 'nous-research' 'openai' 'openclaw']",MIT,,,,,0.98,GitHub Public API,2026-04-17T15:22:14.664622,1328,12309,365 +github_NousResearch_hermes-agent_03bf015c262fe2b6645c6ef056d70c378b9a3dc3,rl_cli.py,rl_cli.py,,16286,Python,"#!/usr/bin/env python3 +"""""" +RL Training CLI Runner + +Dedicated CLI runner for RL training workflows with: +- Extended timeouts for long-running training +- RL-focused system prompts +- Full toolset including RL training tools +- Special handling for 30-minute check intervals + +Usage: + python rl_cli.py ""Train a model on GSM8k for math reasoning"" + python rl_cli.py --interactive + python rl_cli.py --list-environments + +Environment Variables: + TINKER_API_KEY: API key for Tinker service (required)...[truncated]",NousResearch/hermes-agent,NousResearch,96139,13465,The agent that grows with you,"['ai' 'ai-agent' 'ai-agents' 'anthropic' 'chatgpt' 'claude' 'claude-code' + 'clawdbot' 'codex' 'hermes' 'hermes-agent' 'llm' 'moltbot' + 'nous-research' 'openai' 'openclaw']",MIT,,,,,0.98,GitHub Public API,2026-04-17T15:22:13.148292,1609,16199,447 +github_NousResearch_hermes-agent_0ebc450a22e4b92db93e6807eed115fb78ffe10f,hermes_logging.py,hermes_logging.py,,13620,Python,"""""""Centralized logging setup for Hermes Agent. + +Provides a single ``setup_logging()`` entry point that both the CLI and +gateway call early in their startup path. All log files live under +``~/.hermes/logs/`` (profile-aware via ``get_hermes_home()``). + +Log files produced: + agent.log — INFO+, all agent/tool/session activity (the main log) + errors.log — WARNING+, errors and warnings only (quick triage) + gateway.log — INFO+, gateway-only events (created when mode=""gateway"") + +All files us...[truncated]",NousResearch/hermes-agent,NousResearch,96139,13465,The agent that grows with you,"['ai' 'ai-agent' 'ai-agents' 'anthropic' 'chatgpt' 'claude' 'claude-code' + 'clawdbot' 'codex' 'hermes' 'hermes-agent' 'llm' 'moltbot' + 'nous-research' 'openai' 'openclaw']",MIT,,,,,0.98,GitHub Public API,2026-04-17T15:22:10.572554,1317,13588,391 +github_NousResearch_hermes-agent_5e563666e83de31e3ae58c11ba9efb98b03fca44,hermes_state.py,hermes_state.py,,49536,Python,"#!/usr/bin/env python3 +"""""" +SQLite State Store for Hermes Agent. + +Provides persistent session storage with FTS5 full-text search, replacing +the per-session JSONL file approach. Stores session metadata, full message +history, and model configuration for CLI and gateway sessions. + +Key design decisions: +- WAL mode for concurrent readers + one writer (gateway multi-platform) +- FTS5 virtual table for fast text search across all session messages +- Compression-triggered session splitting via parent_sessi...[truncated]",NousResearch/hermes-agent,NousResearch,96139,13465,The agent that grows with you,"['ai' 'ai-agent' 'ai-agents' 'anthropic' 'chatgpt' 'claude' 'claude-code' + 'clawdbot' 'codex' 'hermes' 'hermes-agent' 'llm' 'moltbot' + 'nous-research' 'openai' 'openclaw']",MIT,,,,,0.98,GitHub Public API,2026-04-17T15:22:10.975779,4737,49496,1239 +github_NousResearch_hermes-agent_9f172d28ffb1400e1b43e505bc8c3212fc03a515,hermes_time.py,hermes_time.py,,3209,Python,""""""" +Timezone-aware clock for Hermes. + +Provides a single ``now()`` helper that returns a timezone-aware datetime +based on the user's configured IANA timezone (e.g. ``Asia/Kolkata``). + +Resolution order: + 1. ``HERMES_TIMEZONE`` environment variable + 2. ``timezone`` key in ``~/.hermes/config.yaml`` + 3. Falls back to the server's local time (``datetime.now().astimezone()``) + +Invalid timezone values log a warning and fall back safely — Hermes never +crashes due to a bad timezone string. +"""""" + +import ...[truncated]",NousResearch/hermes-agent,NousResearch,96139,13465,The agent that grows with you,"['ai' 'ai-agent' 'ai-agents' 'anthropic' 'chatgpt' 'claude' 'claude-code' + 'clawdbot' 'codex' 'hermes' 'hermes-agent' 'llm' 'moltbot' + 'nous-research' 'openai' 'openclaw']",MIT,,,,,0.98,GitHub Public API,2026-04-17T15:22:11.800014,372,3199,105 +github_NousResearch_hermes-agent_e8294d1f91f6126b71588f00f6fbcd04138b40fe,mcp_serve.py,mcp_serve.py,,30687,Python,""""""" +Hermes MCP Server — expose messaging conversations as MCP tools. + +Starts a stdio MCP server that lets any MCP client (Claude Code, Cursor, Codex, +etc.) list conversations, read message history, send messages, poll for live +events, and manage approval requests across all connected platforms. + +Matches OpenClaw's 9-tool MCP channel bridge surface: + conversations_list, conversation_get, messages_read, attachments_fetch, + events_poll, events_wait, messages_send, permissions_list_open, + permiss...[truncated]",NousResearch/hermes-agent,NousResearch,96139,13465,The agent that grows with you,"['ai' 'ai-agent' 'ai-agents' 'anthropic' 'chatgpt' 'claude' 'claude-code' + 'clawdbot' 'codex' 'hermes' 'hermes-agent' 'llm' 'moltbot' + 'nous-research' 'openai' 'openclaw']",MIT,,,,,0.98,GitHub Public API,2026-04-17T15:22:12.190480,2650,30670,868 +github_NousResearch_hermes-agent_3bc56d4f7874c9281decbc62d1e6e0f9885545e3,hermes_constants.py,hermes_constants.py,,10358,Python,"""""""Shared constants for Hermes Agent. + +Import-safe module with no dependencies — can be imported from anywhere +without risk of circular imports. +"""""" + +import os +from pathlib import Path + + +def get_hermes_home() -> Path: + """"""Return the Hermes home directory (default: ~/.hermes). + + Reads HERMES_HOME env var, falls back to ~/.hermes. + This is the single source of truth — all other copies should import this. + """""" + return Path(os.getenv(""HERMES_HOME"", Path.home() / "".hermes"")) + + +def get_...[truncated]",NousResearch/hermes-agent,NousResearch,96139,13465,The agent that grows with you,"['ai' 'ai-agent' 'ai-agents' 'anthropic' 'chatgpt' 'claude' 'claude-code' + 'clawdbot' 'codex' 'hermes' 'hermes-agent' 'llm' 'moltbot' + 'nous-research' 'openai' 'openclaw']",MIT,,,,,0.98,GitHub Public API,2026-04-17T15:22:10.111537,1123,10088,295 +github_NousResearch_hermes-agent_801255b797801b2833234769ca83ead303a5ad15,model_tools.py,model_tools.py,,22854,Python,"#!/usr/bin/env python3 +"""""" +Model Tools Module + +Thin orchestration layer over the tool registry. Each tool file in tools/ +self-registers its schema, handler, and metadata via tools.registry.register(). +This module triggers discovery (by importing all tool modules), then provides +the public API that run_agent.py, cli.py, batch_runner.py, and the RL +environments consume. + +Public API (signatures preserved from the original 2,400-line version): + get_tool_definitions(enabled_toolsets, disabled_tool...[truncated]",NousResearch/hermes-agent,NousResearch,96139,13465,The agent that grows with you,"['ai' 'ai-agent' 'ai-agents' 'anthropic' 'chatgpt' 'claude' 'claude-code' + 'clawdbot' 'codex' 'hermes' 'hermes-agent' 'llm' 'moltbot' + 'nous-research' 'openai' 'openclaw']",MIT,,,,,0.98,GitHub Public API,2026-04-17T15:22:12.819737,2184,22806,563 +github_NousResearch_hermes-agent_28c0ae48c9a1b4e28b39d28709b8e21a0051a3cc,mini_swe_runner.py,mini_swe_runner.py,,27406,Python,"#!/usr/bin/env python3 +"""""" +SWE Runner with Hermes Trajectory Format + +A runner that uses Hermes-Agent's built-in execution environments +(local, docker, modal) and outputs trajectories in the Hermes-Agent format +compatible with batch_runner.py and trajectory_compressor.py. + +Features: +- Uses Hermes-Agent's Docker, Modal, or Local environments for command execution +- Outputs trajectories in Hermes format (from/value pairs with / XML) +- Compatible with the trajectory compres...[truncated]",NousResearch/hermes-agent,NousResearch,96139,13465,The agent that grows with you,"['ai' 'ai-agent' 'ai-agents' 'anthropic' 'chatgpt' 'claude' 'claude-code' + 'clawdbot' 'codex' 'hermes' 'hermes-agent' 'llm' 'moltbot' + 'nous-research' 'openai' 'openclaw']",MIT,,,,,0.98,GitHub Public API,2026-04-17T15:22:12.504623,2209,27341,710 +github_NousResearch_hermes-agent_cf2582853f59f1e67dfe5598a9755d89f9c9d4fa,utils.py,utils.py,,6244,Python,"""""""Shared utility functions for hermes-agent."""""" + +import json +import logging +import os +import stat +import tempfile +from pathlib import Path +from typing import Any, Union + +import yaml + +logger = logging.getLogger(__name__) + + +TRUTHY_STRINGS = frozenset({""1"", ""true"", ""yes"", ""on""}) + + +def is_truthy_value(value: Any, default: bool = False) -> bool: + """"""Coerce bool-ish values using the project's shared truthy string set."""""" + if value is None: + return default + if isinstance(value, bool): +...[truncated]",NousResearch/hermes-agent,NousResearch,96139,13465,The agent that grows with you,"['ai' 'ai-agent' 'ai-agents' 'anthropic' 'chatgpt' 'claude' 'claude-code' + 'clawdbot' 'codex' 'hermes' 'hermes-agent' 'llm' 'moltbot' + 'nous-research' 'openai' 'openclaw']",MIT,,,,,0.98,GitHub Public API,2026-04-17T15:22:15.961850,628,6020,197 +github_NousResearch_hermes-agent_4102dcf021b492ef40aa10ca92be068eafceca57,cli.py,cli.py,,461840,Python,"#!/usr/bin/env python3 +"""""" +Hermes Agent CLI - Interactive Terminal Interface + +A beautiful command-line interface for the Hermes Agent, inspired by Claude Code. +Features ASCII art branding, interactive REPL, toolset selection, and rich formatting. + +Usage: + python cli.py # Start interactive mode with all tools + python cli.py --toolsets web,terminal # Start with specific toolsets + python cli.py --skills hermes-agent-dev,github-auth + python cli.py -q ""your quest...[truncated]",NousResearch/hermes-agent,NousResearch,96139,13465,The agent that grows with you,"['ai' 'ai-agent' 'ai-agents' 'anthropic' 'chatgpt' 'claude' 'claude-code' + 'clawdbot' 'codex' 'hermes' 'hermes-agent' 'llm' 'moltbot' + 'nous-research' 'openai' 'openclaw']",MIT,,,,,0.98,GitHub Public API,2026-04-17T15:22:09.793607,39187,458495,10328 +github_NousResearch_hermes-agent_3c0e3f1b7a1315b85a0226849f2dd3229eb46cb5,trajectory_compressor.py,trajectory_compressor.py,,63412,Python,"#!/usr/bin/env python3 +"""""" +Trajectory Compressor + +Post-processes completed agent trajectories to compress them within a target +token budget while preserving training signal quality. + +Compression Strategy: +1. Protect first turns (system, human, first gpt, first tool) +2. Protect last N turns (final actions and conclusions) +3. Compress MIDDLE turns only, starting from 2nd tool response +4. Compress only as much as needed to fit under target +5. Replace compressed region with a single human summary me...[truncated]",NousResearch/hermes-agent,NousResearch,96139,13465,The agent that grows with you,"['ai' 'ai-agent' 'ai-agents' 'anthropic' 'chatgpt' 'claude' 'claude-code' + 'clawdbot' 'codex' 'hermes' 'hermes-agent' 'llm' 'moltbot' + 'nous-research' 'openai' 'openclaw']",MIT,,,,,0.98,GitHub Public API,2026-04-17T15:22:15.430738,4911,63029,1463 +github_NousResearch_hermes-agent_b725133a6d38aa5e70082eac57c86d5cf6126234,toolsets.py,toolsets.py,,22579,Python,"#!/usr/bin/env python3 +"""""" +Toolsets Module + +This module provides a flexible system for defining and managing tool aliases/toolsets. +Toolsets allow you to group tools together for specific scenarios and can be composed +from individual tools or other toolsets. + +Features: +- Define custom toolsets with specific tools +- Compose toolsets from other toolsets +- Built-in common toolsets for typical use cases +- Easy extension for new toolsets +- Support for dynamic toolset resolution + +Usage: + from tools...[truncated]",NousResearch/hermes-agent,NousResearch,96139,13465,The agent that grows with you,"['ai' 'ai-agent' 'ai-agents' 'anthropic' 'chatgpt' 'claude' 'claude-code' + 'clawdbot' 'codex' 'hermes' 'hermes-agent' 'llm' 'moltbot' + 'nous-research' 'openai' 'openclaw']",MIT,,,,,0.98,GitHub Public API,2026-04-17T15:22:15.054055,2177,22569,703 +github_NousResearch_hermes-agent_1a65f473ff4f59fa27613338988e6345e6bd91c2,batch_runner.py,batch_runner.py,,55623,Python,"#!/usr/bin/env python3 +"""""" +Batch Agent Runner + +This module provides parallel batch processing capabilities for running the agent +across multiple prompts from a dataset. It includes: +- Dataset loading and batching +- Parallel batch processing with multiprocessing +- Checkpointing for fault tolerance and resumption +- Trajectory saving in the proper format (from/value pairs) +- Tool usage statistics aggregation across all batches + +Usage: + python batch_runner.py --dataset_file=data.jsonl --batch_siz...[truncated]",NousResearch/hermes-agent,NousResearch,96139,13465,The agent that grows with you,"['ai' 'ai-agent' 'ai-agents' 'anthropic' 'chatgpt' 'claude' 'claude-code' + 'clawdbot' 'codex' 'hermes' 'hermes-agent' 'llm' 'moltbot' + 'nous-research' 'openai' 'openclaw']",MIT,,,,,0.98,GitHub Public API,2026-04-17T15:22:08.994367,4592,55383,1291 +github_NousResearch_hermes-agent_cf2582853f59f1e67dfe5598a9755d89f9c9d4fa,utils.py,utils.py,.py,6244,Python,"""""""Shared utility functions for hermes-agent."""""" + +import json +import logging +import os +import stat +import tempfile +from pathlib import Path +from typing import Any, Union + +import yaml + +logger = logging.getLogger(__name__) + + +TRUTHY_STRINGS = frozenset({""1"", ""true"", ""yes"", ""on""}) + + +def is_truthy_value(value: Any, default: bool = False) -> bool: + """"""Coerce bool-ish values using the project's shared truthy string set."""""" + if value is None: + return default + if isinstance(value, bool): +...[truncated]",NousResearch/hermes-agent,NousResearch,90198,12350,The agent that grows with you,"['ai' 'ai-agent' 'ai-agents' 'anthropic' 'chatgpt' 'claude' 'claude-code' + 'clawdbot' 'codex' 'hermes' 'hermes-agent' 'llm' 'moltbot' + 'nous-research' 'openai' 'openclaw']",MIT,,,,,0.95,GitHub Public Repositories,2026-04-16T03:07:53.638274,628,6020,197 +github_github_spec-kit_26ceab403423b585c469ae69f05efbad24ce0cc3,src/specify_cli/extensions.py,extensions.py,,101448,Python,""""""" +Extension Manager for Spec Kit + +Handles installation, removal, and management of Spec Kit extensions. +Extensions are modular packages that add commands and functionality to spec-kit +without bloating the core framework. +"""""" + +import json +import hashlib +import os +import tempfile +import zipfile +import shutil +import copy +from dataclasses import dataclass +from pathlib import Path +from typing import Optional, Dict, List, Any, Callable, Set +from datetime import datetime, timezone +import re + +import p...[truncated]",github/spec-kit,github,90165,7768,💫 Toolkit to help you get started with Spec-Driven Development,['ai' 'copilot' 'development' 'engineering' 'prd' 'spec' 'spec-driven'],MIT,,,,,0.98,GitHub Public API,2026-04-22T17:04:11.186137,8728,101428,2660 +github_github_spec-kit_97cb993a966c362da5bc9c3e05ff889f916643b6,src/specify_cli/__init__.py,__init__.py,,217241,Python,"#!/usr/bin/env python3 +# /// script +# requires-python = "">=3.11"" +# dependencies = [ +# ""typer"", +# ""rich"", +# ""platformdirs"", +# ""readchar"", +# ""json5"", +# ] +# /// +"""""" +Specify CLI - Setup tool for Specify projects + +Usage: + uvx specify-cli.py init + uvx specify-cli.py init . + uvx specify-cli.py init --here + +Or install globally: + uv tool install --from specify-cli.py specify-cli + specify init + specify init . + specify init --here +"""""" + +...[truncated]",github/spec-kit,github,90165,7768,💫 Toolkit to help you get started with Spec-Driven Development,['ai' 'copilot' 'development' 'engineering' 'prd' 'spec' 'spec-driven'],MIT,,,,,0.98,GitHub Public API,2026-04-22T17:04:10.434729,17670,216518,5094 +github_github_spec-kit_c5e25a708582c8b45de3ecc7f955823d3a2e3864,src/specify_cli/agents.py,agents.py,,26331,Python,""""""" +Agent Command Registrar for Spec Kit + +Shared infrastructure for registering commands with AI agents. +Used by both the extension system and the preset system to write +command files into agent-specific directories in the correct format. +"""""" + +import os +from pathlib import Path +from typing import Dict, List, Any + +import platform +import re +from copy import deepcopy +import yaml + + +def _build_agent_configs() -> dict[str, Any]: + """"""Derive CommandRegistrar.AGENT_CONFIGS from INTEGRATION_REGISTRY.""""...[truncated]",github/spec-kit,github,90165,7768,💫 Toolkit to help you get started with Spec-Driven Development,['ai' 'copilot' 'development' 'engineering' 'prd' 'spec' 'spec-driven'],MIT,,,,,0.98,GitHub Public API,2026-04-22T17:04:10.739871,2075,26329,703 +github_github_spec-kit_5f28be72044b7ea2536aa3603b5ff543426972d7,src/specify_cli/presets.py,presets.py,,91288,Python,""""""" +Preset Manager for Spec Kit + +Handles installation, removal, and management of Spec Kit presets. +Presets are self-contained, versioned collections of templates +(artifact, command, and script templates) that can be installed to +customize the Spec-Driven Development workflow. +"""""" + +import copy +import json +import hashlib +import os +import tempfile +import zipfile +import shutil +from dataclasses import dataclass +from pathlib import Path +from typing import TYPE_CHECKING, Optional, Dict, List, Any + +if ...[truncated]",github/spec-kit,github,90165,7768,💫 Toolkit to help you get started with Spec-Driven Development,['ai' 'copilot' 'development' 'engineering' 'prd' 'spec' 'spec-driven'],MIT,,,,,0.98,GitHub Public API,2026-04-22T17:04:11.643035,7632,91258,2320 +github_github_spec-kit_32fc6cdbf0c2829f71c3a08718c7b0aeb1537a48,src/specify_cli/agents.py,agents.py,,25281,Python,""""""" +Agent Command Registrar for Spec Kit + +Shared infrastructure for registering commands with AI agents. +Used by both the extension system and the preset system to write +command files into agent-specific directories in the correct format. +"""""" + +from pathlib import Path +from typing import Dict, List, Any + +import platform +import re +from copy import deepcopy +import yaml + + +def _build_agent_configs() -> dict[str, Any]: + """"""Derive CommandRegistrar.AGENT_CONFIGS from INTEGRATION_REGISTRY."""""" + from...[truncated]",github/spec-kit,github,88823,7641,💫 Toolkit to help you get started with Spec-Driven Development,['ai' 'copilot' 'development' 'engineering' 'prd' 'spec' 'spec-driven'],MIT,,,,,0.98,GitHub Public API,2026-04-17T15:22:43.288295,1990,25279,683 +github_github_spec-kit_d5543cd0b4328cf9490fcabb4d700f11732f9eff,src/specify_cli/extensions.py,extensions.py,,101260,Python,""""""" +Extension Manager for Spec Kit + +Handles installation, removal, and management of Spec Kit extensions. +Extensions are modular packages that add commands and functionality to spec-kit +without bloating the core framework. +"""""" + +import json +import hashlib +import os +import tempfile +import zipfile +import shutil +import copy +from dataclasses import dataclass +from pathlib import Path +from typing import Optional, Dict, List, Any, Callable, Set +from datetime import datetime, timezone +import re + +import p...[truncated]",github/spec-kit,github,88823,7641,💫 Toolkit to help you get started with Spec-Driven Development,['ai' 'copilot' 'development' 'engineering' 'prd' 'spec' 'spec-driven'],MIT,,,,,0.98,GitHub Public API,2026-04-17T15:22:43.887520,8711,101240,2655 +github_github_spec-kit_d5513c8323d4f0714d636ae6206a24dad7fb9aad,src/specify_cli/presets.py,presets.py,,70881,Python,""""""" +Preset Manager for Spec Kit + +Handles installation, removal, and management of Spec Kit presets. +Presets are self-contained, versioned collections of templates +(artifact, command, and script templates) that can be installed to +customize the Spec-Driven Development workflow. +"""""" + +import copy +import json +import hashlib +import os +import tempfile +import zipfile +import shutil +from dataclasses import dataclass +from pathlib import Path +from typing import Optional, Dict, List, Any +from datetime impor...[truncated]",github/spec-kit,github,88823,7641,💫 Toolkit to help you get started with Spec-Driven Development,['ai' 'copilot' 'development' 'engineering' 'prd' 'spec' 'spec-driven'],MIT,,,,,0.98,GitHub Public API,2026-04-17T15:22:44.266341,5937,70867,1876 +github_github_spec-kit_0608e7a8ac87f003f17c79bbdebae091a7cc6434,src/specify_cli/__init__.py,__init__.py,,217336,Python,"#!/usr/bin/env python3 +# /// script +# requires-python = "">=3.11"" +# dependencies = [ +# ""typer"", +# ""rich"", +# ""platformdirs"", +# ""readchar"", +# ""json5"", +# ] +# /// +"""""" +Specify CLI - Setup tool for Specify projects + +Usage: + uvx specify-cli.py init + uvx specify-cli.py init . + uvx specify-cli.py init --here + +Or install globally: + uv tool install --from specify-cli.py specify-cli + specify init + specify init . + specify init --here +"""""" + +...[truncated]",github/spec-kit,github,88823,7641,💫 Toolkit to help you get started with Spec-Driven Development,['ai' 'copilot' 'development' 'engineering' 'prd' 'spec' 'spec-driven'],MIT,,,,,0.98,GitHub Public API,2026-04-17T15:22:42.888771,17680,216613,5094 +github_infiniflow_ragflow_57d188b6c2d87e71d9fcd1ce3a4ef076dc9c586c,check_comment_ascii.py,check_comment_ascii.py,,1301,Python,"#!/usr/bin/env python3 + +"""""" +Check whether given python files contain non-ASCII comments. + +How to check the whole git repo: + +``` +$ git ls-files -z -- '*.py' | xargs -0 python3 check_comment_ascii.py +``` +"""""" + +import sys +import tokenize +import ast +import pathlib +import re + +ASCII = re.compile(r""^[\n -~]*\Z"") # Printable ASCII + newline + + +def check(src: str, name: str) -> int: + """""" + docstring line 1 + docstring line 2 + """""" + ok = 1 + # A common comment begins with `#` + with tokeniz...[truncated]",infiniflow/ragflow,infiniflow,78746,8896,RAGFlow is a leading open-source Retrieval-Augmented Generation (RAG) engine that fuses cutting-edge RAG with Agent capabilities to create a superior context layer for LLMs,"['agent' 'agentic' 'agentic-ai' 'agentic-workflow' 'ai' + 'context-engineering' 'context-retrieval' 'deep-research' 'deepseek' + 'deepseek-r1' 'document-understanding' 'graphrag' 'harness' 'llm' 'mcp' + 'ollama' 'openai' 'openclaw' 'rag' 'retrieval-augmented-generation']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T14:52:32.110834,151,1301,49 +github_infiniflow_ragflow_0ebd9f56f3f35217ec9f97fd7f14082e1f1845b7,api/db/__init__.py,__init__.py,,2173,Python,"# +# Copyright 2024 The InfiniFlow Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre...[truncated]",infiniflow/ragflow,infiniflow,78746,8896,RAGFlow is a leading open-source Retrieval-Augmented Generation (RAG) engine that fuses cutting-edge RAG with Agent capabilities to create a superior context layer for LLMs,"['agent' 'agentic' 'agentic-ai' 'agentic-workflow' 'ai' + 'context-engineering' 'context-retrieval' 'deep-research' 'deepseek' + 'deepseek-r1' 'document-understanding' 'graphrag' 'harness' 'llm' 'mcp' + 'ollama' 'openai' 'openclaw' 'rag' 'retrieval-augmented-generation']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T14:52:20.584720,264,2173,77 +github_infiniflow_ragflow_187560d626b9cc3647b601656de725d153f933b1,api/apps/mcp_server_app.py,mcp_server_app.py,,17446,Python,"# +# Copyright 2024 The InfiniFlow Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre...[truncated]",infiniflow/ragflow,infiniflow,78746,8896,RAGFlow is a leading open-source Retrieval-Augmented Generation (RAG) engine that fuses cutting-edge RAG with Agent capabilities to create a superior context layer for LLMs,"['agent' 'agentic' 'agentic-ai' 'agentic-workflow' 'ai' + 'context-engineering' 'context-retrieval' 'deep-research' 'deepseek' + 'deepseek-r1' 'document-understanding' 'graphrag' 'harness' 'llm' 'mcp' + 'ollama' 'openai' 'openclaw' 'rag' 'retrieval-augmented-generation']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T14:52:16.926117,1477,17440,440 +github_infiniflow_ragflow_730d63c66ca8febdb9f1148a3e361dc9be580984,api/apps/kb_app.py,kb_app.py,,38802,Python,"# +# Copyright 2024 The InfiniFlow Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre...[truncated]",infiniflow/ragflow,infiniflow,78746,8896,RAGFlow is a leading open-source Retrieval-Augmented Generation (RAG) engine that fuses cutting-edge RAG with Agent capabilities to create a superior context layer for LLMs,"['agent' 'agentic' 'agentic-ai' 'agentic-workflow' 'ai' + 'context-engineering' 'context-retrieval' 'deep-research' 'deepseek' + 'deepseek-r1' 'document-understanding' 'graphrag' 'harness' 'llm' 'mcp' + 'ollama' 'openai' 'openclaw' 'rag' 'retrieval-augmented-generation']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T14:52:15.344690,2923,38802,1013 +github_infiniflow_ragflow_172b49ff8502fd468c16174e84d71bc106cfeeeb,api/apps/file_app.py,file_app.py,,19177,Python,"# # +# # Copyright 2024 The InfiniFlow Authors. All Rights Reserved. +# # +# # Licensed under the Apache License, Version 2.0 (the ""License""); +# # you may not use this file except in compliance with the License. +# # You may obtain a copy of the License at +# # +# # http://www.apache.org/licenses/LICENSE-2.0 +# # +# # Unless required by applicable law or agreed to in writing, software +# # distributed under the License is distributed on an ""AS IS"" BASIS, +# # WITHOUT WARRANTIES OR CONDITIONS O...[truncated]",infiniflow/ragflow,infiniflow,78746,8896,RAGFlow is a leading open-source Retrieval-Augmented Generation (RAG) engine that fuses cutting-edge RAG with Agent capabilities to create a superior context layer for LLMs,"['agent' 'agentic' 'agentic-ai' 'agentic-workflow' 'ai' + 'context-engineering' 'context-retrieval' 'deep-research' 'deepseek' + 'deepseek-r1' 'document-understanding' 'graphrag' 'harness' 'llm' 'mcp' + 'ollama' 'openai' 'openclaw' 'rag' 'retrieval-augmented-generation']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T14:52:14.934703,1760,19177,465 +github_infiniflow_ragflow_91c20fddfa769350f2dfdc5e34a925838fe56e04,api/apps/llm_app.py,llm_app.py,,20379,Python,"# +# Copyright 2024 The InfiniFlow Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre...[truncated]",infiniflow/ragflow,infiniflow,78746,8896,RAGFlow is a leading open-source Retrieval-Augmented Generation (RAG) engine that fuses cutting-edge RAG with Agent capabilities to create a superior context layer for LLMs,"['agent' 'agentic' 'agentic-ai' 'agentic-workflow' 'ai' + 'context-engineering' 'context-retrieval' 'deep-research' 'deepseek' + 'deepseek-r1' 'document-understanding' 'graphrag' 'harness' 'llm' 'mcp' + 'ollama' 'openai' 'openclaw' 'rag' 'retrieval-augmented-generation']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T14:52:16.541289,1704,20379,472 +github_infiniflow_ragflow_cd7307f51a54360167e7c3b5ff9362c3a9d3c419,api/settings.py,settings.py,,622,Python,"# +# Copyright 2024 The InfiniFlow Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre...[truncated]",infiniflow/ragflow,infiniflow,78746,8896,RAGFlow is a leading open-source Retrieval-Augmented Generation (RAG) engine that fuses cutting-edge RAG with Agent capabilities to create a superior context layer for LLMs,"['agent' 'agentic' 'agentic-ai' 'agentic-workflow' 'ai' + 'context-engineering' 'context-retrieval' 'deep-research' 'deepseek' + 'deepseek-r1' 'document-understanding' 'graphrag' 'harness' 'llm' 'mcp' + 'ollama' 'openai' 'openclaw' 'rag' 'retrieval-augmented-generation']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T14:52:23.951310,101,622,16 +github_infiniflow_ragflow_fb0a7bb6106b35d3586eb6067004d5eadcaf2866,api/apps/plugin_app.py,plugin_app.py,,1039,Python,"# +# Copyright 2025 The InfiniFlow Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre...[truncated]",infiniflow/ragflow,infiniflow,78746,8896,RAGFlow is a leading open-source Retrieval-Augmented Generation (RAG) engine that fuses cutting-edge RAG with Agent capabilities to create a superior context layer for LLMs,"['agent' 'agentic' 'agentic-ai' 'agentic-workflow' 'ai' + 'context-engineering' 'context-retrieval' 'deep-research' 'deepseek' + 'deepseek-r1' 'document-understanding' 'graphrag' 'harness' 'llm' 'mcp' + 'ollama' 'openai' 'openclaw' 'rag' 'retrieval-augmented-generation']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T14:52:17.275275,139,1039,31 +github_infiniflow_ragflow_1d7993d365ccd3fe3b6c5536f43c2b27d828c764,api/apps/langfuse_app.py,langfuse_app.py,,3887,Python,"# +# Copyright 2025 The InfiniFlow Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre...[truncated]",infiniflow/ragflow,infiniflow,78746,8896,RAGFlow is a leading open-source Retrieval-Augmented Generation (RAG) engine that fuses cutting-edge RAG with Agent capabilities to create a superior context layer for LLMs,"['agent' 'agentic' 'agentic-ai' 'agentic-workflow' 'ai' + 'context-engineering' 'context-retrieval' 'deep-research' 'deepseek' + 'deepseek-r1' 'document-understanding' 'graphrag' 'harness' 'llm' 'mcp' + 'ollama' 'openai' 'openclaw' 'rag' 'retrieval-augmented-generation']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T14:52:16.119808,307,3887,100 +github_infiniflow_ragflow_833a7819dd563d92cf53feec09bb44f30e056a93,api/apps/system_app.py,system_app.py,,5906,Python,"# +# Copyright 2024 The InfiniFlow Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre...[truncated]",infiniflow/ragflow,infiniflow,78746,8896,RAGFlow is a leading open-source Retrieval-Augmented Generation (RAG) engine that fuses cutting-edge RAG with Agent capabilities to create a superior context layer for LLMs,"['agent' 'agentic' 'agentic-ai' 'agentic-workflow' 'ai' + 'context-engineering' 'context-retrieval' 'deep-research' 'deepseek' + 'deepseek-r1' 'document-understanding' 'graphrag' 'harness' 'llm' 'mcp' + 'ollama' 'openai' 'openclaw' 'rag' 'retrieval-augmented-generation']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T14:52:17.568084,532,5906,198 +github_infiniflow_ragflow_a42cd9a6dd709c94ceda990d2d71c6546e0a3790,api/__init__.py,__init__.py,,699,Python,"# +# Copyright 2025 The InfiniFlow Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre...[truncated]",infiniflow/ragflow,infiniflow,78746,8896,RAGFlow is a leading open-source Retrieval-Augmented Generation (RAG) engine that fuses cutting-edge RAG with Agent capabilities to create a superior context layer for LLMs,"['agent' 'agentic' 'agentic-ai' 'agentic-workflow' 'ai' + 'context-engineering' 'context-retrieval' 'deep-research' 'deepseek' + 'deepseek-r1' 'document-understanding' 'graphrag' 'harness' 'llm' 'mcp' + 'ollama' 'openai' 'openclaw' 'rag' 'retrieval-augmented-generation']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T14:52:11.408086,108,699,19 +github_infiniflow_ragflow_767eb7b927029e16fdb44dc7bb33d8c35fac3f3b,api/utils/email_templates.py,email_templates.py,,1212,Python,"# +# Copyright 2025 The InfiniFlow Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre...[truncated]",infiniflow/ragflow,infiniflow,78746,8896,RAGFlow is a leading open-source Retrieval-Augmented Generation (RAG) engine that fuses cutting-edge RAG with Agent capabilities to create a superior context layer for LLMs,"['agent' 'agentic' 'agentic-ai' 'agentic-workflow' 'ai' + 'context-engineering' 'context-retrieval' 'deep-research' 'deepseek' + 'deepseek-r1' 'document-understanding' 'graphrag' 'harness' 'llm' 'mcp' + 'ollama' 'openai' 'openclaw' 'rag' 'retrieval-augmented-generation']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T14:52:27.525648,186,1212,42 +github_infiniflow_ragflow_857cf17381dccfb226df7fd8afd2303753c7de49,api/utils/file_utils.py,file_utils.py,,8471,Python,"# +# Copyright 2024 The InfiniFlow Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre...[truncated]",infiniflow/ragflow,infiniflow,78746,8896,RAGFlow is a leading open-source Retrieval-Augmented Generation (RAG) engine that fuses cutting-edge RAG with Agent capabilities to create a superior context layer for LLMs,"['agent' 'agentic' 'agentic-ai' 'agentic-workflow' 'ai' + 'context-engineering' 'context-retrieval' 'deep-research' 'deepseek' + 'deepseek-r1' 'document-understanding' 'graphrag' 'harness' 'llm' 'mcp' + 'ollama' 'openai' 'openclaw' 'rag' 'retrieval-augmented-generation']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T14:52:27.834418,836,8471,262 +github_infiniflow_ragflow_9139954115c978368b7172baca964cc10aea2185,api/apps/__init__.py,__init__.py,,11601,Python,"# +# Copyright 2024 The InfiniFlow Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre...[truncated]",infiniflow/ragflow,infiniflow,78746,8896,RAGFlow is a leading open-source Retrieval-Augmented Generation (RAG) engine that fuses cutting-edge RAG with Agent capabilities to create a superior context layer for LLMs,"['agent' 'agentic' 'agentic-ai' 'agentic-workflow' 'ai' + 'context-engineering' 'context-retrieval' 'deep-research' 'deepseek' + 'deepseek-r1' 'document-understanding' 'graphrag' 'harness' 'llm' 'mcp' + 'ollama' 'openai' 'openclaw' 'rag' 'retrieval-augmented-generation']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T14:52:11.754710,1133,11601,340 +github_infiniflow_ragflow_0d5d62334edd59f68d0ab8069c72e2ab3b5403d9,api/apps/api_app.py,api_app.py,,2332,Python,"# +# Copyright 2024 The InfiniFlow Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre...[truncated]",infiniflow/ragflow,infiniflow,78746,8896,RAGFlow is a leading open-source Retrieval-Augmented Generation (RAG) engine that fuses cutting-edge RAG with Agent capabilities to create a superior context layer for LLMs,"['agent' 'agentic' 'agentic-ai' 'agentic-workflow' 'ai' + 'context-engineering' 'context-retrieval' 'deep-research' 'deepseek' + 'deepseek-r1' 'document-understanding' 'graphrag' 'harness' 'llm' 'mcp' + 'ollama' 'openai' 'openclaw' 'rag' 'retrieval-augmented-generation']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T14:52:12.119252,228,2332,56 +github_infiniflow_ragflow_8c896e36add37a17fba51e60dc294aaade0538d7,api/apps/canvas_app.py,canvas_app.py,,30254,Python,"# +# Copyright 2024 The InfiniFlow Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre...[truncated]",infiniflow/ragflow,infiniflow,78746,8896,RAGFlow is a leading open-source Retrieval-Augmented Generation (RAG) engine that fuses cutting-edge RAG with Agent capabilities to create a superior context layer for LLMs,"['agent' 'agentic' 'agentic-ai' 'agentic-workflow' 'ai' + 'context-engineering' 'context-retrieval' 'deep-research' 'deepseek' + 'deepseek-r1' 'document-understanding' 'graphrag' 'harness' 'llm' 'mcp' + 'ollama' 'openai' 'openclaw' 'rag' 'retrieval-augmented-generation']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T14:52:12.538380,2218,30254,756 +github_infiniflow_ragflow_b707e036227f0ed604b0457374b3f1858abdbdc1,download_deps.py,download_deps.py,,3906,Python,"#!/usr/bin/env python3 + +# PEP 723 metadata +# /// script +# requires-python = "">=3.10"" +# dependencies = [ +# ""nltk"", +# ""huggingface-hub"" +# ] +# /// + +import argparse +import os +import urllib.request +from typing import Union + +import nltk +from huggingface_hub import snapshot_download + + +def get_urls(use_china_mirrors=False) -> list[Union[str, list[str]]]: + if use_china_mirrors: + return [ + ""http://mirrors.tuna.tsinghua.edu.cn/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_am...[truncated]",infiniflow/ragflow,infiniflow,78746,8896,RAGFlow is a leading open-source Retrieval-Augmented Generation (RAG) engine that fuses cutting-edge RAG with Agent capabilities to create a superior context layer for LLMs,"['agent' 'agentic' 'agentic-ai' 'agentic-workflow' 'ai' + 'context-engineering' 'context-retrieval' 'deep-research' 'deepseek' + 'deepseek-r1' 'document-understanding' 'graphrag' 'harness' 'llm' 'mcp' + 'ollama' 'openai' 'openclaw' 'rag' 'retrieval-augmented-generation']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T14:52:33.837997,171,3906,82 +github_infiniflow_ragflow_508fb552701b33dc74083b384099a0b3f5516737,api/common/exceptions.py,exceptions.py,,1377,Python,"# +# Copyright 2025 The InfiniFlow Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre...[truncated]",infiniflow/ragflow,infiniflow,78746,8896,RAGFlow is a leading open-source Retrieval-Augmented Generation (RAG) engine that fuses cutting-edge RAG with Agent capabilities to create a superior context layer for LLMs,"['agent' 'agentic' 'agentic-ai' 'agentic-workflow' 'ai' + 'context-engineering' 'context-retrieval' 'deep-research' 'deepseek' + 'deepseek-r1' 'document-understanding' 'graphrag' 'harness' 'llm' 'mcp' + 'ollama' 'openai' 'openclaw' 'rag' 'retrieval-augmented-generation']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T14:52:19.388720,157,1377,44 +github_rust-lang_rust_fda03563c79f2537f18831b5f935cd5f89a18605,src/librustdoc/visit_ast.rs,visit_ast.rs,,25581,Rust,"//! The Rust AST Visitor. Extracts useful information and massages it into a form +//! usable for `clean`. + +use std::mem; + +use rustc_ast::attr::AttributeExt; +use rustc_data_structures::fx::{FxHashSet, FxIndexMap}; +use rustc_hir as hir; +use rustc_hir::attrs::DocInline; +use rustc_hir::def::{DefKind, MacroKinds, Res}; +use rustc_hir::def_id::{DefId, DefIdMap, LocalDefId, LocalDefIdSet}; +use rustc_hir::intravisit::{Visitor, walk_body, walk_item}; +use rustc_hir::{Node, find_attr}; +use rustc_middle::hir...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:53.748289,2458,25581,652 +github_rust-lang_rust_9cf7d6b29b10125fa7e2e3418057b79ae5e85113,src/librustdoc/visit.rs,visit.rs,,2742,Rust,"use crate::clean::*; + +/// Allows a type to traverse the cleaned ast of a crate. +/// +/// Note that like [`rustc_ast::visit::Visitor`], but +/// unlike [`rustc_lint::EarlyLintPass`], if you override a +/// `visit_*` method, you will need to manually recurse into +/// its contents. +pub(crate) trait DocVisitor<'a>: Sized { + fn visit_item(&mut self, item: &'a Item) { + self.visit_item_recur(item) + } + + /// Don't override! + fn visit_inner_recur(&mut self, kind: &'a ItemKind) { + ma...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:52.925321,225,2742,79 +github_rust-lang_rust_297485659fa148c6acacda5de867d1299d5f9eab,src/librustdoc/visit_lib.rs,visit_lib.rs,,2306,Rust,"use rustc_hir::def::DefKind; +use rustc_hir::def_id::{DefId, DefIdSet}; +use rustc_middle::ty::TyCtxt; + +use crate::core::DocContext; + +// FIXME: this may not be exhaustive, but is sufficient for rustdocs current uses + +#[derive(Default)] +pub(crate) struct RustdocEffectiveVisibilities { + extern_public: DefIdSet, +} + +macro_rules! define_method { + ($method:ident) => { + pub(crate) fn $method(&self, tcx: TyCtxt<'_>, def_id: DefId) -> bool { + match def_id.as_local() { + ...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:54.019221,197,2306,78 +github_rust-lang_rust_63b869c0f2d51c0f326a266a65f2f518007c5577,src/librustdoc/scrape_examples.rs,scrape_examples.rs,,13716,Rust,"//! This module analyzes crates to find call sites that can serve as examples in the documentation. + +use std::fs; +use std::path::PathBuf; + +use rustc_data_structures::fx::{FxHashSet, FxIndexMap}; +use rustc_errors::DiagCtxtHandle; +use rustc_hir as hir; +use rustc_hir::intravisit::{self, Visitor}; +use rustc_macros::{Decodable, Encodable}; +use rustc_middle::hir::nested_filter; +use rustc_middle::ty::{self, TyCtxt}; +use rustc_serialize::opaque::{FileEncoder, MemDecoder}; +use rustc_serialize::{Decodable...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:52.298419,1189,13716,373 +github_rust-lang_rust_a49fb06bde35fa0691250eeb01c4e6ced61fd707,src/librustdoc/theme.rs,theme.rs,,7670,Rust,"use std::fs; +use std::iter::Peekable; +use std::path::Path; +use std::str::Chars; + +use rustc_data_structures::fx::{FxIndexMap, IndexEntry}; +use rustc_errors::DiagCtxtHandle; + +#[cfg(test)] +mod tests; + +#[derive(Debug)] +pub(crate) struct CssPath { + pub(crate) rules: FxIndexMap, + pub(crate) children: FxIndexMap, +} + +/// When encountering a `""` or a `'`, returns the whole string, including the quote characters. +fn get_string(iter: &mut Peekable>, string_s...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:52.599768,862,7670,255 +github_rust-lang_rust_37dd226b73ce818da9be5883f421e8fc3c5276b5,src/rustdoc-json-types/lib.rs,lib.rs,,71760,Rust,"//! Rustdoc's JSON output interface +//! +//! These types are the public API exposed through the `--output-format json` flag. The [`Crate`] +//! struct is the root of the JSON blob and all other items are contained within. +//! +//! # Feature Flags +//! +//! ## `rustc-hash` +//! +//! We expose a `rustc-hash` feature, disabled by default. This feature switches the +//! [`std::collections::HashMap`] for [`rustc_hash::FxHashMap`] to improve the performance of said +//! `HashMap` in specific situations. +//! +//...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:54.413334,8804,71748,1759 +github_rust-lang_rust_8b9db4638e4736ff2e470f48ddb1056ceb4f52e7,src/librustdoc/fold.rs,fold.rs,,4910,Rust,"use std::mem; + +use crate::clean::*; + +pub(crate) fn strip_item(mut item: Item) -> Item { + if !matches!(item.inner.kind, StrippedItem(..)) { + item.inner.kind = StrippedItem(Box::new(item.inner.kind)); + } + item +} + +pub(crate) trait DocFolder: Sized { + fn fold_item(&mut self, item: Item) -> Option { + Some(self.fold_item_recur(item)) + } + + /// don't override! + fn fold_inner_recur(&mut self, kind: ItemKind) -> ItemKind { + match kind { + StrippedI...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:50.545659,345,4910,134 +github_rust-lang_rust_42ade5b90048b70176a9765f44ff3f23bf442755,src/librustdoc/externalfiles.rs,externalfiles.rs,,3783,Rust,"use std::path::{Path, PathBuf}; +use std::{fs, str}; + +use rustc_errors::DiagCtxtHandle; +use rustc_span::edition::Edition; +use serde::Serialize; + +use crate::html::markdown::{ErrorCodes, HeadingOffset, IdMap, Markdown, Playground}; + +#[derive(Clone, Debug, Serialize)] +pub(crate) struct ExternalHtml { + /// Content that will be included inline in the `` section of a + /// rendered Markdown file or generated documentation + pub(crate) in_header: String, + /// Content that will be include...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:50.259398,338,3783,120 +github_rust-lang_rust_94bb0e30fcdbce70985aaa229387f28a9c4600d0,src/librustdoc/build.rs,build.rs,,3066,Rust,"use std::str; + +use sha2::Digest; +fn main() { + // generate sha256 files + // this avoids having to perform hashing at runtime + let files = &[ + ""static/css/rustdoc.css"", + ""static/css/noscript.css"", + ""static/css/normalize.css"", + ""static/js/main.js"", + ""static/js/search.js"", + ""static/js/stringdex.js"", + ""static/js/settings.js"", + ""static/js/src-script.js"", + ""static/js/storage.js"", + ""static/js/scrape-examples.js"", + ""sta...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:47.458173,151,3066,71 +github_rust-lang_rust_d726c612acf682900f4a698bac965b6c5cc7d8b8,src/librustdoc/config.rs,config.rs,,46072,Rust,"use std::collections::BTreeMap; +use std::ffi::OsStr; +use std::io::Read; +use std::path::{Path, PathBuf}; +use std::str::FromStr; +use std::{fmt, io}; + +use rustc_data_structures::fx::FxIndexMap; +use rustc_errors::DiagCtxtHandle; +use rustc_session::config::{ + self, CodegenOptions, CrateType, ErrorOutputType, Externs, Input, JsonUnusedExterns, + OptionsTargetModifiers, OutFileName, Sysroot, UnstableOptions, get_cmd_lint_options, + nightly_options, parse_crate_types_from_list, parse_externs, par...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:47.841214,4078,46072,1104 +github_rust-lang_rust_0ca070ddb8e660eef8076fca249bfe5d032332a8,src/librustdoc/docfs.rs,docfs.rs,,2763,Rust,"//! Rustdoc's FileSystem abstraction module. +//! +//! On Windows this indirects IO into threads to work around performance issues +//! with Defender (and other similar virus scanners that do blocking operations). +//! +//! Only calls needed to permit this workaround have been abstracted: thus +//! fs::read is still done directly via the fs module; if in future rustdoc +//! needs to read-after-write from a file, then it would be added to this +//! abstraction. + +use std::cmp::max; +use std::path::{Path, P...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:48.822754,303,2763,92 +github_rust-lang_rust_adb761ed9faa8cb2cdbb554c232e1957395980b4,src/librustdoc/display.rs,display.rs,,3703,Rust,"//! Various utilities for working with [`fmt::Display`] implementations. + +use std::fmt::{self, Display, Formatter, FormattingOptions}; + +pub(crate) trait Joined: IntoIterator { + /// Takes an iterator over elements that implement [`Display`], and format them into `f`, separated by `sep`. + /// + /// This is similar to [`Itertools::format`], but instead of returning an implementation of `Display`, + /// it formats directly into a [`Formatter`]. + /// + /// The performance of `joined` i...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:48.478591,441,3703,133 +github_rust-lang_rust_21ce508d8560cf3ddaf2d8e5bc4efa71470a703b,src/librustdoc/core.rs,core.rs,,20272,Rust,"use std::sync::{Arc, LazyLock}; +use std::{io, mem}; + +use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexMap}; +use rustc_data_structures::unord::UnordSet; +use rustc_driver::USING_INTERNAL_FEATURES; +use rustc_errors::TerminalUrl; +use rustc_errors::annotate_snippet_emitter_writer::AnnotateSnippetEmitter; +use rustc_errors::codes::*; +use rustc_errors::emitter::{DynEmitter, HumanReadableErrorType, OutputTheme, stderr_destination}; +use rustc_errors::json::JsonEmitter; +use rustc_feature::Unsta...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:48.182905,1736,20272,527 +github_rust-lang_rust_6ec4aaf28223881f73f75860be8ace6e03f8f5d3,src/librustdoc/doctest.rs,doctest.rs,,46856,Rust,"mod extracted; +mod make; +mod markdown; +mod runner; +mod rust; + +use std::fs::File; +use std::hash::{Hash, Hasher}; +use std::io::{self, Write}; +use std::path::{Path, PathBuf}; +use std::process::{self, Command, Stdio}; +use std::str::FromStr; +use std::sync::atomic::{AtomicUsize, Ordering}; +use std::sync::{Arc, Mutex}; +use std::time::{Duration, Instant}; +use std::{panic, str}; + +pub(crate) use make::{BuildDocTestBuilder, DocTestBuilder}; +pub(crate) use markdown::test as test_markdown; +use proc_macro2::{...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:49.683517,3867,46856,1238 +github_rust-lang_rust_594c9b1af339703959d744487cd87f7c6b213b1d,src/librustdoc/markdown.rs,markdown.rs,,4485,Rust,"//! Standalone markdown rendering. +//! +//! For the (much more common) case of rendering markdown in doc-comments, see +//! [crate::html::markdown]. +//! +//! This is used when [rendering a markdown file to an html file][docs], without processing +//! rust source code. +//! +//! [docs]: https://doc.rust-lang.org/stable/rustdoc/#using-standalone-markdown-files + +use std::fmt::{self, Write as _}; +use std::fs::{File, create_dir_all}; +use std::io::prelude::*; +use std::path::PathBuf; +use std::sync::Arc; + +use...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:51.987854,425,4485,142 +github_rust-lang_rust_7876125f7fdf71351d6497f8c39d39644dfa47d2,src/librustdoc/error.rs,error.rs,,1365,Rust,"use std::error; +use std::fmt::{self, Formatter}; +use std::path::{Path, PathBuf}; + +use crate::docfs::PathError; + +#[derive(Debug)] +pub(crate) struct Error { + pub(crate) file: PathBuf, + pub(crate) error: String, +} + +impl error::Error for Error {} + +impl std::fmt::Display for Error { + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { + let file = self.file.display().to_string(); + if file.is_empty() { + write!(f, ""{}"", self.error) + } else { + write!(...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:49.971977,144,1365,60 +github_rust-lang_rust_750ce27ea7962e62320533a78eb43be1b6e2a144,src/librustdoc/lib.rs,lib.rs,,36007,Rust,"// tidy-alphabetical-start +#![doc( + html_root_url = ""https://doc.rust-lang.org/nightly/"", + html_playground_url = ""https://play.rust-lang.org/"" +)] +#![feature(ascii_char)] +#![feature(ascii_char_variants)] +#![feature(box_patterns)] +#![feature(file_buffered)] +#![feature(formatting_options)] +#![feature(iter_intersperse)] +#![feature(iter_order_by)] +#![feature(rustc_private)] +#![feature(test)] +#![feature(trim_prefix_suffix)] +#![recursion_limit = ""256""] +#![warn(rustc::internal)] +// tidy-alphabetic...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:50.900441,3311,36007,1004 +github_rust-lang_rust_b09ea05688595c86f8f9dc34f1d370695a740d46,src/librustdoc/lint.rs,lint.rs,,8524,Rust,"use std::sync::LazyLock as Lazy; + +use rustc_data_structures::fx::FxHashMap; +use rustc_lint::LintStore; +use rustc_lint_defs::{Lint, LintId, declare_tool_lint}; +use rustc_session::{Session, lint}; + +/// This function is used to setup the lint initialization. By default, in rustdoc, everything +/// is ""allowed"". Depending if we run in test mode or not, we want some of them to be at their +/// default level. For example, the ""INVALID_CODEBLOCK_ATTRIBUTES"" lint is activated in both +/// modes. +/// +/// A ...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:51.683058,895,8524,237 +github_rust-lang_rust_e878350e43b9bd7f6390b0f336ac8fe9fc118fa8,src/rustdoc-json-types/tests.rs,tests.rs,,5769,Rust,"use super::*; + +#[test] +fn test_struct_info_roundtrip() { + let s = ItemEnum::Struct(Struct { + generics: Generics { params: vec![], where_predicates: vec![] }, + kind: StructKind::Plain { fields: vec![], has_stripped_fields: false }, + impls: vec![], + }); + + // JSON + let struct_json = serde_json::to_string(&s).unwrap(); + let de_s = serde_json::from_str(&struct_json).unwrap(); + assert_eq!(s, de_s); + + // Bincode + let encoded: Vec = bincode::serialize(&s)...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:54.734101,468,5769,156 +github_rust-lang_rust_d9810e899a04386a58106daad29130ab582c3dd1,src/bootstrap/build.rs,build.rs,,246,Rust,"use std::env; + +fn main() { + // this is needed because `HOST` is only available to build scripts. + let host = env::var(""HOST"").unwrap(); + println!(""cargo:rerun-if-changed=build.rs""); + println!(""cargo:rustc-env=BUILD_TRIPLE={host}""); +} +...[truncated]",rust-lang/rust,rust-lang,112076,14769,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:13:41.162077,24,246,9 +github_rust-lang_rust_928a7496cb70ef2a6caf8e890fb09f12883a26e3,x.py,x.py,.py,2007,Rust,"#!/usr/bin/env python3 +# Some systems don't have `python3` in their PATH. This isn't supported by x.py directly; +# they should use `x` or `x.ps1` instead. + +# This file is only a ""symlink"" to bootstrap.py, all logic should go there. + +# Parts of `bootstrap.py` use the `multiprocessing` module, so this entry point +# must use the normal `if __name__ == '__main__':` convention to avoid problems. +if __name__ == ""__main__"": + import os + import sys + import warnings + from inspect import cleand...[truncated]",rust-lang/rust,rust-lang,111984,14746,Empowering everyone to build reliable and efficient software.,['compiler' 'language' 'rust'],Apache-2.0,,,,,0.95,GitHub Public Repositories,2026-04-13T14:04:35.524870,254,2007,54 +github_unionlabs_union_5ce70f58a10ec4acd443dcc53187f5f3939d7605,lib/ucs04/build.rs,build.rs,,5123,Rust,"use std::{collections::BTreeMap, env, fs, path::Path}; + +use heck::ToPascalCase; + +fn main() { + let path = ""well-known.json""; + + println!(""cargo:rerun-if-changed={path}""); + + let universal_chain_ids = + serde_json::from_str::>>(&fs::read_to_string(path).unwrap()) + .unwrap(); + + let variants = universal_chain_ids + .keys() + .map(|family| { + format!( + r#"" + /// ```txt + /// chain...[truncated]",unionlabs/union,unionlabs,74142,3884,"The trust-minimized, zero-knowledge bridging protocol, designed for censorship resistance, extremely high security, and usage in decentralized finance.","['astro' 'blockchain' 'cosmos' 'cosmwasm' 'ethereum' 'evm' 'golang' + 'indexer' 'interoperability' 'move' 'nix' 'prover' 'relayer' 'rust' + 'solidity' 'svelte' 'typescipt' 'typescript' 'zero-knowledge']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:15:44.251390,337,5123,170 +github_unionlabs_union_e0717ef0ea642fdc43886109a1cf59392cab9a42,lib/cometbls-groth16-verifier/build.rs,build.rs,,3823,Rust,"use std::{ + env, + fmt::{Display, Write}, + fs, + mem::{align_of, size_of}, + path::Path, +}; + +use gnark_key_parser::bn254::VerifyingKey; +use substrate_bn::{G1, G2}; + +pub const FQ_SIZE: usize = 32; +pub const G1_SIZE: usize = 2 * FQ_SIZE; +pub const G2_SIZE: usize = 2 * G1_SIZE; + +fn parse_verifying_key(buf: &[u8]) -> String { + let (n_read, parsed_key) = VerifyingKey::parse(buf).unwrap(); + + // we expect the verifying key to be fully parsed + assert_eq!(n_read, buf.len()); + let ...[truncated]",unionlabs/union,unionlabs,74142,3884,"The trust-minimized, zero-knowledge bridging protocol, designed for censorship resistance, extremely high security, and usage in decentralized finance.","['astro' 'blockchain' 'cosmos' 'cosmwasm' 'ethereum' 'evm' 'golang' + 'indexer' 'interoperability' 'move' 'nix' 'prover' 'relayer' 'rust' + 'solidity' 'svelte' 'typescipt' 'typescript' 'zero-knowledge']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:15:43.938245,336,3823,125 +github_unionlabs_union_fd3c87ec10fddce52601c0e91d814c110b7abb85,vitest.setup.ts,vitest.setup.ts,.ts,74,Rust,"import { addEqualityTesters } from ""@effect/vitest"" + +addEqualityTesters() +...[truncated]",unionlabs/union,unionlabs,74141,3882,"The trust-minimized, zero-knowledge bridging protocol, designed for censorship resistance, extremely high security, and usage in decentralized finance.","['astro' 'blockchain' 'cosmos' 'cosmwasm' 'ethereum' 'evm' 'golang' + 'indexer' 'interoperability' 'move' 'nix' 'prover' 'relayer' 'rust' + 'solidity' 'svelte' 'typescipt' 'typescript' 'zero-knowledge']",Apache-2.0,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:02.251617,7,74,4 +github_unionlabs_union_c78ea73c9ba32bc4d7b53e2f0ff719f8007a4d12,vitest.workspace.ts,vitest.workspace.ts,.ts,219,Rust,"import { defineWorkspace } from ""vitest/config"" + +export default defineWorkspace([ + ""ts-sdk/vitest.config.ts"", + ""ts-sdk-evm/vitest.config.ts"", + ""ts-sdk-cosmos/vitest.config.ts"", + ""effect-svelte/vitest.config.ts"", +]) +...[truncated]",unionlabs/union,unionlabs,74141,3882,"The trust-minimized, zero-knowledge bridging protocol, designed for censorship resistance, extremely high security, and usage in decentralized finance.","['astro' 'blockchain' 'cosmos' 'cosmwasm' 'ethereum' 'evm' 'golang' + 'indexer' 'interoperability' 'move' 'nix' 'prover' 'relayer' 'rust' + 'solidity' 'svelte' 'typescipt' 'typescript' 'zero-knowledge']",Apache-2.0,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:02.924901,14,219,9 +github_unionlabs_union_dd81ef15bee590be68c6827d7f2cdb0b7d35f281,vitest.shared.ts,vitest.shared.ts,.ts,392,Rust,"import * as path from ""node:path"" +import type { ViteUserConfig } from ""vitest/config"" + +const config: ViteUserConfig = { + esbuild: { + target: ""es2020"", + }, + test: { + setupFiles: [path.join(__dirname, ""vitest.setup.ts"")], + fakeTimers: { + toFake: undefined, + }, + sequence: { + concurrent: true, + }, + include: [""test/**/*.test.ts""], + }, +} + +export default config +...[truncated]",unionlabs/union,unionlabs,74141,3882,"The trust-minimized, zero-knowledge bridging protocol, designed for censorship resistance, extremely high security, and usage in decentralized finance.","['astro' 'blockchain' 'cosmos' 'cosmwasm' 'ethereum' 'evm' 'golang' + 'indexer' 'interoperability' 'move' 'nix' 'prover' 'relayer' 'rust' + 'solidity' 'svelte' 'typescipt' 'typescript' 'zero-knowledge']",Apache-2.0,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:02.582800,45,392,21 +github_rust-lang_rustlings_2467b4503661f74f2f49218499087f8ec9caca25,src/term.rs,term.rs,,8857,Rust,"use crossterm::{ + Command, QueueableCommand, + cursor::MoveTo, + style::{Attribute, Color, ResetColor, SetAttribute, SetForegroundColor}, + terminal::{Clear, ClearType}, +}; +use std::{ + fmt, fs, + io::{self, BufRead, StdoutLock, Write}, +}; + +use crate::app_state::CheckProgress; + +pub struct MaxLenWriter<'a, 'lock> { + pub stdout: &'a mut StdoutLock<'lock>, + len: usize, + max_len: usize, +} + +impl<'a, 'lock> MaxLenWriter<'a, 'lock> { + pub fn new(stdout: &'a mut StdoutLock<'lock...[truncated]",rust-lang/rustlings,rust-lang,62528,11177,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:16:17.182853,777,8855,314 +github_rust-lang_rustlings_16d04563ca983eacff4ca29a04feac74347edcac,src/dev/check.rs,check.rs,,13635,Rust,"use anyhow::{Context, Error, Result, anyhow, bail}; +use std::{ + cmp::Ordering, + collections::HashSet, + fs::{self, OpenOptions, read_dir}, + io::{self, Read, Write}, + path::{Path, PathBuf}, + process::{Command, Stdio}, + thread, +}; + +use crate::{ + CURRENT_FORMAT_VERSION, + cargo_toml::{BINS_BUFFER_CAPACITY, append_bins, bins_start_end_ind}, + cmd::CmdRunner, + exercise::{OUTPUT_CAPACITY, RunnableExercise}, + info_file::{ExerciseInfo, InfoFile}, + term::ProgressCounte...[truncated]",rust-lang/rustlings,rust-lang,62528,11177,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:16:10.816864,1271,13635,399 +github_rust-lang_rustlings_7c72a6b700d84b3bceb23df66d237fe6fd9ffd96,src/dev/new.rs,new.rs,,4908,Rust,"use anyhow::{Context, Result, bail}; +use std::{ + env::set_current_dir, + fs::{self, create_dir}, + path::Path, + process::Command, +}; + +use crate::{CURRENT_FORMAT_VERSION, init::RUST_ANALYZER_TOML}; + +// Create a directory relative to the current directory and print its path. +fn create_rel_dir(dir_name: &str, current_dir: &str) -> Result<()> { + create_dir(dir_name) + .with_context(|| format!(""Failed to create the directory {current_dir}/{dir_name}""))?; + println!(""Created the d...[truncated]",rust-lang/rustlings,rust-lang,62528,11177,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:16:11.108815,579,4895,149 +github_rust-lang_rustlings_e0855a0e937a7d39bd585d18994b7f4d28541b69,src/dev/update.rs,update.rs,,1282,Rust,"use anyhow::{Context, Result}; +use std::fs; + +use crate::{ + cargo_toml::updated_cargo_toml, + info_file::{ExerciseInfo, InfoFile}, +}; + +// Update the `Cargo.toml` file. +fn update_cargo_toml( + exercise_infos: &[ExerciseInfo], + cargo_toml_path: &str, + exercise_path_prefix: &[u8], +) -> Result<()> { + let current_cargo_toml = fs::read_to_string(cargo_toml_path) + .with_context(|| format!(""Failed to read the file `{cargo_toml_path}`""))?; + + let updated_cargo_toml = + updat...[truncated]",rust-lang/rustlings,rust-lang,62528,11177,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:16:11.416715,108,1282,45 +github_rust-lang_rustlings_4fcbd3c353c2ed25310ed0c0c6744070a61c88f7,src/list/state.rs,state.rs,,13827,Rust,"use anyhow::{Context, Result}; +use crossterm::{ + QueueableCommand, + cursor::{MoveTo, MoveToNextLine}, + style::{ + Attribute, Attributes, Color, ResetColor, SetAttribute, SetAttributes, SetForegroundColor, + }, + terminal::{self, BeginSynchronizedUpdate, Clear, ClearType, EndSynchronizedUpdate}, +}; +use std::{ + fmt::Write as _, + io::{self, StdoutLock, Write}, +}; + +use crate::{ + app_state::AppState, + exercise::Exercise, + list::scroll_state::ScrollState, + term::{C...[truncated]",rust-lang/rustlings,rust-lang,62528,11177,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:16:15.665552,909,13820,412 +github_rust-lang_rustlings_3c189c789dfce251cd1ba45189bace15b924be86,src/editor.rs,editor.rs,,4290,Rust,"use std::{ + borrow::Cow, + env, + process::{Command, Stdio}, + thread::{self, JoinHandle}, +}; + +use anyhow::{Context, Result, bail}; +use shlex::Shlex; + +mod zellij; + +fn run_cmd(cmd: &mut Command) -> Result> { + let output = cmd + .stdin(Stdio::null()) + .output() + .with_context(|| format!(""Failed to run the command {cmd:?}""))?; + + if !output.status.success() { + bail!( + ""The command {cmd:?} didn't run successfully\n\n\ + stdout:\n{...[truncated]",rust-lang/rustlings,rust-lang,62528,11177,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:16:11.749011,323,4290,145 +github_rust-lang_rustlings_edd9c7207d49c0724721566dfeff05739edb4394,src/watch/notify_event.rs,notify_event.rs,,4883,Rust,"use anyhow::{Context, Result}; +use notify::{ + Event, EventKind, + event::{AccessKind, AccessMode, MetadataKind, ModifyKind, RenameMode}, +}; +use std::{ + sync::{ + atomic::Ordering::Relaxed, + mpsc::{RecvTimeoutError, Sender, SyncSender, sync_channel}, + }, + thread, + time::Duration, +}; + +use crate::watch::{EXERCISE_RUNNING, WatchEvent}; + +const DEBOUNCE_DURATION: Duration = Duration::from_millis(200); + +pub struct NotifyEventHandler { + error_sender: Sender, +...[truncated]",rust-lang/rustlings,rust-lang,62528,11177,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:16:17.837635,355,4883,133 +github_rust-lang_rustlings_8bbdc5851801516c47c7a5dbc10b43c453908270,src/watch/state.rs,state.rs,,9468,Rust,"use anyhow::{Context, Result}; +use crossterm::{ + QueueableCommand, + style::{ + Attribute, Attributes, Color, ResetColor, SetAttribute, SetAttributes, SetForegroundColor, + }, + terminal, +}; +use std::{ + io::{self, Read, StdoutLock, Write}, + sync::mpsc::{Sender, SyncSender, sync_channel}, + thread, +}; + +use crate::{ + app_state::{AppState, ExercisesProgress}, + clear_terminal, + exercise::{OUTPUT_CAPACITY, RunnableExercise, solution_link_line}, + term::progress_bar, +...[truncated]",rust-lang/rustlings,rust-lang,62528,11177,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:16:18.222793,643,9461,304 +github_rust-lang_rustlings_4f0685b6e0146527c806f1946401c31bf21f1869,src/watch/terminal_event.rs,terminal_event.rs,,2306,Rust,"use crossterm::event::{self, Event, KeyCode, KeyEventKind}; +use std::sync::{ + atomic::Ordering::Relaxed, + mpsc::{Receiver, Sender}, +}; + +use crate::watch::{EXERCISE_RUNNING, WatchEvent}; + +pub enum InputEvent { + Next, + Run, + Hint, + List, + CheckAll, + Reset, + Quit, +} + +pub fn terminal_event_handler( + sender: Sender, + unpause_receiver: Receiver<()>, + manual_run: bool, +) { + let last_watch_event = loop { + match event::read() { + Ok(Even...[truncated]",rust-lang/rustlings,rust-lang,62528,11177,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:16:18.548433,157,2306,74 +github_rust-lang_rustlings_857ccfde51c406fc716988719cf1c7f7a5124df3,src/watch.rs,watch.rs,,6427,Rust,"use anyhow::{Error, Result}; +use notify::{Config, RecommendedWatcher, RecursiveMode, Watcher}; +use std::{ + io::{self, Write}, + path::Path, + sync::{ + atomic::{AtomicBool, Ordering::Relaxed}, + mpsc::channel, + }, + time::Duration, +}; + +use crate::{ + app_state::{AppState, ExercisesProgress}, + list, + watch::{notify_event::NotifyEventHandler, state::WatchState, terminal_event::InputEvent}, +}; + +mod notify_event; +mod state; +mod terminal_event; + +static EXERCISE_RUNNING...[truncated]",rust-lang/rustlings,rust-lang,62528,11177,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:16:17.487403,555,6427,187 +github_rust-lang_rustlings_8da36f7f579955118b7356feb3582131ac0a495f,src/main.rs,main.rs,,6854,Rust,"use anyhow::{Context, Result, bail}; +use app_state::StateFileStatus; +use clap::Parser; +use std::{ + env, + io::{self, IsTerminal, Write}, + path::Path, + process::ExitCode, +}; +use term::{clear_terminal, press_enter_prompt}; + +use crate::{ + app_state::AppState, + cli::{Args, Command}, + editor::Editor, + info_file::InfoFile, +}; + +mod app_state; +mod cargo_toml; +mod cli; +mod cmd; +mod dev; +mod editor; +mod embedded; +mod exercise; +mod info_file; +mod init; +mod list; +mod run; +mod term; +mo...[truncated]",rust-lang/rustlings,rust-lang,62528,11177,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:16:16.013331,582,6854,211 +github_rust-lang_rustlings_b473fc2062642d013082659049d705b78cf75e7f,src/run.rs,run.rs,,1890,Rust,"use anyhow::Result; +use crossterm::{ + QueueableCommand, + style::{Color, ResetColor, SetForegroundColor}, +}; +use std::{ + io::{self, Write}, + process::ExitCode, +}; + +use crate::{ + app_state::{AppState, ExercisesProgress}, + exercise::{OUTPUT_CAPACITY, RunnableExercise, solution_link_line}, +}; + +pub fn run(app_state: &mut AppState) -> Result { + let exercise = app_state.current_exercise(); + let mut output = Vec::with_capacity(OUTPUT_CAPACITY); + let success = exercis...[truncated]",rust-lang/rustlings,rust-lang,62528,11177,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:16:16.302611,115,1888,61 +github_rust-lang_rustlings_26bb1a2ccdfeee61aae742fc206f0fd5a21c9fdc,src/info_file.rs,info_file.rs,,3844,Rust,"use anyhow::{Context, Error, Result, bail}; +use serde::Deserialize; +use std::{fs, io::ErrorKind}; + +use crate::{embedded::EMBEDDED_FILES, exercise::RunnableExercise}; + +/// Deserialized from the `info.toml` file. +#[derive(Deserialize)] +pub struct ExerciseInfo { + /// Exercise's unique name. + pub name: &'static str, + /// Exercise's directory name inside the `exercises/` directory. + pub dir: Option<&'static str>, + /// Run `cargo test` on the exercise. + #[serde(default = ""default_tru...[truncated]",rust-lang/rustlings,rust-lang,62528,11177,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:16:13.779755,426,3844,123 +github_rust-lang_rustlings_5687864183b32ce24ff609ed4fb4fe099c525072,build.rs,build.rs,,176,Rust,"fn main() { + // Fix building from source on Windows because it can't handle file links. + #[cfg(windows)] + let _ = std::fs::copy(""dev/Cargo.toml"", ""dev-Cargo.toml""); +} +...[truncated]",rust-lang/rustlings,rust-lang,62528,11177,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:16:08.226364,23,176,6 +github_rust-lang_rustlings_b628a682cfe408cfd0de620a010c1188366d3ac1,src/editor/zellij.rs,zellij.rs,,1216,Rust,"use std::process::Command; + +use anyhow::{Context, Result}; +use serde::Deserialize; + +use crate::editor::run_cmd; + +#[derive(Deserialize)] +struct Pane { + id: u32, +} + +pub fn parse_pane_id(b: &[u8]) -> Option<(String, u32)> { + // Remove newline + let b = b.get(""terminal_"".len()..b.len().saturating_sub(1))?; + let id_str = str::from_utf8(b).ok()?; + + let (first, rest) = b.split_first()?; + let mut id = u32::from(first - b'0'); + + for c in rest { + id = 10 * id + u32::from(c - b'0...[truncated]",rust-lang/rustlings,rust-lang,62528,11177,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:16:12.583302,121,1216,56 +github_rust-lang_rustlings_bee4119c2bf9cfaf4b0f92a818ba82f926642559,src/embedded.rs,embedded.rs,,5142,Rust,"use anyhow::{Context, Error, Result}; +use std::{ + fs::{self, create_dir}, + io, +}; + +use crate::info_file::ExerciseInfo; + +/// Contains all embedded files. +pub static EMBEDDED_FILES: EmbeddedFiles = rustlings_macros::include_files!(); + +// Files related to one exercise. +struct ExerciseFiles { + // The content of the exercise file. + exercise: &'static [u8], + // The content of the solution file. + solution: &'static [u8], + // Index of the related `ExerciseDir` in `EmbeddedFiles::exe...[truncated]",rust-lang/rustlings,rust-lang,62528,11177,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:16:12.937709,423,5142,170 +github_rust-lang_rustlings_b969c69ad24da1f0fe565e0d45b06b40f7b511f0,src/exercise.rs,exercise.rs,,6982,Rust,"use anyhow::Result; +use crossterm::{ + QueueableCommand, + style::{Attribute, Color, ResetColor, SetAttribute, SetForegroundColor}, +}; +use std::io::{self, StdoutLock, Write}; + +use crate::{ + cmd::CmdRunner, + term::{self, CountedWrite, file_path, terminal_file_link, write_ansi}, +}; + +/// The initial capacity of the output buffer. +pub const OUTPUT_CAPACITY: usize = 1 << 14; + +pub fn solution_link_line( + stdout: &mut StdoutLock, + solution_path: &str, + emit_file_links: bool, +) -> io:...[truncated]",rust-lang/rustlings,rust-lang,62528,11177,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:16:13.265272,696,6975,219 +github_rust-lang_rustlings_c60a5299ef2b059e6c8cae70b929581dbe978316,src/list.rs,list.rs,,5103,Rust,"use anyhow::{Context, Result}; +use crossterm::{ + QueueableCommand, cursor, + event::{ + self, DisableMouseCapture, EnableMouseCapture, Event, KeyCode, KeyEventKind, MouseEventKind, + }, + terminal::{ + DisableLineWrap, EnableLineWrap, EnterAlternateScreen, LeaveAlternateScreen, + disable_raw_mode, enable_raw_mode, + }, +}; +use std::io::{self, StdoutLock, Write}; + +use crate::{ + app_state::AppState, + list::state::{Filter, ListState}, +}; + +mod scroll_state; +mod stat...[truncated]",rust-lang/rustlings,rust-lang,62528,11177,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:16:14.942779,321,5099,136 +github_rust-lang_rustlings_f043bd48f2d45d5a2f5f43ce8c94cf3a2766bae9,src/init.rs,init.rs,,8564,Rust,"use anyhow::{Context, Result, bail}; +use crossterm::{ + QueueableCommand, + style::{Attribute, Color, ResetColor, SetAttribute, SetForegroundColor}, +}; +use serde::Deserialize; +use std::{ + env::{current_dir, set_current_dir}, + fs::{self, create_dir}, + io::{self, Write}, + path::Path, + process::{Command, Stdio}, +}; + +use crate::{ + cargo_toml::updated_cargo_toml, embedded::EMBEDDED_FILES, exercise::RunnableExercise, + info_file::InfoFile, term::press_enter_prompt, +}; + +#[derive...[truncated]",rust-lang/rustlings,rust-lang,62528,11177,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:16:14.130126,715,8558,239 +github_rust-lang_rustlings_299db568c9c1f882fcae04ee9a7751bc8d2c288f,src/list/scroll_state.rs,scroll_state.rs,,2699,Rust,"pub struct ScrollState { + n_rows: usize, + max_n_rows_to_display: usize, + selected: Option, + offset: usize, + scroll_padding: usize, + max_scroll_padding: usize, +} + +impl ScrollState { + pub fn new(n_rows: usize, selected: Option, max_scroll_padding: usize) -> Self { + Self { + n_rows, + max_n_rows_to_display: 0, + selected, + offset: selected.map_or(0, |selected| selected.saturating_sub(max_scroll_padding)), + ...[truncated]",rust-lang/rustlings,rust-lang,62528,11177,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:16:15.291518,227,2699,101 +github_rust-lang_rustlings_153994be335168e5d6b5ae0168745733d7cc063c,src/cli.rs,cli.rs,,1970,Rust,"use clap::{Parser, Subcommand}; + +use crate::dev::DevCommand; + +/// Rustlings is a collection of small exercises to get you used to writing and reading Rust code +#[derive(Parser)] +#[command(version)] +pub struct Args { + #[command(subcommand)] + pub command: Option, + /// Disable automatic opening of the current file in VS Code or Zellij. + /// Ignores `--edit-cmd` + #[arg(long)] + pub no_editor: bool, + /// Open the current exercise by running `EDIT_CMD EXERCISE_PATH`. + /...[truncated]",rust-lang/rustlings,rust-lang,62528,11177,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:16:09.295135,271,1970,58 +github_rust-lang_rustlings_78b9c20598d519aad97addd2ebd158780735fc90,src/app_state.rs,app_state.rs,,23627,Rust,"use anyhow::{Context, Error, Result, bail}; +use crossterm::{QueueableCommand, cursor, terminal}; +use std::{ + collections::HashSet, + fs::{File, OpenOptions}, + io::{Read, Seek, StdoutLock, Write}, + path::{MAIN_SEPARATOR_STR, Path}, + process::{Command, Stdio}, + sync::{ + atomic::{AtomicUsize, Ordering::Relaxed}, + mpsc, + }, + thread, +}; + +use crate::{ + clear_terminal, + cmd::CmdRunner, + editor::{Editor, EditorJoinHandle}, + embedded::EMBEDDED_FILES, + e...[truncated]",rust-lang/rustlings,rust-lang,62528,11177,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:16:08.620081,1828,22895,664 +github_rust-lang_rustlings_9297da82da1255921594850c64a413142695f319,src/cargo_toml.rs,cargo_toml.rs,,4927,Rust,"use anyhow::{Context, Result}; +use std::path::Path; + +use crate::{exercise::RunnableExercise, info_file::ExerciseInfo}; + +/// Initial capacity of the bins buffer. +pub const BINS_BUFFER_CAPACITY: usize = 1 << 14; + +/// Return the start and end index of the content of the list `bin = […]`. +/// bin = [xxxxxxxxxxxxxxxxx] +/// |start_ind | +/// |end_ind +pub fn bins_start_end_ind(cargo_toml: &str) -> Result<(usize, usize)> { + let start_ind = cargo_toml + .find(...[truncated]",rust-lang/rustlings,rust-lang,62528,11177,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:16:08.953111,395,4925,154 +github_rust-lang_rustlings_6442e449a3eafd52e18bd2d0e9769bf0ba1354a8,src/cmd.rs,cmd.rs,,4874,Rust,"use anyhow::{Context, Result, bail}; +use serde::Deserialize; +use std::{ + io::{Read, pipe}, + path::PathBuf, + process::{Command, Stdio}, +}; + +/// Run a command with a description for a possible error and append the merged stdout and stderr. +/// The boolean in the returned `Result` is true if the command's exit status is success. +fn run_cmd(mut cmd: Command, description: &str, output: Option<&mut Vec>) -> Result { + let spawn = |mut cmd: Command| { + // NOTE: The closure d...[truncated]",rust-lang/rustlings,rust-lang,62528,11177,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:16:09.649191,483,4866,162 +github_rust-lang_rustlings_f2be606646d771795d29372f0c2fcaab67f21002,src/dev.rs,dev.rs,,1265,Rust,"use anyhow::{Context, Result, bail}; +use clap::Subcommand; +use std::path::PathBuf; + +mod check; +mod new; +mod update; + +#[derive(Subcommand)] +pub enum DevCommand { + /// Create a new project for community exercises + New { + /// The path to create the project in + path: PathBuf, + /// Don't try to initialize a Git repository in the project directory + #[arg(long)] + no_git: bool, + }, + /// Run checks on the exercises + Check { + /// Require that every ...[truncated]",rust-lang/rustlings,rust-lang,62528,11177,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:16:10.463541,150,1265,47 +github_rust-lang_rustlings_153994be335168e5d6b5ae0168745733d7cc063c,src/cli.rs,cli.rs,.rs,1970,Rust,"use clap::{Parser, Subcommand}; + +use crate::dev::DevCommand; + +/// Rustlings is a collection of small exercises to get you used to writing and reading Rust code +#[derive(Parser)] +#[command(version)] +pub struct Args { + #[command(subcommand)] + pub command: Option, + /// Disable automatic opening of the current file in VS Code or Zellij. + /// Ignores `--edit-cmd` + #[arg(long)] + pub no_editor: bool, + /// Open the current exercise by running `EDIT_CMD EXERCISE_PATH`. + /...[truncated]",rust-lang/rustlings,rust-lang,62478,11173,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:08.091121,271,1970,58 +github_rust-lang_rustlings_9297da82da1255921594850c64a413142695f319,src/cargo_toml.rs,cargo_toml.rs,.rs,4927,Rust,"use anyhow::{Context, Result}; +use std::path::Path; + +use crate::{exercise::RunnableExercise, info_file::ExerciseInfo}; + +/// Initial capacity of the bins buffer. +pub const BINS_BUFFER_CAPACITY: usize = 1 << 14; + +/// Return the start and end index of the content of the list `bin = […]`. +/// bin = [xxxxxxxxxxxxxxxxx] +/// |start_ind | +/// |end_ind +pub fn bins_start_end_ind(cargo_toml: &str) -> Result<(usize, usize)> { + let start_ind = cargo_toml + .find(...[truncated]",rust-lang/rustlings,rust-lang,62478,11173,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:07.703586,395,4925,154 +github_rust-lang_rustlings_f043bd48f2d45d5a2f5f43ce8c94cf3a2766bae9,src/init.rs,init.rs,.rs,8564,Rust,"use anyhow::{Context, Result, bail}; +use crossterm::{ + QueueableCommand, + style::{Attribute, Color, ResetColor, SetAttribute, SetForegroundColor}, +}; +use serde::Deserialize; +use std::{ + env::{current_dir, set_current_dir}, + fs::{self, create_dir}, + io::{self, Write}, + path::Path, + process::{Command, Stdio}, +}; + +use crate::{ + cargo_toml::updated_cargo_toml, embedded::EMBEDDED_FILES, exercise::RunnableExercise, + info_file::InfoFile, term::press_enter_prompt, +}; + +#[derive...[truncated]",rust-lang/rustlings,rust-lang,62478,11173,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:11.481442,715,8558,239 +github_rust-lang_rustlings_c60a5299ef2b059e6c8cae70b929581dbe978316,src/list.rs,list.rs,.rs,5103,Rust,"use anyhow::{Context, Result}; +use crossterm::{ + QueueableCommand, cursor, + event::{ + self, DisableMouseCapture, EnableMouseCapture, Event, KeyCode, KeyEventKind, MouseEventKind, + }, + terminal::{ + DisableLineWrap, EnableLineWrap, EnterAlternateScreen, LeaveAlternateScreen, + disable_raw_mode, enable_raw_mode, + }, +}; +use std::io::{self, StdoutLock, Write}; + +use crate::{ + app_state::AppState, + list::state::{Filter, ListState}, +}; + +mod scroll_state; +mod stat...[truncated]",rust-lang/rustlings,rust-lang,62478,11173,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:11.774331,321,5099,136 +github_rust-lang_rustlings_78b9c20598d519aad97addd2ebd158780735fc90,src/app_state.rs,app_state.rs,.rs,23627,Rust,"use anyhow::{Context, Error, Result, bail}; +use crossterm::{QueueableCommand, cursor, terminal}; +use std::{ + collections::HashSet, + fs::{File, OpenOptions}, + io::{Read, Seek, StdoutLock, Write}, + path::{MAIN_SEPARATOR_STR, Path}, + process::{Command, Stdio}, + sync::{ + atomic::{AtomicUsize, Ordering::Relaxed}, + mpsc, + }, + thread, +}; + +use crate::{ + clear_terminal, + cmd::CmdRunner, + editor::{Editor, EditorJoinHandle}, + embedded::EMBEDDED_FILES, + e...[truncated]",rust-lang/rustlings,rust-lang,62478,11173,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:07.390343,1828,22895,664 +github_rust-lang_rustlings_5687864183b32ce24ff609ed4fb4fe099c525072,build.rs,build.rs,.rs,176,Rust,"fn main() { + // Fix building from source on Windows because it can't handle file links. + #[cfg(windows)] + let _ = std::fs::copy(""dev/Cargo.toml"", ""dev-Cargo.toml""); +} +...[truncated]",rust-lang/rustlings,rust-lang,62478,11173,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:06.975977,23,176,6 +github_rust-lang_rustlings_6442e449a3eafd52e18bd2d0e9769bf0ba1354a8,src/cmd.rs,cmd.rs,.rs,4874,Rust,"use anyhow::{Context, Result, bail}; +use serde::Deserialize; +use std::{ + io::{Read, pipe}, + path::PathBuf, + process::{Command, Stdio}, +}; + +/// Run a command with a description for a possible error and append the merged stdout and stderr. +/// The boolean in the returned `Result` is true if the command's exit status is success. +fn run_cmd(mut cmd: Command, description: &str, output: Option<&mut Vec>) -> Result { + let spawn = |mut cmd: Command| { + // NOTE: The closure d...[truncated]",rust-lang/rustlings,rust-lang,62478,11173,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:08.391577,483,4866,162 +github_rust-lang_rustlings_f2be606646d771795d29372f0c2fcaab67f21002,src/dev.rs,dev.rs,.rs,1265,Rust,"use anyhow::{Context, Result, bail}; +use clap::Subcommand; +use std::path::PathBuf; + +mod check; +mod new; +mod update; + +#[derive(Subcommand)] +pub enum DevCommand { + /// Create a new project for community exercises + New { + /// The path to create the project in + path: PathBuf, + /// Don't try to initialize a Git repository in the project directory + #[arg(long)] + no_git: bool, + }, + /// Run checks on the exercises + Check { + /// Require that every ...[truncated]",rust-lang/rustlings,rust-lang,62478,11173,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:09.215435,150,1265,47 +github_rust-lang_rustlings_857ccfde51c406fc716988719cf1c7f7a5124df3,src/watch.rs,watch.rs,.rs,6427,Rust,"use anyhow::{Error, Result}; +use notify::{Config, RecommendedWatcher, RecursiveMode, Watcher}; +use std::{ + io::{self, Write}, + path::Path, + sync::{ + atomic::{AtomicBool, Ordering::Relaxed}, + mpsc::channel, + }, + time::Duration, +}; + +use crate::{ + app_state::{AppState, ExercisesProgress}, + list, + watch::{notify_event::NotifyEventHandler, state::WatchState, terminal_event::InputEvent}, +}; + +mod notify_event; +mod state; +mod terminal_event; + +static EXERCISE_RUNNING...[truncated]",rust-lang/rustlings,rust-lang,62478,11173,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:13.654286,555,6427,187 +github_rust-lang_rustlings_2467b4503661f74f2f49218499087f8ec9caca25,src/term.rs,term.rs,.rs,8857,Rust,"use crossterm::{ + Command, QueueableCommand, + cursor::MoveTo, + style::{Attribute, Color, ResetColor, SetAttribute, SetForegroundColor}, + terminal::{Clear, ClearType}, +}; +use std::{ + fmt, fs, + io::{self, BufRead, StdoutLock, Write}, +}; + +use crate::app_state::CheckProgress; + +pub struct MaxLenWriter<'a, 'lock> { + pub stdout: &'a mut StdoutLock<'lock>, + len: usize, + max_len: usize, +} + +impl<'a, 'lock> MaxLenWriter<'a, 'lock> { + pub fn new(stdout: &'a mut StdoutLock<'lock...[truncated]",rust-lang/rustlings,rust-lang,62478,11173,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:12.827573,777,8855,314 +github_rust-lang_rustlings_b473fc2062642d013082659049d705b78cf75e7f,src/run.rs,run.rs,.rs,1890,Rust,"use anyhow::Result; +use crossterm::{ + QueueableCommand, + style::{Color, ResetColor, SetForegroundColor}, +}; +use std::{ + io::{self, Write}, + process::ExitCode, +}; + +use crate::{ + app_state::{AppState, ExercisesProgress}, + exercise::{OUTPUT_CAPACITY, RunnableExercise, solution_link_line}, +}; + +pub fn run(app_state: &mut AppState) -> Result { + let exercise = app_state.current_exercise(); + let mut output = Vec::with_capacity(OUTPUT_CAPACITY); + let success = exercis...[truncated]",rust-lang/rustlings,rust-lang,62478,11173,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:12.483003,115,1888,61 +github_rust-lang_rustlings_b969c69ad24da1f0fe565e0d45b06b40f7b511f0,src/exercise.rs,exercise.rs,.rs,6982,Rust,"use anyhow::Result; +use crossterm::{ + QueueableCommand, + style::{Attribute, Color, ResetColor, SetAttribute, SetForegroundColor}, +}; +use std::io::{self, StdoutLock, Write}; + +use crate::{ + cmd::CmdRunner, + term::{self, CountedWrite, file_path, terminal_file_link, write_ansi}, +}; + +/// The initial capacity of the output buffer. +pub const OUTPUT_CAPACITY: usize = 1 << 14; + +pub fn solution_link_line( + stdout: &mut StdoutLock, + solution_path: &str, + emit_file_links: bool, +) -> io:...[truncated]",rust-lang/rustlings,rust-lang,62478,11173,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:10.295567,696,6975,219 +github_rust-lang_rustlings_26bb1a2ccdfeee61aae742fc206f0fd5a21c9fdc,src/info_file.rs,info_file.rs,.rs,3844,Rust,"use anyhow::{Context, Error, Result, bail}; +use serde::Deserialize; +use std::{fs, io::ErrorKind}; + +use crate::{embedded::EMBEDDED_FILES, exercise::RunnableExercise}; + +/// Deserialized from the `info.toml` file. +#[derive(Deserialize)] +pub struct ExerciseInfo { + /// Exercise's unique name. + pub name: &'static str, + /// Exercise's directory name inside the `exercises/` directory. + pub dir: Option<&'static str>, + /// Run `cargo test` on the exercise. + #[serde(default = ""default_tru...[truncated]",rust-lang/rustlings,rust-lang,62478,11173,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:10.631027,426,3844,123 +github_rust-lang_rustlings_3c189c789dfce251cd1ba45189bace15b924be86,src/editor.rs,editor.rs,.rs,4290,Rust,"use std::{ + borrow::Cow, + env, + process::{Command, Stdio}, + thread::{self, JoinHandle}, +}; + +use anyhow::{Context, Result, bail}; +use shlex::Shlex; + +mod zellij; + +fn run_cmd(cmd: &mut Command) -> Result> { + let output = cmd + .stdin(Stdio::null()) + .output() + .with_context(|| format!(""Failed to run the command {cmd:?}""))?; + + if !output.status.success() { + bail!( + ""The command {cmd:?} didn't run successfully\n\n\ + stdout:\n{...[truncated]",rust-lang/rustlings,rust-lang,62478,11173,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:09.525727,323,4290,145 +github_rust-lang_rustlings_8da36f7f579955118b7356feb3582131ac0a495f,src/main.rs,main.rs,.rs,6854,Rust,"use anyhow::{Context, Result, bail}; +use app_state::StateFileStatus; +use clap::Parser; +use std::{ + env, + io::{self, IsTerminal, Write}, + path::Path, + process::ExitCode, +}; +use term::{clear_terminal, press_enter_prompt}; + +use crate::{ + app_state::AppState, + cli::{Args, Command}, + editor::Editor, + info_file::InfoFile, +}; + +mod app_state; +mod cargo_toml; +mod cli; +mod cmd; +mod dev; +mod editor; +mod embedded; +mod exercise; +mod info_file; +mod init; +mod list; +mod run; +mod term; +mo...[truncated]",rust-lang/rustlings,rust-lang,62478,11173,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:12.114899,582,6854,211 +github_rust-lang_rustlings_bee4119c2bf9cfaf4b0f92a818ba82f926642559,src/embedded.rs,embedded.rs,.rs,5142,Rust,"use anyhow::{Context, Error, Result}; +use std::{ + fs::{self, create_dir}, + io, +}; + +use crate::info_file::ExerciseInfo; + +/// Contains all embedded files. +pub static EMBEDDED_FILES: EmbeddedFiles = rustlings_macros::include_files!(); + +// Files related to one exercise. +struct ExerciseFiles { + // The content of the exercise file. + exercise: &'static [u8], + // The content of the solution file. + solution: &'static [u8], + // Index of the related `ExerciseDir` in `EmbeddedFiles::exe...[truncated]",rust-lang/rustlings,rust-lang,62478,11173,:crab: Small exercises to get you used to reading and writing Rust code!,['beginner-friendly' 'exercises' 'rust' 'rustlings'],MIT,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:09.824979,423,5142,170 +github_sharkdp_bat_3a5fa4571a256cca8d40fe1b1abf8ed73b7df292,src/wrapping.rs,wrapping.rs,,327,Rust,"#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum WrappingMode { + Character, + Word, + // The bool specifies whether wrapping has been explicitly disabled by the user via --wrap=never + NoWrapping(bool), +} + +impl Default for WrappingMode { + fn default() -> Self { + WrappingMode::NoWrapping(false) + } +} +...[truncated]",sharkdp/bat,sharkdp,58255,1524,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:16:59.754559,41,327,14 +github_sharkdp_bat_3acbb72f7b4275df1532b7a8e956dafa555b040f,src/vscreen.rs,vscreen.rs,,28949,Rust,"use std::{ + fmt::{Display, Formatter}, + iter::Peekable, + str::CharIndices, +}; + +// Wrapper to avoid unnecessary branching when input doesn't have ANSI escape sequences. +pub struct AnsiStyle { + attributes: Option, +} + +impl AnsiStyle { + pub fn new() -> Self { + AnsiStyle { attributes: None } + } + + pub fn update(&mut self, sequence: EscapeSequence) -> bool { + match &mut self.attributes { + Some(a) => a.update(sequence), + None => { + ...[truncated]",sharkdp/bat,sharkdp,58255,1524,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:16:58.993932,2348,28949,954 +github_sharkdp_bat_966bc2c09678e3fa7b547bf34130889df8b4338e,src/lessopen.rs,lessopen.rs,,13558,Rust,"use std::convert::TryFrom; +use std::env; +use std::fs::File; +use std::io::{BufRead, BufReader, Cursor, Read}; +use std::path::PathBuf; +use std::process::{ExitStatus, Stdio}; + +use clircle::{Clircle, Identifier}; +use execute::{shell, Execute}; + +use crate::error::Result; +use crate::{ + bat_warning, + input::{Input, InputKind, InputReader, OpenedInput, OpenedInputKind}, +}; + +/// Preprocess files and/or stdin using $LESSOPEN and $LESSCLOSE +pub(crate) struct LessOpenPreprocessor { + lessopen: Strin...[truncated]",sharkdp/bat,sharkdp,58255,1524,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:16:52.202243,1038,13558,388 +github_sharkdp_bat_df6a513df1df5007060512054cad582d0fff290f,src/less.rs,less.rs,,4013,Rust,"#![cfg(feature = ""paging"")] + +use std::ffi::OsStr; +use std::process::Command; + +#[derive(Debug, PartialEq, Eq)] +pub enum LessVersion { + Less(usize), + BusyBox, +} + +pub fn retrieve_less_version(less_path: &dyn AsRef) -> Option { + let resolved_path = grep_cli::resolve_binary(less_path.as_ref()).ok()?; + + let cmd = Command::new(resolved_path).arg(""--version"").output().ok()?; + if cmd.status.success() { + parse_less_version(&cmd.stdout) + } else { + parse_l...[truncated]",sharkdp/bat,sharkdp,58255,1524,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:16:51.903564,413,4013,132 +github_sharkdp_bat_30f13f981443fcb9fea48dddc33a5f5e94cdac08,src/input.rs,input.rs,,16331,Rust,"use std::convert::TryFrom; +use std::fs; +use std::fs::File; +use std::io::{self, BufRead, BufReader, Read}; +use std::path::{Path, PathBuf}; + +use clircle::{Clircle, Identifier}; +use content_inspector::{self, ContentType}; + +use crate::error::*; + +/// A description of an Input source. +/// This tells bat how to refer to the input. +#[derive(Clone)] +pub struct InputDescription { + pub(crate) name: String, + + /// The input title. + /// This replaces the name if provided. + title: Option, + +...[truncated]",sharkdp/bat,sharkdp,58255,1524,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:16:51.629714,1356,16331,569 +github_sharkdp_bat_93a009304af80fe27d33099a4d6037d3b386292b,src/error.rs,error.rs,,2273,Rust,"use std::io::Write; +use thiserror::Error; + +#[derive(Error, Debug)] +#[non_exhaustive] +pub enum Error { + #[error(transparent)] + Io(#[from] ::std::io::Error), + #[error(transparent)] + Fmt(#[from] ::std::fmt::Error), + #[error(transparent)] + SyntectError(#[from] ::syntect::Error), + #[error(transparent)] + SyntectLoadingError(#[from] ::syntect::LoadingError), + #[error(transparent)] + ParseIntError(#[from] ::std::num::ParseIntError), + #[error(transparent)] + GlobParsingE...[truncated]",sharkdp/bat,sharkdp,58255,1524,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:16:50.750627,176,2273,81 +github_sharkdp_bat_584a5cb61ab41c03a43ecde32e8c7c98da3ccd0c,src/syntax_mapping.rs,syntax_mapping.rs,,10787,Rust,"use std::{ + path::Path, + sync::{ + atomic::{AtomicBool, Ordering}, + Arc, + }, + thread, +}; + +use globset::{Candidate, GlobBuilder, GlobMatcher}; +use once_cell::sync::Lazy; + +use crate::error::Result; +use builtin::BUILTIN_MAPPINGS; +use ignored_suffixes::IgnoredSuffixes; + +mod builtin; +pub mod ignored_suffixes; + +/// Whether a glob pattern should be matched case-sensitively or case-insensitively. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub(crate) enum Case { + Sensitive, +...[truncated]",sharkdp/bat,sharkdp,58255,1524,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:16:56.855946,994,10787,316 +github_sharkdp_bat_9f8d7cb8d5f3f35a7704ab6e0d1b912f63767f89,src/nonprintable_notation.rs,nonprintable_notation.rs,,594,Rust,"/// How to print non-printable characters with +/// [crate::config::Config::show_nonprintable] +#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)] +#[non_exhaustive] +pub enum NonprintableNotation { + /// Use caret notation (^G, ^J, ^@, ..) + Caret, + + /// Use unicode notation (␇, ␊, ␀, ..) + #[default] + Unicode, +} + +/// How to treat binary content +#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)] +#[non_exhaustive] +pub enum BinaryBehavior { + /// Do not print any binary content + ...[truncated]",sharkdp/bat,sharkdp,58255,1524,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:16:53.943408,75,588,25 +github_sharkdp_bat_63b0531aa8689bfb6ccbb48157a2fa16a0ab2a6e,src/assets/assets_metadata.rs,assets_metadata.rs,,2846,Rust,"use std::fs::File; +use std::path::Path; +use std::time::SystemTime; + +use semver::Version; +use serde_derive::{Deserialize, Serialize}; + +use crate::error::*; + +#[derive(Debug, PartialEq, Eq, Default, Serialize, Deserialize)] +pub struct AssetsMetadata { + bat_version: Option, + creation_time: Option, +} + +const FILENAME: &str = ""metadata.yaml""; + +impl AssetsMetadata { + #[cfg(feature = ""build-assets"")] + pub(crate) fn new(current_version: &str) -> AssetsMetadata { + Ass...[truncated]",sharkdp/bat,sharkdp,58255,1524,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:16:47.623178,281,2846,83 +github_sharkdp_bat_f3f3f6900025542d8d1b749cc7416b9068bbc828,src/assets/lazy_theme_set.rs,lazy_theme_set.rs,,3171,Rust,"use super::*; + +use std::collections::BTreeMap; +use std::convert::TryFrom; + +use serde_derive::{Deserialize, Serialize}; + +use once_cell::unsync::OnceCell; + +use syntect::highlighting::{Theme, ThemeSet}; + +/// Same structure as a [`syntect::highlighting::ThemeSet`] but with themes +/// stored in raw serialized form, and deserialized on demand. +#[derive(Debug, Default, Serialize, Deserialize)] +pub struct LazyThemeSet { + /// This is a [`BTreeMap`] because that's what [`syntect::highlighting::ThemeSet...[truncated]",sharkdp/bat,sharkdp,58255,1524,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:16:48.279936,331,3171,104 +github_sharkdp_bat_6d9c8e59f11275002cece606917e5276408479b4,src/assets/build_assets.rs,build_assets.rs,,4724,Rust,"use std::convert::TryInto; +use std::path::Path; + +use syntect::highlighting::ThemeSet; +use syntect::parsing::{SyntaxSet, SyntaxSetBuilder}; + +use crate::assets::*; +use acknowledgements::build_acknowledgements; + +mod acknowledgements; + +pub fn build( + source_dir: &Path, + include_integrated_assets: bool, + include_acknowledgements: bool, + target_dir: &Path, + current_version: &str, +) -> Result<()> { + let theme_set = build_theme_set(source_dir, include_integrated_assets)?; + + let synt...[truncated]",sharkdp/bat,sharkdp,58255,1524,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:16:47.930942,363,4724,171 +github_sharkdp_bat_78d20c30ad45c360a8f2d8735bfffa5c670ef264,src/diff.rs,diff.rs,,2494,Rust,"#![cfg(feature = ""git"")] + +use std::collections::HashMap; +use std::fs; +use std::path::Path; + +use git2::{DiffOptions, IntoCString, Repository}; + +#[derive(Copy, Clone, Debug)] +pub enum LineChange { + Added, + RemovedAbove, + RemovedBelow, + Modified, +} + +pub type LineChanges = HashMap; + +pub fn get_git_diff(filename: &Path) -> Option { + let repo = Repository::discover(filename).ok()?; + + let repo_path_absolute = fs::canonicalize(repo.workdir()?).ok()?; + + ...[truncated]",sharkdp/bat,sharkdp,58255,1524,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:16:50.274496,214,2494,84 +github_sharkdp_bat_79d298c3da6b40f59f0700220431a223e444a255,src/syntax_mapping/builtin.rs,builtin.rs,,3317,Rust,"use std::env; + +use globset::GlobMatcher; +use once_cell::sync::Lazy; + +use crate::syntax_mapping::{make_glob_matcher, Case, MappingTarget}; + +// Static syntax mappings generated from /src/syntax_mapping/builtins/ by the +// build script (/build/syntax_mapping.rs). +include!(concat!( + env!(""OUT_DIR""), + ""/codegen_static_syntax_mappings.rs"" +)); + +// The defined matcher strings are analysed at compile time and converted into +// lazily-compiled `GlobMatcher`s. This is so that the string searches are ...[truncated]",sharkdp/bat,sharkdp,58255,1524,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:16:57.663433,450,3317,92 +github_sharkdp_bat_a6d38e8f060ff514c31678776a691e0224569408,src/syntax_mapping/ignored_suffixes.rs,ignored_suffixes.rs,,3265,Rust,"use std::ffi::OsStr; +use std::fmt::Debug; +use std::path::Path; + +use crate::error::*; + +#[derive(Debug, Clone)] +pub struct IgnoredSuffixes<'a> { + values: Vec<&'a str>, +} + +impl Default for IgnoredSuffixes<'_> { + fn default() -> Self { + Self { + values: vec![ + // Editor etc backups + ""~"", + "".bak"", + "".old"", + "".orig"", + // Debian and derivatives apt/dpkg/ucf backups + "".dpkg-dis...[truncated]",sharkdp/bat,sharkdp,58255,1524,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:16:57.956675,260,3265,110 +github_sharkdp_bat_46099e3249f7bf794b687890c0e44610d1b3a1ed,src/assets/serialized_syntax_set.rs,serialized_syntax_set.rs,,787,Rust,"use std::path::PathBuf; + +use syntect::parsing::SyntaxSet; + +use super::*; + +/// A SyntaxSet in serialized form, i.e. bincoded and flate2 compressed. +/// We keep it in this format since we want to load it lazily. +#[derive(Debug)] +pub enum SerializedSyntaxSet { + /// The data comes from a user-generated cache file. + FromFile(PathBuf), + + /// The data to use is embedded into the bat binary. + FromBinary(&'static [u8]), +} + +impl SerializedSyntaxSet { + pub fn deserialize(&self) -> Result>>, +} + +#[cfg(...[truncated]",sharkdp/bat,sharkdp,58255,1524,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:16:54.235693,775,8868,269 +github_sharkdp_bat_29247bd7d8145180ceffcb36036bd1ce74a9bd7d,src/assets.rs,assets.rs,,29067,Rust,"use std::ffi::OsStr; +use std::fs; +use std::path::Path; + +use once_cell::unsync::OnceCell; + +use syntect::highlighting::Theme; +use syntect::parsing::{SyntaxReference, SyntaxSet}; + +use path_abs::PathAbs; + +use crate::error::*; +use crate::input::{InputReader, OpenedInput}; +use crate::syntax_mapping::ignored_suffixes::IgnoredSuffixes; +use crate::syntax_mapping::MappingTarget; +use crate::theme::{default_theme, ColorScheme}; +use crate::{bat_warning, SyntaxMapping}; + +use lazy_theme_set::LazyThemeSet; + +use...[truncated]",sharkdp/bat,sharkdp,58255,1524,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:16:47.365733,2150,29067,818 +github_sharkdp_bat_e3b01b8ccc0a70c6e01243935669e9ab40c463f3,src/macros.rs,macros.rs,,196,Rust,"#[macro_export] +macro_rules! bat_warning { + ($($arg:tt)*) => ({ + use nu_ansi_term::Color::Yellow; + eprintln!(""{}: {}"", Yellow.paint(""[bat warning]""), format!($($arg)*)); + }) +} +...[truncated]",sharkdp/bat,sharkdp,58255,1524,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:16:53.643922,16,196,8 +github_sharkdp_bat_3d15c607458503a7746273560685a427ddde0f20,src/line_range.rs,line_range.rs,,25260,Rust,"use crate::error::*; +use itertools::{Itertools, MinMaxResult}; + +#[derive(Debug, Copy, Clone)] +pub struct LineRange { + lower: RangeBound, + upper: RangeBound, +} + +/// Defines a boundary for a range +#[derive(Debug, Copy, Clone, Eq, PartialEq)] +pub(crate) enum RangeBound { + // An absolute line number marking the boundary of a range + Absolute(usize), + // A relative (implicitly negative) offset from the end of the file as a boundary + OffsetFromEnd(usize), +} + +impl Default for LineRange...[truncated]",sharkdp/bat,sharkdp,58255,1524,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:16:52.847848,1823,25260,769 +github_sharkdp_bat_4c60f10ec7e1d413b7a06352d7413f227939f4b7,src/lib.rs,lib.rs,,1626,Rust,"//! `bat` is a library to print syntax highlighted content. +//! +//! The main struct of this crate is `PrettyPrinter` which can be used to +//! configure and run the syntax highlighting. +//! +//! If you need more control, you can also use the structs in the submodules +//! (start with `controller::Controller`), but note that the API of these +//! internal modules is much more likely to change. Some or all of these +//! modules might be removed in the future. +//! +//! ""Hello world"" example: +//! ``` +//! ...[truncated]",sharkdp/bat,sharkdp,58255,1524,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:16:52.491861,212,1626,64 +github_sharkdp_bat_16525823ab638b0c810f10a2af66292454dc234d,src/theme.rs,theme.rs,,19481,Rust,"//! Utilities for choosing an appropriate theme for syntax highlighting. + +use std::convert::Infallible; +use std::fmt; +use std::io::IsTerminal as _; +use std::str::FromStr; + +/// Environment variable names. +pub mod env { + /// See [`crate::theme::ThemeOptions::theme`]. + pub const BAT_THEME: &str = ""BAT_THEME""; + /// See [`crate::theme::ThemeOptions::theme_dark`]. + pub const BAT_THEME_DARK: &str = ""BAT_THEME_DARK""; + /// See [`crate::theme::ThemeOptions::theme_light`]. + pub const BAT_...[truncated]",sharkdp/bat,sharkdp,58255,1524,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:16:58.546560,1730,19481,571 +github_sharkdp_bat_28808e3e3084c0e2a95fe9b10da6f1fa8cac266f,src/terminal.rs,terminal.rs,,3073,Rust,"use nu_ansi_term::Color::{self, Fixed, Rgb}; +use nu_ansi_term::{self, Style}; + +use syntect::highlighting::{self, FontStyle}; + +pub fn to_ansi_color(color: highlighting::Color, true_color: bool) -> Option { + if color.a == 0 { + // Themes can specify one of the user-configurable terminal colors by + // encoding them as #RRGGBBAA with AA set to 00 (transparent) and RR set + // to the 8-bit color palette number. The built-in themes ansi, base16, + // an...[truncated]",sharkdp/bat,sharkdp,58255,1524,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:16:58.248992,342,3073,83 +github_sharkdp_bat_97720fb5c1d9a30fc63b6c6c9b967f6d5019abbc,src/config.rs,config.rs,,7088,Rust,"use crate::line_range::{HighlightedLineRanges, LineRanges}; +use crate::nonprintable_notation::{BinaryBehavior, NonprintableNotation}; +#[cfg(feature = ""paging"")] +use crate::paging::PagingMode; +use crate::style::StyleComponents; +use crate::syntax_mapping::SyntaxMapping; +use crate::wrapping::WrappingMode; +use crate::StripAnsiMode; + +#[derive(Debug, Clone)] +pub enum VisibleLines { + /// Show all lines which are included in the line ranges + Ranges(LineRanges), + + #[cfg(feature = ""git"")] + ///...[truncated]",sharkdp/bat,sharkdp,58255,1524,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:16:49.357378,692,7088,236 +github_sharkdp_bat_8f64e8c5821a611e6b19f6e101b5817b578c514b,src/controller.rs,controller.rs,,12312,Rust,"use crate::assets::HighlightingAssets; +use crate::config::{Config, VisibleLines}; +#[cfg(feature = ""git"")] +use crate::diff::{get_git_diff, LineChanges}; +use crate::error::*; +use crate::input::{Input, InputReader, OpenedInput}; +#[cfg(feature = ""lessopen"")] +use crate::lessopen::LessOpenPreprocessor; +#[cfg(feature = ""git"")] +use crate::line_range::LineRange; +use crate::line_range::{LineRanges, MaxBufferedLineNumber, RangeCheckResult}; +use crate::output::{OutputHandle, OutputType}; +#[cfg(feature = ""pa...[truncated]",sharkdp/bat,sharkdp,58255,1524,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:16:49.748502,972,12312,343 +github_sharkdp_bat_5b7846c30d7a640bfdbe1f36b09cb9c6b842235d,src/decorations.rs,decorations.rs,,4362,Rust,"#[cfg(feature = ""git"")] +use crate::diff::LineChange; +use crate::printer::{Colors, InteractivePrinter}; +use nu_ansi_term::Style; + +#[derive(Debug, Clone)] +pub(crate) struct DecorationText { + pub width: usize, + pub text: String, +} + +pub(crate) trait Decoration { + fn generate( + &self, + line_number: usize, + continuation: bool, + printer: &InteractivePrinter, + ) -> DecorationText; + fn width(&self) -> usize; +} + +pub(crate) struct LineNumberDecoration { + color:...[truncated]",sharkdp/bat,sharkdp,58255,1524,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:16:50.016932,343,4358,159 +github_sharkdp_bat_6b4e29352ee8d19b59197bf6cee88608845b69c4,src/preprocessor.rs,preprocessor.rs,,8682,Rust,"use std::fmt::Write; + +use crate::{ + nonprintable_notation::NonprintableNotation, + vscreen::{EscapeSequenceOffsets, EscapeSequenceOffsetsIterator}, +}; + +/// Expand tabs like an ANSI-enabled expand(1). +pub fn expand_tabs(line: &str, width: usize, cursor: &mut usize) -> String { + let mut buffer = String::with_capacity(line.len() * 2); + + for seq in EscapeSequenceOffsetsIterator::new(line) { + match seq { + EscapeSequenceOffsets::Text { .. } => { + let mut tex...[truncated]",sharkdp/bat,sharkdp,58255,1524,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:16:55.586697,716,8644,264 +github_sharkdp_bat_89a9854e756836518d6389f7b0b70f402a16c9ac,src/pretty_printer.rs,pretty_printer.rs,,12754,Rust,"use std::io::Read; +use std::path::Path; + +use console::Term; + +use crate::{ + assets::HighlightingAssets, + config::{Config, VisibleLines}, + controller::Controller, + error::Result, + input, + line_range::{HighlightedLineRanges, LineRange, LineRanges}, + output::OutputHandle, + style::StyleComponent, + StripAnsiMode, SyntaxMapping, WrappingMode, +}; + +#[cfg(feature = ""paging"")] +use crate::paging::PagingMode; + +#[derive(Default)] +struct ActiveStyleComponents { + header_filename: b...[truncated]",sharkdp/bat,sharkdp,58255,1524,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:16:55.896987,1414,12754,406 +github_sharkdp_bat_c58c914dc554118b79079d96dc301f3887dca6b9,src/printer.rs,printer.rs,,36278,Rust,"use std::vec::Vec; + +use nu_ansi_term::Color::{Fixed, Green, Red, Yellow}; +use nu_ansi_term::Style; + +use bytesize::ByteSize; + +use syntect::easy::HighlightLines; +use syntect::highlighting::Color; +use syntect::highlighting::FontStyle; +use syntect::highlighting::Theme; +use syntect::parsing::SyntaxSet; + +use content_inspector::ContentType; + +use encoding_rs::{UTF_16BE, UTF_16LE}; + +use unicode_segmentation::UnicodeSegmentation; +use unicode_width::UnicodeWidthChar; + +use crate::assets::{HighlightingAssets...[truncated]",sharkdp/bat,sharkdp,58255,1524,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:16:56.218801,2561,36254,988 +github_sharkdp_bat_d6343c94ba08233989e724ba998cc5b76b9afae1,src/style.rs,style.rs,,11438,Rust,"use std::collections::HashSet; +use std::str::FromStr; + +use crate::error::*; + +#[non_exhaustive] +#[derive(Debug, Eq, PartialEq, Copy, Clone, Hash)] +pub enum StyleComponent { + Auto, + #[cfg(feature = ""git"")] + Changes, + Grid, + Rule, + Header, + HeaderFilename, + HeaderFilesize, + LineNumbers, + Snip, + Full, + Default, + Plain, +} + +impl StyleComponent { + pub fn components(self, interactive_terminal: bool) -> &'static [StyleComponent] { + match self { + ...[truncated]",sharkdp/bat,sharkdp,58255,1524,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:16:56.575955,779,11438,365 +github_sharkdp_bat_c58c914dc554118b79079d96dc301f3887dca6b9,src/printer.rs,printer.rs,.rs,36278,Rust,"use std::vec::Vec; + +use nu_ansi_term::Color::{Fixed, Green, Red, Yellow}; +use nu_ansi_term::Style; + +use bytesize::ByteSize; + +use syntect::easy::HighlightLines; +use syntect::highlighting::Color; +use syntect::highlighting::FontStyle; +use syntect::highlighting::Theme; +use syntect::parsing::SyntaxSet; + +use content_inspector::ContentType; + +use encoding_rs::{UTF_16BE, UTF_16LE}; + +use unicode_segmentation::UnicodeSegmentation; +use unicode_width::UnicodeWidthChar; + +use crate::assets::{HighlightingAssets...[truncated]",sharkdp/bat,sharkdp,58128,1512,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:34.960338,2561,36254,988 +github_sharkdp_bat_3acbb72f7b4275df1532b7a8e956dafa555b040f,src/vscreen.rs,vscreen.rs,.rs,28949,Rust,"use std::{ + fmt::{Display, Formatter}, + iter::Peekable, + str::CharIndices, +}; + +// Wrapper to avoid unnecessary branching when input doesn't have ANSI escape sequences. +pub struct AnsiStyle { + attributes: Option, +} + +impl AnsiStyle { + pub fn new() -> Self { + AnsiStyle { attributes: None } + } + + pub fn update(&mut self, sequence: EscapeSequence) -> bool { + match &mut self.attributes { + Some(a) => a.update(sequence), + None => { + ...[truncated]",sharkdp/bat,sharkdp,58128,1512,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:37.222275,2348,28949,954 +github_sharkdp_bat_16525823ab638b0c810f10a2af66292454dc234d,src/theme.rs,theme.rs,.rs,19481,Rust,"//! Utilities for choosing an appropriate theme for syntax highlighting. + +use std::convert::Infallible; +use std::fmt; +use std::io::IsTerminal as _; +use std::str::FromStr; + +/// Environment variable names. +pub mod env { + /// See [`crate::theme::ThemeOptions::theme`]. + pub const BAT_THEME: &str = ""BAT_THEME""; + /// See [`crate::theme::ThemeOptions::theme_dark`]. + pub const BAT_THEME_DARK: &str = ""BAT_THEME_DARK""; + /// See [`crate::theme::ThemeOptions::theme_light`]. + pub const BAT_...[truncated]",sharkdp/bat,sharkdp,58128,1512,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:36.741718,1730,19481,571 +github_sharkdp_bat_28808e3e3084c0e2a95fe9b10da6f1fa8cac266f,src/terminal.rs,terminal.rs,.rs,3073,Rust,"use nu_ansi_term::Color::{self, Fixed, Rgb}; +use nu_ansi_term::{self, Style}; + +use syntect::highlighting::{self, FontStyle}; + +pub fn to_ansi_color(color: highlighting::Color, true_color: bool) -> Option { + if color.a == 0 { + // Themes can specify one of the user-configurable terminal colors by + // encoding them as #RRGGBBAA with AA set to 00 (transparent) and RR set + // to the 8-bit color palette number. The built-in themes ansi, base16, + // an...[truncated]",sharkdp/bat,sharkdp,58128,1512,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:36.406517,342,3073,83 +github_sharkdp_bat_d6343c94ba08233989e724ba998cc5b76b9afae1,src/style.rs,style.rs,.rs,11438,Rust,"use std::collections::HashSet; +use std::str::FromStr; + +use crate::error::*; + +#[non_exhaustive] +#[derive(Debug, Eq, PartialEq, Copy, Clone, Hash)] +pub enum StyleComponent { + Auto, + #[cfg(feature = ""git"")] + Changes, + Grid, + Rule, + Header, + HeaderFilename, + HeaderFilesize, + LineNumbers, + Snip, + Full, + Default, + Plain, +} + +impl StyleComponent { + pub fn components(self, interactive_terminal: bool) -> &'static [StyleComponent] { + match self { + ...[truncated]",sharkdp/bat,sharkdp,58128,1512,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:35.254017,779,11438,365 +github_sharkdp_bat_78d20c30ad45c360a8f2d8735bfffa5c670ef264,src/diff.rs,diff.rs,.rs,2494,Rust,"#![cfg(feature = ""git"")] + +use std::collections::HashMap; +use std::fs; +use std::path::Path; + +use git2::{DiffOptions, IntoCString, Repository}; + +#[derive(Copy, Clone, Debug)] +pub enum LineChange { + Added, + RemovedAbove, + RemovedBelow, + Modified, +} + +pub type LineChanges = HashMap; + +pub fn get_git_diff(filename: &Path) -> Option { + let repo = Repository::discover(filename).ok()?; + + let repo_path_absolute = fs::canonicalize(repo.workdir()?).ok()?; + + ...[truncated]",sharkdp/bat,sharkdp,58128,1512,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:28.836835,214,2494,84 +github_sharkdp_bat_966bc2c09678e3fa7b547bf34130889df8b4338e,src/lessopen.rs,lessopen.rs,.rs,13558,Rust,"use std::convert::TryFrom; +use std::env; +use std::fs::File; +use std::io::{BufRead, BufReader, Cursor, Read}; +use std::path::PathBuf; +use std::process::{ExitStatus, Stdio}; + +use clircle::{Clircle, Identifier}; +use execute::{shell, Execute}; + +use crate::error::Result; +use crate::{ + bat_warning, + input::{Input, InputKind, InputReader, OpenedInput, OpenedInputKind}, +}; + +/// Preprocess files and/or stdin using $LESSOPEN and $LESSCLOSE +pub(crate) struct LessOpenPreprocessor { + lessopen: Strin...[truncated]",sharkdp/bat,sharkdp,58128,1512,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:30.695081,1038,13558,388 +github_sharkdp_bat_5b7846c30d7a640bfdbe1f36b09cb9c6b842235d,src/decorations.rs,decorations.rs,.rs,4362,Rust,"#[cfg(feature = ""git"")] +use crate::diff::LineChange; +use crate::printer::{Colors, InteractivePrinter}; +use nu_ansi_term::Style; + +#[derive(Debug, Clone)] +pub(crate) struct DecorationText { + pub width: usize, + pub text: String, +} + +pub(crate) trait Decoration { + fn generate( + &self, + line_number: usize, + continuation: bool, + printer: &InteractivePrinter, + ) -> DecorationText; + fn width(&self) -> usize; +} + +pub(crate) struct LineNumberDecoration { + color:...[truncated]",sharkdp/bat,sharkdp,58128,1512,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:28.555148,343,4358,159 +github_sharkdp_bat_8f64e8c5821a611e6b19f6e101b5817b578c514b,src/controller.rs,controller.rs,.rs,12312,Rust,"use crate::assets::HighlightingAssets; +use crate::config::{Config, VisibleLines}; +#[cfg(feature = ""git"")] +use crate::diff::{get_git_diff, LineChanges}; +use crate::error::*; +use crate::input::{Input, InputReader, OpenedInput}; +#[cfg(feature = ""lessopen"")] +use crate::lessopen::LessOpenPreprocessor; +#[cfg(feature = ""git"")] +use crate::line_range::LineRange; +use crate::line_range::{LineRanges, MaxBufferedLineNumber, RangeCheckResult}; +use crate::output::{OutputHandle, OutputType}; +#[cfg(feature = ""pa...[truncated]",sharkdp/bat,sharkdp,58128,1512,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:28.291166,972,12312,343 +github_sharkdp_bat_97720fb5c1d9a30fc63b6c6c9b967f6d5019abbc,src/config.rs,config.rs,.rs,7088,Rust,"use crate::line_range::{HighlightedLineRanges, LineRanges}; +use crate::nonprintable_notation::{BinaryBehavior, NonprintableNotation}; +#[cfg(feature = ""paging"")] +use crate::paging::PagingMode; +use crate::style::StyleComponents; +use crate::syntax_mapping::SyntaxMapping; +use crate::wrapping::WrappingMode; +use crate::StripAnsiMode; + +#[derive(Debug, Clone)] +pub enum VisibleLines { + /// Show all lines which are included in the line ranges + Ranges(LineRanges), + + #[cfg(feature = ""git"")] + ///...[truncated]",sharkdp/bat,sharkdp,58128,1512,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:27.958524,692,7088,236 +github_sharkdp_bat_df6a513df1df5007060512054cad582d0fff290f,src/less.rs,less.rs,.rs,4013,Rust,"#![cfg(feature = ""paging"")] + +use std::ffi::OsStr; +use std::process::Command; + +#[derive(Debug, PartialEq, Eq)] +pub enum LessVersion { + Less(usize), + BusyBox, +} + +pub fn retrieve_less_version(less_path: &dyn AsRef) -> Option { + let resolved_path = grep_cli::resolve_binary(less_path.as_ref()).ok()?; + + let cmd = Command::new(resolved_path).arg(""--version"").output().ok()?; + if cmd.status.success() { + parse_less_version(&cmd.stdout) + } else { + parse_l...[truncated]",sharkdp/bat,sharkdp,58128,1512,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:30.297605,413,4013,132 +github_sharkdp_bat_30f13f981443fcb9fea48dddc33a5f5e94cdac08,src/input.rs,input.rs,.rs,16331,Rust,"use std::convert::TryFrom; +use std::fs; +use std::fs::File; +use std::io::{self, BufRead, BufReader, Read}; +use std::path::{Path, PathBuf}; + +use clircle::{Clircle, Identifier}; +use content_inspector::{self, ContentType}; + +use crate::error::*; + +/// A description of an Input source. +/// This tells bat how to refer to the input. +#[derive(Clone)] +pub struct InputDescription { + pub(crate) name: String, + + /// The input title. + /// This replaces the name if provided. + title: Option, + +...[truncated]",sharkdp/bat,sharkdp,58128,1512,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:29.984525,1356,16331,569 +github_sharkdp_bat_6b4e29352ee8d19b59197bf6cee88608845b69c4,src/preprocessor.rs,preprocessor.rs,.rs,8682,Rust,"use std::fmt::Write; + +use crate::{ + nonprintable_notation::NonprintableNotation, + vscreen::{EscapeSequenceOffsets, EscapeSequenceOffsetsIterator}, +}; + +/// Expand tabs like an ANSI-enabled expand(1). +pub fn expand_tabs(line: &str, width: usize, cursor: &mut usize) -> String { + let mut buffer = String::with_capacity(line.len() * 2); + + for seq in EscapeSequenceOffsetsIterator::new(line) { + match seq { + EscapeSequenceOffsets::Text { .. } => { + let mut tex...[truncated]",sharkdp/bat,sharkdp,58128,1512,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:34.173687,716,8644,264 +github_sharkdp_bat_584a5cb61ab41c03a43ecde32e8c7c98da3ccd0c,src/syntax_mapping.rs,syntax_mapping.rs,.rs,10787,Rust,"use std::{ + path::Path, + sync::{ + atomic::{AtomicBool, Ordering}, + Arc, + }, + thread, +}; + +use globset::{Candidate, GlobBuilder, GlobMatcher}; +use once_cell::sync::Lazy; + +use crate::error::Result; +use builtin::BUILTIN_MAPPINGS; +use ignored_suffixes::IgnoredSuffixes; + +mod builtin; +pub mod ignored_suffixes; + +/// Whether a glob pattern should be matched case-sensitively or case-insensitively. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub(crate) enum Case { + Sensitive, +...[truncated]",sharkdp/bat,sharkdp,58128,1512,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:36.070548,994,10787,316 +github_sharkdp_bat_93a009304af80fe27d33099a4d6037d3b386292b,src/error.rs,error.rs,.rs,2273,Rust,"use std::io::Write; +use thiserror::Error; + +#[derive(Error, Debug)] +#[non_exhaustive] +pub enum Error { + #[error(transparent)] + Io(#[from] ::std::io::Error), + #[error(transparent)] + Fmt(#[from] ::std::fmt::Error), + #[error(transparent)] + SyntectError(#[from] ::syntect::Error), + #[error(transparent)] + SyntectLoadingError(#[from] ::syntect::LoadingError), + #[error(transparent)] + ParseIntError(#[from] ::std::num::ParseIntError), + #[error(transparent)] + GlobParsingE...[truncated]",sharkdp/bat,sharkdp,58128,1512,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:29.603802,176,2273,81 +github_sharkdp_bat_3a5fa4571a256cca8d40fe1b1abf8ed73b7df292,src/wrapping.rs,wrapping.rs,.rs,327,Rust,"#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum WrappingMode { + Character, + Word, + // The bool specifies whether wrapping has been explicitly disabled by the user via --wrap=never + NoWrapping(bool), +} + +impl Default for WrappingMode { + fn default() -> Self { + WrappingMode::NoWrapping(false) + } +} +...[truncated]",sharkdp/bat,sharkdp,58128,1512,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:37.487985,41,327,14 +github_sharkdp_bat_29247bd7d8145180ceffcb36036bd1ce74a9bd7d,src/assets.rs,assets.rs,.rs,29067,Rust,"use std::ffi::OsStr; +use std::fs; +use std::path::Path; + +use once_cell::unsync::OnceCell; + +use syntect::highlighting::Theme; +use syntect::parsing::{SyntaxReference, SyntaxSet}; + +use path_abs::PathAbs; + +use crate::error::*; +use crate::input::{InputReader, OpenedInput}; +use crate::syntax_mapping::ignored_suffixes::IgnoredSuffixes; +use crate::syntax_mapping::MappingTarget; +use crate::theme::{default_theme, ColorScheme}; +use crate::{bat_warning, SyntaxMapping}; + +use lazy_theme_set::LazyThemeSet; + +use...[truncated]",sharkdp/bat,sharkdp,58128,1512,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:27.651809,2150,29067,818 +github_sharkdp_bat_e3b01b8ccc0a70c6e01243935669e9ab40c463f3,src/macros.rs,macros.rs,.rs,196,Rust,"#[macro_export] +macro_rules! bat_warning { + ($($arg:tt)*) => ({ + use nu_ansi_term::Color::Yellow; + eprintln!(""{}: {}"", Yellow.paint(""[bat warning]""), format!($($arg)*)); + }) +} +...[truncated]",sharkdp/bat,sharkdp,58128,1512,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:32.089072,16,196,8 +github_sharkdp_bat_3d15c607458503a7746273560685a427ddde0f20,src/line_range.rs,line_range.rs,.rs,25260,Rust,"use crate::error::*; +use itertools::{Itertools, MinMaxResult}; + +#[derive(Debug, Copy, Clone)] +pub struct LineRange { + lower: RangeBound, + upper: RangeBound, +} + +/// Defines a boundary for a range +#[derive(Debug, Copy, Clone, Eq, PartialEq)] +pub(crate) enum RangeBound { + // An absolute line number marking the boundary of a range + Absolute(usize), + // A relative (implicitly negative) offset from the end of the file as a boundary + OffsetFromEnd(usize), +} + +impl Default for LineRange...[truncated]",sharkdp/bat,sharkdp,58128,1512,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:31.770559,1823,25260,769 +github_sharkdp_bat_3017066c0b192f72fa1ee178d7a607dcca19459e,src/pager.rs,pager.rs,.rs,3971,Rust,"use shell_words::ParseError; +use std::env; + +/// If we use a pager, this enum tells us from where we were told to use it. +#[derive(Debug, PartialEq)] +pub(crate) enum PagerSource { + /// From --config + Config, + + /// From the env var BAT_PAGER + EnvVarBatPager, + + /// From the env var PAGER + EnvVarPager, + + /// No pager was specified, default is used + Default, +} + +/// We know about some pagers, for example 'less'. This is a list of all pagers we know about +#[derive(Debug, Partial...[truncated]",sharkdp/bat,sharkdp,58128,1512,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:33.001082,455,3971,139 +github_sharkdp_bat_7f78910bf285e7d887502b0a5c73076792cf1e6d,src/paging.rs,paging.rs,.rs,137,Rust,"#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)] +pub enum PagingMode { + Always, + QuitIfOneScreen, + #[default] + Never, +} +...[truncated]",sharkdp/bat,sharkdp,58128,1512,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:33.831843,15,137,8 +github_sharkdp_bat_89a9854e756836518d6389f7b0b70f402a16c9ac,src/pretty_printer.rs,pretty_printer.rs,.rs,12754,Rust,"use std::io::Read; +use std::path::Path; + +use console::Term; + +use crate::{ + assets::HighlightingAssets, + config::{Config, VisibleLines}, + controller::Controller, + error::Result, + input, + line_range::{HighlightedLineRanges, LineRange, LineRanges}, + output::OutputHandle, + style::StyleComponent, + StripAnsiMode, SyntaxMapping, WrappingMode, +}; + +#[cfg(feature = ""paging"")] +use crate::paging::PagingMode; + +#[derive(Default)] +struct ActiveStyleComponents { + header_filename: b...[truncated]",sharkdp/bat,sharkdp,58128,1512,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:34.489426,1414,12754,406 +github_sharkdp_bat_4c60f10ec7e1d413b7a06352d7413f227939f4b7,src/lib.rs,lib.rs,.rs,1626,Rust,"//! `bat` is a library to print syntax highlighted content. +//! +//! The main struct of this crate is `PrettyPrinter` which can be used to +//! configure and run the syntax highlighting. +//! +//! If you need more control, you can also use the structs in the submodules +//! (start with `controller::Controller`), but note that the API of these +//! internal modules is much more likely to change. Some or all of these +//! modules might be removed in the future. +//! +//! ""Hello world"" example: +//! ``` +//! ...[truncated]",sharkdp/bat,sharkdp,58128,1512,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:30.973378,212,1626,64 +github_sharkdp_bat_8054be46b6c7d30bf94d3558b2dceb7f6986d8a2,src/output.rs,output.rs,.rs,8868,Rust,"use std::fmt; +use std::io; +#[cfg(feature = ""paging"")] +use std::process::Child; +#[cfg(feature = ""paging"")] +use std::thread::{spawn, JoinHandle}; + +use crate::error::*; +#[cfg(feature = ""paging"")] +use crate::less::{retrieve_less_version, LessVersion}; +#[cfg(feature = ""paging"")] +use crate::paging::PagingMode; +#[cfg(feature = ""paging"")] +use crate::wrapping::WrappingMode; + +#[cfg(feature = ""paging"")] +pub struct BuiltinPager { + pager: minus::Pager, + handle: Option>>, +} + +#[cfg(...[truncated]",sharkdp/bat,sharkdp,58128,1512,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:32.715575,775,8868,269 +github_sharkdp_bat_9f8d7cb8d5f3f35a7704ab6e0d1b912f63767f89,src/nonprintable_notation.rs,nonprintable_notation.rs,.rs,594,Rust,"/// How to print non-printable characters with +/// [crate::config::Config::show_nonprintable] +#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)] +#[non_exhaustive] +pub enum NonprintableNotation { + /// Use caret notation (^G, ^J, ^@, ..) + Caret, + + /// Use unicode notation (␇, ␊, ␀, ..) + #[default] + Unicode, +} + +/// How to treat binary content +#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)] +#[non_exhaustive] +pub enum BinaryBehavior { + /// Do not print any binary content + ...[truncated]",sharkdp/bat,sharkdp,58128,1512,A cat(1) clone with wings.,"['cli' 'command-line' 'git' 'hacktoberfest' 'rust' 'syntax-highlighting' + 'terminal' 'tool']",Apache-2.0,,,,,0.95,GitHub Public Repositories,2026-04-13T14:05:32.383965,75,588,25 +github_starship_starship_8c6c401865bd558efc7aa0d7c0357b1ce8ca27f2,src/configs/netns.rs,netns.rs,,586,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct NetnsConfig<'a> { + pub format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, +} + +impl Default for NetnsConfig<'_> { + fn default() -> Self { + Self { + format: ""[$symbol \\[$name\\]]($style) "", + symbol: ""🛜"", + ...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:52.283272,61,583,27 +github_starship_starship_68e39f3fa92e09ec7bc22ca50c326ed1473239a6,src/configs/nats.rs,nats.rs,,576,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct NatsConfig<'a> { + pub format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, +} + +impl Default for NatsConfig<'_> { + fn default() -> Self { + Self { + format: ""[$symbol($name )]($style)"", + symbol: ""✉️ "", + ...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:51.980083,60,572,27 +github_starship_starship_089d8b6ece4d99997ee9a36a6b4e412bb1c30ad1,src/configs/mojo.rs,mojo.rs,,901,Rust,"use nu_ansi_term::Color; +use serde::{Deserialize, Serialize}; + +pub const MOJO_DEFAULT_COLOR: Color = Color::Fixed(208); + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct MojoConfig<'a> { + pub format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + ...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:51.702264,88,895,36 +github_starship_starship_5a989fe2adca6d343bf2da2e1ed90e321475ea7f,src/configs/mod.rs,mod.rs,,8926,Rust,"use indexmap::IndexMap; +use serde::{self, Deserialize, Serialize}; + +pub mod aws; +pub mod azure; +pub mod battery; +pub mod buf; +pub mod bun; +pub mod c; +pub mod cc; +pub mod character; +pub mod claude_context; +pub mod claude_cost; +pub mod claude_model; +pub mod cmake; +pub mod cmd_duration; +pub mod cobol; +pub mod conda; +pub mod container; +pub mod cpp; +pub mod crystal; +pub mod custom; +pub mod daml; +pub mod dart; +pub mod deno; +pub mod directory; +pub mod direnv; +pub mod docker_context; +pub mod dotnet; +pub...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:51.423585,714,8926,358 +github_starship_starship_5c5b34544197228f139ffab9801b1d53635f6741,src/configs/mise.rs,mise.rs,,1101,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct MiseConfig<'a> { + pub format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_folders: Vec<&'a str>, + pub healthy_symbol: &'a str, + pub unhealt...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:51.027025,96,1101,42 +github_starship_starship_ace054b7a2da4c83ab096c81b2f6becaf02a3d01,src/configs/perl.rs,perl.rs,,1119,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct PerlConfig<'a> { + pub format: &'a str, + pub version_format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_folders: Vec<&'a str>, +} + +impl Default...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:56.244028,95,1116,43 +github_starship_starship_7cce347223ea2f9e06e5c324dec26bb4db8cfc55,src/configs/package.rs,package.rs,,721,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct PackageConfig<'a> { + pub format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub display_private: bool, + pub disabled: bool, + pub version_format: &'a str, +} + +impl Default for PackageConfig<'_> { + fn default() -> Self { + Self { + fo...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:55.938775,72,718,31 +github_starship_starship_30c44d55440181c68e5ed4b7ca576878cfaeb5b8,src/configs/conda.rs,conda.rs,,811,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct CondaConfig<'a> { + pub truncation_length: usize, + pub format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub ignore_base: bool, + pub detect_env_vars: Vec<&'a str>, + pub disabled: bool, +} + +impl Default for CondaConfig<'_> { + fn default() -> Self...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:31.739451,77,808,33 +github_starship_starship_1bd7b7f1ef29ec9dd113df3c3cd1f2ba0644b5ae,src/configs/erlang.rs,erlang.rs,,905,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct ErlangConfig<'a> { + pub format: &'a str, + pub version_format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_folders: Vec<&'a str>, +} + +impl Defau...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:37.524660,86,903,35 +github_starship_starship_b608c2db930d853ec1b9ef5d4011ebd5810ba17b,src/configs/env_var.rs,env_var.rs,,895,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct EnvVarConfig<'a> { + pub symbol: &'a str, + pub style: &'a str, + #[serde(skip_serializing_if = ""Option::is_none"")] + pub variable: Option<&'a str>, + #[serde(skip_serializing_if = ""Option::is_none"")] + pub default: Option<&'a str>, + pub format: &'a str, + pub ...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:37.269711,86,895,35 +github_starship_starship_ff15c94e2733a3901b13cf455056f8bfc3cee1bf,src/configs/elm.rs,elm.rs,,936,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct ElmConfig<'a> { + pub format: &'a str, + pub version_format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_folders: Vec<&'a str>, +} + +impl Default ...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:36.963411,87,933,35 +github_starship_starship_3601efdeeecc96b06601f621e4149499dfea3cb4,src/configs/claude_model.rs,claude_model.rs,,704,Rust,"use indexmap::IndexMap; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct ClaudeModelConfig<'a> { + pub format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub model_aliases: IndexMap, + pub disabled: bool, +} + +impl Default for ClaudeModelConfig<'_> { + fn default() -> Self { + Sel...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:30.054847,69,701,30 +github_starship_starship_79f67db10bef95eb8d174424321f2ffdff8d85e9,src/configs/claude_cost.rs,claude_cost.rs,,1218,Rust,"use serde::{Deserialize, Serialize}; + +use crate::configs::claude_context::ClaudeDisplayConfig; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct ClaudeCostConfig<'a> { + pub format: &'a str, + pub symbol: &'a str, + #[serde(borrow)] + pub display: Vec>, + pub disabled: bool, +} + +impl Default for ClaudeCostConfig<'_> { + fn defau...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:29.745988,88,1215,46 +github_starship_starship_b6080f305e0dd3edcf8d31c2f833d098d027db83,src/configs/claude_context.rs,claude_context.rs,,2092,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct ClaudeContextConfig<'a> { + pub format: &'a str, + pub symbol: &'a str, + pub gauge_width: u8, + pub gauge_full_symbol: &'a str, + pub gauge_partial_symbol: &'a str, + pub gauge_empty_symbol: &'a str, + #[serde(borrow)] + pub display: Vec...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:29.430793,166,2086,80 +github_starship_starship_228b2ce10569b7d0727023cf5c90090b2c0dffff,src/configs/character.rs,character.rs,,1028,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct CharacterConfig<'a> { + pub format: &'a str, + pub success_symbol: &'a str, + pub error_symbol: &'a str, + #[serde(alias = ""vicmd_symbol"")] + pub vimcmd_symbol: &'a str, + pub vimcmd_visual_symbol: &'a str, + pub vimcmd_replace_symbol: &'a str, + pub vimcmd_repl...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:29.120502,91,1016,36 +github_starship_starship_0a070d38e67a6cf87c2ce6130b22401457e8cadf,src/configs/battery.rs,battery.rs,,1537,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct BatteryConfig<'a> { + pub full_symbol: &'a str, + pub charging_symbol: &'a str, + pub discharging_symbol: &'a str, + pub unknown_symbol: &'a str, + pub empty_symbol: &'a str, + #[serde(borrow)] + pub display: Vec>, + pub disabled: bool, +...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:27.094529,142,1522,61 +github_starship_starship_1a0d3cc02b1c1ad1408f788bd1b85c016371413a,src/configs/php.rs,php.rs,,909,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct PhpConfig<'a> { + pub format: &'a str, + pub version_format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_folders: Vec<&'a str>, +} + +impl Default ...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:57.054074,86,906,35 +github_starship_starship_8ec3777b678c6052ee3b592c3f59a14b09c0b153,src/configs/fill.rs,fill.rs,,496,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct FillConfig<'a> { + pub style: &'a str, + pub symbol: &'a str, + pub disabled: bool, +} + +impl Default for FillConfig<'_> { + fn default() -> Self { + Self { + style: ""bold black"", + symbol: ""."", + disabled: false, + } + } +} +...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:38.162271,52,496,25 +github_starship_starship_5c6028fe814294e6c942c9752538e81b1f3e259c,src/configs/haxe.rs,haxe.rs,,959,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct HaxeConfig<'a> { + pub format: &'a str, + pub version_format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_folders: Vec<&'a str>, +} + +impl Default...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:44.304161,89,957,35 +github_starship_starship_bfcc6d5fb93a34768b147b3d071a148ff84f9dc0,src/configs/meson.rs,meson.rs,,726,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct MesonConfig<'a> { + pub truncation_length: u32, + pub truncation_symbol: &'a str, + pub format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, +} + +impl Default for MesonConfig<'_> { + fn default() -> Self { + Self { + tr...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:50.242495,72,722,31 +github_starship_starship_d468bdb6905f81ccfb154b5a6ea2f3f4ae010dbc,src/configs/memory_usage.rs,memory_usage.rs,,646,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct MemoryConfig<'a> { + pub threshold: i64, + pub format: &'a str, + pub style: &'a str, + pub symbol: &'a str, + pub disabled: bool, +} + +impl Default for MemoryConfig<'_> { + fn default() -> Self { + Self { + threshold: 75, + format: ""via $sym...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:49.941759,69,643,29 +github_starship_starship_73975bea5a9174499e02a3a2f83bade9f5e2a0d2,src/configs/maven.rs,maven.rs,,955,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct MavenConfig<'a> { + pub format: &'a str, + pub version_format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + pub recursive: bool, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_folders: Vec...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:49.637368,90,952,37 +github_starship_starship_dbf97beb55e56e54e64d8fc68ca891c9b0e4023c,src/configs/go.rs,go.rs,,1175,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct GoConfig<'a> { + pub format: &'a str, + pub version_format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + pub not_capable_style: &'a str, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_fold...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:43.084405,100,1172,45 +github_starship_starship_72ffd87ce348924e0315cc680f4b6364affb96a1,src/configs/gleam.rs,gleam.rs,,899,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct GleamConfig<'a> { + pub format: &'a str, + pub version_format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_folders: Vec<&'a str>, +} + +impl Defaul...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:42.288534,85,897,35 +github_starship_starship_daf25e09b86f387e20cba5b700e02cc5d226bde4,src/configs/purescript.rs,purescript.rs,,935,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct PureScriptConfig<'a> { + pub format: &'a str, + pub version_format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_folders: Vec<&'a str>, +} + +impl D...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:58.239930,87,935,35 +github_starship_starship_fa6ea9ffa35d7e5afb17b40e1cc0273e06f31e34,src/configs/pulumi.rs,pulumi.rs,,724,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct PulumiConfig<'a> { + pub format: &'a str, + pub version_format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + pub search_upwards: bool, +} + +impl Default for PulumiConfig<'_> { + fn default() -> Self { + Self { + forma...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:57.968347,72,722,31 +github_starship_starship_876e4d5aa7cf210bf58827d9c99b440e1b868f7d,src/configs/pixi.rs,pixi.rs,,1117,Rust,"use serde::{Deserialize, Serialize}; + +use crate::config::VecOr; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct PixiConfig<'a> { + pub pixi_binary: VecOr<&'a str>, + pub show_default_environment: bool, + pub format: &'a str, + pub version_format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + pub detect_extensions:...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:57.664330,100,1114,41 +github_starship_starship_ab8c775f16e3b76244635b2e37535f367efe33c6,src/configs/cc.rs,cc.rs,,679,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Serialize, Deserialize, Clone)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields), + schemars(bound = ""CcConfig<'a, T>: std::default::Default, T: schemars::JsonSchema"") +)] +#[serde(default)] +pub struct CcConfig<'a, T> { + #[serde(skip)] + pub marker: std::marker::PhantomData, + + pub format: &'a str, + pub version_format: &'a str, + pub style: &'a str, + pub symbol: &'a str,...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:28.319696,66,679,25 +github_starship_starship_196b0d5f441406b7669fd22d1b018628b15bdb2a,src/configs/raku.rs,raku.rs,,942,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct RakuConfig<'a> { + pub format: &'a str, + pub version_format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_folders: Vec<&'a str>, +} + +impl Default...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:59.661416,89,939,35 +github_starship_starship_bdd918d5e8b323f911c2eb1b4fddef3e06d02dee,src/configs/python.rs,python.rs,,1723,Rust,"use crate::config::VecOr; + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct PythonConfig<'a> { + pub pyenv_version_name: bool, + pub pyenv_prefix: &'a str, + pub python_binary: VecOr>, + pub format: &'a str, + pub version_format: &'a str, + pub style: &'a str, + pub symbol: &'a str, + pub disabl...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:59.051783,131,1720,59 +github_starship_starship_2c37639bed82177c2fee68bf94367a06a3515404,src/configs/kotlin.rs,kotlin.rs,,960,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct KotlinConfig<'a> { + pub format: &'a str, + pub version_format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub kotlin_binary: &'a str, + pub disabled: bool, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_fold...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:47.672411,92,957,37 +github_starship_starship_dce5ebe4cad8149e3c280c015491a129fa76de0d,src/configs/nodejs.rs,nodejs.rs,,1206,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct NodejsConfig<'a> { + pub format: &'a str, + pub version_format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + pub not_capable_style: &'a str, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:53.670514,104,1204,44 +github_starship_starship_d361f18ef0bb2f690fa0b70f6546eb145ab7d4be,src/configs/nix_shell.rs,nix_shell.rs,,1068,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct NixShellConfig<'a> { + pub format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub impure_msg: &'a str, + pub pure_msg: &'a str, + pub unknown_msg: &'a str, + pub disabled: bool, + pub heuristic: bool, +} + +/* The trailing double spaces in `symbol` are...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:53.373296,127,1064,38 +github_starship_starship_fd009892a106c9a74254d42bf4f250eb6c33a894,src/configs/nim.rs,nim.rs,,908,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct NimConfig<'a> { + pub format: &'a str, + pub version_format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_folders: Vec<&'a str>, +} + +impl Default ...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:53.089459,87,905,35 +github_starship_starship_d11a7e73b03991d0befdcd191183b0983536045b,src/configs/hostname.rs,hostname.rs,,892,Rust,"use indexmap::IndexMap; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct HostnameConfig<'a> { + pub ssh_only: bool, + pub ssh_symbol: &'a str, + pub trim_at: &'a str, + pub detect_env_vars: Vec<&'a str>, + pub format: &'a str, + pub style: &'a str, + pub disabled: bool, + pub aliases: IndexMap...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:46.006699,88,889,36 +github_starship_starship_0bc126622c72eb05914a4b553bf91a187f22b416,src/configs/hg_state.rs,hg_state.rs,,1005,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct HgStateConfig<'a> { + pub merge: &'a str, + pub rebase: &'a str, + pub update: &'a str, + pub bisect: &'a str, + pub shelve: &'a str, + pub graft: &'a str, + pub transplant: &'a str, + pub histedit: &'a str, + pub style: &'a str, + pub format: &'a str, + p...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:45.723513,101,1005,41 +github_starship_starship_fefdd50a78ea6bb3cef814ab8bac18d7a47140c1,src/configs/hg_branch.rs,hg_branch.rs,,740,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct HgBranchConfig<'a> { + pub symbol: &'a str, + pub style: &'a str, + pub format: &'a str, + pub truncation_length: i64, + pub truncation_symbol: &'a str, + pub disabled: bool, +} + +impl Default for HgBranchConfig<'_> { + fn default() -> Self { + Self { + ...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:45.402862,72,736,31 +github_starship_starship_0e6ff2baeef981608578e78a3e24c68776e4de5c,src/configs/helm.rs,helm.rs,,905,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct HelmConfig<'a> { + pub format: &'a str, + pub version_format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_folders: Vec<&'a str>, +} + +impl Default...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:45.098484,86,903,35 +github_starship_starship_bf4185f39be62e5674bce13dab86d8209c49b8f2,src/configs/red.rs,red.rs,,886,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct RedConfig<'a> { + pub format: &'a str, + pub version_format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_folders: Vec<&'a str>, +} + +impl Default ...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:59.950039,86,883,35 +github_starship_starship_b187ae13f8d719c443f0a6fcd95d855e97cc20b7,src/configs/directory.rs,directory.rs,,2224,Rust,"use crate::config::Either; +use indexmap::IndexMap; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +pub struct SubstitutionConfig<'a> { + pub from: String, + pub to: &'a str, + #[serde(default)] + pub regex: bool, +} + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:35.042160,180,2221,75 +github_starship_starship_0c4dc480e66ef4090f07c34a1c7391459e6ce9fc,src/configs/git_commit.rs,git_commit.rs,,941,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct GitCommitConfig<'a> { + pub commit_hash_length: usize, + pub format: &'a str, + pub style: &'a str, + pub only_detached: bool, + pub disabled: bool, + pub tag_symbol: &'a str, + pub tag_disabled: bool, + pub tag_max_candidates: usize, +} + +impl Default for GitComm...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:41.084648,94,938,36 +github_starship_starship_995f5f7f75173e8c58c6f189e5a1194895ece347,src/configs/git_branch.rs,git_branch.rs,,1032,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct GitBranchConfig<'a> { + pub format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub truncation_length: i64, + pub truncation_symbol: &'a str, + pub only_attached: bool, + pub always_show_remote: bool, + pub ignore_branches: Vec<&'a str>, + pub igno...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:40.315450,93,1028,39 +github_starship_starship_d465afcedbf19f585840a191fae1e92565a0c580,src/configs/gcloud.rs,gcloud.rs,,906,Rust,"use serde::{Deserialize, Serialize}; +use std::collections::HashMap; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct GcloudConfig<'a> { + pub format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + pub region_aliases: HashMap, + pub project_aliases: HashMap, + pub detect_env_vars: Vec<...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:40.010323,83,902,34 +github_starship_starship_7f59fc2c5890d0c63a7d1708b4d58cc757e62598,src/configs/fennel.rs,fennel.rs,,977,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct FennelConfig<'a> { + pub format: &'a str, + pub version_format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + #[serde(alias = ""detect_extentions"")] // TODO: remove it after breaking change releases + pub detect_extensions: Vec<&'a s...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:37.844630,96,974,36 +github_starship_starship_05251557a8f3c0b7d2f7e2ac61b79907685b6250,src/configs/haskell.rs,haskell.rs,,935,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct HaskellConfig<'a> { + pub format: &'a str, + pub version_format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_folders: Vec<&'a str>, +} + +impl Defa...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:44.020456,88,934,35 +github_starship_starship_0ed4e06d75faea550b17c4d0350758fff6e73b5d,src/configs/guix_shell.rs,guix_shell.rs,,582,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct GuixShellConfig<'a> { + pub format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, +} + +impl Default for GuixShellConfig<'_> { + fn default() -> Self { + Self { + format: ""via [$symbol]($style) "", + symbol: ""🐃 "", + ...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:43.682239,61,579,27 +github_starship_starship_b31c7ac687e9a33633461bd9589d0023fe7226d2,src/configs/gradle.rs,gradle.rs,,972,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct GradleConfig<'a> { + pub format: &'a str, + pub version_format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + pub recursive: bool, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_folders: Ve...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:43.397089,91,969,37 +github_starship_starship_090ed7fed2341501d357042f0ba26783a308aceb,src/configs/shell.rs,shell.rs,,1404,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct ShellConfig<'a> { + pub format: &'a str, + pub bash_indicator: &'a str, + pub fish_indicator: &'a str, + pub zsh_indicator: &'a str, + pub powershell_indicator: &'a str, + #[serde(skip_serializing_if = ""Option::is_none"")] + pub pwsh_indicator: Option<&'a str>, + ...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:18:02.103136,128,1404,50 +github_starship_starship_09f216c60a3279d735f451eda65b3ae80ce82929,src/configs/scala.rs,scala.rs,,935,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct ScalaConfig<'a> { + pub format: &'a str, + pub version_format: &'a str, + pub disabled: bool, + pub style: &'a str, + pub symbol: &'a str, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_folders: Vec<&'a str>, +} + +impl Defaul...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:18:01.798249,88,932,35 +github_starship_starship_15efae1e071386265f380c3c4eb4c7bbe85e0ef5,src/configs/rust.rs,rust.rs,,891,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct RustConfig<'a> { + pub format: &'a str, + pub version_format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_folders: Vec<&'a str>, +} + +impl Default...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:18:01.511927,85,888,35 +github_starship_starship_458b4d0d0b44fda486fb57d04e4ab5bbde64e5b9,src/configs/ruby.rs,ruby.rs,,1014,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct RubyConfig<'a> { + pub format: &'a str, + pub version_format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_folders: Vec<&'a str>, + pub detect_...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:18:01.213444,93,1011,37 +github_starship_starship_46db6433ebaf6716230062bc9334523672e2629f,src/configs/elixir.rs,elixir.rs,,914,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct ElixirConfig<'a> { + pub format: &'a str, + pub version_format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_folders: Vec<&'a str>, +} + +impl Defau...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:36.189708,87,911,35 +github_starship_starship_c6fc03a492a80b869bb5b570db9a174ee6af0b06,src/configs/dotnet.rs,dotnet.rs,,1167,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct DotnetConfig<'a> { + pub format: &'a str, + pub version_format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub heuristic: bool, + pub disabled: bool, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_folders: Ve...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:35.924257,100,1164,43 +github_starship_starship_ddf1cf69377b6fd33fd6680f3188a170edbcd22e,src/configs/azure.rs,azure.rs,,722,Rust,"use serde::{Deserialize, Serialize}; +use std::collections::HashMap; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct AzureConfig<'a> { + pub format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + pub subscription_aliases: HashMap, +} + +impl Default for AzureConfig<'_> { + fn default() -> Self { + Se...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:26.297677,70,719,30 +github_starship_starship_fa3d3326d1cb16541776e0b83ac3ef08c60a5212,src/configs/direnv.rs,direnv.rs,,1258,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct DirenvConfig<'a> { + pub format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + pub detect_extensions: Vec<&'a str>, + pub detect_env_vars: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_folders: Vec<&'a str>, + pub...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:35.353130,116,1258,45 +github_starship_starship_1e23d66d558579d0293780487646b4d0603e4a30,src/configs/git_metrics.rs,git_metrics.rs,,788,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct GitMetricsConfig<'a> { + pub added_style: &'a str, + pub deleted_style: &'a str, + pub only_nonzero_diffs: bool, + pub format: &'a str, + pub disabled: bool, + pub ignore_submodules: bool, +} + +impl Default for GitMetricsConfig<'_> { + fn default() -> Self { + ...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:41.386611,71,788,31 +github_starship_starship_43a2470cb4ce0f7c495ba45702b84c5f86e9f27b,src/configs/fossil_metrics.rs,fossil_metrics.rs,,723,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct FossilMetricsConfig<'a> { + pub format: &'a str, + pub added_style: &'a str, + pub deleted_style: &'a str, + pub only_nonzero_diffs: bool, + pub disabled: bool, +} + +impl Default for FossilMetricsConfig<'_> { + fn default() -> Self { + Self { + format:...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:39.736807,66,723,29 +github_starship_starship_ec17e9aaf64374de234af2044b26d730afda867b,src/configs/fossil_branch.rs,fossil_branch.rs,,739,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct FossilBranchConfig<'a> { + pub format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub truncation_length: i64, + pub truncation_symbol: &'a str, + pub disabled: bool, +} + +impl Default for FossilBranchConfig<'_> { + fn default() -> Self { + Self { +...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:39.272004,72,735,31 +github_starship_starship_92303269695ecd9d649ca412553fd045db8c39ae,src/configs/git_state.rs,git_state.rs,,976,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct GitStateConfig<'a> { + pub rebase: &'a str, + pub merge: &'a str, + pub revert: &'a str, + pub cherry_pick: &'a str, + pub bisect: &'a str, + pub am: &'a str, + pub am_or_rebase: &'a str, + pub style: &'a str, + pub format: &'a str, + pub disabled: bool, +} + +...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:41.681474,96,976,39 +github_starship_starship_90775f07a34700e6e2e6c74e7d7f8c64b8061a36,src/configs/julia.rs,julia.rs,,914,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct JuliaConfig<'a> { + pub format: &'a str, + pub version_format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_folders: Vec<&'a str>, +} + +impl Defaul...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:47.370451,86,912,35 +github_starship_starship_e93addc913a69fd86c869f2ba73690d0adf77c23,src/configs/jobs.rs,jobs.rs,,749,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct JobsConfig<'a> { + pub threshold: i64, + pub symbol_threshold: i64, + pub number_threshold: i64, + pub format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, +} + +impl Default for JobsConfig<'_> { + fn default() -> Self { + Self ...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:47.077262,74,747,33 +github_starship_starship_7912f6d3464020a664fbfac8ab32791d0250f0b1,src/configs/java.rs,java.rs,,1179,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct JavaConfig<'a> { + pub disabled: bool, + pub format: &'a str, + pub version_format: &'a str, + pub style: &'a str, + pub symbol: &'a str, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_folders: Vec<&'a str>, +} + +impl Default...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:46.281926,99,1177,44 +github_starship_starship_489597ce567896df649d3f17f685a93f92442f1f,src/configs/status.rs,status.rs,,1749,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct StatusConfig<'a> { + pub format: &'a str, + pub symbol: &'a str, + pub success_symbol: &'a str, + pub not_executable_symbol: &'a str, + pub not_found_symbol: &'a str, + pub sigint_symbol: &'a str, + pub signal_symbol: &'a str, + pub style: &'a str, + #[serde(s...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:18:04.581550,146,1736,56 +github_starship_starship_b267e1a2383f6cacbfced50403a4dde816f4ae3b,src/configs/starship_root.rs,starship_root.rs,,3723,Rust,"use indexmap::IndexMap; +use serde::{Deserialize, Serialize}; +use std::collections::HashMap; + +pub fn default_profiles() -> IndexMap { + IndexMap::from_iter([( + ""claude-code"".to_string(), + ""$claude_model$git_branch$claude_context$claude_cost"".to_string(), + )]) +} + +#[derive(Clone, Serialize, Deserialize, Debug)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct StarshipRoot...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:18:04.102008,313,3713,171 +github_starship_starship_bfb38689e4e7f2efecd357e57772f08afc1d1347,src/configs/spack.rs,spack.rs,,652,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct SpackConfig<'a> { + pub truncation_length: usize, + pub format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, +} + +impl Default for SpackConfig<'_> { + fn default() -> Self { + Self { + truncation_length: 1, + fo...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:18:03.805341,66,649,29 +github_starship_starship_accdf7ba93d73d7b64e11320b59b7fa376f1599f,src/configs/rlang.rs,rlang.rs,,936,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct RLangConfig<'a> { + pub format: &'a str, + pub version_format: &'a str, + pub style: &'a str, + pub symbol: &'a str, + pub disabled: bool, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_folders: Vec<&'a str>, +} + +impl Defaul...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:18:00.417029,89,933,35 +github_starship_starship_23c6b57b121f56d89aabf921abfc50d0c116ed36,src/configs/fortran.rs,fortran.rs,,1366,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct FortranConfig<'a> { + pub format: &'a str, + pub version_format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_folders: Vec<&'a str>, + pub comm...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:38.997856,126,1363,45 +github_starship_starship_d93e37ac85a083c7f64d2f1a3caf70ce236df392,src/configs/quarto.rs,quarto.rs,,900,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct QuartoConfig<'a> { + pub format: &'a str, + pub version_format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_folders: Vec<&'a str>, +} + +impl Defau...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:59.352980,85,898,35 +github_starship_starship_81942e6b0553ed9d0e036d2b8e639ef0197301d7,src/configs/docker_context.rs,docker_context.rs,,1069,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct DockerContextConfig<'a> { + pub symbol: &'a str, + pub style: &'a str, + pub format: &'a str, + pub only_with_files: bool, + pub disabled: bool, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_folders: Vec<&'a str>, +} + +impl ...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:35.615076,90,1066,41 +github_starship_starship_2371339ed7a2d3f7ac16cc96ce2f2f16e7fcf7cc,src/configs/git_status.rs,git_status.rs,,2016,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct GitStatusConfig<'a> { + pub format: &'a str, + pub style: &'a str, + pub stashed: &'a str, + pub ahead: &'a str, + pub behind: &'a str, + pub up_to_date: &'a str, + pub diverged: &'a str, + pub conflicted: &'a str, + pub deleted: &'a str, + pub renamed: &'a ...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:41.985273,192,2007,72 +github_starship_starship_9aeef8b3ec332ee36d9eaa8bb6aed6ca5481eb2e,src/configs/aws.rs,aws.rs,,2949,Rust,"use serde::{Deserialize, Serialize}; +use std::collections::HashMap; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +/// ## AWS +/// +/// The `aws` module shows the current AWS region and profile and an expiration timer when using temporary credentials. +/// The output of the module uses the `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env vars and the `~/.aws/config...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:26.022861,367,2945,66 +github_starship_starship_254a56eda80338af3bf5ee068e66257a2f4beef0,src/config.rs,config.rs,,35737,Rust,"use crate::configs::Palette; +use crate::context::Context; + +use crate::utils; +use crate::utils::serde::{ValueDeserializer, ValueRef}; +use nu_ansi_term::Color; +use serde::{ + Deserialize, Deserializer, Serialize, de::Error as SerdeError, de::value::Error as ValueError, +}; + +use std::borrow::Cow; +use std::clone::Clone; +use std::collections::HashMap; +use std::ffi::OsStr; +use std::io::ErrorKind; + +use toml::Value; + +/// Root config of a module. +pub trait ModuleConfig<'a, E> +where + Self: Default, + ...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:25.728401,2798,35733,1063 +github_starship_starship_04ace682bb5cef50bf24ce11c2444bb1fe590301,src/configs/os.rs,os.rs,,3550,Rust,"use indexmap::{IndexMap, indexmap}; +use os_info::Type; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct OSConfig<'a> { + pub format: &'a str, + pub style: &'a str, + pub symbols: IndexMap, + pub disabled: bool, +} + +impl<'a> OSConfig<'a> { + pub fn get_symbol(&self, key: Type) -> Option<&'a str> { + ...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:55.633265,344,3352,102 +github_starship_starship_c2370ff003ef9d22b9f189bb3bba7d8a28cf1176,src/configs/openstack.rs,openstack.rs,,594,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct OspConfig<'a> { + pub format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, +} + +impl Default for OspConfig<'_> { + fn default() -> Self { + Self { + format: ""on [$symbol$cloud(\\($project\\))]($style) "", + symbol:...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:55.342503,61,590,27 +github_starship_starship_aef1743c1da9d8465bed9eab02c8c63c11f70fed,src/configs/opa.rs,opa.rs,,880,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct OpaConfig<'a> { + pub format: &'a str, + pub version_format: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_folders: Vec<&'a str>, +} + +impl Default ...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:55.032957,85,877,35 +github_starship_starship_51bc947c74b97e2e64902ed69aeebc98690e3e8b,src/configs/odin.rs,odin.rs,,874,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct OdinConfig<'a> { + pub format: &'a str, + pub show_commit: bool, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_folders: Vec<&'a str>, +} + +impl Default for O...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:54.239170,84,873,35 +github_starship_starship_38bef4f70dee46b0cedb07fb24e5cdecf1804a50,src/configs/ocaml.rs,ocaml.rs,,1194,Rust,"use serde::{Deserialize, Serialize}; + +#[derive(Clone, Deserialize, Serialize)] +#[cfg_attr( + feature = ""config-schema"", + derive(schemars::JsonSchema), + schemars(deny_unknown_fields) +)] +#[serde(default)] +pub struct OCamlConfig<'a> { + pub format: &'a str, + pub version_format: &'a str, + pub global_switch_indicator: &'a str, + pub local_switch_indicator: &'a str, + pub symbol: &'a str, + pub style: &'a str, + pub disabled: bool, + pub detect_extensions: Vec<&'a str>, + p...[truncated]",starship/starship,starship,56483,2470,"☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!","['bash' 'fish' 'fish-prompt' 'fish-theme' 'oh-my-zsh' 'powershell' 'rust' + 'shell-prompt' 'starship' 'zsh' 'zsh-prompt' 'zsh-theme']",ISC,,,,,0.98,GitHub Public API,2026-04-17T13:17:53.956740,107,1191,39 +github_avelino_awesome-go_3d59d22a24304fe36f783bc94b7cef04175a5ad6,main_test.go,main_test.go,,3448,Go,"package main + +import ( + ""bytes"" + ""github.com/avelino/awesome-go/pkg/markdown"" + ""os"" + ""regexp"" + ""sort"" + ""strings"" + ""testing"" + + ""github.com/PuerkitoBio/goquery"" +) + +var ( + reContainsLink = regexp.MustCompile(`\* \[.*\]\(.*\)`) + reOnlyLink = regexp.MustCompile(`\* \[.*\]\([^()]*\)$`) + reLinkWithDescription = regexp.MustCompile(`\* \[.*\]\(.*\) - \S.*[\.\!]`) +) + +func requireNoErr(t *testing.T, err error, msg string) { + // FIXME: replace to github.com/stretchr/testify + t.Helper() + + i...[truncated]",avelino/awesome-go,avelino,170179,13150,"A curated list of awesome Go frameworks, libraries and software",['awesome' 'awesome-list' 'go' 'golang' 'golang-library' 'hacktoberfest'],MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:00.889651,415,3448,136 +github_avelino_awesome-go_9f2c58c25bc1d24055bcd2206c12ca880cc2223c,pkg/markdown/convert_test.go,convert_test.go,,1296,Go,"package markdown + +import ( + ""strings"" + ""testing"" +) + +func TestToHTML(t *testing.T) { + input := []byte( + `## some headline +followed by some paragraph with [a link](https://example.local) +and some list: +- first +- second + - nested on second level + - nested on third level + - ~~strikethrough~~ + - yet another second level item, **but** with a [a link](https://example.local) +- end + +### h3 headline/header + +embedded HTML is allowed + `, + ) + expected := []byte( + ` a:first-child"").Each(func(_ int, s *goquery.Selection) { + t.Run(s.Text(), func(t *testing.T) { + href, ok := s.Attr(""href"") + if !ok { + t.Error(""ex...[truncated]",avelino/awesome-go,avelino,170179,13150,"A curated list of awesome Go frameworks, libraries and software",['awesome' 'awesome-list' 'go' 'golang' 'golang-library' 'hacktoberfest'],MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:01.158131,224,2096,78 +github_avelino_awesome-go_44e4699765d7afe7b65c9edd71ea35c2ff40a557,stale_repositories_test.go,stale_repositories_test.go,.go,8235,Go,"package main + +import ( + ""bytes"" + ""context"" + ""encoding/json"" + ""fmt"" + ""log"" + ""net/http"" + ""os"" + ""regexp"" + ""strings"" + ""testing"" + ""text/template"" + ""time"" + + ""github.com/PuerkitoBio/goquery"" + ""golang.org/x/oauth2"" +) + +const issueTemplateContent = ` +{{range .}} +- [ ] {{.}} +{{end}} +` + +var issueTemplate = template.Must(template.New(""issue"").Parse(issueTemplateContent)) + +// FIXME: use official github client +var reGithubRepo = regexp.MustCompile(""https://github.com/([a-zA-Z0-9-._]+)/([a-zA-Z0-9-._]+)$"") +var ...[truncated]",avelino/awesome-go,avelino,169862,13138,"A curated list of awesome Go frameworks, libraries and software",['awesome' 'awesome-list' 'go' 'golang' 'golang-library' 'hacktoberfest'],MIT,,,,,0.95,GitHub Public Repositories,2026-04-13T13:40:51.883626,967,8235,317 +github_avelino_awesome-go_60f075484c003885f9a3dd3035e7c22591705e7f,maturity_test.go,maturity_test.go,.go,2096,Go,"package main + +import ( + ""encoding/json"" + ""fmt"" + ""net/http"" + ""os"" + ""strings"" + ""testing"" + ""time"" + + ""github.com/PuerkitoBio/goquery"" +) + +var ( + githubApiAuthorizationToken = os.Getenv(""GITHUB_API_TOKEN"") + minimumMaturityDate = time.Now().AddDate(0, -5, 0) +) + +func TestMaturity(t *testing.T) { + doc := goqueryFromReadme(t) + doc.Find(""body li > a:first-child"").Each(func(_ int, s *goquery.Selection) { + t.Run(s.Text(), func(t *testing.T) { + href, ok := s.Attr(""href"") + if !ok { + t.Error(""ex...[truncated]",avelino/awesome-go,avelino,169862,13138,"A curated list of awesome Go frameworks, libraries and software",['awesome' 'awesome-list' 'go' 'golang' 'golang-library' 'hacktoberfest'],MIT,,,,,0.95,GitHub Public Repositories,2026-04-13T13:40:51.507762,224,2096,78 +github_avelino_awesome-go_3d59d22a24304fe36f783bc94b7cef04175a5ad6,main_test.go,main_test.go,.go,3448,Go,"package main + +import ( + ""bytes"" + ""github.com/avelino/awesome-go/pkg/markdown"" + ""os"" + ""regexp"" + ""sort"" + ""strings"" + ""testing"" + + ""github.com/PuerkitoBio/goquery"" +) + +var ( + reContainsLink = regexp.MustCompile(`\* \[.*\]\(.*\)`) + reOnlyLink = regexp.MustCompile(`\* \[.*\]\([^()]*\)$`) + reLinkWithDescription = regexp.MustCompile(`\* \[.*\]\(.*\) - \S.*[\.\!]`) +) + +func requireNoErr(t *testing.T, err error, msg string) { + // FIXME: replace to github.com/stretchr/testify + t.Helper() + + i...[truncated]",avelino/awesome-go,avelino,169862,13138,"A curated list of awesome Go frameworks, libraries and software",['awesome' 'awesome-list' 'go' 'golang' 'golang-library' 'hacktoberfest'],MIT,,,,,0.95,GitHub Public Repositories,2026-04-13T13:40:51.190756,415,3448,136 +github_avelino_awesome-go_77ad9bc3ed850e00e0a8ef4d5ef2d0a8e5f8921e,main.go,main.go,.go,18682,Go,"// Package main contains code for generate static site. +package main + +import ( + ""bytes"" + ""embed"" + ""encoding/json"" + ""errors"" + ""fmt"" + template2 ""html/template"" + ""io"" + ""log"" + ""net/http"" + ""net/url"" + ""os"" + ""path/filepath"" + ""strings"" + ""text/template"" + ""time"" + + ""github.com/avelino/awesome-go/pkg/markdown"" + cp ""github.com/otiai10/copy"" + + ""github.com/PuerkitoBio/goquery"" + ""github.com/avelino/awesome-go/pkg/slug"" +) + +// Link contains info about awesome url +type Link struct { + Title string + URL ...[truncated]",avelino/awesome-go,avelino,169862,13138,"A curated list of awesome Go frameworks, libraries and software",['awesome' 'awesome-list' 'go' 'golang' 'golang-library' 'hacktoberfest'],MIT,,,,,0.95,GitHub Public Repositories,2026-04-13T13:40:50.903780,2314,18680,771 +github_ollama_ollama_9ea8431837503cc91aa083440fee2bf97cdb42a9,app/format/field_test.go,field_test.go,,849,Go,"//go:build windows || darwin + +package format + +import ""testing"" + +func TestKebabCase(t *testing.T) { + tests := []struct { + input string + expected string + }{ + {""already-kebab-case"", ""already-kebab-case""}, + {""simpleCamelCase"", ""simple-camel-case""}, + {""PascalCase"", ""pascal-case""}, + {""camelCaseWithNumber123"", ""camel-case-with-number123""}, + {""APIResponse"", ""api-response""}, + {""mixedCASE"", ""mixed-case""}, + {""WithACRONYMS"", ""with-acronyms""}, + {""ALLCAPS"", ""allcaps""}, + {""camelCaseWITHMixedACRON...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:22.382504,77,849,35 +github_ollama_ollama_f3714306016e69d4c7e9f437f5cb6ff8aba0e5bf,cmd/launch/droid_test.go,droid_test.go,,36485,Go,"package launch + +import ( + ""encoding/json"" + ""fmt"" + ""os"" + ""path/filepath"" + ""testing"" + + ""github.com/ollama/ollama/cmd/internal/fileutil"" +) + +func TestDroidIntegration(t *testing.T) { + d := &Droid{} + + t.Run(""String"", func(t *testing.T) { + if got := d.String(); got != ""Droid"" { + t.Errorf(""String() = %q, want %q"", got, ""Droid"") + } + }) + + t.Run(""implements Runner"", func(t *testing.T) { + var _ Runner = d + }) + + t.Run(""implements Editor"", func(t *testing.T) { + var _ Editor = d + }) +} + +func TestDroidEdi...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:52.619283,3920,36443,1346 +github_ollama_ollama_fd09fe613e3e6b1ed7220bc627248adcd24198f3,cmd/launch/hermes.go,hermes.go,,16786,Go,"package launch + +import ( + ""bufio"" + ""bytes"" + ""context"" + ""fmt"" + ""net/http"" + ""os"" + ""os/exec"" + ""path/filepath"" + ""runtime"" + ""slices"" + ""strconv"" + ""strings"" + + ""gopkg.in/yaml.v3"" + + ""github.com/ollama/ollama/api"" + ""github.com/ollama/ollama/cmd/config"" + ""github.com/ollama/ollama/cmd/internal/fileutil"" + ""github.com/ollama/ollama/envconfig"" +) + +const ( + hermesInstallScript = ""curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash -s -- --skip-setup"" + hermesP...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:52.937576,2066,16786,680 +github_ollama_ollama_fd710a62c6ff510c51dccc75b532a07bb3616862,app/ui/extract.go,extract.go,,2074,Go,"//go:build windows || darwin + +package ui + +import ( + ""bytes"" + ""fmt"" + ""path/filepath"" + ""slices"" + ""strings"" + ""unicode/utf8"" + + ""github.com/ledongthuc/pdf"" +) + +// convertBytesToText converts raw file bytes to text based on file extension +func convertBytesToText(data []byte, filename string) string { + ext := strings.ToLower(filepath.Ext(filename)) + + if ext == "".pdf"" { + text, err := extractPDFText(data) + if err != nil { + return fmt.Sprintf(""[PDF file - %d bytes - failed to extract text: %v]"", len(da...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:33.035680,266,2074,85 +github_ollama_ollama_d73df2c02b8ea374f61427f5eaa60eababd0241f,app/ui/app.go,app.go,,1111,Go,"//go:build windows || darwin + +package ui + +import ( + ""bytes"" + ""embed"" + ""errors"" + ""io/fs"" + ""net/http"" + ""strings"" + ""time"" +) + +//go:embed app/dist +var appFS embed.FS + +// appHandler returns an HTTP handler that serves the React SPA. +// It tries to serve real files first, then falls back to index.html for React Router. +func (s *Server) appHandler() http.Handler { + // Strip the dist prefix so URLs look clean + fsys, _ := fs.Sub(appFS, ""app/dist"") + fileServer := http.FileServer(http.FS(fsys)) + + return htt...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:32.761473,145,1109,45 +github_ollama_ollama_fd37835f5e9309b8d192ddd6f764510f63ad8789,app/tools/web_search.go,web_search.go,,3540,Go,"//go:build windows || darwin + +package tools + +import ( + ""bytes"" + ""context"" + ""encoding/json"" + ""fmt"" + ""net/http"" + ""net/url"" + ""strconv"" + ""strings"" + ""time"" + + ""github.com/ollama/ollama/auth"" +) + +type WebSearch struct{} + +type SearchRequest struct { + Query string `json:""query""` + MaxResults int `json:""max_results,omitempty""` +} + +type SearchResult struct { + Title string `json:""title""` + URL string `json:""url""` + Content string `json:""content""` +} + +type SearchResponse struct { + Results []SearchRes...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:32.316363,441,3540,150 +github_ollama_ollama_ed428859d3b81a83f73a8e06e26e04b8c4b94836,cmd/editor_windows.go,editor_windows.go,,62,Go,"//go:build windows + +package cmd + +const defaultEditor = ""edit"" +...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:47.143435,8,62,6 +github_ollama_ollama_bd917bde8397ab5b4fbb48bc5d66747ec0e21c5b,cmd/config/config_cloud_test.go,config_cloud_test.go,,17541,Go,"package config + +import ( + ""errors"" + ""os"" + ""path/filepath"" + ""testing"" +) + +func TestSetAliases_CloudModel(t *testing.T) { + // Test the SetAliases logic by checking the alias map behavior + aliases := map[string]string{ + ""primary"": ""kimi-k2.5:cloud"", + ""fast"": ""kimi-k2.5:cloud"", + } + + // Verify fast is set (cloud model behavior) + if aliases[""fast""] == """" { + t.Error(""cloud model should have fast alias set"") + } + if aliases[""fast""] != aliases[""primary""] { + t.Errorf(""fast should equal primary for au...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:45.640000,2100,17541,642 +github_ollama_ollama_20caeaae53b09657f70eccd7e61bf39603e6dbbb,cmd/config/config.go,config.go,,6474,Go,"// Package config provides integration configuration for external coding tools +// (Claude Code, Codex, Droid, OpenCode) to use Ollama models. +package config + +import ( + ""encoding/json"" + ""errors"" + ""fmt"" + ""os"" + ""path/filepath"" + ""strings"" + + ""github.com/ollama/ollama/cmd/internal/fileutil"" +) + +type integration struct { + Models []string `json:""models""` + Aliases map[string]string `json:""aliases,omitempty""` + Onboarded bool `json:""onboarded,omitempty""` +} + +// IntegrationConfig is...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:45.259573,884,6474,285 +github_ollama_ollama_51ba9ee69dddf78058edbe709507b60f6ec9394f,app/dialog/dlgs_windows.go,dlgs_windows.go,,6040,Go,"package dialog + +import ( + ""fmt"" + ""reflect"" + ""syscall"" + ""unicode/utf16"" + ""unsafe"" + + ""github.com/TheTitanrain/w32"" +) + +const multiFileBufferSize = w32.MAX_PATH * 10 + +type WinDlgError int + +func (e WinDlgError) Error() string { + return fmt.Sprintf(""CommDlgExtendedError: %#x"", int(e)) +} + +func err() error { + e := w32.CommDlgExtendedError() + if e == 0 { + return ErrCancelled + } + return WinDlgError(e) +} + +func (b *MsgBuilder) yesNo() bool { + r := w32.MessageBox(w32.HWND(0), b.Msg, firstOf(b.Dlg.Title, ""Co...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:20.985641,745,6040,242 +github_ollama_ollama_2189fd82e4e652873ec8f025dd9de1dc4fe25927,cmd/launch/hermes_test.go,hermes_test.go,,32483,Go,"package launch + +import ( + ""fmt"" + ""net/http"" + ""net/http/httptest"" + ""net/url"" + ""os"" + ""path/filepath"" + ""runtime"" + ""strings"" + ""testing"" + + ""gopkg.in/yaml.v3"" + + ""github.com/ollama/ollama/cmd/config"" +) + +func withHermesPlatform(t *testing.T, goos string) { + t.Helper() + old := hermesGOOS + hermesGOOS = goos + t.Cleanup(func() { + hermesGOOS = old + }) +} + +func withHermesOllamaURL(t *testing.T, rawURL string) { + t.Helper() + old := hermesOllamaURL + hermesOllamaURL = func() *url.URL { + u, err := url.Parse(rawU...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:53.431478,3698,32467,1111 +github_ollama_ollama_c2e7f4b9eea01297167ca5c55ab1198fb66b0aac,app/server/server_windows.go,server_windows.go,,3078,Go,"package server + +import ( + ""context"" + ""fmt"" + ""log/slog"" + ""os"" + ""os/exec"" + ""path/filepath"" + ""strconv"" + ""strings"" + ""syscall"" + + ""golang.org/x/sys/windows"" +) + +var ( + pidFile = filepath.Join(os.Getenv(""LOCALAPPDATA""), ""Ollama"", ""ollama.pid"") + serverLogPath = filepath.Join(os.Getenv(""LOCALAPPDATA""), ""Ollama"", ""server.log"") +) + +func commandContext(ctx context.Context, name string, arg ...string) *exec.Cmd { + cmd := exec.CommandContext(ctx, name, arg...) + cmd.SysProcAttr = &syscall.SysProcAttr{ + Hi...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:24.679141,417,3078,150 +github_ollama_ollama_7a71cbd7bab16ee2309c192690e6d24abddd685d,app/store/cloud_config.go,cloud_config.go,,3182,Go,"//go:build windows || darwin + +package store + +import ( + ""encoding/json"" + ""errors"" + ""fmt"" + ""os"" + ""path/filepath"" + + ""github.com/ollama/ollama/envconfig"" +) + +const serverConfigFilename = ""server.json"" + +type serverConfig struct { + DisableOllamaCloud bool `json:""disable_ollama_cloud,omitempty""` +} + +// CloudDisabled returns whether cloud features should be disabled. +// The source of truth is: OLLAMA_NO_CLOUD OR ~/.ollama/server.json:disable_ollama_cloud. +func (s *Store) CloudDisabled() (bool, error) { + d...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:24.981793,417,3182,129 +github_ollama_ollama_d2929d8a1c9d5ff2c2fd99f61e839484ce8f4957,app/updater/updater.go,updater.go,,9611,Go,"//go:build windows || darwin + +package updater + +import ( + ""context"" + ""crypto/rand"" + ""encoding/json"" + ""errors"" + ""fmt"" + ""io"" + ""log/slog"" + ""mime"" + ""net/http"" + ""net/url"" + ""os"" + ""path"" + ""path/filepath"" + ""runtime"" + ""strconv"" + ""strings"" + ""sync"" + ""time"" + + ""github.com/ollama/ollama/app/store"" + ""github.com/ollama/ollama/app/version"" + ""github.com/ollama/ollama/auth"" +) + +var ( + UpdateCheckURLBase = ""https://ollama.com/api/update"" + UpdateDownloaded = false + UpdateCheckInterval = 60 * 60 * time....[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:34.596488,1146,9611,345 +github_ollama_ollama_fb3cdb62c7a04e6aa55b049c77a3def114c379f4,cmd/launch/copilot_test.go,copilot_test.go,,4252,Go,"package launch + +import ( + ""os"" + ""path/filepath"" + ""runtime"" + ""slices"" + ""strings"" + ""testing"" +) + +func TestCopilotIntegration(t *testing.T) { + c := &Copilot{} + + t.Run(""String"", func(t *testing.T) { + if got := c.String(); got != ""Copilot CLI"" { + t.Errorf(""String() = %q, want %q"", got, ""Copilot CLI"") + } + }) + + t.Run(""implements Runner"", func(t *testing.T) { + var _ Runner = c + }) +} + +func TestCopilotFindPath(t *testing.T) { + c := &Copilot{} + + t.Run(""finds copilot in PATH"", func(t *testing.T) { + tmp...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:51.491290,511,4252,162 +github_ollama_ollama_d626027d357cfe97a22f12b3c8d527073ed399eb,cmd/launch/copilot.go,copilot.go,,1724,Go,"package launch + +import ( + ""fmt"" + ""os"" + ""os/exec"" + ""path/filepath"" + ""runtime"" + + ""github.com/ollama/ollama/envconfig"" +) + +// Copilot implements Runner for GitHub Copilot CLI integration. +type Copilot struct{} + +func (c *Copilot) String() string { return ""Copilot CLI"" } + +func (c *Copilot) args(model string, extra []string) []string { + var args []string + if model != """" { + args = append(args, ""--model"", model) + } + args = append(args, extra...) + return args +} + +func (c *Copilot) findPath() (string, erro...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:51.199957,228,1724,77 +github_ollama_ollama_cc8d0df499ab32618c526a092e06e40f39e2367a,cmd/launch/command_test.go,command_test.go,,17956,Go,"package launch + +import ( + ""bytes"" + ""fmt"" + ""io"" + ""net/http"" + ""net/http/httptest"" + ""os"" + ""strings"" + ""testing"" + + ""github.com/google/go-cmp/cmp"" + ""github.com/ollama/ollama/cmd/config"" + ""github.com/spf13/cobra"" +) + +func captureStderr(t *testing.T, fn func()) string { + t.Helper() + + oldStderr := os.Stderr + r, w, err := os.Pipe() + if err != nil { + t.Fatalf(""failed to create stderr pipe: %v"", err) + } + os.Stderr = w + defer func() { + os.Stderr = oldStderr + }() + + done := make(chan string, 1) + go func() { + ...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:50.905851,1976,17956,602 +github_ollama_ollama_a8154d60cc7affafbb66fb9da6af0df5c01e3af6,app/store/cloud_config_test.go,cloud_config_test.go,,3278,Go,"//go:build windows || darwin + +package store + +import ( + ""encoding/json"" + ""os"" + ""path/filepath"" + ""testing"" +) + +func TestCloudDisabled(t *testing.T) { + tests := []struct { + name string + envValue string + configContent string + wantDisabled bool + wantSource string + }{ + { + name: ""default enabled"", + wantDisabled: false, + wantSource: ""none"", + }, + { + name: ""env disables cloud"", + envValue: ""1"", + wantDisabled: true, + wantSource: ""env"", + }, + { +...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:25.769535,363,3278,131 +github_ollama_ollama_15e27780dd41007983018eeba570a0b5ab434c14,app/tools/web_fetch.go,web_fetch.go,,3092,Go,"//go:build windows || darwin + +package tools + +import ( + ""bytes"" + ""context"" + ""encoding/json"" + ""fmt"" + ""net/http"" + ""net/url"" + ""strconv"" + ""strings"" + ""time"" + + ""github.com/ollama/ollama/auth"" +) + +type WebFetch struct{} + +type FetchRequest struct { + URL string `json:""url""` +} + +type FetchResponse struct { + Title string `json:""title""` + Content string `json:""content""` + Links []string `json:""links""` +} + +func (w *WebFetch) Name() string { + return ""web_fetch"" +} + +func (w *WebFetch) Description() string { + ...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:32.033037,391,3092,133 +github_ollama_ollama_02cd422ab1fb0075682972c173931c1a5c1999e3,app/ui/ui.go,ui.go,,53560,Go,"//go:build windows || darwin + +// package ui implements a chat interface for Ollama +package ui + +import ( + ""context"" + ""encoding/base64"" + ""encoding/json"" + ""errors"" + ""fmt"" + ""log/slog"" + ""net/http"" + ""net/http/httputil"" + ""os"" + ""runtime"" + ""runtime/debug"" + ""slices"" + ""strconv"" + ""strings"" + ""sync"" + ""time"" + + ""github.com/google/uuid"" + ""github.com/ollama/ollama/api"" + ""github.com/ollama/ollama/app/server"" + ""github.com/ollama/ollama/app/store"" + ""github.com/ollama/ollama/app/tools"" + ""github.com/ollama/ollama/app/...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:33.889809,6016,53558,1786 +github_ollama_ollama_c7e6f9fd83787794b22d642088f32e7f50354044,app/store/image.go,image.go,,3340,Go,"//go:build windows || darwin + +package store + +import ( + ""crypto/sha256"" + ""encoding/hex"" + ""fmt"" + ""os"" + ""path/filepath"" + ""strings"" +) + +type Image struct { + Filename string `json:""filename""` + Path string `json:""path""` + Size int64 `json:""size,omitempty""` + MimeType string `json:""mime_type,omitempty""` +} + +// Bytes loads image data from disk for a given ImageData reference +func (i *Image) Bytes() ([]byte, error) { + return ImgBytes(i.Path) +} + +// ImgBytes reads image data from the specified file pa...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:26.772346,470,3340,129 +github_ollama_ollama_3411e11bf7bf71ae6ce7f0c18a1190112fe53e42,app/store/database_test.go,database_test.go,,14046,Go,"//go:build windows || darwin + +package store + +import ( + ""database/sql"" + ""fmt"" + ""os"" + ""path/filepath"" + ""sort"" + ""strings"" + ""testing"" + ""time"" + + ""github.com/google/go-cmp/cmp"" + _ ""github.com/mattn/go-sqlite3"" +) + +func TestSchemaMigrations(t *testing.T) { + t.Run(""schema comparison after migration"", func(t *testing.T) { + tmpDir := t.TempDir() + migratedDBPath := filepath.Join(tmpDir, ""migrated.db"") + migratedDB := loadV2Schema(t, migratedDBPath) + defer migratedDB.Close() + + if err := migratedDB.migrat...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:26.491376,1824,14046,484 +github_ollama_ollama_97e792e173172d4c383dca1eaa51919b8a950851,app/store/database.go,database.go,,37512,Go,"//go:build windows || darwin + +package store + +import ( + ""database/sql"" + ""encoding/json"" + ""fmt"" + ""strings"" + ""time"" + + _ ""github.com/mattn/go-sqlite3"" +) + +// currentSchemaVersion defines the current database schema version. +// Increment this when making schema changes that require migrations. +const currentSchemaVersion = 16 + +// database wraps the SQLite connection. +// SQLite handles its own locking for concurrent access: +// - Multiple readers can access the database simultaneously +// - Writers are se...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:26.114411,5142,37512,1345 +github_ollama_ollama_12f6af06ab8d5c24e6ac02629687d20149813770,app/wintray/messages.go,messages.go,,502,Go,"//go:build windows + +package wintray + +const ( + firstTimeTitle = ""Ollama is running"" + firstTimeMessage = ""Click here to get started"" + updateTitle = ""Update available"" + updateMessage = ""Ollama version %s is ready to install"" + + quitMenuTitle = ""Quit Ollama"" + updateAvailableMenuTitle = ""An update is available"" + updateMenuTitle = ""Restart to update"" + diagLogsMenuTitle = ""View logs"" + openUIMenuTitle = ""Open Ollama"" + settingsUIMenuTitle = ""Settings..."" +...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:40.552468,58,502,18 +github_ollama_ollama_b367278908e370c87bbe5ab1d3d3993784d95abe,app/tools/tools.go,tools.go,,3136,Go,"//go:build windows || darwin + +package tools + +import ( + ""context"" + ""encoding/json"" + ""fmt"" +) + +// Tool defines the interface that all tools must implement +type Tool interface { + // Name returns the unique identifier for the tool + Name() string + + // Description returns a human-readable description of what the tool does + Description() string + + // Schema returns the JSON schema for the tool's parameters + Schema() map[string]any + + // Execute runs the tool with the given arguments and returns result to ...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:31.748671,447,3136,123 +github_ollama_ollama_5bd83cae2bbca8c910b01cf92a7b284989c5848a,app/tools/cloud_policy_test.go,cloud_policy_test.go,,2136,Go,"//go:build windows || darwin + +package tools + +import ( + ""context"" + ""net/http"" + ""net/http/httptest"" + ""strings"" + ""testing"" +) + +func TestEnsureCloudEnabledForTool(t *testing.T) { + const op = ""web search is unavailable"" + const disabledPrefix = ""ollama cloud is disabled: web search is unavailable"" + + t.Run(""enabled allows tool execution"", func(t *testing.T) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.URL.Path != ""/api/status"" { + http.NotFound(w...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:30.965807,217,2136,74 +github_ollama_ollama_369c1db204d05c7eb7560ce82d1665c81b608f52,app/store/store.go,store.go,,13678,Go,"//go:build windows || darwin + +// Package store provides a simple JSON file store for the desktop application +// to save and load data such as ollama server configuration, messages, +// login information and more. +package store + +import ( + ""encoding/json"" + ""fmt"" + ""log/slog"" + ""os"" + ""path/filepath"" + ""runtime"" + ""sync"" + ""time"" + + ""github.com/google/uuid"" + ""github.com/ollama/ollama/app/types/not"" +) + +type File struct { + Filename string `json:""filename""` + Data []byte `json:""data""` +} + +type User struct {...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:28.184328,1761,13678,537 +github_ollama_ollama_2682aa102ef7b35ba6e0c88b94fa4a0844cf12e0,cmd/launch/models.go,models.go,,15058,Go,"package launch + +import ( + ""context"" + ""errors"" + ""fmt"" + ""net/http"" + ""os"" + ""os/exec"" + ""runtime"" + ""slices"" + ""strings"" + ""time"" + + ""github.com/ollama/ollama/api"" + ""github.com/ollama/ollama/cmd/config"" + ""github.com/ollama/ollama/cmd/internal/fileutil"" + internalcloud ""github.com/ollama/ollama/internal/cloud"" + ""github.com/ollama/ollama/internal/modelref"" + ""github.com/ollama/ollama/progress"" +) + +var recommendedModels = []ModelItem{ + {Name: ""kimi-k2.5:cloud"", Description: ""Multimodal reasoning with subagents...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:55.551082,1797,15058,514 +github_ollama_ollama_0fd320cb04b1ed3fff3424f172ad0f601c926c30,cmd/launch/launch_test.go,launch_test.go,,76139,Go,"package launch + +import ( + ""context"" + ""encoding/json"" + ""fmt"" + ""net/http"" + ""net/http/httptest"" + ""os"" + ""path/filepath"" + ""runtime"" + ""slices"" + ""strings"" + ""testing"" + + ""github.com/ollama/ollama/cmd/config"" +) + +type launcherEditorRunner struct { + paths []string + edited [][]string + ranModel string +} + +func (r *launcherEditorRunner) Run(model string, args []string) error { + r.ranModel = model + return nil +} + +func (r *launcherEditorRunner) String() string { return ""LauncherEditor"" } + +func (r *launcherEdi...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:55.238973,7667,76139,2485 +github_ollama_ollama_f4c13092ea64bcba597fbfadc17f2677b8f22c7f,cmd/launch/launch.go,launch.go,,29891,Go,"package launch + +import ( + ""context"" + ""errors"" + ""fmt"" + ""net/http"" + ""os"" + ""slices"" + ""strings"" + + ""github.com/ollama/ollama/api"" + ""github.com/ollama/ollama/cmd/config"" + ""github.com/spf13/cobra"" + ""golang.org/x/term"" +) + +// LauncherState is the launch-owned snapshot used to render the root launcher menu. +type LauncherState struct { + LastSelection string + RunModel string + RunModelUsable bool + Integrations map[string]LauncherIntegrationState +} + +// LauncherIntegrationState is the launch-owned sta...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:54.353743,3485,29888,1038 +github_ollama_ollama_909b314283612b9335205d44bb0f0c07e182d7ce,cmd/launch/registry_test_helpers_test.go,registry_test_helpers_test.go,,523,Go,"package launch + +import ""strings"" + +// OverrideIntegration replaces one registry entry's runner for tests and returns a restore function. +func OverrideIntegration(name string, runner Runner) func() { + spec, err := LookupIntegrationSpec(name) + if err != nil { + key := strings.ToLower(name) + integrationSpecsByName[key] = &IntegrationSpec{Name: key, Runner: runner} + return func() { + delete(integrationSpecsByName, key) + } + } + + original := spec.Runner + spec.Runner = runner + return func() { + spec....[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:58.752243,64,523,22 +github_ollama_ollama_1612352a5afbd414bf3e31d2b4bbcf23a5be97b2,cmd/launch/droid.go,droid.go,,5078,Go,"package launch + +import ( + ""encoding/json"" + ""fmt"" + ""os"" + ""os/exec"" + ""path/filepath"" + ""slices"" + + ""github.com/ollama/ollama/cmd/internal/fileutil"" + ""github.com/ollama/ollama/envconfig"" +) + +// Droid implements Runner and Editor for Droid integration +type Droid struct{} + +// droidSettings represents the Droid settings.json file (only fields we use) +type droidSettings struct { + CustomModels []modelEntry `json:""customModels""` + SessionDefaultSettings sessionSettings `json:""sessionDefaultSetti...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:51.777696,590,5078,191 +github_ollama_ollama_46dc069ee6514677939a0dc537c057bd1e409e1f,cmd/launch/pi_test.go,pi_test.go,,36085,Go,"package launch + +import ( + ""context"" + ""encoding/json"" + ""fmt"" + ""net/http"" + ""net/http/httptest"" + ""net/url"" + ""os"" + ""path/filepath"" + ""runtime"" + ""strings"" + ""testing"" + + ""github.com/ollama/ollama/api"" + ""github.com/ollama/ollama/types/model"" +) + +func TestPiIntegration(t *testing.T) { + pi := &Pi{} + + t.Run(""String"", func(t *testing.T) { + if got := pi.String(); got != ""Pi"" { + t.Errorf(""String() = %q, want %q"", got, ""Pi"") + } + }) + + t.Run(""implements Runner"", func(t *testing.T) { + var _ Runner = pi + }) + + t...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:58.131806,4103,36085,1263 +github_ollama_ollama_a4eea48c5b39b41466653306afc5aeef1e82abf9,cmd/background_unix.go,background_unix.go,,343,Go,"//go:build !windows + +package cmd + +import ""syscall"" + +// backgroundServerSysProcAttr returns SysProcAttr for running the server in the background on Unix. +// Setpgid prevents the server from being killed when the parent process exits. +func backgroundServerSysProcAttr() *syscall.SysProcAttr { + return &syscall.SysProcAttr{ + Setpgid: true, + } +} +...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:42.507302,42,343,14 +github_ollama_ollama_3b05577efae9e250a812b94005f284386511a07a,app/tools/cloud_policy.go,cloud_policy.go,,979,Go,"//go:build windows || darwin + +package tools + +import ( + ""context"" + ""errors"" + + ""github.com/ollama/ollama/api"" + internalcloud ""github.com/ollama/ollama/internal/cloud"" +) + +// ensureCloudEnabledForTool checks cloud policy from the connected Ollama server. +// If policy cannot be determined, this fails closed and blocks the operation. +func ensureCloudEnabledForTool(ctx context.Context, operation string) error { + // Reuse shared message formatting; policy evaluation is still done via + // the connected s...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:30.714416,114,979,36 +github_ollama_ollama_dd47fb886fa0a75cb5771fb1e5d951371dc9b8e1,app/tools/browser_websearch.go,browser_websearch.go,,4049,Go,"//go:build windows || darwin + +package tools + +import ( + ""context"" + ""encoding/json"" + ""fmt"" + ""strconv"" + ""time"" +) + +// WebSearchContent represents the content of a search result +type WebSearchContent struct { + Snippet string `json:""snippet""` + FullText string `json:""full_text""` +} + +// WebSearchMetadata represents metadata for a search result +type WebSearchMetadata struct { + PublishedDate *time.Time `json:""published_date,omitempty""` +} + +// WebSearchResult represents a single search result +type WebSearch...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:30.449428,510,4049,144 +github_ollama_ollama_9d3b378a9ef6928b28ac59ec4b8ecbc631aadc76,cmd/launch/opencode_test.go,opencode_test.go,,22841,Go,"package launch + +import ( + ""encoding/json"" + ""fmt"" + ""os"" + ""path/filepath"" + ""runtime"" + ""testing"" +) + +func TestOpenCodeIntegration(t *testing.T) { + o := &OpenCode{} + + t.Run(""String"", func(t *testing.T) { + if got := o.String(); got != ""OpenCode"" { + t.Errorf(""String() = %q, want %q"", got, ""OpenCode"") + } + }) + + t.Run(""implements Runner"", func(t *testing.T) { + var _ Runner = o + }) + + t.Run(""implements Editor"", func(t *testing.T) { + var _ Editor = o + }) +} + +func TestOpenCodeEdit(t *testing.T) { + t.Run(...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:57.509811,2504,22837,779 +github_ollama_ollama_34a1bb25077b59d08452adde4c5bb0d38843be81,cmd/launch/opencode.go,opencode.go,,6350,Go,"package launch + +import ( + ""encoding/json"" + ""fmt"" + ""os"" + ""os/exec"" + ""path/filepath"" + ""runtime"" + ""slices"" + + ""github.com/ollama/ollama/cmd/internal/fileutil"" + ""github.com/ollama/ollama/envconfig"" +) + +// OpenCode implements Runner and Editor for OpenCode integration. +// Config is passed via OPENCODE_CONFIG_CONTENT env var at launch time +// instead of writing to opencode's config files. +type OpenCode struct { + configContent string // JSON config built by Edit, passed to Run via env var +} + +func (o *Ope...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:56.582957,858,6348,249 +github_ollama_ollama_434496bae29df7df69d8e9397b1f369cd3b441b6,cmd/launch/openclaw_test.go,openclaw_test.go,,78126,Go,"package launch + +import ( + ""bytes"" + ""context"" + ""encoding/json"" + ""fmt"" + ""net"" + ""net/http"" + ""net/http/httptest"" + ""net/url"" + ""os"" + ""path/filepath"" + ""runtime"" + ""strings"" + ""testing"" + ""time"" + + ""github.com/ollama/ollama/api"" +) + +func TestOpenclawIntegration(t *testing.T) { + c := &Openclaw{} + + t.Run(""String"", func(t *testing.T) { + if got := c.String(); got != ""OpenClaw"" { + t.Errorf(""String() = %q, want %q"", got, ""OpenClaw"") + } + }) + + t.Run(""implements Runner"", func(t *testing.T) { + var _ Runner = c + }...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:56.294564,8404,78126,2618 +github_ollama_ollama_d5980a5327e43d9c58c171455683ab592c897660,cmd/launch/openclaw.go,openclaw.go,,28099,Go,"package launch + +import ( + ""context"" + ""encoding/json"" + ""fmt"" + ""net"" + ""net/url"" + ""os"" + ""os/exec"" + ""path/filepath"" + ""runtime"" + ""slices"" + ""strings"" + ""time"" + + ""golang.org/x/mod/semver"" + + ""github.com/ollama/ollama/api"" + ""github.com/ollama/ollama/cmd/internal/fileutil"" + ""github.com/ollama/ollama/envconfig"" + ""github.com/ollama/ollama/types/model"" +) + +const defaultGatewayPort = 18789 + +// Bound model capability probing so launch/config cannot hang on slow/unreachable API calls. +var openclawModelShowTimeout...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:55.926709,3631,28093,1010 +github_ollama_ollama_05b5584b27f21e481799f7dfb945b13014a01f44,app/tools/browser_test.go,browser_test.go,,5046,Go,"//go:build windows || darwin + +package tools + +import ( + ""strings"" + ""testing"" + ""time"" + + ""github.com/ollama/ollama/app/ui/responses"" +) + +func makeTestPage(url string) *responses.Page { + return &responses.Page{ + URL: url, + Title: ""Title "" + url, + Text: ""Body for "" + url, + Lines: []string{""line1"", ""line2"", ""line3""}, + Links: map[int]string{0: url}, + FetchedAt: time.Now(), + } +} + +func TestBrowser_Scroll_AppendsOnlyPageStack(t *testing.T) { + b := NewBrowser(&responses.BrowserS...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:30.165654,586,5044,148 +github_ollama_ollama_fd9c2bd4dce1c5290c56e564e838442efbf280ce,app/tools/browser_crawl.go,browser_crawl.go,,3772,Go,"//go:build windows || darwin + +package tools + +import ( + ""context"" + ""encoding/json"" + ""fmt"" +) + +// CrawlContent represents the content of a crawled page +type CrawlContent struct { + Snippet string `json:""snippet""` + FullText string `json:""full_text""` +} + +// CrawlExtras represents additional data from the crawl API +type CrawlExtras struct { + Links []CrawlLink `json:""links""` +} + +// CrawlLink represents a link found on a crawled page +type CrawlLink struct { + URL string `json:""url""` + Href string `json:""hr...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:29.875221,512,3772,137 +github_ollama_ollama_b41c079ba9cdcac8ff3e9ae6219444ea385299a8,app/tools/browser.go,browser.go,,23476,Go,"//go:build windows || darwin + +package tools + +import ( + ""context"" + ""fmt"" + ""net/url"" + ""regexp"" + ""strings"" + ""sync"" + ""time"" + + ""github.com/ollama/ollama/app/ui/responses"" +) + +type PageType string + +const ( + PageTypeSearchResults PageType = ""initial_results"" + PageTypeWebpage PageType = ""webpage"" +) + +// DefaultViewTokens is the number of tokens to show to the model used when calling displayPage +const DefaultViewTokens = 1024 + +/* +The Browser tool provides web browsing capability for gpt-oss. +The mode...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:29.094132,3050,23448,864 +github_ollama_ollama_3c4c67f138513247413297239908921a5eab3792,cmd/bench/bench_test.go,bench_test.go,,37549,Go,"package main + +import ( + ""bytes"" + ""crypto/rand"" + ""encoding/json"" + ""io"" + ""net/http"" + ""net/http/httptest"" + ""os"" + ""strings"" + ""testing"" + ""time"" + + ""github.com/ollama/ollama/api"" +) + +func createTestFlagOptions() flagOptions { + models := ""test-model"" + format := ""benchstat"" + epochs := 1 + maxTokens := 50 + temperature := 0.7 + seed := 42 + timeout := 30 + prompt := ""test prompt"" + imageFile := """" + keepAlive := 0.0 + verbose := false + debug := false + warmup := 0 + promptTokens := 0 + + return flagOptions{ + models: ...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:43.394081,3945,37547,1411 +github_ollama_ollama_2a9dfb01b42962515cc1ab9c2f78a81126121d64,app/updater/updater_darwin.go,updater_darwin.go,,12926,Go,"package updater + +// #cgo CFLAGS: -x objective-c +// #cgo LDFLAGS: -framework Webkit -framework Cocoa -framework LocalAuthentication -framework ServiceManagement +// #include ""updater_darwin.h"" +// typedef const char cchar_t; +import ""C"" + +import ( + ""archive/zip"" + ""errors"" + ""fmt"" + ""io"" + ""log/slog"" + ""os"" + ""os/user"" + ""path/filepath"" + ""strings"" + ""syscall"" + ""unsafe"" + + ""golang.org/x/sys/unix"" +) + +var ( + appBackupDir string + SystemWidePath = ""/Applications/Ollama.app"" +) + +var BundlePath = func() string { + i...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:34.886823,1701,12926,447 +github_ollama_ollama_fc96a1babe36e76e2f8f57fd5668347c43bb1bba,cmd/launch/registry.go,registry.go,,11282,Go,"package launch + +import ( + ""fmt"" + ""os"" + ""os/exec"" + ""slices"" + ""strings"" +) + +// IntegrationInstallSpec describes how launcher should detect and guide installation. +type IntegrationInstallSpec struct { + CheckInstalled func() bool + EnsureInstalled func() error + URL string + Command []string +} + +// IntegrationSpec is the canonical registry entry for one integration. +type IntegrationSpec struct { + Name string + Runner Runner + Aliases []string + Hidden bool + Descript...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:58.444947,1251,11282,401 +github_ollama_ollama_827e41d9a340792f4f28156c359028c1ffb4386d,api/client_test.go,client_test.go,,9000,Go,"package api + +import ( + ""encoding/json"" + ""fmt"" + ""net/http"" + ""net/http/httptest"" + ""net/url"" + ""strings"" + ""testing"" +) + +func TestClientFromEnvironment(t *testing.T) { + type testCase struct { + value string + expect string + err error + } + + testCases := map[string]*testCase{ + ""empty"": {value: """", expect: ""http://127.0.0.1:11434""}, + ""only address"": {value: ""1.2.3.4"", expect: ""http://1.2.3.4:11434""}, + ""only port"": {value: "":1234"", expect: ""http:/...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:17.663079,937,9000,323 +github_ollama_ollama_106953b7a2ad38cdbd18a3c5c1cfc2b3fe4a5b2b,app/wintray/menus.go,menus.go,,3092,Go,"//go:build windows + +package wintray + +import ( + ""fmt"" + ""log/slog"" + ""os"" + ""os/exec"" + ""path/filepath"" + ""syscall"" + ""unsafe"" + + ""golang.org/x/sys/windows"" +) + +const ( + _ = iota + openUIMenuID + settingsUIMenuID + updateSeparatorMenuID + updateAvailableMenuID + updateMenuID + separatorMenuID + diagLogsMenuID + diagSeparatorMenuID + quitMenuID +) + +func (t *winTray) initMenus() error { + if err := t.addOrUpdateMenuItem(openUIMenuID, 0, openUIMenuTitle, false); err != nil { + return fmt.Errorf(""unable to create menu ...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:40.089676,365,3092,104 +github_ollama_ollama_dda433e28dff6a37aae95256bc011417b22a9453,app/wintray/eventloop.go,eventloop.go,,9799,Go,"//go:build windows + +package wintray + +import ( + ""fmt"" + ""log/slog"" + ""sync"" + ""unsafe"" + + ""golang.org/x/sys/windows"" +) + +var ( + quitOnce sync.Once + UI_REQUEST_MSG_ID = WM_USER + 2 + FOCUS_WINDOW_MSG_ID = WM_USER + 3 +) + +func (t *winTray) TrayRun() { + // Main message pump. + slog.Debug(""starting event handling loop"") + m := &struct { + WindowHandle windows.Handle + Message uint32 + Wparam uintptr + Lparam uintptr + Time uint32 + Pt point + LPrivate uint32...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:39.279424,1194,9799,332 +github_ollama_ollama_d9c565630920439c84f7563338bd3f7a63e53ffb,cmd/cmd_test.go,cmd_test.go,,63902,Go,"package cmd + +import ( + ""bytes"" + ""encoding/json"" + ""errors"" + ""fmt"" + ""io"" + ""net/http"" + ""net/http/httptest"" + ""os"" + ""reflect"" + ""strings"" + ""testing"" + ""time"" + + ""github.com/google/go-cmp/cmp"" + ""github.com/spf13/cobra"" + + ""github.com/ollama/ollama/api"" + ""github.com/ollama/ollama/types/model"" +) + +func TestShowInfo(t *testing.T) { + t.Run(""bare details"", func(t *testing.T) { + var b bytes.Buffer + if err := showInfo(&api.ShowResponse{ + Details: api.ModelDetails{ + Family: ""test"", + ParameterS...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:44.977112,6431,63902,2280 +github_ollama_ollama_2d76219bf3de836af23df453528135f1a0e1debc,cmd/cmd_launcher_test.go,cmd_launcher_test.go,,7821,Go,"package cmd + +import ( + ""context"" + ""testing"" + + ""github.com/spf13/cobra"" + + ""github.com/ollama/ollama/cmd/config"" + ""github.com/ollama/ollama/cmd/launch"" + ""github.com/ollama/ollama/cmd/tui"" +) + +func setCmdTestHome(t *testing.T, dir string) { + t.Helper() + t.Setenv(""HOME"", dir) + t.Setenv(""USERPROFILE"", dir) +} + +func unexpectedRunModelResolution(t *testing.T) func(context.Context, launch.RunModelRequest) (string, error) { + t.Helper() + return func(ctx context.Context, req launch.RunModelRequest) (string, ...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:44.637629,773,7821,271 +github_ollama_ollama_43a2e7d3c48da6bbe1b15e88afdf82a8f49a7927,cmd/cmd.go,cmd.go,,62358,Go,"package cmd + +import ( + ""bufio"" + ""context"" + ""crypto/ed25519"" + ""crypto/rand"" + ""encoding/json"" + ""encoding/pem"" + ""errors"" + ""fmt"" + ""io"" + ""log"" + ""log/slog"" + ""math"" + ""net"" + ""net/http"" + ""os"" + ""os/exec"" + ""os/signal"" + ""path/filepath"" + ""runtime"" + ""slices"" + ""sort"" + ""strconv"" + ""strings"" + ""sync/atomic"" + ""syscall"" + ""time"" + + ""github.com/containerd/console"" + ""github.com/mattn/go-runewidth"" + ""github.com/olekukonko/tablewriter"" + ""github.com/pkg/browser"" + ""github.com/spf13/cobra"" + ""golang.org/x/crypto/ssh"" + ""golang...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:44.354065,7147,62354,2417 +github_ollama_ollama_89c5327d1f86d7bc43d7581658cd92456575b38a,cmd/launch/pi.go,pi.go,,10471,Go,"package launch + +import ( + ""context"" + ""encoding/json"" + ""fmt"" + ""net/http"" + ""os"" + ""os/exec"" + ""path/filepath"" + ""slices"" + ""strings"" + + ""github.com/ollama/ollama/api"" + ""github.com/ollama/ollama/cmd/internal/fileutil"" + ""github.com/ollama/ollama/envconfig"" + ""github.com/ollama/ollama/types/model"" +) + +// Pi implements Runner and Editor for Pi (Pi Coding Agent) integration +type Pi struct{} + +const ( + piNpmPackage = ""@mariozechner/pi-coding-agent"" + piWebSearchSource = ""npm:@ollama/pi-web-search"" + piWebSea...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:57.791524,1322,10467,397 +github_ollama_ollama_4ac24deb9ab9fed51768eb3ed538029d4ee496bb,cmd/launch/codex.go,codex.go,,3670,Go,"package launch + +import ( + ""fmt"" + ""os"" + ""os/exec"" + ""path/filepath"" + ""strings"" + + ""github.com/ollama/ollama/envconfig"" + ""golang.org/x/mod/semver"" +) + +// Codex implements Runner for Codex integration +type Codex struct{} + +func (c *Codex) String() string { return ""Codex"" } + +const codexProfileName = ""ollama-launch"" + +func (c *Codex) args(model string, extra []string) []string { + args := []string{""--profile"", codexProfileName} + if model != """" { + args = append(args, ""-m"", model) + } + args = append(args, ex...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:49.782566,471,3670,149 +github_ollama_ollama_f2440a27fa871f35a755cbbb0c8c5448cfe1f0b2,cmd/launch/cline_test.go,cline_test.go,,5643,Go,"package launch + +import ( + ""encoding/json"" + ""os"" + ""path/filepath"" + ""testing"" +) + +func TestClineIntegration(t *testing.T) { + c := &Cline{} + + t.Run(""String"", func(t *testing.T) { + if got := c.String(); got != ""Cline"" { + t.Errorf(""String() = %q, want %q"", got, ""Cline"") + } + }) + + t.Run(""implements Runner"", func(t *testing.T) { + var _ Runner = c + }) + + t.Run(""implements Editor"", func(t *testing.T) { + var _ Editor = c + }) +} + +func TestClineEdit(t *testing.T) { + c := &Cline{} + tmpDir := t.TempDir() + s...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:49.479595,595,5643,205 +github_ollama_ollama_a6d469000f58fb75bd8e9452c2a25e8bfbec82c8,app/store/schema_test.go,schema_test.go,,1539,Go,"//go:build windows || darwin + +package store + +import ( + ""path/filepath"" + ""testing"" +) + +func TestSchemaVersioning(t *testing.T) { + tmpDir := t.TempDir() + // Override legacy config path to avoid migration logs + oldLegacyConfigPath := legacyConfigPath + legacyConfigPath = filepath.Join(tmpDir, ""config.json"") + defer func() { legacyConfigPath = oldLegacyConfigPath }() + + t.Run(""new database has correct schema version"", func(t *testing.T) { + dbPath := filepath.Join(tmpDir, ""new_db.sqlite"") + db, err := n...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:27.869417,199,1539,61 +github_ollama_ollama_0b3c061124608c4bed9155ed88d7d100563e3c49,app/store/migration_test.go,migration_test.go,,7925,Go,"//go:build windows || darwin + +package store + +import ( + ""database/sql"" + ""encoding/json"" + ""os"" + ""path/filepath"" + ""testing"" +) + +func TestConfigMigration(t *testing.T) { + tmpDir := t.TempDir() + // Create a legacy config.json + legacyConfig := legacyData{ + ID: ""test-device-id-12345"", + FirstTimeRun: true, // In old system, true meant ""has completed first run"" + } + + configData, err := json.MarshalIndent(legacyConfig, """", "" "") + if err != nil { + t.Fatal(err) + } + + configPath := filepath.Join(tm...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:27.081781,1066,7925,291 +github_ollama_ollama_8d0f08d65247d47341c64220e356f9b27f010cbe,app/dialog/dlgs_darwin.go,dlgs_darwin.go,,1840,Go,"package dialog + +import ( + ""github.com/ollama/ollama/app/dialog/cocoa"" +) + +func (b *MsgBuilder) yesNo() bool { + return cocoa.YesNoDlg(b.Msg, b.Dlg.Title) +} + +func (b *MsgBuilder) info() { + cocoa.InfoDlg(b.Msg, b.Dlg.Title) +} + +func (b *MsgBuilder) error() { + cocoa.ErrorDlg(b.Msg, b.Dlg.Title) +} + +func (b *FileBuilder) load() (string, error) { + return b.run(false) +} + +func (b *FileBuilder) loadMultiple() ([]string, error) { + return b.runMultiple() +} + +func (b *FileBuilder) save() (string, error) { + retu...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:20.690230,282,1840,83 +github_ollama_ollama_7a042d77d49192d04131331f1667d36993407c69,cmd/interactive_test.go,interactive_test.go,,3922,Go,"package cmd + +import ( + ""os"" + ""path/filepath"" + ""testing"" + + ""github.com/stretchr/testify/assert"" +) + +func TestExtractFilenames(t *testing.T) { + // Unix style paths + input := ` some preamble + ./relative\ path/one.png inbetween1 ./not a valid two.jpg inbetween2 ./1.svg +/unescaped space /three.jpeg inbetween3 /valid\ path/dir/four.png ""./quoted with spaces/five.JPG +/unescaped space /six.webp inbetween6 /valid\ path/dir/seven.WEBP` + res := extractFileNames(input) + assert.Len(t, res, 7) + assert.Contain...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:47.823613,431,3922,117 +github_ollama_ollama_ea1ed9841330045ecf1eab759b3f3ce3c41b415a,cmd/interactive.go,interactive.go,,21963,Go,"package cmd + +import ( + ""cmp"" + ""errors"" + ""fmt"" + ""io"" + ""net/http"" + ""os"" + ""os/exec"" + ""path/filepath"" + ""regexp"" + ""slices"" + ""strings"" + + ""github.com/spf13/cobra"" + + ""github.com/ollama/ollama/api"" + ""github.com/ollama/ollama/envconfig"" + ""github.com/ollama/ollama/internal/modelref"" + ""github.com/ollama/ollama/readline"" + ""github.com/ollama/ollama/types/errtypes"" + ""github.com/ollama/ollama/types/model"" +) + +type MultilineState int + +const ( + MultilineNone MultilineState = iota + MultilinePrompt + MultilineSystem +...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:47.535242,2514,21963,736 +github_ollama_ollama_74a323ba387e507d0037dd71038e8e1c05149bd9,app/updater/updater_darwin_test.go,updater_darwin_test.go,,15828,Go,"package updater + +import ( + ""archive/zip"" + ""io/fs"" + ""os"" + ""path/filepath"" + ""strings"" + ""testing"" +) + +func TestDoUpgrade(t *testing.T) { + tmpDir := t.TempDir() + BundlePath = filepath.Join(tmpDir, ""Ollama.app"") + appContents := filepath.Join(BundlePath, ""Contents"") + appBackupDir = filepath.Join(tmpDir, ""backup"") + appContentsOld := filepath.Join(appBackupDir, ""Ollama.app"", ""Contents"") + UpdateStageDir = filepath.Join(tmpDir, ""updates"") + UpgradeMarkerFile = filepath.Join(tmpDir, ""upgraded"") + bundle := fi...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:36.002709,2313,15828,327 +github_ollama_ollama_1985fda7d6e5670793b3b7f49f21903e785ace83,app/store/store_test.go,store_test.go,,5252,Go,"//go:build windows || darwin + +package store + +import ( + ""path/filepath"" + ""testing"" +) + +func TestStore(t *testing.T) { + s, cleanup := setupTestStore(t) + defer cleanup() + + t.Run(""default id"", func(t *testing.T) { + // ID should be automatically generated + id, err := s.ID() + if err != nil { + t.Fatal(err) + } + if id == """" { + t.Error(""expected non-empty ID"") + } + + // Verify ID is persisted + id2, err := s.ID() + if err != nil { + t.Fatal(err) + } + if id != id2 { + t.Errorf(""expected ID %s, g...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:28.479010,696,5252,219 +github_ollama_ollama_5eef5b4f12f9a176e50c0d6aed0dd5efbc72fa55,app/logrotate/logrotate_test.go,logrotate_test.go,,2006,Go,"//go:build windows || darwin + +package logrotate + +import ( + ""os"" + ""path/filepath"" + ""strconv"" + ""testing"" +) + +func TestRotate(t *testing.T) { + logDir := t.TempDir() + logFile := filepath.Join(logDir, ""testlog.log"") + + // No log exists + Rotate(logFile) + + if err := os.WriteFile(logFile, []byte(""1""), 0o644); err != nil { + t.Fatal(err) + } + if _, err := os.Stat(logFile); os.IsNotExist(err) { + t.Fatal(""expected log file to exist"") + } + + // First rotation + Rotate(logFile) + if _, err := os.Stat(filepath.Join...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:22.975653,251,2006,71 +github_ollama_ollama_df8ba9c01cb8b7f98e6290395a303848848da11d,app/logrotate/logrotate.go,logrotate.go,,1061,Go,"//go:build windows || darwin + +// package logrotate provides utilities for rotating logs +// TODO (jmorgan): this most likely doesn't need it's own +// package and can be moved to app where log files are created +package logrotate + +import ( + ""log/slog"" + ""os"" + ""strconv"" + ""strings"" +) + +const MaxLogFiles = 5 + +func Rotate(filename string) { + if _, err := os.Stat(filename); os.IsNotExist(err) { + return + } + + index := strings.LastIndex(filename, ""."") + pre := filename[:index] + post := ""."" + filename[index+1...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:22.658040,172,1061,46 +github_ollama_ollama_34d12dfd6efe8073db8f0ffdf51653a37eb57e30,app/server/server_test.go,server_test.go,,10428,Go,"//go:build windows || darwin + +package server + +import ( + ""context"" + ""os"" + ""path/filepath"" + ""reflect"" + ""strings"" + ""testing"" + ""time"" + + ""github.com/ollama/ollama/app/store"" +) + +func TestNew(t *testing.T) { + tmpDir := t.TempDir() + st := &store.Store{DBPath: filepath.Join(tmpDir, ""db.sqlite"")} + defer st.Close() // Ensure database is closed before cleanup + s := New(st, false) + + if s == nil { + t.Fatal(""expected non-nil server"") + } + + if s.bin == """" { + t.Error(""expected non-empty bin path"") + } +} + +func Te...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:24.100468,1038,10425,344 +github_ollama_ollama_89a8df58fff57f22f283c12f61fc730ff8857cd5,app/server/server.go,server.go,,9367,Go,"//go:build windows || darwin + +package server + +import ( + ""bufio"" + ""context"" + ""errors"" + ""fmt"" + ""io"" + ""log/slog"" + ""os"" + ""os/exec"" + ""path/filepath"" + ""regexp"" + ""runtime"" + ""strconv"" + ""strings"" + ""time"" + + ""github.com/ollama/ollama/app/logrotate"" + ""github.com/ollama/ollama/app/store"" +) + +const restartDelay = time.Second + +// Server is a managed ollama server process +type Server struct { + store *store.Store + bin string // resolved path to `ollama` + log io.WriteCloser + dev bool // true if running with ...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:23.790374,1216,9367,387 +github_ollama_ollama_5658b61eb9c2462ceb339b87818ffbd5aa44ddda,app/ui/ui_test.go,ui_test.go,,23075,Go,"//go:build windows || darwin + +package ui + +import ( + ""bytes"" + ""context"" + ""encoding/json"" + ""io"" + ""net/http"" + ""net/http/httptest"" + ""path/filepath"" + ""runtime"" + ""strings"" + ""sync/atomic"" + ""testing"" + + ""github.com/ollama/ollama/api"" + ""github.com/ollama/ollama/app/store"" + ""github.com/ollama/ollama/app/updater"" +) + +func TestHandlePostApiSettings(t *testing.T) { + tests := []struct { + name string + requested store.Settings + wantErr bool + }{ + { + name: ""valid settings update - all fields"", + reque...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:34.205322,2569,23075,843 +github_ollama_ollama_9ce71d001a51d84576e92f6d262b1759467617ad,app/wintray/winclass.go,winclass.go,,1228,Go,"//go:build windows + +package wintray + +import ( + ""unsafe"" + + ""golang.org/x/sys/windows"" +) + +// Contains window class information. +// It is used with the RegisterClassEx and GetClassInfoEx functions. +// https://msdn.microsoft.com/en-us/library/ms633577.aspx +type wndClassEx struct { + Size, Style uint32 + WndProc uintptr + ClsExtra, WndExtra int32 + Instance, Icon, Cursor, Background windows.Handle + MenuName, ClassName *uint1...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:42.223547,131,1228,46 +github_ollama_ollama_c19e24d1e47dd1b9d770865697ebc04741739bce,cmd/launch/codex_test.go,codex_test.go,,7100,Go,"package launch + +import ( + ""os"" + ""path/filepath"" + ""slices"" + ""strings"" + ""testing"" +) + +func TestCodexArgs(t *testing.T) { + c := &Codex{} + + tests := []struct { + name string + model string + args []string + want []string + }{ + {""with model"", ""llama3.2"", nil, []string{""--profile"", ""ollama-launch"", ""-m"", ""llama3.2""}}, + {""empty model"", """", nil, []string{""--profile"", ""ollama-launch""}}, + {""with model and extra args"", ""qwen3.5"", []string{""-p"", ""myprofile""}, []string{""--profile"", ""ollama-launch"", ""-m"",...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:50.598579,704,7100,230 +github_ollama_ollama_1ecd42cfc3280a3119e4023e737b679fb977715a,cmd/bench/bench.go,bench.go,,17289,Go,"package main + +import ( + ""cmp"" + ""context"" + ""flag"" + ""fmt"" + ""io"" + ""os"" + ""runtime"" + ""slices"" + ""strings"" + ""sync"" + ""time"" + + ""github.com/ollama/ollama/api"" +) + +type flagOptions struct { + models *string + epochs *int + maxTokens *int + temperature *float64 + seed *int + timeout *int + prompt *string + imageFile *string + keepAlive *float64 + format *string + outputFile *string + debug *bool + verbose *bool + warmup *int + promptTokens *int + numCtx ...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:43.071138,1999,17287,562 +github_ollama_ollama_da3904576e28aab99cb77ae3e8f610cf49a8963f,cmd/launch/claude.go,claude.go,,1993,Go,"package launch + +import ( + ""fmt"" + ""os"" + ""os/exec"" + ""path/filepath"" + ""runtime"" + ""strconv"" + + ""github.com/ollama/ollama/envconfig"" +) + +// Claude implements Runner for Claude Code integration. +type Claude struct{} + +func (c *Claude) String() string { return ""Claude Code"" } + +func (c *Claude) args(model string, extra []string) []string { + var args []string + if model != """" { + args = append(args, ""--model"", model) + } + args = append(args, extra...) + return args +} + +func (c *Claude) findPath() (string, error...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:48.605140,246,1993,88 +github_ollama_ollama_090bdf7dca00a9c61d13a2a374a5e168a3e49876,app/format/field.go,field.go,,633,Go,"//go:build windows || darwin + +package format + +import ( + ""strings"" + ""unicode"" +) + +// KebabCase converts a string from camelCase or PascalCase to kebab-case. +// (e.g. ""camelCase"" -> ""camel-case"") +func KebabCase(str string) string { + var result strings.Builder + + for i, char := range str { + if i > 0 { + prevChar := rune(str[i-1]) + + // Add hyphen before uppercase letters + if unicode.IsUpper(char) && + (unicode.IsLower(prevChar) || unicode.IsDigit(prevChar) || + (i < len(str)-1 && unicode.Is...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:22.081227,77,633,31 +github_ollama_ollama_2848c479805f07df982c7efad6454b3e3a60b745,app/dialog/util.go,util.go,,153,Go,"//go:build windows + +package dialog + +func firstOf(args ...string) string { + for _, arg := range args { + if arg != """" { + return arg + } + } + return """" +} +...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:21.787248,28,153,13 +github_ollama_ollama_df2f988514943c0da3fac0efc7bf639340cd6b76,app/store/test_home_test.go,test_home_test.go,,178,Go,"//go:build windows || darwin + +package store + +import ""testing"" + +func setTestHome(t *testing.T, home string) { + t.Helper() + t.Setenv(""HOME"", home) + t.Setenv(""USERPROFILE"", home) +} +...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:28.768932,20,178,12 +github_ollama_ollama_fa43b7400939f5aa00d89b9e50e510d7dd29e497,cmd/background_windows.go,background_windows.go,,355,Go,"package cmd + +import ""syscall"" + +// backgroundServerSysProcAttr returns SysProcAttr for running the server in the background on Windows. +// CREATE_NO_WINDOW (0x08000000) prevents a console window from appearing. +func backgroundServerSysProcAttr() *syscall.SysProcAttr { + return &syscall.SysProcAttr{ + CreationFlags: 0x08000000, + HideWindow: true, + } +} +...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:42.776133,38,355,13 +github_ollama_ollama_700f79fc46e7023ba13a1db02099badc382c0348,app/dialog/dlgs.go,dlgs.go,,5406,Go,"//go:build windows || darwin + +// Package dialog provides a simple cross-platform common dialog API. +// Eg. to prompt the user with a yes/no dialog: +// +// if dialog.MsgDlg(""%s"", ""Do you want to continue?"").YesNo() { +// // user pressed Yes +// } +// +// The general usage pattern is to call one of the toplevel *Dlg functions +// which return a *Builder structure. From here you can optionally call +// configuration functions (eg. Title) to customise the dialog, before +// using a launcher function to ...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:20.207234,817,5406,183 +github_ollama_ollama_2d3297e187ce967403f70ee0ad2fd011bb1cb90c,app/auth/connect.go,connect.go,,634,Go,"//go:build windows || darwin + +package auth + +import ( + ""encoding/base64"" + ""fmt"" + ""net/url"" + ""os"" + + ""github.com/ollama/ollama/auth"" +) + +// BuildConnectURL generates the connect URL with the public key and device name +func BuildConnectURL(baseURL string) (string, error) { + pubKey, err := auth.GetPublicKey() + if err != nil { + return """", fmt.Errorf(""failed to get public key: %w"", err) + } + + encodedKey := base64.RawURLEncoding.EncodeToString([]byte(pubKey)) + hostname, _ := os.Hostname() + encodedDevice ...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:19.911209,69,634,27 +github_ollama_ollama_1146e41c5eb41735def5c846b9c416da0f8d213e,app/assets/assets.go,assets.go,,264,Go,"//go:build windows || darwin + +package assets + +import ( + ""embed"" + ""io/fs"" +) + +//go:embed *.ico +var icons embed.FS + +func ListIcons() ([]string, error) { + return fs.Glob(icons, ""*"") +} + +func GetIcon(filename string) ([]byte, error) { + return icons.ReadFile(filename) +} +...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:19.566437,34,264,20 +github_ollama_ollama_9902c5bee2ef0f8a3e32a9550b1d9672e94c9b61,api/types_typescript_test.go,types_typescript_test.go,,2768,Go,"package api + +import ( + ""testing"" +) + +func TestToolParameterToTypeScriptType(t *testing.T) { + tests := []struct { + name string + param ToolProperty + expected string + }{ + { + name: ""single string type"", + param: ToolProperty{ + Type: PropertyType{""string""}, + }, + expected: ""string"", + }, + { + name: ""single number type"", + param: ToolProperty{ + Type: PropertyType{""number""}, + }, + expected: ""number"", + }, + { + name: ""integer maps to number"", + param: ToolProperty{ + Typ...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:18.788939,300,2768,143 +github_ollama_ollama_69d9c5a3d9010443339456ba1938aacdc3251692,api/types_test.go,types_test.go,,21786,Go,"package api + +import ( + ""encoding/json"" + ""errors"" + ""math"" + ""testing"" + ""time"" + + ""github.com/stretchr/testify/assert"" + ""github.com/stretchr/testify/require"" +) + +// testPropsMap creates a ToolPropertiesMap from a map (convenience function for tests, order not preserved) +func testPropsMap(m map[string]ToolProperty) *ToolPropertiesMap { + props := NewToolPropertiesMap() + for k, v := range m { + props.Set(k, v) + } + return props +} + +// testArgs creates ToolCallFunctionArguments from a map (convenience func...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:18.443621,2195,21786,913 +github_ollama_ollama_a0acd66414cf64668d52653d0cb0a24f884490fd,api/types.go,types.go,,39265,Go,"package api + +import ( + ""encoding/json"" + ""fmt"" + ""iter"" + ""log/slog"" + ""math"" + ""os"" + ""reflect"" + ""strconv"" + ""strings"" + ""time"" + + ""github.com/google/uuid"" + + ""github.com/ollama/ollama/envconfig"" + ""github.com/ollama/ollama/internal/orderedmap"" + ""github.com/ollama/ollama/types/model"" +) + +// StatusError is an error with an HTTP status code and message. +type StatusError struct { + StatusCode int + Status string + ErrorMessage string `json:""error""` +} + +func (e StatusError) Error() string { + switch { + case...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:18.122921,4908,39265,1301 +github_ollama_ollama_2c50716b212dfab8a58818f766b2c801ea205b53,app/server/server_unix.go,server_unix.go,,2322,Go,"//go:build darwin + +package server + +import ( + ""context"" + ""errors"" + ""fmt"" + ""log/slog"" + ""os"" + ""os/exec"" + ""path/filepath"" + ""strconv"" + ""strings"" + ""syscall"" +) + +var ( + pidFile = filepath.Join(os.Getenv(""HOME""), ""Library"", ""Application Support"", ""Ollama"", ""ollama.pid"") + serverLogPath = filepath.Join(os.Getenv(""HOME""), "".ollama"", ""logs"", ""server.log"") +) + +func commandContext(ctx context.Context, name string, arg ...string) *exec.Cmd { + return exec.CommandContext(ctx, name, arg...) +} + +func terminate(...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:24.392184,309,2322,105 +github_ollama_ollama_ae8292ebf8ebc1174fc74942ffe731a6e6a872e5,app/updater/updater_test.go,updater_test.go,,9904,Go,"//go:build windows || darwin + +package updater + +import ( + ""archive/zip"" + ""bytes"" + ""context"" + ""fmt"" + ""io"" + ""log/slog"" + ""net/http"" + ""net/http/httptest"" + ""path/filepath"" + ""sync/atomic"" + ""testing"" + ""time"" + + ""github.com/ollama/ollama/app/store"" +) + +func TestIsNewReleaseAvailable(t *testing.T) { + slog.SetLogLoggerLevel(slog.LevelDebug) + var server *httptest.Server + server = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.URL.Path == ""/update.json"" { + w.Write([...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:36.331722,1061,9904,378 +github_ollama_ollama_76bc50c23a5cda439d98804a51d0c4913c8a787e,app/webview/webview.go,webview.go,,10643,Go,"//go:build windows || darwin + +/* + * MIT License + * + * Copyright (c) 2017 Serge Zaitsev + * Copyright (c) 2022 Steffen André Langnes + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the ""Software""), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:38.587341,1487,10642,369 +github_ollama_ollama_5955d601ccfc3d8074fe7e7771228215d4824b66,app/version/version.go,version.go,,76,Go,"//go:build windows || darwin + +package version + +var Version string = ""0.0.0"" +...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:37.196650,11,76,6 +github_ollama_ollama_9ad886809e47236ef036f89e422e046b8a46f67e,cmd/launch/cline.go,cline.go,,2398,Go,"package launch + +import ( + ""encoding/json"" + ""fmt"" + ""os"" + ""os/exec"" + ""path/filepath"" + + ""github.com/ollama/ollama/cmd/internal/fileutil"" + ""github.com/ollama/ollama/envconfig"" +) + +// Cline implements Runner and Editor for the Cline CLI integration +type Cline struct{} + +func (c *Cline) String() string { return ""Cline"" } + +func (c *Cline) Run(model string, args []string) error { + if _, err := exec.LookPath(""cline""); err != nil { + return fmt.Errorf(""cline is not installed, install with: npm install -g cl...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:49.202694,312,2398,105 +github_ollama_ollama_bdfa8ecbb8b78c3d3ce85da4524dfa3b7e715f94,cmd/launch/claude_test.go,claude_test.go,,5031,Go,"package launch + +import ( + ""os"" + ""path/filepath"" + ""runtime"" + ""slices"" + ""strings"" + ""testing"" +) + +func TestClaudeIntegration(t *testing.T) { + c := &Claude{} + + t.Run(""String"", func(t *testing.T) { + if got := c.String(); got != ""Claude Code"" { + t.Errorf(""String() = %q, want %q"", got, ""Claude Code"") + } + }) + + t.Run(""implements Runner"", func(t *testing.T) { + var _ Runner = c + }) +} + +func TestClaudeFindPath(t *testing.T) { + c := &Claude{} + + t.Run(""finds claude in PATH"", func(t *testing.T) { + tmpDir :...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:48.909313,564,5031,172 +github_ollama_ollama_861e090c102f76c908bcfca4f961bca3d23c357d,app/wintray/w32api.go,w32api.go,,4016,Go,"//go:build windows + +package wintray + +import ( + ""runtime"" + + ""golang.org/x/sys/windows"" +) + +var ( + k32 = windows.NewLazySystemDLL(""Kernel32.dll"") + u32 = windows.NewLazySystemDLL(""User32.dll"") + s32 = windows.NewLazySystemDLL(""Shell32.dll"") + + pCreatePopupMenu = u32.NewProc(""CreatePopupMenu"") + pCreateWindowEx = u32.NewProc(""CreateWindowExW"") + pDefWindowProc = u32.NewProc(""DefWindowProcW"") + pDestroyWindow = u32.NewProc(""DestroyWindow"") + pDispatchMessage = u32.NewProc(...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:41.457714,346,4016,112 +github_ollama_ollama_179fbc1a40d550146ee21ee63d03634ee0859b46,app/wintray/tray.go,tray.go,,12378,Go,"//go:build windows + +package wintray + +import ( + ""crypto/md5"" + ""encoding/hex"" + ""fmt"" + ""log/slog"" + ""os"" + ""path/filepath"" + ""sort"" + ""sync"" + ""syscall"" + ""unsafe"" + + ""github.com/ollama/ollama/app/assets"" + ""golang.org/x/sys/windows"" +) + +const ( + UpdateIconName = ""tray_upgrade.ico"" + IconName = ""tray.ico"" + ClassName = ""OllamaClass"" +) + +func NewTray(app AppCallbacks) (TrayCallbacks, error) { + updateIcon, err := assets.GetIcon(UpdateIconName) + if err != nil { + return nil, fmt.Errorf(""failed to load ...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:41.164047,1338,12378,514 +github_ollama_ollama_4707166989a2d2b305afb5949af4b0fdf47ef86f,app/wintray/notifyicon.go,notifyicon.go,,1466,Go,"//go:build windows + +package wintray + +import ( + ""unsafe"" + + ""golang.org/x/sys/windows"" +) + +// Contains information that the system needs to display notifications in the notification area. +// Used by Shell_NotifyIcon. +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb773352(v=vs.85).aspx +// https://msdn.microsoft.com/en-us/library/windows/desktop/bb762159 +type notifyIconData struct { + Size uint32 + Wnd windows.Handle + ID, Flags, CallbackMessage...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:40.843801,154,1466,67 +github_ollama_ollama_f1a9bbac00a1595d85286bd7e0c4e73700918a27,cmd/launch/integrations_test.go,integrations_test.go,,50748,Go,"package launch + +import ( + ""context"" + ""encoding/json"" + ""errors"" + ""fmt"" + ""net/http"" + ""net/http/httptest"" + ""net/url"" + ""slices"" + ""strings"" + ""testing"" + + ""github.com/google/go-cmp/cmp"" + ""github.com/ollama/ollama/api"" + ""github.com/ollama/ollama/cmd/config"" +) + +type stubEditorRunner struct { + edited [][]string + ranModel string + editErr error +} + +func (s *stubEditorRunner) Run(model string, args []string) error { + s.ranModel = model + return nil +} + +func (s *stubEditorRunner) String() string { return ""Stu...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:53.872840,5729,50748,1697 +github_ollama_ollama_0a7848c83b6c83a732be59ade43c3be3991932b3,cmd/editor_unix.go,editor_unix.go,,61,Go,"//go:build !windows + +package cmd + +const defaultEditor = ""vi"" +...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:46.837144,8,61,6 +github_ollama_ollama_044285cdbb43baf649fe05e3bc24db7e2d491179,cmd/config/config_test.go,config_test.go,,13996,Go,"package config + +import ( + ""os"" + ""path/filepath"" + ""strings"" + ""testing"" +) + +// setTestHome sets both HOME (Unix) and USERPROFILE (Windows) for cross-platform tests +func setTestHome(t *testing.T, dir string) { + t.Setenv(""HOME"", dir) + t.Setenv(""TMPDIR"", dir) + t.Setenv(""USERPROFILE"", dir) +} + +func TestIntegrationConfig(t *testing.T) { + tmpDir := t.TempDir() + setTestHome(t, tmpDir) + + t.Run(""save and load round-trip"", func(t *testing.T) { + models := []string{""llama3.2"", ""mistral"", ""qwen2.5""} + if err :=...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:46.537620,1598,13996,531 +github_ollama_ollama_9c665be35d03c230e9f663c39a50c37bc5aacf05,app/updater/updater_windows_test.go,updater_windows_test.go,,247,Go,"//go:build windows || darwin + +package updater + +import ( + ""log/slog"" + ""testing"" +) + +func TestIsInstallerRunning(t *testing.T) { + slog.SetLogLoggerLevel(slog.LevelDebug) + Installer = ""go.exe"" + if !isInstallerRunning() { + t.Fatal(""not running"") + } +} +...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:36.919931,26,247,17 +github_ollama_ollama_e54aaa3b16c8783693de93d920bdc04802362a13,app/updater/updater_windows.go,updater_windows.go,,7295,Go,"package updater + +import ( + ""errors"" + ""fmt"" + ""log/slog"" + ""os"" + ""os/exec"" + ""path"" + ""path/filepath"" + ""strings"" + ""syscall"" + ""time"" + ""unsafe"" + + ""golang.org/x/sys/windows"" +) + +var runningInstaller string + +type OSVERSIONINFOEXW struct { + dwOSVersionInfoSize uint32 + dwMajorVersion uint32 + dwMinorVersion uint32 + dwBuildNumber uint32 + dwPlatformId uint32 + szCSDVersion [128]uint16 + wServicePackMajor uint16 + wServicePackMinor uint16 + wSuiteMask uint16 + wProductType ...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:36.621331,893,7295,239 +github_ollama_ollama_2fc29b069ebe9da89cea5470747d47c8ab9f8366,api/client.go,client.go,,14029,Go,"// Package api implements the client-side API for code wishing to interact +// with the ollama service. The methods of the [Client] type correspond to +// the ollama REST API as described in [the API documentation]. +// The ollama command-line client itself uses this package to interact with +// the backend service. +// +// # Examples +// +// Several examples of using this package are available [in the GitHub +// repository]. +// +// [the API documentation]: https://github.com/ollama/ollama/blob/main/docs/...[truncated]",ollama/ollama,ollama,169218,15633,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:50:17.316962,1860,14029,479 +github_ollama_ollama_650e03a63b381018722e120cc05651f1b89431b3,main.go,main.go,.go,180,Go,"package main + +import ( + ""context"" + + ""github.com/spf13/cobra"" + + ""github.com/ollama/ollama/cmd"" +) + +func main() { + cobra.CheckErr(cmd.NewCLI().ExecuteContext(context.Background())) +} +...[truncated]",ollama/ollama,ollama,168809,15562,"Get up and running with Kimi-K2.5, GLM-5, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.","['deepseek' 'gemma' 'gemma3' 'glm' 'go' 'golang' 'gpt-oss' 'llama' + 'llama3' 'llm' 'llms' 'minimax' 'mistral' 'ollama' 'qwen']",MIT,,,,,0.95,GitHub Public Repositories,2026-04-13T13:40:53.976625,13,180,14 +github_golang_go_4ee14bff980cf0fde464731f0fb9041215a42631,src/image/geom.go,geom.go,,7498,Go,"// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package image + +import ( + ""image/color"" + ""math/bits"" + ""strconv"" +) + +// A Point is an X, Y coordinate pair. The axes increase right and down. +type Point struct { + X, Y int +} + +// String returns a string representation of p like ""(3,4)"". +func (p Point) String() string { + return ""("" + strconv.Itoa(p.X) + "","" + strconv.Itoa(p.Y) + "")"" +} + +// Add ...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:52:00.593129,1376,7498,318 +github_golang_go_2b3ff6ba582662c11c4e19392741513e584e0b38,src/image/decode_test.go,decode_test.go,,3797,Go,"// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package image_test + +import ( + ""bufio"" + ""fmt"" + ""image"" + ""image/color"" + ""os"" + ""testing"" + + _ ""image/gif"" + _ ""image/jpeg"" + _ ""image/png"" +) + +type imageTest struct { + goldenFilename string + filename string + tolerance int +} + +var imageTests = []imageTest{ + {""testdata/video-001.png"", ""testdata/video-001.png"", 0}, + // GIF images are rest...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:59.542093,498,3797,136 +github_golang_go_ad47f853dd4b3620df67b12dcc554524546d9a74,src/context/context_test.go,context_test.go,,7920,Go,"// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package context + +// Tests in package context cannot depend directly on package testing due to an import cycle. +// If your test requires access to unexported members of the context package, +// add your test below as `func XTestFoo(t testingT)` and add a `TestFoo` to x_test.go +// that calls it. Otherwise, write a regular test in a test.go f...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:37.926569,1028,7920,298 +github_golang_go_67f377e089634f15f06069c28d4779bb161b1614,src/bytes/boundary_test.go,boundary_test.go,,2898,Go,"// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. +// +//go:build linux + +package bytes_test + +import ( + . ""bytes"" + ""syscall"" + ""testing"" +) + +// This file tests the situation where byte operations are checking +// data very near to a page boundary. We want to make sure those +// operations do not read across the boundary and cause a page +// fault where they shouldn't. + +// These tests run only on ...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:30.412730,469,2898,116 +github_golang_go_be53077d9cb495e9e1a950ceccf3ceafe76900ce,src/builtin/builtin.go,builtin.go,,13556,Go,"// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +/* +Package builtin provides documentation for Go's predeclared identifiers. +The items documented here are not actually in package builtin +but their descriptions here allow godoc to present documentation +for the language's special identifiers. +*/ +package builtin + +import ""cmp"" + +// bool is the set of boolean values, true and false. +type bool...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:30.083430,2386,13556,320 +github_golang_go_6b64f7ba9c5d896356a4a3a7e2646de30e6837e0,src/bufio/scan_test.go,scan_test.go,,14597,Go,"// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package bufio_test + +import ( + . ""bufio"" + ""bytes"" + ""errors"" + ""io"" + ""strings"" + ""testing"" + ""unicode"" + ""unicode/utf8"" +) + +const smallMaxTokenSize = 256 // Much smaller for more efficient testing. + +// Test white space table matches the Unicode definition. +func TestSpace(t *testing.T) { + for r := rune(0); r <= utf8.MaxRune; r++ { + if IsSpace(r)...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:29.762314,2164,14585,597 +github_golang_go_1a0a3907c9eb8584ebbafa5bbd9dc34511080691,src/bufio/scan.go,scan.go,,14585,Go,"// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package bufio + +import ( + ""bytes"" + ""errors"" + ""io"" + ""unicode/utf8"" +) + +// Scanner provides a convenient interface for reading data such as +// a file of newline-delimited lines of text. Successive calls to +// the [Scanner.Scan] method will step through the 'tokens' of a file, skipping +// the bytes between the tokens. The specification of a to...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:29.458175,2436,14585,428 +github_golang_go_e37fdfb96d1b615a481920318e33cd76fd10b089,src/bytes/iter_test.go,iter_test.go,,1093,Go,"// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package bytes_test + +import ( + . ""bytes"" + ""testing"" +) + +func BenchmarkSplitSeqEmptySeparator(b *testing.B) { + for range b.N { + for range SplitSeq(benchInputHard, nil) { + } + } +} + +func BenchmarkSplitSeqSingleByteSeparator(b *testing.B) { + sep := []byte(""/"") + for range b.N { + for range SplitSeq(benchInputHard, sep) { + } + } +} + +func Benchmar...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:34.489632,146,1093,57 +github_golang_go_f9b762be8d49667f8714742d616b24a60bfc10d4,src/bufio/bufio.go,bufio.go,,22506,Go,"// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package bufio implements buffered I/O. It wraps an io.Reader or io.Writer +// object, creating another object (Reader or Writer) that also implements +// the interface but provides buffering and some help for textual I/O. +package bufio + +import ( + ""bytes"" + ""errors"" + ""io"" + ""strings"" + ""unicode/utf8"" +) + +const ( + defaultBufSize = 4096 +) + +var ...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:27.235227,3897,22506,843 +github_golang_go_017c33c502a7183c7e64f839ac3b36d0cf82396b,src/arena/arena_test.go,arena_test.go,,742,Go,"// Copyright 2022 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build goexperiment.arenas + +package arena_test + +import ( + ""arena"" + ""testing"" +) + +type T1 struct { + n int +} +type T2 [1 << 20]byte // 1MiB + +func TestSmoke(t *testing.T) { + a := arena.NewArena() + defer a.Free() + + tt := arena.New[T1](a) + tt.n = 1 + + ts := arena.MakeSlice[T1](a, 99, 100) + if len(ts) != 99 { + t.Errorf(""Slice() len = %d, want...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:26.837851,126,742,43 +github_golang_go_334a94e2983e634a0d010742e93dc39d30fa6b9d,src/fmt/format.go,format.go,,14069,Go,"// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package fmt + +import ( + ""strconv"" + ""unicode/utf8"" +) + +const ( + ldigits = ""0123456789abcdefx"" + udigits = ""0123456789ABCDEFX"" +) + +const ( + signed = true + unsigned = false +) + +// flags placed in a separate struct for easy clearing. +type fmtFlags struct { + widPresent bool + precPresent bool + minus bool + plus bool + sharp bool +...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:52.294877,2461,14069,596 +github_golang_go_c07da5683c24635d02f26ec31d61aca02b438efd,src/fmt/fmt_test.go,fmt_test.go,,64267,Go,"// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package fmt_test + +import ( + ""bytes"" + . ""fmt"" + ""internal/race"" + ""io"" + ""math"" + ""reflect"" + ""strings"" + ""testing"" + ""time"" + ""unicode"" +) + +type ( + renamedBool bool + renamedInt int + renamedInt8 int8 + renamedInt16 int16 + renamedInt32 int32 + renamedInt64 int64 + renamedUint uint + renamedUint8 uint8 + rename...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:51.475591,7911,63686,2029 +github_golang_go_38bec8243e7baa5e76a6fb128ba204785b082cab,src/io/io_test.go,io_test.go,,19192,Go,"// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package io_test + +import ( + ""bytes"" + ""errors"" + ""fmt"" + . ""io"" + ""os"" + ""strings"" + ""sync"" + ""sync/atomic"" + ""testing"" +) + +// A version of bytes.Buffer without ReadFrom and WriteTo +type Buffer struct { + bytes.Buffer + ReaderFrom // conflicts with and hides bytes.Buffer's ReaderFrom. + WriterTo // conflicts with and hides bytes.Buffer's WriterTo. +}...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:52:04.777952,2878,19192,695 +github_golang_go_d66a3e48378faa4beba20ed388d22afc1f605cfa,src/html/escape.go,escape.go,,5248,Go,"// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package html provides functions for escaping and unescaping HTML text. +package html + +import ( + ""strings"" + ""unicode/utf8"" +) + +// These replacements permit compatibility with old numeric entities that +// assumed Windows-1252 encoding. +// https://html.spec.whatwg.org/multipage/parsing.html#numeric-character-reference-end-state +var replacem...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:57.371623,864,5247,215 +github_golang_go_4011da6141db4bc9fc82021b6a7ba59001ab0c78,src/html/entity_test.go,entity_test.go,,1133,Go,"// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package html + +import ( + ""testing"" + ""unicode/utf8"" +) + +func TestEntityLength(t *testing.T) { + entity, entity2 := entityMaps() + + if len(entity) == 0 || len(entity2) == 0 { + t.Fatal(""maps not loaded"") + } + + // We verify that the length of UTF-8 encoding of each value is <= 1 + len(key). + // The +1 comes from the leading ""&"". This property imp...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:57.075350,184,1133,36 +github_golang_go_421a54ab572eb27cfa15b2f415007ae751bb4a64,src/html/entity.go,entity.go,,117002,Go,"// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package html + +import ""sync"" + +// All entities that do not end with ';' are 6 or fewer bytes long. +const longestEntityWithoutSemicolon = 6 + +// entityMaps returns entity and entity2. +// +// entity is a map from HTML entity names to their values. The semicolon matters: +// https://html.spec.whatwg.org/multipage/named-characters.html +// lists bo...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:56.782833,4703,117002,2262 +github_golang_go_3091f7a67acedeaf72fd3851cf295c1e7bd88e8f,src/hash/marshal_test.go,marshal_test.go,,5563,Go,"// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Test that the hashes in the standard library implement +// BinaryMarshaler, BinaryUnmarshaler, +// and lock in the current representations. + +package hash_test + +import ( + ""bytes"" + ""crypto/md5"" + ""crypto/sha1"" + ""crypto/sha256"" + ""crypto/sha512"" + ""encoding"" + ""encoding/hex"" + ""hash"" + ""hash/adler32"" + ""hash/crc32"" + ""hash/crc64"" + ""hash/fnv"" + ""test...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:56.351512,358,5563,108 +github_golang_go_278ae7e4e02aac1abf279e6764af7a20390051af,src/flag/flag_test.go,flag_test.go,,22573,Go,"// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package flag_test + +import ( + ""bytes"" + . ""flag"" + ""fmt"" + ""internal/testenv"" + ""io"" + ""os"" + ""os/exec"" + ""regexp"" + ""runtime"" + ""slices"" + ""strconv"" + ""strings"" + ""testing"" + ""time"" +) + +func boolString(s string) string { + if s == ""0"" { + return ""false"" + } + return ""true"" +} + +func TestEverything(t *testing.T) { + ResetForTesting(nil) + Bool(""test_bool"", fal...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:49.035696,2998,22573,859 +github_golang_go_35b2fbd2aadd8cf69db74a254715afb592e50833,src/arena/arena.go,arena.go,,4363,Go,"// Copyright 2022 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build goexperiment.arenas + +/* +The arena package provides the ability to allocate memory for a collection +of Go values and free that space manually all at once, safely. The purpose +of this functionality is to improve efficiency: manually freeing memory +before a garbage collection delays that cycle. Less frequent cycles means +the CPU c...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:26.056466,679,4363,109 +github_golang_go_2f4d4dc71a887f133b274d9ff0213c39a07568a1,lib/time/mkzip.go,mkzip.go,,2155,Go,"// Copyright 2022 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build ignore + +// Mkzip writes a zoneinfo.zip with the content of the current directory +// and its subdirectories, with no compression, suitable for package time. +// +// Usage: +// +// go run ../../mkzip.go ../../zoneinfo.zip +// +// We use this program instead of 'zip -0 -r ../../zoneinfo.zip *' to get +// a reproducible generator that doe...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:25.143950,304,2155,95 +github_golang_go_def84179532e4e3530ac5ffcaa74e4fe164c0e70,src/expvar/expvar_test.go,expvar_test.go,,13689,Go,"// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package expvar + +import ( + ""bytes"" + ""crypto/sha1"" + ""encoding/json"" + ""fmt"" + ""net"" + ""net/http/httptest"" + ""reflect"" + ""runtime"" + ""strconv"" + ""sync"" + ""sync/atomic"" + ""testing"" +) + +// RemoveAll removes all exported variables. +// This is for tests only. +func RemoveAll() { + vars.keysMu.Lock() + defer vars.keysMu.Unlock() + for _, k := range vars.keys {...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:45.946472,2013,13687,670 +github_golang_go_4f66848f1fe4cf94ea9b50f02beef556ec57270d,src/expvar/expvar.go,expvar.go,,9333,Go,"// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package expvar provides a standardized interface to public variables, such +// as operation counters in servers. It exposes these variables via HTTP at +// /debug/vars in JSON format. As of Go 1.22, the /debug/vars request must +// use GET. +// +// Operations to set or modify these public variables are atomic. +// +// In addition to adding th...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:45.093437,1439,9333,418 +github_golang_go_742e195425690332dcf32487df3834e04a4a38ea,src/bufio/bufio_test.go,bufio_test.go,,52799,Go,"// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package bufio_test + +import ( + . ""bufio"" + ""bytes"" + ""errors"" + ""fmt"" + ""internal/asan"" + ""io"" + ""math/rand"" + ""strconv"" + ""strings"" + ""testing"" + ""testing/iotest"" + ""time"" + ""unicode/utf8"" +) + +// Reads from a reader and rot13s the result. +type rot13Reader struct { + r io.Reader +} + +func newRot13Reader(r io.Reader) *rot13Reader { + r13 := new(rot13Reader)...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:27.727187,7490,52769,2000 +github_golang_go_7426afb3e69e906406ad69ed68f051366d18a0e8,src/image/format.go,format.go,,3100,Go,"// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package image + +import ( + ""bufio"" + ""errors"" + ""io"" + ""sync"" + ""sync/atomic"" +) + +// ErrFormat indicates that decoding encountered an unknown format. +var ErrFormat = errors.New(""image: unknown format"") + +// A format holds an image format's name, magic header and how to decode it. +type format struct { + name, magic string + decode func(io.Rea...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:59.816444,483,3100,110 +github_golang_go_2cc94075b29ed3286c79c7857ee8fa74340c557c,src/image/image.go,image.go,,35734,Go,"// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package image implements a basic 2-D image library. +// +// The fundamental interface is called [Image]. An [Image] contains colors, which +// are described in the image/color package. +// +// Values of the [Image] interface are created either by calling functions such +// as [NewRGBA] and [NewPaletted], or by calling [Decode] on an [io.Read...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:52:01.201063,5669,35734,1290 +github_golang_go_0e28cac1be5e4f8ead17ffb4b4cfd90803fc2e48,src/html/example_test.go,example_test.go,,619,Go,"// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package html_test + +import ( + ""fmt"" + ""html"" +) + +func ExampleEscapeString() { + const s = `""Fran & Freddie's Diner"" ` + fmt.Println(html.EscapeString(s)) + // Output: "Fran & Freddie's Diner" <tasty@example.com> +} + +func ExampleUnescapeString() { + const s = `"Fran & Freddie's Diner" <...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:58.473388,77,619,23 +github_golang_go_71902f7f5913e908665dd2c1ab66ea28bce1c36b,src/flag/flag.go,flag.go,,40845,Go,"// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +/* +Package flag implements command-line flag parsing. + +# Usage + +Define flags using [flag.String], [Bool], [Int], etc. + +This declares an integer flag, -n, stored in the pointer nFlag, with type *int: + + import ""flag"" + var nFlag = flag.Int(""n"", 1234, ""help message for flag n"") + +If you like, you can bind the flag to a variable using the Var()...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:48.660940,6561,40845,1239 +github_golang_go_9ef93ed6c5be1d0ea9949a150b7e92e6b3d59d44,src/flag/export_test.go,export_test.go,,653,Go,"// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package flag + +import ( + ""io"" + ""os"" +) + +// Additional routines compiled into the package only during testing. + +var DefaultUsage = Usage + +// ResetForTesting clears all flag state and sets the usage function as directed. +// After calling ResetForTesting, parse errors in flag handling will not +// exit the program. +func ResetForTesting(usage fu...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:48.201344,95,653,25 +github_golang_go_46f30b44e9a72289772d7078377e61db9259c896,src/fmt/doc.go,doc.go,,15827,Go,"// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +/* +Package fmt implements formatted I/O with functions analogous +to C's printf and scanf. The format 'verbs' are derived from C's but +are simpler. + +# Printing + +There are four families of printing functions defined by their output destination. +[Print], [Println] and [Printf] write to [os.Stdout]; +[Sprint], [Sprintln] and [Sprintf] return ...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:49.371760,2566,15826,400 +github_golang_go_f34cf25e9de5bdf1a4843b39ceccb45cc4d74950,src/io/pipe.go,pipe.go,,5239,Go,"// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Pipe adapter to connect code expecting an io.Reader +// with code expecting an io.Writer. + +package io + +import ( + ""errors"" + ""sync"" +) + +// onceError is an object that will only store an error once. +type onceError struct { + sync.Mutex // guards following + err error +} + +func (a *onceError) Store(err error) { + a.Lock() + defer a.Unlock()...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:52:05.684129,874,5239,203 +github_golang_go_934a6ec785fda4eddcc6d0308f523317207819f1,src/io/multi_test.go,multi_test.go,,10262,Go,"// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package io_test + +import ( + ""bytes"" + ""crypto/sha1"" + ""errors"" + ""fmt"" + . ""io"" + ""runtime"" + ""strings"" + ""testing"" + ""time"" +) + +func TestMultiReader(t *testing.T) { + var mr Reader + var buf []byte + nread := 0 + withFooBar := func(tests func()) { + r1 := strings.NewReader(""foo "") + r2 := strings.NewReader("""") + r3 := strings.NewReader(""bar"") + mr = M...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:52:05.380653,1469,10262,378 +github_golang_go_252ac868c0fc6cba22ee80ed4f98b76adf37a0ab,src/image/decode_example_test.go,decode_example_test.go,,7681,Go,"// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// This example demonstrates decoding a JPEG image and examining its pixels. +package image_test + +import ( + ""encoding/base64"" + ""fmt"" + ""image"" + ""log"" + ""strings"" + + // Package image/jpeg is not used explicitly in the code below, + // but is imported for its initialization side-effect, which allows + // image.Decode to understand JPEG formatted ...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:59.256202,496,7681,150 +github_golang_go_8b926cfe148c448696750baa12b4ce175d4dc033,src/errors/errors.go,errors.go,,3091,Go,"// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package errors implements functions to manipulate errors. +// +// The [New] function creates errors whose only content is a text message. +// +// An error e wraps another error if e's type has one of the methods +// +// Unwrap() error +// Unwrap() []error +// +// If e.Unwrap() returns a non-nil error w or a slice containing w, +// then we say th...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:42.469017,534,3091,91 +github_golang_go_818020e9dec6dd1b11456d996f123403b8b9bcdf,src/io/example_test.go,example_test.go,,5668,Go,"// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package io_test + +import ( + ""fmt"" + ""io"" + ""log"" + ""os"" + ""strings"" +) + +func ExampleCopy() { + r := strings.NewReader(""some io.Reader stream to be read\n"") + + if _, err := io.Copy(os.Stdout, r); err != nil { + log.Fatal(err) + } + + // Output: + // some io.Reader stream to be read +} + +func ExampleCopyBuffer() { + r1 := strings.NewReader(""first reader\n...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:52:03.332376,844,5668,285 +github_golang_go_06853f975f577f15c3b3a2f532a195ce8b4679e6,src/io/export_test.go,export_test.go,,283,Go,"// Copyright 2020 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package io + +// exported for test +var ErrInvalidWrite = errInvalidWrite +var ErrWhence = errWhence +var ErrOffset = errOffset +...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:52:03.650443,48,283,11 +github_golang_go_81c795a6bb8b18355ae73f4398c9ac8c755c91df,src/errors/wrap_test.go,wrap_test.go,,8109,Go,"// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package errors_test + +import ( + ""errors"" + ""fmt"" + ""io/fs"" + ""os"" + ""reflect"" + ""testing"" +) + +func TestIs(t *testing.T) { + err1 := errors.New(""1"") + erra := wrapped{""wrap 2"", err1} + errb := wrapped{""wrap 3"", erra} + + err3 := errors.New(""3"") + + poser := &poser{""either 1 or 3"", func(err error) bool { + return err == err1 || err == err3 + }} + + testCase...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:44.782385,1023,8109,439 +github_golang_go_8b51a55409fa55ee04149b31bafbe4657312d138,src/html/escape_test.go,escape_test.go,,3338,Go,"// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package html + +import ( + ""strings"" + ""testing"" +) + +type unescapeTest struct { + // A short description of the test case. + desc string + // The HTML text. + html string + // The unescaped text. + unescaped string +} + +var unescapeTests = []unescapeTest{ + // Handle no entities. + { + ""copy"", + ""A\ttext\nstring"", + ""A\ttext\nstring"", + }, + // Handle sim...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:57.688925,501,3328,170 +github_golang_go_5962834226b9d58564eafa1b240a9ff4e99171fc,src/fmt/example_test.go,example_test.go,,12099,Go,"// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package fmt_test + +import ( + ""fmt"" + ""io"" + ""math"" + ""os"" + ""strings"" + ""time"" +) + +// The Errorf function lets us use formatting features +// to create descriptive error messages. +func ExampleErrorf() { + const name, id = ""bueller"", 17 + err := fmt.Errorf(""user %q (id %d) not found"", name, id) + fmt.Println(err.Error()) + + // Output: user ""bueller"" (...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:50.778765,1993,12068,366 +github_golang_go_7f41bcb6c7086f1eb737fdd33cac1cd8135c488a,src/image/image_test.go,image_test.go,,11098,Go,"// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package image + +import ( + ""image/color"" + ""image/color/palette"" + ""testing"" +) + +type image interface { + Image + Opaque() bool + Set(int, int, color.Color) + SubImage(Rectangle) Image +} + +func cmp(cm color.Model, c0, c1 color.Color) bool { + r0, g0, b0, a0 := cm.Convert(c0).RGBA() + r1, g1, b1, a1 := cm.Convert(c1).RGBA() + return r0 == r1 && g0 == g...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:52:01.621666,1626,11098,459 +github_golang_go_07a9afffda38272d264a47af01afb37b827236c7,src/io/multi.go,multi.go,,3419,Go,"// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package io + +type eofReader struct{} + +func (eofReader) Read([]byte) (int, error) { + return 0, EOF +} + +type multiReader struct { + readers []Reader +} + +func (mr *multiReader) Read(p []byte) (n int, err error) { + for len(mr.readers) > 0 { + // Optimization to flatten nested multiReaders (Issue 13558). + if len(mr.readers) == 1 { + if r, ok := ...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:52:05.063635,562,3419,138 +github_golang_go_54333119431d0f756e80b8e9aaa2443fa6c62d97,src/image/ycbcr.go,ycbcr.go,,8876,Go,"// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package image + +import ( + ""image/color"" +) + +// YCbCrSubsampleRatio is the chroma subsample ratio used in a YCbCr image. +type YCbCrSubsampleRatio int + +const ( + YCbCrSubsampleRatio444 YCbCrSubsampleRatio = iota + YCbCrSubsampleRatio422 + YCbCrSubsampleRatio420 + YCbCrSubsampleRatio440 + YCbCrSubsampleRatio411 + YCbCrSubsampleRatio410 +) + +func (s YC...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:52:02.731416,1236,8876,330 +github_golang_go_a2968fabe27d275c60d336801deb1f6b26d2cd66,src/image/names.go,names.go,,1495,Go,"// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package image + +import ( + ""image/color"" +) + +var ( + // Black is an opaque black uniform image. + Black = NewUniform(color.Black) + // White is an opaque white uniform image. + White = NewUniform(color.White) + // Transparent is a fully transparent uniform image. + Transparent = NewUniform(color.Transparent) + // Opaque is a fully opaque uniform im...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:52:01.907972,231,1495,59 +github_golang_go_d3b47e4cb99a39264b3f26ecd5ac1cdd3bc7b188,src/bufio/net_test.go,net_test.go,,1917,Go,"// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build unix + +package bufio_test + +import ( + ""bufio"" + ""io"" + ""net"" + ""path/filepath"" + ""strings"" + ""sync"" + ""testing"" +) + +// TestCopyUnixpacket tests that we can use bufio when copying +// across a unixpacket socket. This used to fail due to an unnecessary +// empty Write call that was interpreted as an EOF. +func TestCopyUnixpacket(t *testing.T...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:29.123701,293,1917,97 +github_golang_go_1667f01a841e07cba04c62e8cf7da7ab3593ca2b,src/bufio/export_test.go,export_test.go,,597,Go,"// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package bufio + +// Exported for testing only. +import ( + ""unicode/utf8"" +) + +var IsSpace = isSpace + +const DefaultBufSize = defaultBufSize + +func (s *Scanner) MaxTokenSize(n int) { + if n < utf8.UTFMax || n > 1e9 { + panic(""bad max token size"") + } + if n < len(s.buf) { + s.buf = make([]byte, n) + } + s.maxTokenSize = n +} + +// ErrOrEOF is like Err, b...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:28.332127,106,597,30 +github_golang_go_7d4f0c1c28dce2d27f7d74b974e5f4746818d716,src/bufio/example_test.go,example_test.go,,5623,Go,"// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package bufio_test + +import ( + ""bufio"" + ""bytes"" + ""fmt"" + ""os"" + ""strconv"" + ""strings"" +) + +func ExampleWriter() { + w := bufio.NewWriter(os.Stdout) + fmt.Fprint(w, ""Hello, "") + fmt.Fprint(w, ""world!"") + w.Flush() // Don't forget to flush! + // Output: Hello, world! +} + +func ExampleWriter_AvailableBuffer() { + w := bufio.NewWriter(os.Stdout) + for _, i ...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:28.024383,829,5623,201 +github_golang_go_4d5e418c9024b338171a204839023e3a0d2d6771,src/embed/embed.go,embed.go,,13937,Go,"// Copyright 2020 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package embed provides access to files embedded in the running Go program. +// +// Go source files that import ""embed"" can use the //go:embed directive +// to initialize a variable of type string, []byte, or [FS] with the contents of +// files read from the package directory or subdirectories at compile time. +// +// For example, here are th...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:41.063586,2345,13855,437 +github_golang_go_9fede027218c31e54a478cd6a40bd4e34fac577b,src/image/geom_test.go,geom_test.go,,3099,Go,"// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package image + +import ( + ""fmt"" + ""testing"" +) + +func TestRectangle(t *testing.T) { + // in checks that every point in f is in g. + in := func(f, g Rectangle) error { + if !f.In(g) { + return fmt.Errorf(""f=%s, f.In(%s): got false, want true"", f, g) + } + for y := f.Min.Y; y < f.Max.Y; y++ { + for x := f.Min.X; x < f.Max.X; x++ { + p := Poin...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:52:00.897635,551,3099,117 +github_golang_go_5b039e985789b77ddfdbbd75e9962b1c29293b86,src/io/io.go,io.go,,23003,Go,"// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package io provides basic interfaces to I/O primitives. +// Its primary job is to wrap existing implementations of such primitives, +// such as those in package os, into shared public interfaces that +// abstract the functionality, plus some other related primitives. +// +// Because these interfaces and primitives wrap lower-level operation...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:52:03.978973,4017,23003,751 +github_golang_go_2bd1284296ae324e662583b9c52c3694bdd01a1a,src/bytes/bytes.go,bytes.go,,37609,Go,"// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package bytes implements functions for the manipulation of byte slices. +// It is analogous to the facilities of the [strings] package. +package bytes + +import ( + ""internal/bytealg"" + ""math/bits"" + ""unicode"" + ""unicode/utf8"" + _ ""unsafe"" // for linkname +) + +// Equal reports whether a and b +// are the same length and contain the same bytes. +// ...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:31.926357,6675,37609,1438 +github_golang_go_9c1ba0a838054f38d7d68890312843af7daf594d,src/bytes/buffer_test.go,buffer_test.go,,19878,Go,"// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package bytes_test + +import ( + . ""bytes"" + ""fmt"" + ""internal/testenv"" + ""io"" + ""math/rand"" + ""strconv"" + ""testing"" + ""unicode/utf8"" +) + +const N = 10000 // make this bigger for a larger (and slower) test +var testString string // test data for write tests +var testBytes []byte // test data; same as testString but as a slice. + +type negativeRead...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:31.560843,3033,19876,782 +github_golang_go_4d288b6d3b9b3e30444b634dd0403ea1245ffff2,src/encoding/encoding.go,encoding.go,,3425,Go,"// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package encoding defines interfaces shared by other packages that +// convert data to and from byte-level and textual representations. +// Packages that check for these interfaces include encoding/gob, +// encoding/json, and encoding/xml. As a result, implementing an +// interface once can make a type useful in multiple encodings. +// Stand...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:42.163632,520,3425,79 +github_golang_go_b92eb520092013f4c33e897701c99d0941aec9cb,src/embed/example_test.go,example_test.go,,464,Go,"// Copyright 2021 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package embed_test + +import ( + ""embed"" + ""log"" + ""net/http"" +) + +//go:embed internal/embedtest/testdata/*.txt +var content embed.FS + +func Example() { + mux := http.NewServeMux() + mux.Handle(""/"", http.FileServer(http.FS(content))) + err := http.ListenAndServe("":8080"", mux) + if err != nil { + log.Fatal(err) + } +} +...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:41.843509,63,464,24 +github_golang_go_c77e78809cc56ccdfa0f13aaddeed1a7a58e3abc,src/fmt/stringer_example_test.go,stringer_example_test.go,,551,Go,"// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package fmt_test + +import ( + ""fmt"" +) + +// Animal has a Name and an Age to represent an animal. +type Animal struct { + Name string + Age uint +} + +// String makes Animal satisfy the Stringer interface. +func (a Animal) String() string { + return fmt.Sprintf(""%v (%d)"", a.Name, a.Age) +} + +func ExampleStringer() { + a := Animal{ + Name: ""Gopher"", + Ag...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:54.710917,94,551,30 +github_golang_go_aeb5470399f4eec82a32533c24079f8c653dd2c9,src/context/x_test.go,x_test.go,,29653,Go,"// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package context_test + +import ( + . ""context"" + ""errors"" + ""fmt"" + ""internal/asan"" + ""math/rand"" + ""runtime"" + ""strings"" + ""sync"" + ""testing"" + ""time"" +) + +// Each XTestFoo in context_test.go must be called from a TestFoo here to run. +func TestParentFinishesChild(t *testing.T) { + XTestParentFinishesChild(t) // uses unexported context types +} +func Test...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:38.976333,3875,29653,1199 +github_golang_go_a007689d363713a4c548623ef934c6bb83918ade,src/context/net_test.go,net_test.go,,538,Go,"// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package context_test + +import ( + ""context"" + ""net"" + ""testing"" +) + +func TestDeadlineExceededIsNetError(t *testing.T) { + err, ok := context.DeadlineExceeded.(net.Error) + if !ok { + t.Fatal(""DeadlineExceeded does not implement net.Error"") + } + if !err.Timeout() || !err.Temporary() { + t.Fatalf(""Timeout() = %v, Temporary() = %v, want true, true"",...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:38.485399,73,538,22 +github_golang_go_1bed045e3947276c9100006f245c3fc3a6b4555b,src/context/example_test.go,example_test.go,,6875,Go,"// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package context_test + +import ( + ""context"" + ""errors"" + ""fmt"" + ""net"" + ""sync"" + ""time"" +) + +var neverReady = make(chan struct{}) // never closed + +// This example demonstrates the use of a cancelable context to prevent a +// goroutine leak. By the end of the example function, the goroutine started +// by gen will return without leaking. +func Exampl...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:38.191661,976,6874,261 +github_golang_go_14163a29afeb4e1615643220e8d554e1479c3064,src/fmt/export_test.go,export_test.go,,219,Go,"// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package fmt + +var IsSpace = isSpace +var Parsenum = parsenum +...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:51.085692,40,219,9 +github_golang_go_8ee4d7f77be8856c1cd4d60fdafd2b5d0eb5cbff,src/errors/join_test.go,join_test.go,,1796,Go,"// Copyright 2022 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package errors_test + +import ( + ""errors"" + ""reflect"" + ""testing"" +) + +func TestJoinReturnsNil(t *testing.T) { + if err := errors.Join(); err != nil { + t.Errorf(""errors.Join() = %v, want nil"", err) + } + if err := errors.Join(nil); err != nil { + t.Errorf(""errors.Join(nil) = %v, want nil"", err) + } + if err := errors.Join(nil, nil); err != nil { + ...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:44.195061,244,1796,77 +github_golang_go_a4ece881d20fa1ed10490d1e43dbb9179899c013,src/bytes/iter.go,iter.go,,3642,Go,"// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package bytes + +import ( + ""iter"" + ""unicode"" + ""unicode/utf8"" +) + +// Lines returns an iterator over the newline-terminated lines in the byte slice s. +// The lines yielded by the iterator include their terminating newlines. +// If s is empty, the iterator yields no lines at all. +// If s does not end in a newline, the final yielded line will not...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:33.990522,587,3642,138 +github_golang_go_ed15d8f270b93e49ee852ba1b7bec901256b9076,src/html/fuzz_test.go,fuzz_test.go,,636,Go,"// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package html + +import ""testing"" + +func FuzzEscapeUnescape(f *testing.F) { + f.Fuzz(func(t *testing.T, v string) { + e := EscapeString(v) + u := UnescapeString(e) + if u != v { + t.Errorf(""EscapeString(%q) = %q, UnescapeString(%q) = %q, want %q"", v, e, e, u, v) + } + + // As per the documentation, this isn't always equal to v, so it makes + /...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:58.966686,104,636,23 +github_golang_go_067530b6d80cd0597eec9a42c4436f2db94c848f,src/bytes/compare_test.go,compare_test.go,,6974,Go,"// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package bytes_test + +import ( + . ""bytes"" + ""fmt"" + ""testing"" +) + +var compareTests = []struct { + a, b []byte + i int +}{ + {[]byte(""""), []byte(""""), 0}, + {[]byte(""a""), []byte(""""), 1}, + {[]byte(""""), []byte(""a""), -1}, + {[]byte(""abc""), []byte(""abc""), 0}, + {[]byte(""abd""), []byte(""abc""), 1}, + {[]byte(""abc""), []byte(""abd""), -1}, + {[]byte(""ab""), []byt...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:33.353960,1063,6973,297 +github_golang_go_20d333217e81e2e5f3f1dda4717d2bce2f7a888b,src/bytes/bytes_test.go,bytes_test.go,,65137,Go,"// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package bytes_test + +import ( + . ""bytes"" + ""fmt"" + ""internal/asan"" + ""internal/testenv"" + ""iter"" + ""math"" + ""math/rand"" + ""slices"" + ""strings"" + ""testing"" + ""unicode"" + ""unicode/utf8"" + ""unsafe"" +) + +func sliceOfString(s [][]byte) []string { + result := make([]string, len(s)) + for i, v := range s { + result[i] = string(v) + } + return result +} + +func collec...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:32.556122,9099,64519,2529 +github_golang_go_6cb4d6a8f66ebf556eb4543f495ec8d537889fd9,src/bytes/buffer.go,buffer.go,,16922,Go,"// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package bytes + +// Simple byte buffer for marshaling data. + +import ( + ""errors"" + ""io"" + ""unicode/utf8"" +) + +// smallBufferSize is an initial allocation minimal capacity. +const smallBufferSize = 64 + +// A Buffer is a variable-sized buffer of bytes with [Buffer.Read] and [Buffer.Write] methods. +// The zero value for Buffer is an empty buffer read...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:31.231633,2916,16922,501 +github_golang_go_fda660aa3241bbdec6bc81f39913fdd8e8d6b1b9,src/fmt/state_test.go,state_test.go,,1477,Go,"// Copyright 2022 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package fmt_test + +import ( + ""fmt"" + ""testing"" +) + +type testState struct { + width int + widthOK bool + prec int + precOK bool + flag map[int]bool +} + +var _ fmt.State = testState{} + +func (s testState) Write(b []byte) (n int, err error) { + panic(""unimplemented"") +} + +func (s testState) Width() (wid int, ok bool) { + return s.width, s.widthOK +...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:54.403428,249,1477,81 +github_golang_go_ff9e4f30ca8c873f89457c4f8fa2fcf62453a9a6,src/fmt/scan_test.go,scan_test.go,,40227,Go,"// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package fmt_test + +import ( + ""bufio"" + ""bytes"" + ""errors"" + . ""fmt"" + ""io"" + ""math"" + ""reflect"" + ""regexp"" + ""strings"" + ""testing"" + ""testing/iotest"" + ""unicode/utf8"" +) + +type ScanTest struct { + text string + in any + out any +} + +type ScanfTest struct { + format string + text string + in any + out any +} + +type ScanfMultiTest struct { + format strin...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:53.606596,5839,40218,1335 +github_golang_go_d8c7d263e059271bc591e5c29260601e4325145f,src/fmt/scan.go,scan.go,,32669,Go,"// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package fmt + +import ( + ""errors"" + ""io"" + ""math"" + ""os"" + ""reflect"" + ""strconv"" + ""sync"" + ""unicode/utf8"" +) + +// ScanState represents the scanner state passed to custom scanners. +// Scanners may do rune-at-a-time scanning or ask the ScanState +// to discover the next space-delimited token. +type ScanState interface { + // ReadRune reads the next rune...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:53.267648,5241,32669,1239 +github_golang_go_067c93f27dad7a36e92e50e9662f7d382cf0ab1f,src/fmt/print.go,print.go,,33315,Go,"// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package fmt + +import ( + ""internal/fmtsort"" + ""io"" + ""os"" + ""reflect"" + ""strconv"" + ""sync"" + ""unicode/utf8"" +) + +// Strings for use with buffer.WriteString. +// This is less overhead than using buffer.Write with byte arrays. +const ( + commaSpaceString = "", "" + nilAngleString = """" + nilParenString = ""(nil)"" + nilString = ""nil"" + mapStr...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:52.935352,4797,33311,1209 +github_golang_go_4996bc8dcaeeb1d67b5adbdcbf58aa4723179c6e,src/image/ycbcr_test.go,ycbcr_test.go,,3421,Go,"// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package image + +import ( + ""image/color"" + ""testing"" +) + +func TestYCbCr(t *testing.T) { + rects := []Rectangle{ + Rect(0, 0, 16, 16), + Rect(1, 0, 16, 16), + Rect(0, 1, 16, 16), + Rect(1, 1, 16, 16), + Rect(1, 1, 15, 16), + Rect(1, 1, 16, 15), + Rect(1, 1, 15, 15), + Rect(2, 3, 14, 15), + Rect(7, 0, 7, 16), + Rect(0, 8, 16, 8), + Rect(0, 0, 10...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:52:03.049813,534,3421,134 +github_golang_go_52bf42d0a623a682dd03fd5016f2af90a48001ba,src/fmt/errors_test.go,errors_test.go,,4013,Go,"// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package fmt_test + +import ( + ""errors"" + ""fmt"" + ""reflect"" + ""testing"" +) + +func TestErrorf(t *testing.T) { + // noVetErrorf is an alias for fmt.Errorf that does not trigger vet warnings for + // %w format strings. + noVetErrorf := fmt.Errorf + + wrapped := errors.New(""inner error"") + for _, test := range []struct { + err error + wantText str...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:50.470639,485,4013,117 +github_golang_go_a0ce7ada346dbc0dbb122e1c5006c1ab89bb1e69,src/fmt/errors.go,errors.go,,2299,Go,"// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package fmt + +import ( + ""errors"" + ""internal/stringslite"" + ""slices"" +) + +// Errorf formats according to a format specifier and returns the string as a +// value that satisfies error. +// +// If the format specifier includes a %w verb with an error operand, +// the returned error will implement an Unwrap method returning the operand. +// If there i...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:50.187729,384,2299,95 +github_golang_go_fcf94d52d21bcd4234c3492e6f39910fa2abf582,src/io/pipe_test.go,pipe_test.go,,9676,Go,"// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package io_test + +import ( + ""bytes"" + ""fmt"" + . ""io"" + ""slices"" + ""strings"" + ""testing"" + ""time"" +) + +func checkWrite(t *testing.T, w Writer, data []byte, c chan int) { + n, err := w.Write(data) + if err != nil { + t.Errorf(""write: %v"", err) + } + if n != len(data) { + t.Errorf(""short write: %d != %d"", n, len(data)) + } + c <- 0 +} + +// Test a single read...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:52:05.997685,1592,9676,442 +github_golang_go_c489b950e59a913d794cd6f6d5568c21abe667c4,src/bytes/example_test.go,example_test.go,,16932,Go,"// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package bytes_test + +import ( + ""bytes"" + ""encoding/base64"" + ""fmt"" + ""io"" + ""os"" + ""slices"" + ""strconv"" + ""unicode"" +) + +func ExampleBuffer() { + var b bytes.Buffer // A Buffer needs no initialization. + b.Write([]byte(""Hello "")) + fmt.Fprintf(&b, ""world!"") + b.WriteTo(os.Stdout) + // Output: Hello world! +} + +func ExampleBuffer_reader() { + // A Buffer ca...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:33.696087,1873,16845,721 +github_golang_go_8b8cbf6b6c8f6b8040096d75edcd97a830512214,src/flag/example_textvar_test.go,example_textvar_test.go,,847,Go,"// Copyright 2022 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package flag_test + +import ( + ""flag"" + ""fmt"" + ""net"" + ""os"" +) + +func ExampleTextVar() { + fs := flag.NewFlagSet(""ExampleTextVar"", flag.ContinueOnError) + fs.SetOutput(os.Stdout) + var ip net.IP + fs.TextVar(&ip, ""ip"", net.IPv4(192, 168, 0, 100), ""`IP address` to parse"") + fs.Parse([]string{""-ip"", ""127.0.0.1""}) + fmt.Printf(""{ip: %v}\n\n"", ip) + + // 2...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:47.077089,117,847,36 +github_golang_go_088447d43f6195cec3b72c45ac20801c4776ba43,src/flag/example_test.go,example_test.go,,2830,Go,"// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// These examples demonstrate more intricate uses of the flag package. +package flag_test + +import ( + ""errors"" + ""flag"" + ""fmt"" + ""strings"" + ""time"" +) + +// Example 1: A single string flag called ""species"" with default value ""gopher"". +var species = flag.String(""species"", ""gopher"", ""the species we are studying"") + +// Example 2: Two flags sharing a ...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:46.788775,467,2830,86 +github_golang_go_5c3fe8dec6967ab3a65e56a4baa87952e2ea9092,src/context/context.go,context.go,,25084,Go,"// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package context defines the Context type, which carries deadlines, +// cancellation signals, and other request-scoped values across API boundaries +// and between processes. +// +// Incoming requests to a server should create a [Context], and outgoing +// calls to servers should accept a Context. The chain of function +// calls between them ...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:37.660529,3852,25084,808 +github_golang_go_d10950d258970f203bc2aec8def4096fca89fdbf,src/context/benchmark_test.go,benchmark_test.go,,4225,Go,"// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package context_test + +import ( + . ""context"" + ""fmt"" + ""runtime"" + ""sync"" + ""testing"" + ""time"" +) + +func BenchmarkCommonParentCancel(b *testing.B) { + root := WithValue(Background(), ""key"", ""value"") + shared, sharedcancel := WithCancel(root) + defer sharedcancel() + + b.ResetTimer() + b.RunParallel(func(pb *testing.PB) { + x := 0 + for pb.Next() { + c...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:36.838499,608,4225,211 +github_golang_go_c2ef1062d3851fd055f27009bd1eb613d049619a,src/context/afterfunc_test.go,afterfunc_test.go,,3490,Go,"// Copyright 2023 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package context_test + +import ( + ""context"" + ""sync"" + ""testing"" + ""time"" +) + +// afterFuncContext is a context that's not one of the types +// defined in context.go, that supports registering AfterFuncs. +type afterFuncContext struct { + mu sync.Mutex + afterFuncs map[*byte]func() + done chan struct{} + err error +} + +var _ context...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:36.535874,444,3490,142 +github_golang_go_c9816cba11665739ed079de1d07570af01df0e9f,src/cmp/cmp_test.go,cmp_test.go,,4438,Go,"// Copyright 2023 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cmp_test + +import ( + ""cmp"" + ""fmt"" + ""math"" + ""slices"" + ""sort"" + ""strings"" + ""testing"" + ""unsafe"" +) + +var negzero = math.Copysign(0, -1) +var nonnilptr uintptr = uintptr(unsafe.Pointer(&negzero)) +var nilptr uintptr = uintptr(unsafe.Pointer(nil)) + +var tests = []struct { + x, y any + compare int +}{ + {1, 2, -1}, + {1, 1, 0}, + {2, 1, +1}, + {""a...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:36.225127,599,4438,203 +github_golang_go_24ee9929c9587d7873675febe6b4bb59e6f57a07,src/hash/hash.go,hash.go,,3320,Go,"// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package hash provides interfaces for hash functions. +package hash + +import ""io"" + +// Hash is the common interface implemented by all hash functions. +// +// Hash implementations in the standard library (e.g. [hash/crc32] and +// [crypto/sha256]) implement the [encoding.BinaryMarshaler], [encoding.BinaryAppender], +// [encoding.BinaryUnmarsha...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:55.558096,544,3320,93 +github_golang_go_f07b9aaa2c4898b5765ba66da0faf6cf48fa4e42,src/hash/example_test.go,example_test.go,,1190,Go,"// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package hash_test + +import ( + ""bytes"" + ""crypto/sha256"" + ""encoding"" + ""fmt"" + ""log"" +) + +func Example_binaryMarshaler() { + const ( + input1 = ""The tunneling gopher digs downwards, "" + input2 = ""unaware of what he will find."" + ) + + first := sha256.New() + first.Write([]byte(input1)) + + marshaler, ok := first.(encoding.BinaryMarshaler) + if !ok { + l...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:55.301957,137,1190,52 +github_golang_go_0ca3f522d622aa7d6b2af6a97f253fa3eca869b5,src/fmt/stringer_test.go,stringer_test.go,,2156,Go,"// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package fmt_test + +import ( + . ""fmt"" + ""testing"" +) + +type TI int +type TI8 int8 +type TI16 int16 +type TI32 int32 +type TI64 int64 +type TU uint +type TU8 uint8 +type TU16 uint16 +type TU32 uint32 +type TU64 uint64 +type TUI uintptr +type TF float64 +type TF32 float32 +type TF64 float64 +type TB bool +type TS string + +func (v TI) String() string { return ...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:55.007005,364,2156,62 +github_golang_go_ab19ee3b94d2e310c8962e85aed95cabd0203bd2,src/fmt/gostringer_example_test.go,gostringer_example_test.go,,1584,Go,"// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package fmt_test + +import ( + ""fmt"" +) + +// Address has a City, State and a Country. +type Address struct { + City string + State string + Country string +} + +// Person has a Name, Age and Address. +type Person struct { + Name string + Age uint + Addr *Address +} + +// GoString makes Person satisfy the GoStringer interface. +// The return value is va...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:52.582574,225,1584,60 +github_golang_go_ac9f9858dfa0013228006cd1bdcb85137a07390c,src/flag/example_func_test.go,example_func_test.go,,1341,Go,"// Copyright 2020 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package flag_test + +import ( + ""errors"" + ""flag"" + ""fmt"" + ""net"" + ""os"" +) + +func ExampleFunc() { + fs := flag.NewFlagSet(""ExampleFunc"", flag.ContinueOnError) + fs.SetOutput(os.Stdout) + var ip net.IP + fs.Func(""ip"", ""`IP address` to parse"", func(s string) error { + ip = net.ParseIP(s) + if ip == nil { + return errors.New(""could not parse IP"") + } + ...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:46.479628,175,1341,58 +github_golang_go_ad9db343184f99faee7b86b5c6ca14425d2c130b,src/bytes/bytes_js_wasm_test.go,bytes_js_wasm_test.go,,417,Go,"// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build js && wasm + +package bytes_test + +import ( + ""bytes"" + ""testing"" +) + +func TestIssue65571(t *testing.T) { + b := make([]byte, 1<<31+1) + b[1<<31] = 1 + i := bytes.IndexByte(b, 1) + if i != 1<<31 { + t.Errorf(""IndexByte(b, 1) = %d; want %d"", i, 1<<31) + } +} +...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:32.214091,71,417,22 +github_golang_go_e4a5ca33d5e0e7ef3b05c24eb5a516a749decea1,src/errors/wrap.go,wrap.go,,6124,Go,"// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package errors + +import ( + ""internal/reflectlite"" +) + +// Unwrap returns the result of calling the Unwrap method on err, if err's +// type contains an Unwrap method returning error. +// Otherwise, Unwrap returns nil. +// +// Unwrap only calls a method of the form ""Unwrap() error"". +// In particular Unwrap does not unwrap errors returned by [Join]...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:44.479301,1025,6124,210 +github_golang_go_466208879991e1a12ecf92d34b53d71885ed1b08,src/crypto/issue21104_test.go,issue21104_test.go,,1849,Go,"// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package crypto_test + +import ( + ""crypto/aes"" + ""crypto/cipher"" + ""crypto/rc4"" + ""testing"" +) + +func TestRC4OutOfBoundsWrite(t *testing.T) { + // This cipherText is encrypted ""0123456789"" + cipherText := []byte{238, 41, 187, 114, 151, 2, 107, 13, 178, 63} + cipher, err := rc4.NewCipher([]byte{0}) + if err != nil { + panic(err) + } + test(t, ""RC4"", cip...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:40.403434,237,1849,62 +github_golang_go_9cd62dce196cf39a0a64d367a82c1bf8233ec1e2,src/crypto/crypto_test.go,crypto_test.go,,5306,Go,"// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package crypto_test + +import ( + ""bytes"" + ""crypto"" + ""crypto/rand"" + ""crypto/rsa"" + ""crypto/sha256"" + ""crypto/x509"" + ""encoding/pem"" + ""errors"" + ""fmt"" + ""internal/testenv"" + ""io"" + ""io/fs"" + ""os"" + ""path/filepath"" + ""regexp"" + ""strings"" + ""testing"" +) + +type messageSignerOnly struct { + k *rsa.PrivateKey +} + +func (s *messageSignerOnly) Public() crypto.Public...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:40.117709,520,5306,161 +github_golang_go_51275942a64fbef8db41208e483e93b283337087,src/crypto/crypto.go,crypto.go,,8874,Go,"// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package crypto collects common cryptographic constants. +package crypto + +import ( + ""hash"" + ""io"" + ""strconv"" +) + +// Hash identifies a cryptographic hash function that is implemented in another +// package. +type Hash uint + +// HashFunc simply returns the value of h so that [Hash] implements [SignerOpts]. +func (h Hash) HashFunc() Hash { + retur...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:39.814732,1281,8874,274 +github_golang_go_730bf7043c683f93dee2270aec25b13380c987b6,src/errors/join.go,join.go,,1397,Go,"// Copyright 2022 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package errors + +import ( + ""unsafe"" +) + +// Join returns an error that wraps the given errors. +// Any nil error values are discarded. +// Join returns nil if every value in errs is nil. +// The error formats as the concatenation of the strings obtained +// by calling the Error method of each element of errs, with a newline +// between each strin...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:43.864855,257,1397,64 +github_golang_go_298612c4eac92c3827c8f70ab68df93d48f79941,src/errors/example_test.go,example_test.go,,5503,Go,"// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package errors_test + +import ( + ""errors"" + ""fmt"" + ""io/fs"" + ""os"" + ""time"" +) + +// MyError is an error implementation that includes a time and message. +type MyError struct { + When time.Time + What string +} + +func (e MyError) Error() string { + return fmt.Sprintf(""%v: %v"", e.When, e.What) +} + +func oops() error { + return MyError{ + time.Date(1989, 3, ...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:43.069270,779,5503,239 +github_golang_go_08ed54e041cf03ab83ffe9146c6f08c0cb5daf05,src/errors/errors_test.go,errors_test.go,,765,Go,"// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package errors_test + +import ( + ""errors"" + ""testing"" +) + +func TestNewEqual(t *testing.T) { + // Different allocations should not be equal. + if errors.New(""abc"") == errors.New(""abc"") { + t.Errorf(`New(""abc"") == New(""abc"")`) + } + if errors.New(""abc"") == errors.New(""xyz"") { + t.Errorf(`New(""abc"") == New(""xyz"")`) + } + + // Same allocation should be ...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:42.767631,110,765,34 +github_langflow-ai_langflow_92691401ff3fc92d47214a088a5a4cc615f2db05,src/frontend/playwright.config.ts,playwright.config.ts,,3840,TypeScript,"import { defineConfig, devices } from ""@playwright/test""; +import * as dotenv from ""dotenv""; +import path from ""path""; +import { PORT } from ""./src/customization/config-constants""; + +dotenv.config(); +dotenv.config({ path: path.resolve(__dirname, ""../../.env"") }); + +/** + * Read environment variables from file. + * https://github.com/motdotla/dotenv + */ +/** + * See https://playwright.dev/docs/test-configuration. + */ + +export default defineConfig({ + testDir: ""./tests"", + /* Run tests in files in parallel ...[truncated]",langflow-ai/langflow,langflow-ai,147265,8829,Langflow is a powerful tool for building and deploying AI-powered agents and workflows.,"['agents' 'chatgpt' 'generative-ai' 'large-language-models' 'multiagent' + 'react-flow']",MIT,,,,,0.98,GitHub Public API,2026-04-22T21:54:37.644650,416,3840,140 +github_hoppscotch_hoppscotch_916a621768f866f9ac854736fbcb9ae642fef6fb,tailwind.config.ts,tailwind.config.ts,,270,TypeScript,"import preset from ""@hoppscotch/ui/ui-preset"" + +export default { + content: [ + ""packages/hoppscotch-common/src/**/*.{vue,html}"", + ""packages/hoppscotch-sh-admin/src/**/*.{vue,html}"", + ""packages/hoppscotch-desktop/src/**/*.{vue,html}"", + ], + presets: [preset], +} +...[truncated]",hoppscotch/hoppscotch,hoppscotch,78958,5808,"Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia","['api' 'api-client' 'api-rest' 'api-testing' 'developer-tools' 'graphql' + 'http' 'http-client' 'pwa' 'rest' 'rest-api' 'spa' 'testing' + 'testing-tools' 'tools' 'vue' 'vuejs' 'websocket']",MIT,,,,,0.98,GitHub Public API,2026-04-17T17:53:10.883637,16,270,11 +github_unionlabs_union_fd3c87ec10fddce52601c0e91d814c110b7abb85,vitest.setup.ts,vitest.setup.ts,,74,TypeScript,"import { addEqualityTesters } from ""@effect/vitest"" + +addEqualityTesters() +...[truncated]",unionlabs/union,unionlabs,74142,3884,"The trust-minimized, zero-knowledge bridging protocol, designed for censorship resistance, extremely high security, and usage in decentralized finance.","['astro' 'blockchain' 'cosmos' 'cosmwasm' 'ethereum' 'evm' 'golang' + 'indexer' 'interoperability' 'move' 'nix' 'prover' 'relayer' 'rust' + 'solidity' 'svelte' 'typescipt' 'typescript' 'zero-knowledge']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:15:44.550835,7,74,4 +github_unionlabs_union_c78ea73c9ba32bc4d7b53e2f0ff719f8007a4d12,vitest.workspace.ts,vitest.workspace.ts,,219,TypeScript,"import { defineWorkspace } from ""vitest/config"" + +export default defineWorkspace([ + ""ts-sdk/vitest.config.ts"", + ""ts-sdk-evm/vitest.config.ts"", + ""ts-sdk-cosmos/vitest.config.ts"", + ""effect-svelte/vitest.config.ts"", +]) +...[truncated]",unionlabs/union,unionlabs,74142,3884,"The trust-minimized, zero-knowledge bridging protocol, designed for censorship resistance, extremely high security, and usage in decentralized finance.","['astro' 'blockchain' 'cosmos' 'cosmwasm' 'ethereum' 'evm' 'golang' + 'indexer' 'interoperability' 'move' 'nix' 'prover' 'relayer' 'rust' + 'solidity' 'svelte' 'typescipt' 'typescript' 'zero-knowledge']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:15:45.145511,14,219,9 +github_unionlabs_union_dd81ef15bee590be68c6827d7f2cdb0b7d35f281,vitest.shared.ts,vitest.shared.ts,,392,TypeScript,"import * as path from ""node:path"" +import type { ViteUserConfig } from ""vitest/config"" + +const config: ViteUserConfig = { + esbuild: { + target: ""es2020"", + }, + test: { + setupFiles: [path.join(__dirname, ""vitest.setup.ts"")], + fakeTimers: { + toFake: undefined, + }, + sequence: { + concurrent: true, + }, + include: [""test/**/*.test.ts""], + }, +} + +export default config +...[truncated]",unionlabs/union,unionlabs,74142,3884,"The trust-minimized, zero-knowledge bridging protocol, designed for censorship resistance, extremely high security, and usage in decentralized finance.","['astro' 'blockchain' 'cosmos' 'cosmwasm' 'ethereum' 'evm' 'golang' + 'indexer' 'interoperability' 'move' 'nix' 'prover' 'relayer' 'rust' + 'solidity' 'svelte' 'typescipt' 'typescript' 'zero-knowledge']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:15:44.844091,45,392,21 +github_go-gitea_gitea_45696fb79cb8872a8cc85595989a66fcc0ba12cc,eslint.json.config.ts,eslint.json.config.ts,,613,TypeScript,"import {defineConfig, globalIgnores} from 'eslint/config'; +import json from '@eslint/json'; + +export default defineConfig([ + globalIgnores([ + '**/.venv', + '**/node_modules', + '**/public', + ]), + { + files: ['**/*.json'], + plugins: {json}, + language: 'json/json', + extends: ['json/recommended'], + }, + { + files: [ + 'tsconfig.json', + '.devcontainer/*.json', + '.vscode/*.json', + 'contrib/ide/vscode/*.json', + ], + plugins: {json}, + language: 'json/js...[truncated]",go-gitea/gitea,go-gitea,54955,6587,"Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD","['bitbucket' 'cicd' 'devops' 'docker-registry-v2' 'git' 'git-gui' + 'git-lfs' 'git-server' 'gitea' 'github' 'github-actions' 'gitlab' 'go' + 'golang' 'hacktoberfest' 'maven-server' 'npm-registry' 'self-hosted' + 'typescript' 'vue']",MIT,,,,,0.98,GitHub Public API,2026-04-17T07:19:30.883122,48,613,31 +github_go-gitea_gitea_0a327e333df540c3f00553d6669ddf583ba53854,eslint.config.ts,eslint.config.ts,,44965,TypeScript,"import arrayFunc from 'eslint-plugin-array-func'; +import comments from '@eslint-community/eslint-plugin-eslint-comments'; +import deMorgan from 'eslint-plugin-de-morgan'; +import github from 'eslint-plugin-github'; +import globals from 'globals'; +import importPlugin from 'eslint-plugin-import-x'; +import playwright from 'eslint-plugin-playwright'; +import regexp from 'eslint-plugin-regexp'; +import sonarjs from 'eslint-plugin-sonarjs'; +import stylistic from '@stylistic/eslint-plugin'; +import typescrip...[truncated]",go-gitea/gitea,go-gitea,54955,6587,"Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD","['bitbucket' 'cicd' 'devops' 'docker-registry-v2' 'git' 'git-gui' + 'git-lfs' 'git-server' 'gitea' 'github' 'github-actions' 'gitlab' 'go' + 'golang' 'hacktoberfest' 'maven-server' 'npm-registry' 'self-hosted' + 'typescript' 'vue']",MIT,,,,,0.98,GitHub Public API,2026-04-17T07:19:30.573912,2540,44965,1026 +github_go-gitea_gitea_7249cb902eb5e9ca341dc3e36715382bc5d0b33b,vite.config.ts,vite.config.ts,,12160,TypeScript,"import {build, defineConfig} from 'vite'; +import vuePlugin from '@vitejs/plugin-vue'; +import {stringPlugin} from 'vite-string-plugin'; +import {licensePlugin, wrap} from 'rolldown-license-plugin'; +import {readFileSync, writeFileSync, mkdirSync, unlinkSync, globSync} from 'node:fs'; +import path, {basename, join, parse} from 'node:path'; +import {env} from 'node:process'; +import tailwindcss from 'tailwindcss'; +import tailwindConfig from './tailwind.config.ts'; +import type {InlineConfig, Plugin, Roll...[truncated]",go-gitea/gitea,go-gitea,54955,6587,"Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD","['bitbucket' 'cicd' 'devops' 'docker-registry-v2' 'git' 'git-gui' + 'git-lfs' 'git-server' 'gitea' 'github' 'github-actions' 'gitlab' 'go' + 'golang' 'hacktoberfest' 'maven-server' 'npm-registry' 'self-hosted' + 'typescript' 'vue']",MIT,,,,,0.98,GitHub Public API,2026-04-17T07:19:34.330288,1138,12160,339 +github_go-gitea_gitea_d2d3eeef1aa20e9be9cea688affc259ec68d8689,vitest.config.ts,vitest.config.ts,,552,TypeScript,"import {defineConfig} from 'vitest/config'; +import vuePlugin from '@vitejs/plugin-vue'; +import {stringPlugin} from 'vite-string-plugin'; + +export default defineConfig({ + test: { + include: ['web_src/**/*.test.ts'], + setupFiles: ['web_src/js/vitest.setup.ts'], + environment: 'happy-dom', + testTimeout: 20000, + open: false, + allowOnly: true, + passWithNoTests: true, + globals: true, + watch: false, + isolate: false, + sequence: { + concurrent: true, + }, + }, + plugi...[truncated]",go-gitea/gitea,go-gitea,54955,6587,"Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD","['bitbucket' 'cicd' 'devops' 'docker-registry-v2' 'git' 'git-gui' + 'git-lfs' 'git-server' 'gitea' 'github' 'github-actions' 'gitlab' 'go' + 'golang' 'hacktoberfest' 'maven-server' 'npm-registry' 'self-hosted' + 'typescript' 'vue']",MIT,,,,,0.98,GitHub Public API,2026-04-17T07:19:34.620853,49,552,26 +github_go-gitea_gitea_787e6dc7c6fa4c706fa50cf8df9760448a4640c5,updates.config.ts,updates.config.ts,,306,TypeScript,"import type {Config} from 'updates'; + +export default { + pin: { + '@mcaptcha/vanilla-glue': '^0.1', // breaking changes in rc versions need to be handled + 'cropperjs': '^1', // need to migrate to v2 but v2 is not compatible with v1 + 'tailwindcss': '^3', // need to migrate + }, +} satisfies Config; +...[truncated]",go-gitea/gitea,go-gitea,54955,6587,"Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD","['bitbucket' 'cicd' 'devops' 'docker-registry-v2' 'git' 'git-gui' + 'git-lfs' 'git-server' 'gitea' 'github' 'github-actions' 'gitlab' 'go' + 'golang' 'hacktoberfest' 'maven-server' 'npm-registry' 'self-hosted' + 'typescript' 'vue']",MIT,,,,,0.98,GitHub Public API,2026-04-17T07:19:33.977762,47,306,10 +github_go-gitea_gitea_bdf35428bc62a4e1279b27ad88b881f3c7a66b00,types.d.ts,types.d.ts,,2525,TypeScript,"declare module 'eslint-plugin-no-use-extend-native' { + import type {Eslint} from 'eslint'; + const plugin: Eslint.Plugin; + export = plugin; +} + +declare module 'eslint-plugin-array-func' { + import type {Eslint} from 'eslint'; + const plugin: Eslint.Plugin; + export = plugin; +} + +declare module 'eslint-plugin-github' { + import type {Eslint} from 'eslint'; + const plugin: Eslint.Plugin; + export = plugin; +} + +declare module '*.svg' { + const value: string; + export default value; +} + +declare module...[truncated]",go-gitea/gitea,go-gitea,54955,6587,"Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD","['bitbucket' 'cicd' 'devops' 'docker-registry-v2' 'git' 'git-gui' + 'git-lfs' 'git-server' 'gitea' 'github' 'github-actions' 'gitlab' 'go' + 'golang' 'hacktoberfest' 'maven-server' 'npm-registry' 'self-hosted' + 'typescript' 'vue']",MIT,,,,,0.98,GitHub Public API,2026-04-17T07:19:33.173235,287,2525,104 +github_go-gitea_gitea_199433d0cff964728eedeac595ec7a1d60f8a7bc,tailwind.config.ts,tailwind.config.ts,,4161,TypeScript,"import {readFileSync} from 'node:fs'; +import {parse} from 'postcss'; +import plugin from 'tailwindcss/plugin.js'; +import type {Config} from 'tailwindcss'; + +function extractRootVars(css: string) { + const root = parse(css); + const vars = new Set(); + root.walkRules((rule) => { + if (rule.selector !== ':root') return; + rule.each((node) => { + if (node.type === 'decl' && node.value && node.prop.startsWith('--')) { + vars.add(node.prop.substring(2)); + } + }); + }); + re...[truncated]",go-gitea/gitea,go-gitea,54955,6587,"Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD","['bitbucket' 'cicd' 'devops' 'docker-registry-v2' 'git' 'git-gui' + 'git-lfs' 'git-server' 'gitea' 'github' 'github-actions' 'gitlab' 'go' + 'golang' 'hacktoberfest' 'maven-server' 'npm-registry' 'self-hosted' + 'typescript' 'vue']",MIT,,,,,0.98,GitHub Public API,2026-04-17T07:19:32.859218,418,4161,123 +github_go-gitea_gitea_9dc8a7c1b5cbfb760dd8625e4786f988d58d446c,playwright.config.ts,playwright.config.ts,,903,TypeScript,"import {env} from 'node:process'; +import {defineConfig, devices} from '@playwright/test'; + +const timeoutFactor = Number(env.GITEA_TEST_E2E_TIMEOUT_FACTOR) || 1; +const timeout = 5000 * timeoutFactor; + +export default defineConfig({ + workers: '50%', + fullyParallel: true, + testDir: './tests/e2e/', + outputDir: './tests/e2e-output/', + testMatch: /.*\.test\.ts/, + forbidOnly: Boolean(env.CI), + reporter: 'list', + timeout: 2 * timeout, + expect: { + timeout, + }, + use: { + baseURL: env.GITEA_...[truncated]",go-gitea/gitea,go-gitea,54955,6587,"Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD","['bitbucket' 'cicd' 'devops' 'docker-registry-v2' 'git' 'git-gui' + 'git-lfs' 'git-server' 'gitea' 'github' 'github-actions' 'gitlab' 'go' + 'golang' 'hacktoberfest' 'maven-server' 'npm-registry' 'self-hosted' + 'typescript' 'vue']",MIT,,,,,0.98,GitHub Public API,2026-04-17T07:19:32.285924,85,903,41 +github_tw93_Pake_65bb64fc3b8ed74912b67722b5c5fe3b7908f9c5,vitest.config.ts,vitest.config.ts,,381,TypeScript,"import { defineConfig } from 'vitest/config'; +import path from 'path'; + +export default defineConfig({ + test: { + environment: 'node', + include: [ + 'bin/**/*.{test,spec}.ts', + 'tests/unit/**/*.{test,spec}.{ts,js}', + 'tests/integration/**/*.{test,spec}.{ts,js}', + ], + }, + resolve: { + alias: { + '@': path.resolve(__dirname, './bin'), + }, + }, +}); +...[truncated]",tw93/Pake,tw93,47826,9539,🤱🏻 Turn any webpage into a desktop app with one command.,"['chatgpt' 'claude' 'desktop' 'gemini' 'hight-performance' 'linux' 'macos' + 'no-electron' 'package' 'rust' 'tauri' 'windows' 'youtube']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:27.231178,34,381,19 +github_farion1231_cc-switch_e74de48306ddd83aa31976af8ca0aac9692f7a93,src/utils/domUtils.ts,domUtils.ts,,297,TypeScript,"export function isTextEditableTarget(target: EventTarget | null): boolean { + if (!(target instanceof HTMLElement)) return false; + + const tagName = target.tagName; + return ( + tagName === ""INPUT"" || + tagName === ""TEXTAREA"" || + tagName === ""SELECT"" || + target.isContentEditable + ); +} +...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:19:01.487793,35,297,12 +github_farion1231_cc-switch_e90301443396f0857cb086d4e4bb043f925bde95,src/utils/errorUtils.ts,errorUtils.ts,,3585,TypeScript,"/** + * 从各种错误对象中提取错误信息 + * @param error 错误对象 + * @returns 提取的错误信息字符串 + */ +export const extractErrorMessage = (error: unknown): string => { + if (!error) return """"; + if (typeof error === ""string"") { + return error; + } + if (error instanceof Error && error.message.trim()) { + return error.message; + } + + if (typeof error === ""object"") { + const errObject = error as Record; + + const candidate = errObject.message ?? errObject.error ?? errObject.detail; + if (typeof candidate...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:19:02.276478,346,2905,109 +github_farion1231_cc-switch_04e23a951c6caa5d9a1db72a56f872ce23032c5e,src/utils/formatters.ts,formatters.ts,,2280,TypeScript,"/** + * 格式化 JSON 字符串 + * @param value - 原始 JSON 字符串 + * @returns 格式化后的 JSON 字符串(2 空格缩进) + * @throws 如果 JSON 格式无效 + */ +export function formatJSON(value: string): string { + const trimmed = value.trim(); + if (!trimmed) { + return """"; + } + const parsed = JSON.parse(trimmed); + return JSON.stringify(parsed, null, 2); +} + +/** + * 智能解析 MCP JSON 配置 + * 支持两种格式: + * 1. 纯配置对象:{ ""command"": ""npx"", ""args"": [...], ... } + * 2. 带键名包装: ""server-name"": { ""command"": ""npx"", ... } 或 { ""server-name"": {...} } + * + * @para...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:19:02.570733,236,1778,80 +github_farion1231_cc-switch_c48977aeb0201e974e0ac16bb2f08bb649499e3b,src/utils/postChangeSync.ts,postChangeSync.ts,,541,TypeScript,"import { settingsApi } from ""@/lib/api""; + +/** + * 统一的“后置同步”工具:将当前使用的供应商写回对应应用的 live 配置。 + * 不抛出异常,由调用方根据返回值决定提示策略。 + */ +export async function syncCurrentProvidersLiveSafe(): Promise<{ + ok: boolean; + error?: Error; +}> { + try { + await settingsApi.syncCurrentProvidersLive(); + return { ok: true }; + } catch (err) { + const error = err instanceof Error ? err : new Error(String(err ?? """")); + return { ok: false, error }; + } +} +...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:19:02.837370,59,435,19 +github_farion1231_cc-switch_c58d0f4992fc6da561da9023d9f77bdaa46a5938,vitest.config.ts,vitest.config.ts,,445,TypeScript,"import path from ""node:path""; +import { defineConfig } from ""vitest/config""; +import react from ""@vitejs/plugin-react""; + +export default defineConfig({ + plugins: [react()], + resolve: { + alias: { + ""@"": path.resolve(__dirname, ""./src""), + }, + }, + test: { + environment: ""jsdom"", + setupFiles: [""./tests/setupGlobals.ts"", ""./tests/setupTests.ts""], + globals: true, + coverage: { + reporter: [""text"", ""lcov""], + }, + }, +}); +...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:19:06.294999,45,445,21 +github_farion1231_cc-switch_1f829308d8dca958e39d6012b2e9334bf23dd598,src/config/universalProviderPresets.ts,universalProviderPresets.ts,,3121,TypeScript,"/** + * 统一供应商(Universal Provider)预设配置 + * + * 统一供应商是跨应用共享的配置,修改后会自动同步到 Claude、Codex、Gemini 三个应用。 + * 适用于 NewAPI 等支持多种协议的 API 网关。 + */ + +import type { + UniversalProvider, + UniversalProviderApps, + UniversalProviderModels, +} from ""@/types""; + +/** + * 统一供应商预设接口 + */ +export interface UniversalProviderPreset { + /** 预设名称 */ + name: string; + /** 供应商类型标识 */ + providerType: string; + /** 默认启用的应用 */ + defaultApps: UniversalProviderApps; + /** 默认模型配置 */ + defaultModels: UniversalProviderModels; + /** 网站链接 */ + ...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:47.348793,266,2717,132 +github_farion1231_cc-switch_3ba8abe5f56ec5e2a0559cecd2c545d996188ef8,src/hooks/useAutoCompact.ts,useAutoCompact.ts,,1689,TypeScript,"import { useEffect, useRef, useState, type RefObject } from ""react""; + +/** + * Detects whether the container's children overflow the available width + * and returns a `compact` flag for the AppSwitcher. + * + * Uses ResizeObserver on a flex-constrained container. The container + * must have `flex-1 min-w-0 overflow-hidden` so its width is determined + * by the parent layout, not its own content — avoiding the oscillation + * problem when toggling compact mode. + */ +export function useAutoCompact( + conta...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:48.135483,218,1685,50 +github_farion1231_cc-switch_822025237cddf219581a1ebe7c93395ed8da877f,src/hooks/useBackupManager.ts,useBackupManager.ts,,1597,TypeScript,"import { useQuery, useMutation, useQueryClient } from ""@tanstack/react-query""; +import { backupsApi } from ""@/lib/api""; + +export function useBackupManager() { + const queryClient = useQueryClient(); + + const { + data: backups = [], + isLoading, + refetch, + } = useQuery({ + queryKey: [""db-backups""], + queryFn: () => backupsApi.listDbBackups(), + }); + + const createMutation = useMutation({ + mutationFn: () => backupsApi.createDbBackup(), + onSuccess: () => refetch(), + }); + + const re...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:48.426972,146,1597,60 +github_farion1231_cc-switch_a5ef193506d07d0459fec4f187af08283094d7c8,src/lib/utils.ts,utils.ts,,169,TypeScript,"import { clsx, type ClassValue } from ""clsx""; +import { twMerge } from ""tailwind-merge""; + +export function cn(...inputs: ClassValue[]) { + return twMerge(clsx(inputs)); +} +...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:58.597407,22,169,7 +github_farion1231_cc-switch_20984a9fc5265c0af0b3a48bb53b852309836b08,src/utils/providerConfigUtils.ts,providerConfigUtils.ts,,25213,TypeScript,"// 供应商配置处理工具函数 + +import type { TemplateValueConfig } from ""../config/claudeProviderPresets""; +import { normalizeTomlText } from ""@/utils/textNormalization""; +import { parse as parseToml, stringify as stringifyToml } from ""smol-toml""; + +const isPlainObject = (value: unknown): value is Record => { + return Object.prototype.toString.call(value) === ""[object Object]""; +}; + +const deepMerge = ( + target: Record, + source: Record, +): Record => { + Object.e...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:19:03.230942,2558,24425,919 +github_farion1231_cc-switch_9da495ecb4885963aa1ef53ef7d435323840b00a,src/utils/providerMetaUtils.ts,providerMetaUtils.ts,,2013,TypeScript,"import type { CustomEndpoint, ProviderMeta } from ""@/types""; + +/** + * 合并供应商元数据中的自定义端点。 + * - 当 customEndpoints 为空对象时,明确删除自定义端点但保留其它元数据。 + * - 当 customEndpoints 为 null/undefined 时,不修改端点(保留原有端点)。 + * - 当 customEndpoints 存在时,覆盖原有自定义端点。 + * - 若结果为空对象且非明确清空场景则返回 undefined,避免写入空 meta。 + */ +export function mergeProviderMeta( + initialMeta: ProviderMeta | undefined, + customEndpoints: Record | null | undefined, +): ProviderMeta | undefined { + const hasCustomEndpoints = + !!customEndp...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:19:03.535846,179,1605,60 +github_farion1231_cc-switch_8064fae0b8332cf3e3c2d6b53c6b910304e25c99,src/utils/textNormalization.ts,textNormalization.ts,,740,TypeScript,"/** + * 将常见的中文/全角/弯引号统一为 ASCII 引号,以避免 TOML 解析失败。 + * - 双引号:” “ „ ‟ " → "" + * - 单引号:’ ‘ ' → ' + * 保守起见,不替换书名号/角引号(《》、「」等),避免误伤内容语义。 + */ +export const normalizeQuotes = (text: string): string => { + if (!text) return text; + return ( + text + // 双引号族 → "" + .replace(/[“”„‟"]/g, '""') + // 单引号族 → ' + .replace(/[‘’']/g, ""'"") + ); +}; + +/** + * 专用于 TOML 文本的归一化;目前等同于 normalizeQuotes,后续可扩展(如空白、行尾等)。 + */ +export const normalizeTomlText = (text: string): string => + normalizeQuotes(text); +...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:19:04.309365,72,492,23 +github_farion1231_cc-switch_0c7a5c21a97889768192cd024d7d1b37efd43654,src/utils/tomlUtils.ts,tomlUtils.ts,,6762,TypeScript,"import { parse as parseToml, stringify as stringifyToml } from ""smol-toml""; +import { normalizeTomlText } from ""@/utils/textNormalization""; +import { McpServerSpec } from ""../types""; + +/** + * 验证 TOML 格式并转换为 JSON 对象 + * @param text TOML 文本 + * @returns 错误信息(空字符串表示成功) + */ +export const validateToml = (text: string): string => { + if (!text.trim()) return """"; + try { + const normalized = normalizeTomlText(text); + const parsed = parseToml(normalized); + if (!parsed || typeof parsed !== ""object"" || ...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:19:04.609143,701,5870,222 +github_farion1231_cc-switch_ff9f505fda8bb1460aaa1c1716abf1481fe02c13,src/hooks/useMcp.ts,useMcp.ts,,1789,TypeScript,"import { useMutation, useQuery, useQueryClient } from ""@tanstack/react-query""; +import { mcpApi } from ""@/lib/api/mcp""; +import type { McpServer } from ""@/types""; +import type { AppId } from ""@/lib/api/types""; + +/** + * 查询所有 MCP 服务器(统一管理) + */ +export function useAllMcpServers() { + return useQuery({ + queryKey: [""mcp"", ""all""], + queryFn: () => mcpApi.getAllServers(), + }); +} + +/** + * 添加或更新 MCP 服务器 + */ +export function useUpsertMcpServer() { + const queryClient = useQueryClient(); + return useMutatio...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:51.009847,193,1687,75 +github_farion1231_cc-switch_764bfa295a34ff8d1f14b2dbe36db8304af56a5e,src/hooks/useOpenClaw.ts,useOpenClaw.ts,,4247,TypeScript,"import { useMutation, useQuery, useQueryClient } from ""@tanstack/react-query""; +import { openclawApi } from ""@/lib/api/openclaw""; +import { providersApi } from ""@/lib/api/providers""; +import type { + OpenClawEnvConfig, + OpenClawToolsConfig, + OpenClawAgentsDefaults, +} from ""@/types""; + +/** + * Centralized query keys for all OpenClaw-related queries. + * Import this from any file that needs to invalidate OpenClaw caches. + */ +export const openclawKeys = { + all: [""openclaw""] as const, + liveProviderIds...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:51.295179,429,4247,145 +github_farion1231_cc-switch_8c3822c4fd260e816ec68a7bd063e847f93f9e7d,src/utils/uuid.ts,uuid.ts,,1075,TypeScript,"/** + * 生成 UUID v4 + * + * 优先使用 crypto.randomUUID(),不可用时使用 crypto.getRandomValues() 实现 + * + * 兼容性: + * - crypto.randomUUID(): Chrome 92+, Safari 15.4+, Firefox 95+ + * - crypto.getRandomValues(): Chrome 11+, Safari 5+, Firefox 21+ + */ +export function generateUUID(): string { + const cryptoApi = globalThis.crypto; + + // 优先使用原生 API + if (typeof cryptoApi?.randomUUID === ""function"") { + return cryptoApi.randomUUID(); + } + + // Fallback: 使用 crypto.getRandomValues 实现 UUID v4 + if (!cryptoApi?.getRandomVa...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:19:04.915333,121,1003,38 +github_farion1231_cc-switch_c1e431a6763272d587e2f7726feca0d3a73728ee,vite.config.ts,vite.config.ts,,647,TypeScript,"import path from ""node:path""; +import { defineConfig } from ""vite""; +import react from ""@vitejs/plugin-react""; +import { codeInspectorPlugin } from ""code-inspector-plugin""; + +export default defineConfig(({ command }) => ({ + root: ""src"", + plugins: [ + command === ""serve"" && + codeInspectorPlugin({ + bundler: ""vite"", + }), + react(), + ].filter(Boolean), + base: ""./"", + build: { + outDir: ""../dist"", + emptyOutDir: true, + }, + server: { + port: 3000, + strictPort: true, + }...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:19:05.479474,72,647,33 +github_farion1231_cc-switch_4e9f9a04b683da277bf761dcc83e18a46bb51881,src/hooks/useDebouncedValue.ts,useDebouncedValue.ts,,517,TypeScript,"import { useState, useEffect } from ""react""; + +/** + * 返回一个延迟更新的值,在指定时间内无新变化后才更新。 + * 用于搜索输入等场景,避免每次按键都触发请求。 + */ +export function useDebouncedValue(value: T, delay: number): T { + const [debouncedValue, setDebouncedValue] = useState(value); + + useEffect(() => { + const timer = setTimeout(() => setDebouncedValue(value), delay); + return () => clearTimeout(timer); + }, [value, delay]); + + return debouncedValue; +} +...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:48.743817,46,421,17 +github_farion1231_cc-switch_b24e01e43e01f35d3c5f1f1b3f0aff6c59b5c4ec,src/hooks/useSettings.ts,useSettings.ts,,14637,TypeScript,"import { useCallback, useMemo } from ""react""; +import { useTranslation } from ""react-i18next""; +import { toast } from ""sonner""; +import { providersApi, settingsApi, type AppId } from ""@/lib/api""; +import { syncCurrentProvidersLiveSafe } from ""@/utils/postChangeSync""; +import { useSettingsQuery, useSaveSettingsMutation } from ""@/lib/query""; +import type { Settings } from ""@/types""; +import { useSettingsForm, type SettingsFormState } from ""./useSettingsForm""; +import { + useDirectorySettings, + type Resol...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:54.083791,1108,13925,442 +github_farion1231_cc-switch_3e1157cafbbd796924e2d83068d3a0a7e3748e81,src/types/subscription.ts,subscription.ts,,629,TypeScript,"export type CredentialStatus = + | ""valid"" + | ""expired"" + | ""not_found"" + | ""parse_error""; + +export interface QuotaTier { + name: string; + utilization: number; // 0-100 + resetsAt: string | null; +} + +export interface ExtraUsage { + isEnabled: boolean; + monthlyLimit: number | null; + usedCredits: number | null; + utilization: number | null; + currency: string | null; +} + +export interface SubscriptionQuota { + tool: string; + credentialStatus: CredentialStatus; + credentialMessage: string | null; +...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:19:00.933463,79,629,31 +github_farion1231_cc-switch_8379c217bc85ca41e9498f10d714787acbec7e2c,src/types.ts,types.ts,,18216,TypeScript,"export type ProviderCategory = + | ""official"" // 官方 + | ""cn_official"" // 开源官方(原""国产官方"") + | ""cloud_provider"" // 云服务商(AWS Bedrock 等) + | ""aggregator"" // 聚合网站 + | ""third_party"" // 第三方供应商 + | ""custom"" // 自定义 + | ""omo"" // Oh My OpenCode + | ""omo-slim""; // Oh My OpenCode Slim + +export interface Provider { + id: string; + name: string; + settingsConfig: Record; // 应用配置对象:Claude 为 settings.json;Codex 为 { auth, config } + websiteUrl?: string; + // 新增:供应商分类(用于差异化提示/能力开关) + category?: ProviderC...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:58.981419,1662,14894,572 +github_farion1231_cc-switch_f52080f6cc80eda8d90533aa0482481e3142d177,src/config/opencodeProviderPresets.ts,opencodeProviderPresets.ts,,38092,TypeScript,"import type { ProviderCategory, OpenCodeProviderConfig } from ""../types""; +import type { PresetTheme, TemplateValueConfig } from ""./claudeProviderPresets""; + +export interface OpenCodeProviderPreset { + name: string; + nameKey?: string; // i18n key for localized display name + websiteUrl: string; + apiKeyUrl?: string; + settingsConfig: OpenCodeProviderConfig; + isOfficial?: boolean; + isPartner?: boolean; + partnerPromotionKey?: string; + category?: ProviderCategory; + templateValues?: Record; + +// 创建跨平台 npx 命令配置 +// Windows 需要使用 cmd /c wrapper 来执行 npx.cmd +// Mac/Linux 可以直接执行 npx +const createNpxCommand = ( + packageName: string, + extraArgs: string[] = [], +): { command: string; args: string[] } => { + if (isWindows()) { + return { + command: ""cmd"", + args: [""/c"", ""npx"", ...extraArgs, packageName], + }; + } else ...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:46.236672,268,3056,105 +github_farion1231_cc-switch_56261014683efa66147fdc6b5240c40e8e1bb2b8,src/config/iconInference.ts,iconInference.ts,,2429,TypeScript,"/** + * 根据供应商名称智能推断图标配置 + */ + +const iconMappings = { + // AI 服务商 + claude: { icon: ""claude"", iconColor: ""#D4915D"" }, + anthropic: { icon: ""anthropic"", iconColor: ""#D4915D"" }, + deepseek: { icon: ""deepseek"", iconColor: ""#1E88E5"" }, + zhipu: { icon: ""zhipu"", iconColor: ""#0F62FE"" }, + glm: { icon: ""zhipu"", iconColor: ""#0F62FE"" }, + qwen: { icon: ""qwen"", iconColor: ""#FF6A00"" }, + bailian: { icon: ""bailian"", iconColor: ""#624AFF"" }, + alibaba: { icon: ""alibaba"", iconColor: ""#FF6A00"" }, + aliyun: { icon:...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:45.908734,294,2279,78 +github_farion1231_cc-switch_5d9710233900aee9e3f2172f4eae96d94cf4a607,src/hooks/useSessionSearch.ts,useSessionSearch.ts,,1819,TypeScript,"import { useCallback, useMemo } from ""react""; +import FlexSearch from ""flexsearch""; +import type { SessionMeta } from ""@/types""; + +interface UseSessionSearchOptions { + sessions: SessionMeta[]; + providerFilter: string; +} + +interface UseSessionSearchResult { + search: (query: string) => SessionMeta[]; +} + +/** + * 使用 FlexSearch 实现会话全文搜索 + * 索引会话元数据(标题、摘要、项目目录等) + */ +export function useSessionSearch({ + sessions, + providerFilter, +}: UseSessionSearchOptions): UseSessionSearchResult { + const filteredByPro...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:53.283462,179,1759,73 +github_farion1231_cc-switch_aa6d4a08ec050cb430452003278e8947da9b4af5,src/hooks/useProxyStatus.ts,useProxyStatus.ts,,6660,TypeScript,"/** + * 代理服务状态管理 Hook + */ + +import { useQuery, useMutation, useQueryClient } from ""@tanstack/react-query""; +import { invoke } from ""@tauri-apps/api/core""; +import { toast } from ""sonner""; +import { useTranslation } from ""react-i18next""; +import type { + ProxyStatus, + ProxyServerInfo, + ProxyTakeoverStatus, +} from ""@/types/proxy""; +import { extractErrorMessage } from ""@/utils/errorUtils""; + +/** + * 代理服务状态管理 + */ +export function useProxyStatus() { + const queryClient = useQueryClient(); + const { t } = use...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:52.991594,514,6002,215 +github_farion1231_cc-switch_92ba1d3c57ec233bb8897006be0c2e01cb5f94a5,src/hooks/useProxyConfig.ts,useProxyConfig.ts,,1301,TypeScript,"/** + * 代理配置管理 Hook + */ + +import { useQuery, useMutation, useQueryClient } from ""@tanstack/react-query""; +import { invoke } from ""@tauri-apps/api/core""; +import { toast } from ""sonner""; +import { useTranslation } from ""react-i18next""; +import type { ProxyConfig } from ""@/types/proxy""; + +/** + * 代理配置管理 + */ +export function useProxyConfig() { + const queryClient = useQueryClient(); + const { t } = useTranslation(); + + // 查询配置 + const { data: config, isLoading } = useQuery({ + queryKey: [""proxyConfig""], + ...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:52.700780,130,1261,49 +github_farion1231_cc-switch_4b70ee1d2447c39de4b7005862edb3c402021301,src/lib/usageRange.ts,usageRange.ts,,2177,TypeScript,"import type { UsageRangePreset, UsageRangeSelection } from ""@/types/usage""; + +const DAY_SECONDS = 24 * 60 * 60; +const DAY_MS = DAY_SECONDS * 1000; + +export interface ResolvedUsageRange { + startDate: number; + endDate: number; +} + +function getStartOfLocalDayDate(nowMs: number): Date { + const date = new Date(nowMs); + return new Date(date.getFullYear(), date.getMonth(), date.getDate()); +} + +function getPresetLookbackStart( + preset: Exclude, + nowMs: numb...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:58.325219,241,2165,80 +github_farion1231_cc-switch_b697c544df7515032caa122b7fd8a5a4509955bd,src/config/codexTemplates.ts,codexTemplates.ts,,581,TypeScript,"/** + * Codex 配置模板 + * 用于新建自定义供应商时的默认配置 + */ + +export interface CodexTemplate { + auth: Record; + config: string; +} + +/** + * 获取 Codex 自定义模板 + * @returns Codex 模板配置 + */ +export function getCodexCustomTemplate(): CodexTemplate { + const config = `model_provider = ""custom"" +model = ""gpt-5.4"" +model_reasoning_effort = ""high"" +disable_response_storage = true + +[model_providers.custom] +name = ""custom"" +wire_api = ""responses"" +requires_openai_auth = true`; + + return { + auth: { OPENAI_API_KEY: """" }, +...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:44.432257,67,519,31 +github_farion1231_cc-switch_0e8caa0468c292763de381fc43b0dd9d647237b5,src/config/codexProviderPresets.ts,codexProviderPresets.ts,,12539,TypeScript,"/** + * Codex 预设供应商配置模板 + */ +import { ProviderCategory } from ""../types""; +import type { PresetTheme } from ""./claudeProviderPresets""; + +export interface CodexProviderPreset { + name: string; + nameKey?: string; // i18n key for localized display name + websiteUrl: string; + // 第三方供应商可提供单独的获取 API Key 链接 + apiKeyUrl?: string; + auth: Record; // 将写入 ~/.codex/auth.json + config: string; // 将写入 ~/.codex/config.toml(TOML 字符串) + isOfficial?: boolean; // 标识是否为官方预设 + isPartner?: boolean; // 标识是否...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:44.128227,872,12099,441 +github_farion1231_cc-switch_26c19a00e7c26a29687f09e0c0e20f79d6a0bc7e,src/config/claudeProviderPresets.ts,claudeProviderPresets.ts,,29659,TypeScript,"/** + * 预设供应商配置模板 + */ +import { ProviderCategory } from ""../types""; + +export interface TemplateValueConfig { + label: string; + placeholder: string; + defaultValue?: string; + editorValue: string; +} + +/** + * 预设供应商的视觉主题配置 + */ +export interface PresetTheme { + /** 图标类型:'claude' | 'codex' | 'gemini' | 'generic' */ + icon?: ""claude"" | ""codex"" | ""gemini"" | ""generic""; + /** 背景色(选中状态),支持 Tailwind 类名或 hex 颜色 */ + backgroundColor?: string; + /** 文字色(选中状态),支持 Tailwind 类名或 hex 颜色 */ + textColor?: string; +} + +exp...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:43.804781,1882,28577,951 +github_farion1231_cc-switch_42e63ef9de7550a8f45502c08ad60d1b9b2a65dc,src/hooks/useDirectorySettings.ts,useDirectorySettings.ts,,10189,TypeScript,"import { useCallback, useEffect, useRef, useState } from ""react""; +import { useTranslation } from ""react-i18next""; +import { toast } from ""sonner""; +import { homeDir, join } from ""@tauri-apps/api/path""; +import { settingsApi, type AppId } from ""@/lib/api""; +import type { SettingsFormState } from ""./useSettingsForm""; + +type DirectoryKey = ""appConfig"" | ""claude"" | ""codex"" | ""gemini"" | ""opencode""; + +export interface ResolvedDirectories { + appConfig: string; + claude: string; + codex: string; + gemini: st...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:49.065451,929,10101,366 +github_farion1231_cc-switch_22b3ae4052eec79cd543aefac9d0e2fee92e53ce,src/hooks/useLastValidValue.ts,useLastValidValue.ts,,543,TypeScript,"import { useRef } from ""react""; + +/** + * 保存最后一个非 null/undefined 的值 + * 用于 Dialog 关闭动画期间保持内容显示 + * + * @param value 当前值 + * @returns 当前值(如果有效)或最后一个有效值 + */ +export function useLastValidValue(value: T | null | undefined): T | null { + const ref = useRef(null); + + // 同步更新 ref(在渲染期间,不在 useEffect 中) + if (value != null) { + ref.current = value; + } + + // 返回当前值或最后有效值 + return value ?? ref.current; +} +...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:50.720540,63,405,21 +github_farion1231_cc-switch_62703df6e0864bb7d35e6d4c0bb1669c5a9f9342,src/hooks/useImportExport.ts,useImportExport.ts,,6041,TypeScript,"import { useCallback, useState } from ""react""; +import { useTranslation } from ""react-i18next""; +import { toast } from ""sonner""; +import { settingsApi } from ""@/lib/api""; +import { syncCurrentProvidersLiveSafe } from ""@/utils/postChangeSync""; + +export type ImportStatus = + | ""idle"" + | ""importing"" + | ""success"" + | ""partial-success"" + | ""error""; + +export interface UseImportExportOptions { + onImportSuccess?: () => void | Promise; +} + +export interface UseImportExportResult { + selectedFile: string...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:50.472102,506,5763,204 +github_farion1231_cc-switch_c595c1cf72b41ae61fdb0ec3065b7345e20649de,src/types/usage.ts,usage.ts,,2911,TypeScript,"// 使用统计相关类型定义 + +export interface TokenUsage { + inputTokens: number; + outputTokens: number; + cacheReadTokens: number; + cacheCreationTokens: number; +} + +export interface RequestLog { + requestId: string; + providerId: string; + providerName?: string; + appType: string; + model: string; + requestModel?: string; + costMultiplier: string; + inputTokens: number; + outputTokens: number; + cacheReadTokens: number; + cacheCreationTokens: number; + inputCostUsd: string; + outputCostUsd: string; + cacheR...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:19:01.194161,280,2891,139 +github_farion1231_cc-switch_c7df771b574667c87534722e957288af5b80fe6a,src/hooks/useDragSort.ts,useDragSort.ts,,3344,TypeScript,"import { useCallback, useMemo } from ""react""; +import { + KeyboardSensor, + PointerSensor, + useSensor, + useSensors, + type DragEndEvent, +} from ""@dnd-kit/core""; +import { arrayMove, sortableKeyboardCoordinates } from ""@dnd-kit/sortable""; +import { useQueryClient } from ""@tanstack/react-query""; +import { toast } from ""sonner""; +import { useTranslation } from ""react-i18next""; +import type { Provider } from ""@/types""; +import { providersApi, type AppId } from ""@/lib/api""; + +export function useDragSort(pr...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:49.373072,333,3210,115 +github_farion1231_cc-switch_d6a3aab8d956c52cf2ae9efb2f4f91d054fc60e6,src/config/constants.ts,constants.ts,,445,TypeScript,"// Provider 类型常量 +export const PROVIDER_TYPES = { + GITHUB_COPILOT: ""github_copilot"", + CODEX_OAUTH: ""codex_oauth"", +} as const; + +// 用量脚本模板类型常量 +export const TEMPLATE_TYPES = { + CUSTOM: ""custom"", + GENERAL: ""general"", + NEW_API: ""newapi"", + GITHUB_COPILOT: ""github_copilot"", + TOKEN_PLAN: ""token_plan"", + BALANCE: ""balance"", +} as const; + +export type TemplateType = (typeof TEMPLATE_TYPES)[keyof typeof TEMPLATE_TYPES]; +...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:44.801780,45,417,18 +github_farion1231_cc-switch_6ae480f5e79a411b080eb3a92baf222d5f16b39f,src/hooks/useGlobalProxy.ts,useGlobalProxy.ts,,2579,TypeScript,"/** + * 全局出站代理 React Hooks + * + * 提供获取、设置和测试全局代理的 React Query hooks。 + */ + +import { useQuery, useMutation, useQueryClient } from ""@tanstack/react-query""; +import { toast } from ""sonner""; +import { useTranslation } from ""react-i18next""; +import { + getGlobalProxyUrl, + setGlobalProxyUrl, + testProxyUrl, + getUpstreamProxyStatus, + scanLocalProxies, + type ProxyTestResult, + type UpstreamProxyStatus, + type DetectedProxy, +} from ""@/lib/api/globalProxy""; + +/** + * 获取全局代理 URL + */ +export function useGlobalPr...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:50.162192,247,2437,110 +github_farion1231_cc-switch_2926cb184b9cd1a56bfda41cc478bd69ff62b383,src/lib/updater.ts,updater.ts,,3532,TypeScript,"import { getVersion } from ""@tauri-apps/api/app""; + +// 可选导入:在未注册插件或非 Tauri 环境下,调用时会抛错,外层需做兜底 +// 我们按需加载并在运行时捕获错误,避免构建期类型问题 +// eslint-disable-next-line @typescript-eslint/consistent-type-imports +import type { Update } from ""@tauri-apps/plugin-updater""; + +export type UpdateChannel = ""stable"" | ""beta""; + +export type UpdaterPhase = + | ""idle"" + | ""checking"" + | ""available"" + | ""downloading"" + | ""installing"" + | ""restarting"" + | ""upToDate"" + | ""error""; + +export interface UpdateInfo { + currentVersion: str...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:57.520124,366,3262,127 +github_farion1231_cc-switch_196e65e9fddc7f1e83e6003d9a3b3034469b6fbb,src/hooks/useStreamCheck.ts,useStreamCheck.ts,,4395,TypeScript,"import { useState, useCallback } from ""react""; +import { toast } from ""sonner""; +import { useTranslation } from ""react-i18next""; +import { + streamCheckProvider, + type StreamCheckResult, +} from ""@/lib/api/model-test""; +import type { AppId } from ""@/lib/api""; +import { useResetCircuitBreaker } from ""@/lib/query/failover""; + +export function useStreamCheck(appId: AppId) { + const { t } = useTranslation(); + const [checkingIds, setCheckingIds] = useState>(new Set()); + const resetCircuitBreak...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:55.364533,344,4177,127 +github_farion1231_cc-switch_ea641f0996fced39d21c61ac1cc41fd9c7c14189,src/hooks/useSkills.ts,useSkills.ts,,9380,TypeScript,"import { + useMutation, + useQuery, + useQueryClient, + keepPreviousData, +} from ""@tanstack/react-query""; +import { + skillsApi, + type SkillBackupEntry, + type DiscoverableSkill, + type ImportSkillSelection, + type InstalledSkill, + type SkillUpdateInfo, + type SkillsShSearchResult, +} from ""@/lib/api/skills""; +import type { AppId } from ""@/lib/api/types""; + +/** + * 查询所有已安装的 Skills + * 使用 staleTime: Infinity 和 placeholderData: keepPreviousData + * 实现首次进入使用缓存,只有刷新时才重新获取 + */ +export function useInstalled...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:54.927299,860,8770,361 +github_farion1231_cc-switch_5acef631228c370daf6bd2bb0468088244d49678,src/hooks/useSettingsMetadata.ts,useSettingsMetadata.ts,,1422,TypeScript,"import { useCallback, useEffect, useState } from ""react""; +import { settingsApi } from ""@/lib/api""; + +export interface UseSettingsMetadataResult { + isPortable: boolean; + requiresRestart: boolean; + isLoading: boolean; + acknowledgeRestart: () => void; + setRequiresRestart: (value: boolean) => void; +} + +/** + * useSettingsMetadata - 元数据管理 + * 负责: + * - isPortable(便携模式) + * - requiresRestart(需要重启标志) + */ +export function useSettingsMetadata(): UseSettingsMetadataResult { + const [isPortable, setIsPortabl...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:54.634899,146,1368,62 +github_farion1231_cc-switch_0944b91d1025e717742eb102102115f21fa7ab8f,src/hooks/useSettingsForm.ts,useSettingsForm.ts,,5327,TypeScript,"import { useCallback, useEffect, useRef, useState } from ""react""; +import { useTranslation } from ""react-i18next""; +import { useSettingsQuery } from ""@/lib/query""; +import type { Settings } from ""@/types""; + +type Language = ""zh"" | ""en"" | ""ja""; + +export type SettingsFormState = Omit & { + language: Language; +}; + +const normalizeLanguage = (lang?: string | null): Language => { + if (!lang) return ""zh""; + const normalized = lang.toLowerCase(); + return normalized === ""en"" || normali...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:54.351192,461,5255,172 +github_farion1231_cc-switch_7aa6f42de367df4fba366f26fd6195bff6c2d043,src/types/proxy.ts,proxy.ts,,3186,TypeScript,"export interface ProxyConfig { + listen_address: string; + listen_port: number; + max_retries: number; + request_timeout: number; + enable_logging: boolean; + live_takeover_active?: boolean; + // 超时配置 + streaming_first_byte_timeout: number; + streaming_idle_timeout: number; + non_streaming_timeout: number; +} + +export interface ProxyStatus { + running: boolean; + address: string; + port: number; + active_connections: number; + total_requests: number; + success_requests: number; + failed_requests: ...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:19:00.648406,297,3046,138 +github_farion1231_cc-switch_81c55275fec681ba8adb6d0d4f9a542b522bd0b6,src/i18n/index.ts,index.ts,,1509,TypeScript,"import i18n from ""i18next""; +import { initReactI18next } from ""react-i18next""; + +import en from ""./locales/en.json""; +import ja from ""./locales/ja.json""; +import zh from ""./locales/zh.json""; + +type Language = ""zh"" | ""en"" | ""ja""; + +const DEFAULT_LANGUAGE: Language = ""zh""; + +const getInitialLanguage = (): Language => { + if (typeof window !== ""undefined"") { + try { + const stored = window.localStorage.getItem(""language""); + if (stored === ""zh"" || stored === ""en"" || stored === ""ja"") { + re...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:56.160691,164,1415,71 +github_farion1231_cc-switch_2d9890b83d2ec89c37018f7fd98ea68fe304fbaa,src/types/icon.ts,icon.ts,,366,TypeScript,"export interface IconMetadata { + name: string; // 图标名称(小写,如 ""openai"") + displayName: string; // 显示名称(如 ""OpenAI"") + category: string; // 分类(如 ""ai-provider"", ""cloud"", ""tool"") + keywords: string[]; // 搜索关键词 + defaultColor?: string; // 默认颜色 +} + +export interface IconPreset { + [key: string]: IconMetadata; +} +...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:59.547481,38,304,12 +github_farion1231_cc-switch_17cd3af876dff8a475bed93ef84fc065bcf7a686,src/types/env.ts,env.ts,,647,TypeScript,"/** + * 环境变量冲突检测相关类型定义 + */ + +/** + * 环境变量冲突信息 + */ +export interface EnvConflict { + /** 环境变量名称 */ + varName: string; + /** 环境变量的值 */ + varValue: string; + /** 来源类型: ""system"" 表示系统环境变量, ""file"" 表示配置文件 */ + sourceType: ""system"" | ""file""; + /** 来源路径 (注册表路径或文件路径:行号) */ + sourcePath: string; +} + +/** + * 备份信息 + */ +export interface BackupInfo { + /** 备份文件路径 */ + backupPath: string; + /** 备份时间戳 */ + timestamp: string; + /** 被备份的环境变量冲突列表 */ + conflicts: EnvConflict[]; +} +...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:59.253172,64,457,30 +github_farion1231_cc-switch_64b2edf1c3d7fc276f8e04c6da39722a67bc55ae,src/hooks/useProviderActions.ts,useProviderActions.ts,,11372,TypeScript,"import { useCallback } from ""react""; +import { useQueryClient } from ""@tanstack/react-query""; +import { toast } from ""sonner""; +import { useTranslation } from ""react-i18next""; +import { providersApi, settingsApi, openclawApi, type AppId } from ""@/lib/api""; +import type { + Provider, + UsageScript, + OpenClawProviderConfig, + OpenClawDefaultModel, +} from ""@/types""; +import type { OpenClawSuggestedDefaults } from ""@/config/openclawProviderPresets""; +import { + useAddProviderMutation, + useUpdateProviderM...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:52.414479,910,10745,354 +github_farion1231_cc-switch_538d6ee403f7709af26c12903b78be78b0427127,src/hooks/usePromptActions.ts,usePromptActions.ts,,4104,TypeScript,"import { useState, useCallback } from ""react""; +import { useTranslation } from ""react-i18next""; +import { toast } from ""sonner""; +import { promptsApi, type Prompt, type AppId } from ""@/lib/api""; + +export function usePromptActions(appId: AppId) { + const { t } = useTranslation(); + const [prompts, setPrompts] = useState>({}); + const [loading, setLoading] = useState(false); + const [currentFileContent, setCurrentFileContent] = useState( + null, + ); + + const re...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:52.094284,383,4020,153 +github_farion1231_cc-switch_14205c043f08b1f783d0febeac66d45485e6838c,src/config/geminiProviderPresets.ts,geminiProviderPresets.ts,,9918,TypeScript,"import type { ProviderCategory } from ""@/types""; + +/** + * Gemini 预设供应商的视觉主题配置 + */ +export interface GeminiPresetTheme { + /** 图标类型:'gemini' | 'generic' */ + icon?: ""gemini"" | ""generic""; + /** 背景色(选中状态),支持 hex 颜色 */ + backgroundColor?: string; + /** 文字色(选中状态),支持 hex 颜色 */ + textColor?: string; +} + +export interface GeminiProviderPreset { + name: string; + nameKey?: string; // i18n key for localized display name + websiteUrl: string; + apiKeyUrl?: string; + settingsConfig: object; + baseURL?: string; +...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:45.109293,681,9784,362 +github_farion1231_cc-switch_5682ac465854c7dc800af7f259caef314aa79852,src/lib/platform.ts,platform.ts,,1555,TypeScript,"// 轻量平台检测,避免在 SSR 或无 navigator 的环境报错 +export const isMac = (): boolean => { + try { + const ua = navigator.userAgent || """"; + const plat = (navigator.platform || """").toLowerCase(); + return /mac/i.test(ua) || plat.includes(""mac""); + } catch { + return false; + } +}; + +export const isWindows = (): boolean => { + try { + const ua = navigator.userAgent || """"; + return /windows|win32|win64/i.test(ua); + } catch { + return false; + } +}; + +export const isLinux = (): boolean => { + try { + ...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:57.242412,173,1321,49 +github_farion1231_cc-switch_ddbb3129bc6cd31fbfb2ce78c239a887481a7f26,src/lib/clipboard.ts,clipboard.ts,,496,TypeScript,"import { invoke } from ""@tauri-apps/api/core""; + +export async function copyText(text: string): Promise { + try { + await invoke(""copy_text_to_clipboard"", { text }); + return; + } catch (nativeError) { + try { + await navigator.clipboard.writeText(text); + return; + } catch (webError) { + throw webError instanceof Error + ? webError + : nativeError instanceof Error + ? nativeError + : new Error(String(webError || nativeError)); + } + } +} +...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:56.762923,54,496,20 +github_farion1231_cc-switch_675c67a053291cc5c0d41cd8b77d69ead4b5e89c,src/lib/authBinding.ts,authBinding.ts,,452,TypeScript,"import type { ProviderMeta } from ""@/types""; + +export function resolveManagedAccountId( + meta: ProviderMeta | undefined, + authProvider: string, +): string | null { + const binding = meta?.authBinding; + + if ( + binding?.source === ""managed_account"" && + binding.authProvider === authProvider + ) { + return binding.accountId ?? null; + } + + if (authProvider === ""github_copilot"") { + return meta?.githubAccountId ?? null; + } + + return null; +} +...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:56.471967,54,452,22 +github_farion1231_cc-switch_2ce50efa67ee6310b9cdf1fc9fee741664c94b70,src/types/omo.ts,omo.ts,,12355,TypeScript,"export interface OmoLocalFileData { + agents?: Record>; + categories?: Record>; + otherFields?: Record; + filePath: string; + lastModified?: string; +} + +export interface OmoAgentDef { + key: string; + display: string; + descKey: string; + tooltipKey: string; + recommended?: string; + group: ""main"" | ""sub""; +} + +export interface OmoCategoryDef { + key: string; + display: string; + descKey: string; + tooltipKey: string; +...[truncated]",farion1231/cc-switch,farion1231,46404,2957,"A cross-platform desktop All-in-One assistant tool for Claude Code, Codex, OpenCode, openclaw & Gemini CLI.","['ai-tools' 'claude-code' 'codex' 'desktop-app' 'mcp' 'minimax' 'omo' + 'open-source' 'openclaw' 'openclaw-ui' 'opencode' 'provider-management' + 'rust' 'skills' 'skills-management' 'tauri' 'typescript' 'wsl-support']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:19:00.357151,1098,12355,434 +github_gradio-app_gradio_c370c17c63eeb146504f1917ae99ea1f49b0f60e,globals.d.ts,globals.d.ts,,1376,TypeScript,"import { ApiData, ApiInfo } from ""client/js/src/types""; +declare global { + interface Window { + __gradio_mode__: ""app"" | ""website""; + __gradio_space__: string | null; + launchGradio: Function; + launchGradioFromSpaces: Function; + gradio_config: Config; + gradio_api_info: ApiInfo | { api: ApiInfo }; + scoped_css_attach: (link: HTMLLinkElement) => void; + __is_colab__: boolean; + parentIFrame?: { + scrollTo: (x: number, y: number) => void; + size: (height: number) => void; + a...[truncated]",gradio-app/gradio,gradio-app,42399,3410,"Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!","['data-analysis' 'data-science' 'data-visualization' 'deep-learning' + 'deploy' 'gradio' 'gradio-interface' 'interface' 'machine-learning' + 'models' 'python' 'python-notebook' 'ui' 'ui-components']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:32:43.138960,165,1376,54 +github_gradio-app_gradio_c370c17c63eeb146504f1917ae99ea1f49b0f60e,globals.d.ts,globals.d.ts,,1376,TypeScript,"import { ApiData, ApiInfo } from ""client/js/src/types""; +declare global { + interface Window { + __gradio_mode__: ""app"" | ""website""; + __gradio_space__: string | null; + launchGradio: Function; + launchGradioFromSpaces: Function; + gradio_config: Config; + gradio_api_info: ApiInfo | { api: ApiInfo }; + scoped_css_attach: (link: HTMLLinkElement) => void; + __is_colab__: boolean; + parentIFrame?: { + scrollTo: (x: number, y: number) => void; + size: (height: number) => void; + a...[truncated]",gradio-app/gradio,gradio-app,42347,3393,"Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!","['data-analysis' 'data-science' 'data-visualization' 'deep-learning' + 'deploy' 'gradio' 'gradio-interface' 'interface' 'machine-learning' + 'models' 'python' 'python-notebook' 'ui' 'ui-components']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:43:14.636984,165,1376,54 +github_payloadcms_payload_6a705ad240b82521339a9b764c5688121f0201a7,app/my-route/route.ts,route.ts,,80,TypeScript,"export const GET = () => { + return Response.json({ + hello: 'elliot', + }) +} +...[truncated]",payloadcms/payload,payloadcms,41881,3599,"Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.","['cms' 'content-management' 'content-management-system' 'express' + 'graphql' 'headless' 'headless-cms' 'jamstack' 'javascript' 'mit-license' + 'mongodb' 'nextjs' 'nodejs' 'open-source' 'payload' 'payloadcms' + 'postgres' 'react' 'typescript']",MIT,,,,,0.98,GitHub Public API,2026-04-18T01:22:13.874838,13,80,6 +github_payloadcms_payload_ea29d3c412c703eec008e396830c7c68cb05f0ef,payload-types.ts,payload-types.ts,,8382,TypeScript,"/* tslint:disable */ +/* eslint-disable */ +/** + * This file was automatically generated by Payload. + * DO NOT MODIFY IT BY HAND. Instead, modify your source Payload config, + * and re-run `payload generate:types` to regenerate this file. + */ + +/** + * Supported timezones in IANA format. + * + * This interface was referenced by `Config`'s JSON-Schema + * via the `definition` ""supportedTimezones"". + */ +export type SupportedTimezones = + | 'Pacific/Midway' + | 'Pacific/Niue' + | 'Pacific/Honolulu' + | 'Pac...[truncated]",payloadcms/payload,payloadcms,41881,3599,"Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.","['cms' 'content-management' 'content-management-system' 'express' + 'graphql' 'headless' 'headless-cms' 'jamstack' 'javascript' 'mit-license' + 'mongodb' 'nextjs' 'nodejs' 'open-source' 'payload' 'payloadcms' + 'postgres' 'react' 'typescript']",MIT,,,,,0.98,GitHub Public API,2026-04-18T01:22:14.806059,1005,8382,373 +github_payloadcms_payload_2e6cd580d006e3743f847ab0615191cada88219e,sentry.client.config.ts,sentry.client.config.ts,,771,TypeScript,"import * as Sentry from '@sentry/nextjs' + +const dsn = process.env.NEXT_PUBLIC_SENTRY_DSN + +Sentry.init({ + dsn, + // Replay may only be enabled for the client-side + integrations: [Sentry.replayIntegration()], + + // Set tracesSampleRate to 1.0 to capture 100% + // of transactions for tracing. + // We recommend adjusting this value in production + tracesSampleRate: 1.0, + + // Capture Replay for 10% of all sessions, + // plus for 100% of sessions with an error + enabled: !!dsn, + replaysOnErrorSamp...[truncated]",payloadcms/payload,payloadcms,41881,3599,"Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.","['cms' 'content-management' 'content-management-system' 'express' + 'graphql' 'headless' 'headless-cms' 'jamstack' 'javascript' 'mit-license' + 'mongodb' 'nextjs' 'nodejs' 'open-source' 'payload' 'payloadcms' + 'postgres' 'react' 'typescript']",MIT,,,,,0.98,GitHub Public API,2026-04-18T01:22:15.370209,109,771,27 +github_payloadcms_payload_761181d34d1166bc2de04ca2c96688aadd41275f,vitest.config.ts,vitest.config.ts,,2730,TypeScript,"import { createRequire } from 'module' +import path from 'path' +import fs from 'fs' +import { defineConfig } from 'vitest/config' + +// Use process.cwd() to be safe in both CJS and ESM contexts within Vitest +const ROOT_DIR = process.cwd() +const figmaPath = path.resolve(ROOT_DIR, '../enterprise-plugins/packages/figma/src/index.ts') +const hasFigma = fs.existsSync(figmaPath) + +// Resolve graphql to a single copy to avoid duplicate-instance issues (instanceof checks fail). +// pnpm's isolated linker means...[truncated]",payloadcms/payload,payloadcms,41881,3599,"Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.","['cms' 'content-management' 'content-management-system' 'express' + 'graphql' 'headless' 'headless-cms' 'jamstack' 'javascript' 'mit-license' + 'mongodb' 'nextjs' 'nodejs' 'open-source' 'payload' 'payloadcms' + 'postgres' 'react' 'typescript']",MIT,,,,,0.98,GitHub Public API,2026-04-18T01:22:16.150000,301,2730,80 +github_payloadcms_payload_0271baa468715a628d96a16b10f02b5c237e537e,sentry.server.config.ts,sentry.server.config.ts,,305,TypeScript,"import * as Sentry from '@sentry/nextjs' +const dsn = process.env.NEXT_PUBLIC_SENTRY_DSN + +const enabled = !!dsn + +Sentry.init({ + dsn, + enabled, + skipOpenTelemetrySetup: true, + tracesSampleRate: 1.0, +}) + +if (enabled) { + // eslint-disable-next-line no-console + console.log('Sentry inited') +} + +export {} +...[truncated]",payloadcms/payload,payloadcms,41881,3599,"Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.","['cms' 'content-management' 'content-management-system' 'express' + 'graphql' 'headless' 'headless-cms' 'jamstack' 'javascript' 'mit-license' + 'mongodb' 'nextjs' 'nodejs' 'open-source' 'payload' 'payloadcms' + 'postgres' 'react' 'typescript']",MIT,,,,,0.98,GitHub Public API,2026-04-18T01:22:15.664506,33,305,19 +github_payloadcms_payload_bfbc3055145560bb63ca11c5d9fd52d8d7da768d,instrumentation.ts,instrumentation.ts,,172,TypeScript,"export async function register() { + if (process.env.NEXT_RUNTIME === 'nodejs' && process.env.NEXT_PUBLIC_SENTRY_DSN) { + await import('./sentry.server.config.js') + } +} +...[truncated]",payloadcms/payload,payloadcms,41881,3599,"Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.","['cms' 'content-management' 'content-management-system' 'express' + 'graphql' 'headless' 'headless-cms' 'jamstack' 'javascript' 'mit-license' + 'mongodb' 'nextjs' 'nodejs' 'open-source' 'payload' 'payloadcms' + 'postgres' 'react' 'typescript']",MIT,,,,,0.98,GitHub Public API,2026-04-18T01:22:14.521835,16,172,6 +github_trpc_trpc_0526e6aa81df54c372e0c6cf20499bf1fe428e42,vitest.config.ts,vitest.config.ts,,2057,TypeScript,"/* eslint-disable @typescript-eslint/no-unsafe-argument */ +/* eslint-disable @typescript-eslint/no-unsafe-member-access */ +/* eslint-disable @typescript-eslint/no-unsafe-assignment */ +import { existsSync, readdirSync, readFileSync } from 'node:fs'; +import path, { join } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { defineConfig } from 'vitest/config'; + +const aliases: Record = {}; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const package...[truncated]",trpc/trpc,trpc,40003,1582,🧙‍♀️ Move Fast and Break Nothing. End-to-end typesafe APIs made easy. ,['api' 'next' 'nextjs' 'prisma' 'react' 'typescript'],MIT,,,,,0.98,GitHub Public API,2026-04-17T17:53:36.036311,195,2057,72 +github_ChromeDevTools_chrome-devtools-mcp_1691b117462271012b5cf28735bd6b52f09ca48f,src/version.ts,version.ts,,221,TypeScript,"/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +// If moved update release-please config +// x-release-please-start-version +export const VERSION = '0.21.0'; +// x-release-please-end +...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:22.253033,27,221,11 +github_ChromeDevTools_chrome-devtools-mcp_9f6f6a5f8e304431968ba3ac26258b4e29ac7a19,src/tools/screencast.ts,screencast.ts,,3047,TypeScript,"/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import fs from 'node:fs/promises'; +import os from 'node:os'; +import path from 'node:path'; + +import {zod} from '../third_party/index.js'; +import type {ScreenRecorder} from '../third_party/index.js'; +import {ensureExtension} from '../utils/files.js'; + +import {ToolCategory} from './categories.js'; +import {definePageTool} from './ToolDefinition.js'; + +async function generateTempFilePath(): Promise { + con...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:16.026791,317,3047,103 +github_ChromeDevTools_chrome-devtools-mcp_997bc58fa4f66a9af68fb3f0d88ff0a9ecc6d760,src/utils/types.ts,types.ts,,169,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +export interface PaginationOptions { + pageSize?: number; + pageIdx?: number; +} +...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:21.453433,21,169,11 +github_ChromeDevTools_chrome-devtools-mcp_10e2069d10c07fb7852d9a28390cb71053eb1517,src/formatters/NetworkFormatter.ts,NetworkFormatter.ts,,9375,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + * */ + +import {isUtf8} from 'node:buffer'; + +import { + DevTools, + type HTTPRequest, + type HTTPResponse, +} from '../third_party/index.js'; + +const BODY_CONTEXT_SIZE_LIMIT = 10000; + +export interface NetworkFormatterOptions { + requestId?: number | string; + selectedInDevToolsUI?: boolean; + requestIdResolver?: (request: HTTPRequest) => number | string; + fetchData?: boolean; + requestFilePath?: string; + responseF...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:03.540364,770,9375,326 +github_ChromeDevTools_chrome-devtools-mcp_dee2c36d5b844600e00234ee0d58fcc9166361db,src/utils/string.ts,string.ts,,1518,TypeScript,"/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +/** + * Converts a given string to snake_case. + * This function handles camelCase, PascalCase, and acronyms, including transitions between letters and numbers. + * It uses Unicode-aware regular expressions (`\p{L}`, `\p{N}`, `\p{Lu}`, `\p{Ll}` with the `u` flag) + * to correctly process letters and numbers from various languages. + * + * @param text The input string to convert to snake_case. + * @returns The snake...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:21.164260,199,1518,39 +github_ChromeDevTools_chrome-devtools-mcp_18f6ebad029e051b372900c4fbe8abd52b12b4b3,src/daemon/daemon.ts,daemon.ts,,5618,TypeScript,"#!/usr/bin/env node + +/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import fs from 'node:fs'; +import {createServer, type Server} from 'node:net'; +import path from 'node:path'; +import process from 'node:process'; + +import {logger} from '../logger.js'; +import { + Client, + PipeTransport, + StdioClientTransport, +} from '../third_party/index.js'; +import {VERSION} from '../version.js'; + +import type {DaemonMessage} from './types.js'; +import { + DAEMON_CLIENT_NA...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:00.442621,596,5618,247 +github_ChromeDevTools_chrome-devtools-mcp_b84b58b2b3212f8752068adc375f4f99665bdd77,src/daemon/types.ts,types.ts,,413,TypeScript,"/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +export type DaemonMessage = + | { + method: 'stop'; + } + | { + method: 'status'; + } + | { + method: 'invoke_tool'; + tool: string; + args?: Record; + }; + +export interface DaemonResponse { + success: boolean; + // Stringified CallToolResult. + result: string; + error: unknown; +} +...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:01.237168,50,413,26 +github_ChromeDevTools_chrome-devtools-mcp_7b73bc0fffeda89812a87be48b22acc7f255fca7,src/daemon/utils.ts,utils.ts,,3526,TypeScript,"/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import fs from 'node:fs'; +import os from 'node:os'; +import path from 'node:path'; +import process from 'node:process'; + +import {logger} from '../logger.js'; +import type {YargsOptions} from '../third_party/index.js'; + +export const DAEMON_SCRIPT_PATH = path.join(import.meta.dirname, 'daemon.js'); +export const INDEX_SCRIPT_PATH = path.join( + import.meta.dirname, + '..', + 'bin', + 'chrome-devtools-mcp.js', +); + +...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:01.534568,416,3526,132 +github_ChromeDevTools_chrome-devtools-mcp_b66e0cd26bcf2667f9255861ed045f90b7e749d0,src/Mutex.ts,Mutex.ts,,839,TypeScript,"/** + * @license + * Copyright 2025 Google Inc. + * SPDX-License-Identifier: Apache-2.0 + */ + +export class Mutex { + static Guard = class Guard { + #mutex: Mutex; + constructor(mutex: Mutex) { + this.#mutex = mutex; + } + dispose(): void { + return this.#mutex.release(); + } + }; + + #locked = false; + #acquirers: Array<() => void> = []; + + // This is FIFO. + async acquire(): Promise> { + if (!this.#locked) { + this.#locked = true; + return...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:20:55.602549,96,839,42 +github_ChromeDevTools_chrome-devtools-mcp_92f4612010a3d3054cf803439739562295926fe3,src/PageCollector.ts,PageCollector.ts,,11294,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import {FakeIssuesManager} from './DevtoolsUtils.js'; +import {logger} from './logger.js'; +import type { + Target, + CDPSession, + ConsoleMessage, + Protocol, + Issue, +} from './third_party/index.js'; +import {DevTools} from './third_party/index.js'; +import { + type Browser, + type Frame, + type Handler, + type HTTPRequest, + type Page, + type PageEvents as PuppeteerPageEvents, +} from './third_party/index.js';...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:20:55.901623,1055,11294,420 +github_ChromeDevTools_chrome-devtools-mcp_37ba96f26d6e51e688b8b07fb649c5a0822da51e,src/formatters/HeapSnapshotFormatter.ts,HeapSnapshotFormatter.ts,,1621,TypeScript,"/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import type {DevTools} from '../third_party/index.js'; + +export interface FormattedSnapshotEntry { + className: string; + count: number; + selfSize: number; + retainedSize: number; +} + +export class HeapSnapshotFormatter { + #aggregates: Record< + string, + DevTools.HeapSnapshotModel.HeapSnapshotModel.AggregatedInfo + >; + + constructor( + aggregates: Record< + string, + DevTools.HeapSnapshotModel....[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:02.409456,129,1621,68 +github_ChromeDevTools_chrome-devtools-mcp_4f1668c310fc3fbb49b96dabc73d5b1304f37ef6,src/formatters/IssueFormatter.ts,IssueFormatter.ts,,7454,TypeScript,"/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import {ISSUE_UTILS} from '../issue-descriptions.js'; +import {logger} from '../logger.js'; +import {DevTools} from '../third_party/index.js'; + +export interface IssueFormatterOptions { + requestIdResolver?: (requestId: string) => number | undefined; + elementIdResolver?: (backendNodeId: number) => string | undefined; + id: number; +} + +export interface AffectedResource { + uid?: string; + data?: unknown; + reque...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:03.210225,676,7454,273 +github_ChromeDevTools_chrome-devtools-mcp_f9ffe35bfd19880e77949e0b96a5d680102ae9f6,src/utils/pagination.ts,pagination.ts,,1920,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import type {PaginationOptions} from './types.js'; + +export interface PaginationResult { + items: readonly Item[]; + currentPage: number; + totalPages: number; + hasNextPage: boolean; + hasPreviousPage: boolean; + startIndex: number; + endIndex: number; + invalidPage: boolean; +} + +const DEFAULT_PAGE_SIZE = 20; + +export function paginate( + items: readonly Item[], + options?: PaginationOptions, +): Pa...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:20.870375,205,1920,85 +github_ChromeDevTools_chrome-devtools-mcp_7deea75b4bc5cc855b17cfbba21cd8e8e14b7fd7,src/browser.ts,browser.ts,,7753,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import {execSync} from 'node:child_process'; +import fs from 'node:fs'; +import os from 'node:os'; +import path from 'node:path'; + +import {logger} from './logger.js'; +import type { + Browser, + ChromeReleaseChannel, + LaunchOptions, + Target, +} from './third_party/index.js'; +import {puppeteer} from './third_party/index.js'; + +let browser: Browser | undefined; + +function makeTargetFilter(enableExtensions = false) ...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:20:59.864411,787,7753,274 +github_ChromeDevTools_chrome-devtools-mcp_c1e59e0bb7572fe9a7dd19a27f10ee3b77317b6b,src/utils/check-for-updates.ts,check-for-updates.ts,,2350,TypeScript,"/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import child_process from 'node:child_process'; +import fs from 'node:fs/promises'; +import os from 'node:os'; +import path from 'node:path'; +import process from 'node:process'; + +import {semver} from '../third_party/index.js'; +import {VERSION} from '../version.js'; + +/** + * Notifies the user if an update is available. + * @param message The message to display in the update notification. + */ +let isChecking = false...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:19.357738,279,2350,98 +github_ChromeDevTools_chrome-devtools-mcp_26ddfb71022268500b3ed75522ec34f730cb76d9,src/polyfill.ts,polyfill.ts,,180,TypeScript,"/** + * @license + * Copyright 2025 Google Inc. + * SPDX-License-Identifier: Apache-2.0 + */ + +// polyfills are now bundled with all other dependencies +import './third_party/index.js'; +...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:05.486716,23,180,9 +github_ChromeDevTools_chrome-devtools-mcp_e86af2efc026e32d7b78b411e052250a10d73ffb,src/logger.ts,logger.ts,,1152,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import fs from 'node:fs'; + +import {debug} from './third_party/index.js'; + +const mcpDebugNamespace = 'mcp:log'; + +const namespacesToEnable = [ + mcpDebugNamespace, + ...(process.env['DEBUG'] ? [process.env['DEBUG']] : []), +]; + +export function saveLogsToFile(fileName: string): fs.WriteStream { + // Enable overrides everything so we need to add them + debug.enable(namespacesToEnable.join(',')); + + const logFile ...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:05.205108,119,1152,48 +github_ChromeDevTools_chrome-devtools-mcp_c6e47908c2f4328776519a01e9b6d94b03d8eaa0,src/McpResponse.ts,McpResponse.ts,,35397,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import type {WebMCPTool} from 'puppeteer-core'; + +import type {ParsedArguments} from './bin/chrome-devtools-mcp-cli-options.js'; +import {ConsoleFormatter} from './formatters/ConsoleFormatter.js'; +import {HeapSnapshotFormatter} from './formatters/HeapSnapshotFormatter.js'; +import {IssueFormatter} from './formatters/IssueFormatter.js'; +import {NetworkFormatter} from './formatters/NetworkFormatter.js'; +import {S...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:20:55.313576,2678,35397,1126 +github_ChromeDevTools_chrome-devtools-mcp_5d105db9928f2bd4d4b1fdcc207f9da818ee29b7,src/HeapSnapshotManager.ts,HeapSnapshotManager.ts,,3003,TypeScript,"/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import fsSync from 'node:fs'; +import path from 'node:path'; + +import {DevTools} from './third_party/index.js'; + +export class HeapSnapshotManager { + #snapshots = new Map< + string, + { + snapshot: DevTools.HeapSnapshotModel.HeapSnapshotProxy.HeapSnapshotProxy; + worker: DevTools.HeapSnapshotModel.HeapSnapshotProxy.HeapSnapshotWorkerProxy; + } + >(); + + async getSnapshot( + filePath: string, + ...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:20:53.772217,224,3003,104 +github_ChromeDevTools_chrome-devtools-mcp_7a4abe9dc81386ad767f9eb6bce7f7550f44e7c2,src/DevtoolsUtils.ts,DevtoolsUtils.ts,,13691,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import {PuppeteerDevToolsConnection} from './DevToolsConnectionAdapter.js'; +import {Mutex} from './Mutex.js'; +import {DevTools} from './third_party/index.js'; +import type { + Browser, + ConsoleMessage, + Page, + Protocol, + Target as PuppeteerTarget, +} from './third_party/index.js'; + +/** + * A mock implementation of an issues manager that only implements the methods + * that are actually used by the IssuesAggr...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:20:53.497463,1251,13691,449 +github_ChromeDevTools_chrome-devtools-mcp_e1f5d0bfb9a2f36a8c2b40cd8d8b83c645ad501b,src/DevToolsConnectionAdapter.ts,DevToolsConnectionAdapter.ts,,3425,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import type * as puppeteer from './third_party/index.js'; +import type {DevTools} from './third_party/index.js'; +import {CDPSessionEvent} from './third_party/index.js'; + +/** + * This class makes a puppeteer connection look like DevTools CDPConnection. + * + * Since we connect ""root"" DevTools targets to specific pages, we scope everything to a puppeteer CDP session. + * + * We don't have to recursively listen for '...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:20:53.167709,310,3425,114 +github_ChromeDevTools_chrome-devtools-mcp_5f6ac02213d729a13346672f954bb7177591dcb8,src/daemon/client.ts,client.ts,,4736,TypeScript,"/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import {spawn} from 'node:child_process'; +import fs from 'node:fs'; +import net from 'node:net'; + +import {logger} from '../logger.js'; +import type {CallToolResult} from '../third_party/index.js'; +import {PipeTransport} from '../third_party/index.js'; +import {saveTemporaryFile} from '../utils/files.js'; + +import type {DaemonMessage, DaemonResponse} from './types.js'; +import { + DAEMON_SCRIPT_PATH, + getSocketPa...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:00.152669,490,4736,189 +github_ChromeDevTools_chrome-devtools-mcp_aef789af37d097ec3c952d3ff87a6d7083dddb0d,src/bin/cliDefinitions.ts,cliDefinitions.ts,,22100,TypeScript,"/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +// NOTE: do not edit manually. Auto-generated by 'npm run cli:generate'. + +export interface ArgDef { + name: string; + type: string; + description: string; + required: boolean; + default?: string | number | boolean; + enum?: ReadonlyArray; +} +export type Commands = Record< + string, + { + description: string; + category: string; + args: Record; + } +>; +export const command...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:20:59.581022,2501,22100,707 +github_ChromeDevTools_chrome-devtools-mcp_36925f2eabd01c63f205310600cee05fc752cdca,src/McpPage.ts,McpPage.ts,,4272,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import type { + Dialog, + ElementHandle, + Page, + Viewport, + WebMCPTool, +} from './third_party/index.js'; +import type {ToolGroup, ToolDefinition} from './tools/inPage.js'; +import {takeSnapshot} from './tools/snapshot.js'; +import type {ContextPage} from './tools/ToolDefinition.js'; +import type { + EmulationSettings, + GeolocationOptions, + TextSnapshot, + TextSnapshotNode, +} from './types.js'; +import { + ge...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:20:54.446441,450,4272,168 +github_ChromeDevTools_chrome-devtools-mcp_198a91a5941904e77d0f6320386c0fd668947162,src/McpContext.ts,McpContext.ts,,27765,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import fs from 'node:fs/promises'; +import path from 'node:path'; + +import type {TargetUniverse} from './DevtoolsUtils.js'; +import {UniverseManager} from './DevtoolsUtils.js'; +import {HeapSnapshotManager} from './HeapSnapshotManager.js'; +import {McpPage} from './McpPage.js'; +import { + NetworkCollector, + ConsoleCollector, + type ListenerMap, + type UncaughtError, +} from './PageCollector.js'; +import type { + B...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:20:54.157177,2500,27761,939 +github_ChromeDevTools_chrome-devtools-mcp_4cefab55e6109ea0f55fc08b66410c26920ea4da,src/formatters/ConsoleFormatter.ts,ConsoleFormatter.ts,,9745,TypeScript,"/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import { + createStackTraceForConsoleMessage, + type TargetUniverse, + SymbolizedError, +} from '../DevtoolsUtils.js'; +import {UncaughtError} from '../PageCollector.js'; +import * as DevTools from '../third_party/index.js'; +import type {ConsoleMessage} from '../third_party/index.js'; + +export interface ConsoleFormatterOptions { + fetchDetailedData?: boolean; + id: number; + devTools?: TargetUniverse; + resolved...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:02.111845,856,9745,351 +github_ChromeDevTools_chrome-devtools-mcp_fbd64030704e9c20b1331fafa485689e8b1ef07e,src/devtools.d.ts,devtools.d.ts,,214,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +type CSSInJS = string & {_tag: 'CSS-in-JS'}; +declare module '*.css.js' { + const styles: CSSInJS; + export default styles; +} +...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:01.823588,30,214,12 +github_ChromeDevTools_chrome-devtools-mcp_53783645d876bbc718a7eb62c6f5857a044c80c6,src/telemetry/toolMetricsUtils.ts,toolMetricsUtils.ts,,3220,TypeScript,"/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import type {ToolDefinition} from '../tools/ToolDefinition.js'; + +import { + transformArgName, + transformArgType, + getZodType, + PARAM_BLOCKLIST, +} from './ClearcutLogger.js'; + +/** + * Validates that all values in an enum are of the homogeneous primitive type. + * Returns the primitive type string. Throws an error if heterogeneous. + */ +export function validateEnumHomogeneity(values: unknown[]): string { + con...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:08.127796,361,3220,127 +github_ChromeDevTools_chrome-devtools-mcp_5b133649b8a2696d71320628da050085446db34e,src/telemetry/persistence.ts,persistence.ts,,1972,TypeScript,"/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import fs from 'node:fs/promises'; +import os from 'node:os'; +import path from 'node:path'; +import process from 'node:process'; + +import {logger} from '../logger.js'; + +export interface LocalState { + lastActive: string; // ISO 8601 UTC date string +} + +const STATE_FILE_NAME = 'telemetry_state.json'; +function getDataFolder(): string { + const homedir = os.homedir(); + const {env} = process; + const name = 'chrome...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:07.826537,211,1972,75 +github_ChromeDevTools_chrome-devtools-mcp_55e834f41652c02da500115df54cb44013453f28,src/telemetry/metricUtils.ts,metricUtils.ts,,382,TypeScript,"/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +const LATENCY_BUCKETS = [50, 100, 250, 500, 1000, 2500, 5000, 10000]; + +export function bucketizeLatency(latencyMs: number): number { + for (const bucket of LATENCY_BUCKETS) { + if (latencyMs <= bucket) { + return bucket; + } + } + return LATENCY_BUCKETS[LATENCY_BUCKETS.length - 1]; +} +...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:07.350848,49,382,17 +github_ChromeDevTools_chrome-devtools-mcp_fdaa4ed96b6243b6b3434576d9f7f7e1f2c3426f,src/telemetry/flagUtils.ts,flagUtils.ts,,3503,TypeScript,"/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import type {cliOptions} from '../bin/chrome-devtools-mcp-cli-options.js'; +import {toSnakeCase} from '../utils/string.js'; + +import type {FlagUsage} from './types.js'; + +type CliOptions = typeof cliOptions; + +/** + * For enums, log the value as uppercase. + * We're going to have an enum for such flags with choices represented + * as an `enum` where the keys of the enum will map to the uppercase `choice`. + */ +funct...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:06.553468,449,3503,118 +github_ChromeDevTools_chrome-devtools-mcp_e228bae9e266252a08dd6bf061a8c6eca1329378,src/index.ts,index.ts,,9654,TypeScript,"/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import type fs from 'node:fs'; + +import type {parseArguments} from './bin/chrome-devtools-mcp-cli-options.js'; +import type {Channel} from './browser.js'; +import {ensureBrowserConnected, ensureBrowserLaunched} from './browser.js'; +import {loadIssueDescriptions} from './issue-descriptions.js'; +import {logger} from './logger.js'; +import {McpContext} from './McpContext.js'; +import {McpResponse} from './McpRespons...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:04.120978,773,9654,311 +github_ChromeDevTools_chrome-devtools-mcp_d3e00ee6c388a62c7f430e39d384f3c0b67c2f14,src/third_party/index.ts,index.ts,,2421,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import 'core-js/modules/es.promise.with-resolvers.js'; +import 'core-js/modules/es.set.union.v2.js'; +import 'core-js/proposals/iterator-helpers.js'; + +import type {Flags, OutputMode, Result, RunnerResult} from 'lighthouse'; +import type {Page} from 'puppeteer-core'; + +export type {Flags, Result, RunnerResult, OutputMode}; + +export type {Options as YargsOptions} from 'yargs'; +export {default as yargs} from 'yargs'...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:09.783223,231,2421,74 +github_ChromeDevTools_chrome-devtools-mcp_ce5dcc56201207bd6f70d33274fdbf867df30f41,src/third_party/devtools-heap-snapshot-worker.ts,devtools-heap-snapshot-worker.ts,,271,TypeScript,"/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +// eslint-disable-next-line no-restricted-imports +import '../../node_modules/chrome-devtools-frontend/front_end/entrypoints/heap_snapshot_worker/heap_snapshot_worker-entrypoint.js'; +...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:09.500462,17,271,9 +github_ChromeDevTools_chrome-devtools-mcp_338bd67941bcd9181de99953356527175240059a,src/tools/snapshot.ts,snapshot.ts,,2178,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import {zod} from '../third_party/index.js'; + +import {ToolCategory} from './categories.js'; +import {definePageTool, timeoutSchema} from './ToolDefinition.js'; + +export const takeSnapshot = definePageTool({ + name: 'take_snapshot', + description: `Take a text snapshot of the currently selected page based on the a11y tree. The snapshot lists page elements along with a unique +identifier (uid). Always use the lat...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:16.906008,244,2178,75 +github_ChromeDevTools_chrome-devtools-mcp_725628bcd1428d64f6654667e7c02b087b2608ae,src/tools/script.ts,script.ts,,5143,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import {zod} from '../third_party/index.js'; +import type {Frame, JSHandle, Page, WebWorker} from '../third_party/index.js'; +import type {ExtensionServiceWorker} from '../types.js'; + +import {ToolCategory} from './categories.js'; +import type {Context, Response} from './ToolDefinition.js'; +import {defineTool, pageIdSchema} from './ToolDefinition.js'; + +export type Evaluatable = Page | Frame | WebWorker; + +export ...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:16.610280,534,5143,179 +github_ChromeDevTools_chrome-devtools-mcp_9a6539bf295f932e94db400215bde153263f3253,src/third_party/devtools-formatter-worker.ts,devtools-formatter-worker.ts,,263,TypeScript,"/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +// eslint-disable-next-line no-restricted-imports +import '../../node_modules/chrome-devtools-frontend/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.js'; +...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:08.712036,17,263,9 +github_ChromeDevTools_chrome-devtools-mcp_4356f1e628ba2a8f15a77612345e1f6529a2d6df,src/tools/lighthouse.ts,lighthouse.ts,,3981,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import path from 'node:path'; + +import { + snapshot, + navigation, + generateReport, + zod, + type Flags, + type RunnerResult, + type OutputMode, +} from '../third_party/index.js'; + +import {ToolCategory} from './categories.js'; +import {startTrace} from './performance.js'; +import {definePageTool} from './ToolDefinition.js'; + +export const lighthouseAudit = definePageTool({ + name: 'lighthouse_audit', + descripti...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:13.884908,389,3981,160 +github_ChromeDevTools_chrome-devtools-mcp_ab0ea788e2c69b19ed572aac87fe83af448ae301,src/issue-descriptions.ts,issue-descriptions.ts,,1295,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import * as fs from 'node:fs'; +import * as path from 'node:path'; + +const DESCRIPTIONS_PATH = path.join( + import.meta.dirname, + 'third_party/issue-descriptions', +); + +let issueDescriptions: Record = {}; + +/** + * Reads all issue descriptions from the filesystem into memory. + */ +export async function loadIssueDescriptions(): Promise { + if (Object.keys(issueDescriptions).length > 0) { + ...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:04.408230,156,1295,55 +github_ChromeDevTools_chrome-devtools-mcp_c9d0ea85911ab6b04579e59db441aada76aa0e8f,src/tools/emulation.ts,emulation.ts,,2106,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + * + */ + +import {zod, PredefinedNetworkConditions} from '../third_party/index.js'; + +import {ToolCategory} from './categories.js'; +import { + definePageTool, + geolocationTransform, + viewportTransform, +} from './ToolDefinition.js'; + +const throttlingOptions: [string, ...string[]] = [ + 'Offline', + ...Object.keys(PredefinedNetworkConditions), +]; + +export const emulate = definePageTool({ + name: 'emulate', + descript...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:11.927685,206,2106,74 +github_ChromeDevTools_chrome-devtools-mcp_76cec7fb3c61a65ca30639233f056d60d3559c30,src/tools/extensions.ts,extensions.ts,,3107,TypeScript,"/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import {zod} from '../third_party/index.js'; + +import {ToolCategory} from './categories.js'; +import {defineTool} from './ToolDefinition.js'; + +const EXTENSIONS_CONDITION = 'experimentalExtensionSupport'; + +export const installExtension = defineTool({ + name: 'install_extension', + description: 'Installs a Chrome extension from the given path.', + annotations: { + category: ToolCategory.EXTENSIONS, + readOnl...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:12.281189,304,3107,106 +github_ChromeDevTools_chrome-devtools-mcp_46100ed94bf16aaf23b1b44073b197d26f4affde,src/bin/chrome-devtools-mcp-main.ts,chrome-devtools-mcp-main.ts,,1651,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import '../polyfill.js'; + +import process from 'node:process'; + +import {createMcpServer, logDisclaimers} from '../index.js'; +import {logger, saveLogsToFile} from '../logger.js'; +import {computeFlagUsage} from '../telemetry/flagUtils.js'; +import {StdioServerTransport} from '../third_party/index.js'; +import {checkForUpdates} from '../utils/check-for-updates.js'; +import {VERSION} from '../version.js'; + +import {c...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:20:58.205453,143,1651,53 +github_ChromeDevTools_chrome-devtools-mcp_804410c056086222442985ce02abfed7a6a31c59,src/bin/chrome-devtools-mcp-cli-options.ts,chrome-devtools-mcp-cli-options.ts,,12656,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import type {YargsOptions} from '../third_party/index.js'; +import {yargs, hideBin} from '../third_party/index.js'; + +export const cliOptions = { + autoConnect: { + type: 'boolean', + description: + 'If specified, automatically connects to a browser (Chrome 144+) running locally from the user data directory identified by the channel param (default channel is stable). Requires the remote debugging serve...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:20:57.917248,1402,12656,370 +github_ChromeDevTools_chrome-devtools-mcp_6e317a3335c617e8858fba1e77599d87800efc74,src/bin/chrome-devtools-cli-options.ts,chrome-devtools-cli-options.ts,,23066,TypeScript,"/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +// NOTE: do not edit manually. Auto-generated by 'npm run cli:generate'. + +export interface ArgDef { + name: string; + type: string; + description: string; + required: boolean; + default?: string | number | boolean; + enum?: ReadonlyArray; +} +export type Commands = Record< + string, + { + description: string; + category: string; + args: Record; + } +>; +export const command...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:20:57.589021,2605,23066,746 +github_ChromeDevTools_chrome-devtools-mcp_eb45674df69443c22e0516b9f8cf9488c99ef89f,src/bin/check-latest-version.ts,check-latest-version.ts,,739,TypeScript,"/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import fs from 'node:fs/promises'; +import path from 'node:path'; +import process from 'node:process'; + +const cachePath = process.argv[2]; + +if (cachePath) { + try { + const response = await fetch( + 'https://registry.npmjs.org/chrome-devtools-mcp/latest', + ); + const data = response.ok ? await response.json() : null; + + if ( + data && + typeof data === 'object' && + 'version' in data &...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:20:57.272637,85,739,33 +github_ChromeDevTools_chrome-devtools-mcp_36090541f9171596e5cb9cc465280962ced5a613,src/telemetry/WatchdogClient.ts,WatchdogClient.ts,,2270,TypeScript,"/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import {spawn, type ChildProcess} from 'node:child_process'; +import {fileURLToPath} from 'node:url'; + +import {logger} from '../logger.js'; + +import type {WatchdogMessage, OsType} from './types.js'; + +export class WatchdogClient { + #childProcess: ChildProcess; + + constructor( + config: { + parentPid: number; + appVersion: string; + osType: OsType; + logFile?: string; + clearcutEndpoint?: ...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:06.261978,190,2270,86 +github_ChromeDevTools_chrome-devtools-mcp_d118fc1714e14a3fa1b561be81191201c16be1ca,src/formatters/SnapshotFormatter.ts,SnapshotFormatter.ts,,4347,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import type {TextSnapshot, TextSnapshotNode} from '../types.js'; + +export class SnapshotFormatter { + #snapshot: TextSnapshot; + + constructor(snapshot: TextSnapshot) { + this.#snapshot = snapshot; + } + + toString(): string { + const chunks: string[] = []; + const root = this.#snapshot.root; + + // Top-level content of the snapshot. + if ( + this.#snapshot.verbose && + this.#snapshot.hasSelect...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:03.834013,441,4347,167 +github_ChromeDevTools_chrome-devtools-mcp_bce93f73b5b7561513d35f1d0e3701de3684d05d,src/tools/input.ts,input.ts,,13463,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import {logger} from '../logger.js'; +import type {McpContext} from '../McpContext.js'; +import {zod} from '../third_party/index.js'; +import type {ElementHandle, KeyInput} from '../third_party/index.js'; +import type {TextSnapshotNode} from '../types.js'; +import {parseKey} from '../utils/keyboard.js'; + +import {ToolCategory} from './categories.js'; +import type {ContextPage} from './ToolDefinition.js'; +import {de...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:13.110182,1393,13463,440 +github_ChromeDevTools_chrome-devtools-mcp_27a499d9185517331a88412d625d6a3eb6b15298,src/telemetry/ClearcutLogger.ts,ClearcutLogger.ts,,8224,TypeScript,"/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import process from 'node:process'; + +import {DAEMON_CLIENT_NAME} from '../daemon/utils.js'; +import {logger} from '../logger.js'; +import type {zod, ShapeOutput} from '../third_party/index.js'; + +import type {LocalState, Persistence} from './persistence.js'; +import {FilePersistence} from './persistence.js'; +import { + McpClient, + type FlagUsage, + WatchdogMessageType, + OsType, + type ToolInvocation, +} from '....[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:05.772699,777,8224,295 +github_ChromeDevTools_chrome-devtools-mcp_979533e848ae723db114a0267bf967f74eab072d,src/bin/chrome-devtools.ts,chrome-devtools.ts,,7398,TypeScript,"#!/usr/bin/env node + +/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +process.title = 'chrome-devtools'; + +import process from 'node:process'; + +import type {Options, PositionalOptions} from 'yargs'; + +import { + startDaemon, + stopDaemon, + sendCommand, + handleResponse, +} from '../daemon/client.js'; +import {isDaemonRunning, serializeArgs} from '../daemon/utils.js'; +import {logDisclaimers} from '../index.js'; +import {hideBin, yargs, type CallToolResult} from...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:20:59.281023,718,7398,254 +github_ChromeDevTools_chrome-devtools-mcp_e652d64fe406e0e4b62cd7a95342db02c2650ef4,src/utils/ExtensionRegistry.ts,ExtensionRegistry.ts,,1212,TypeScript,"/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import fs from 'node:fs/promises'; +import path from 'node:path'; + +export interface InstalledExtension { + id: string; + name: string; + version: string; + isEnabled: boolean; + path: string; +} + +export class ExtensionRegistry { + #extensions = new Map(); + + async registerExtension( + id: string, + extensionPath: string, + ): Promise { + const manifestPath ...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:19.070985,119,1212,54 +github_ChromeDevTools_chrome-devtools-mcp_4f6a4f2845608175739e2c817db9e70086900993,src/bin/chrome-devtools-mcp.ts,chrome-devtools-mcp.ts,,916,TypeScript,"#!/usr/bin/env node + +/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +process.title = 'chrome-devtools-mcp'; + +import {version} from 'node:process'; + +const [major, minor] = version.substring(1).split('.').map(Number); + +if (major === 20 && minor < 19) { + console.error( + `ERROR: \`chrome-devtools-mcp\` does not support Node ${process.version}. Please upgrade to Node 20.19.0 LTS or a newer LTS.`, + ); + process.exit(1); +} + +if (major === 22 && minor < 12) {...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:20:58.491721,114,916,37 +github_ChromeDevTools_chrome-devtools-mcp_4efd8dc9347c7e55f66115bf05ff12ea06f62d62,src/types.ts,types.ts,,1073,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import type {SerializedAXNode, Viewport, Target} from './third_party/index.js'; + +export interface ExtensionServiceWorker { + url: string; + target: Target; + id: string; +} + +export interface TextSnapshotNode extends SerializedAXNode { + id: string; + backendNodeId?: number; + loaderId?: string; + children: TextSnapshotNode[]; +} + +export interface GeolocationOptions { + latitude: number; + longitude: number; +} +...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:18.786277,119,1073,46 +github_ChromeDevTools_chrome-devtools-mcp_7b152d853dd32221da54e0990d241d53f4d1a44b,src/trace-processing/parse.ts,parse.ts,,3590,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import {logger} from '../logger.js'; +import {DevTools} from '../third_party/index.js'; + +const engine = DevTools.TraceEngine.TraceModel.Model.createWithAllHandlers(); + +export interface TraceResult { + parsedTrace: DevTools.TraceEngine.TraceModel.ParsedTrace; + insights: DevTools.TraceEngine.Insights.Types.TraceInsightSets | null; +} + +export function traceResultIsSuccess( + x: TraceResult | TraceParseError, +): ...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:18.495780,369,3590,127 +github_ChromeDevTools_chrome-devtools-mcp_d7f06afec2769f8b215f423ddba71056de10cb62,src/tools/webmcp.ts,webmcp.ts,,2054,TypeScript,"/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import {zod} from '../third_party/index.js'; + +import {ToolCategory} from './categories.js'; +import {definePageTool} from './ToolDefinition.js'; + +export const listWebMcpTools = definePageTool({ + name: 'list_webmcp_tools', + description: `Lists all WebMCP tools the page exposes.`, + annotations: { + category: ToolCategory.DEBUGGING, + readOnlyHint: true, + conditions: ['experimentalWebmcp'], + }, + sche...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:18.201314,223,2054,71 +github_ChromeDevTools_chrome-devtools-mcp_b3477b90698c5bd44fb5e1e8f9377c8a4e1a79ba,src/tools/tools.ts,tools.ts,,2037,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import type {ParsedArguments} from '../bin/chrome-devtools-mcp-cli-options.js'; + +import * as consoleTools from './console.js'; +import * as emulationTools from './emulation.js'; +import * as extensionTools from './extensions.js'; +import * as inPageTools from './inPage.js'; +import * as inputTools from './input.js'; +import * as lighthouseTools from './lighthouse.js'; +import * as memoryTools from './memory.js'; +i...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:17.400398,189,2037,63 +github_ChromeDevTools_chrome-devtools-mcp_2dd0f48c1a55e5cfdb6ca379bcc152e546fbef29,src/WaitForHelper.ts,WaitForHelper.ts,,4981,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import {logger} from './logger.js'; +import type {Page, Protocol, CdpPage} from './third_party/index.js'; +import type {PredefinedNetworkConditions} from './third_party/index.js'; + +export class WaitForHelper { + #abortController = new AbortController(); + #page: CdpPage; + #stableDomTimeout: number; + #stableDomFor: number; + #expectNavigationIn: number; + #navigationTimeout: number; + + constructor( + page: ...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:20:56.474382,450,4981,183 +github_ChromeDevTools_chrome-devtools-mcp_57198dd31b953347bf0469dd2a1018f3d24e058f,src/SlimMcpResponse.ts,SlimMcpResponse.ts,,684,TypeScript,"/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import type { + TextContent, + ImageContent, +} from '@modelcontextprotocol/sdk/types.js'; + +import type {McpContext} from './McpContext.js'; +import {McpResponse} from './McpResponse.js'; + +export class SlimMcpResponse extends McpResponse { + override async handle( + _toolName: string, + _context: McpContext, + ): Promise<{ + content: Array; + structuredContent: object; + }> ...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:20:56.180529,71,684,33 +github_ChromeDevTools_chrome-devtools-mcp_f740fda4ed35d4a1385d678e88c7f29da8093688,src/tools/screenshot.ts,screenshot.ts,,3424,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import {zod} from '../third_party/index.js'; +import type {ElementHandle, Page} from '../third_party/index.js'; + +import {ToolCategory} from './categories.js'; +import {definePageTool} from './ToolDefinition.js'; + +export const screenshot = definePageTool({ + name: 'take_screenshot', + description: `Take a screenshot of the page or element.`, + annotations: { + category: ToolCategory.DEBUGGING, + // Not read...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:16.319509,354,3424,110 +github_ChromeDevTools_chrome-devtools-mcp_2aa640f7f46b117939cbdc07f8dae22cfa3ddab5,src/tools/ToolDefinition.ts,ToolDefinition.ts,,10483,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import type {ParsedArguments} from '../bin/chrome-devtools-mcp-cli-options.js'; +import type {McpPage} from '../McpPage.js'; +import {zod} from '../third_party/index.js'; +import type { + Dialog, + ElementHandle, + Page, + ScreenRecorder, + Viewport, + DevTools, +} from '../third_party/index.js'; +import type {InsightName, TraceResult} from '../trace-processing/parse.js'; +import type { + TextSnapshotNode, + Geolo...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:10.417955,974,10483,400 +github_ChromeDevTools_chrome-devtools-mcp_acc588655c952aa6727db083937178c25a12d4ab,src/tools/performance.ts,performance.ts,,8424,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import zlib from 'node:zlib'; + +import {logger} from '../logger.js'; +import {zod, DevTools} from '../third_party/index.js'; +import type {Page} from '../third_party/index.js'; +import type {InsightName, TraceResult} from '../trace-processing/parse.js'; +import { + parseRawTraceBuffer, + traceResultIsSuccess, +} from '../trace-processing/parse.js'; + +import {ToolCategory} from './categories.js'; +import type {Contex...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:15.228714,783,8424,266 +github_ChromeDevTools_chrome-devtools-mcp_40155934893e6b03412ba02e611fe2b1362379ea,src/tools/pages.ts,pages.ts,,12009,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import {logger} from '../logger.js'; +import type {CdpPage, Dialog} from '../third_party/index.js'; +import {zod} from '../third_party/index.js'; + +import {ToolCategory} from './categories.js'; +import { + CLOSE_PAGE_ERROR, + definePageTool, + defineTool, + timeoutSchema, +} from './ToolDefinition.js'; + +export const listPages = defineTool(args => { + return { + name: 'list_pages', + description: `Get a list o...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:14.805265,1138,12009,400 +github_ChromeDevTools_chrome-devtools-mcp_596afa546affc2e54de7209e49839cda2f220670,src/tools/network.ts,network.ts,,4184,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import {zod} from '../third_party/index.js'; +import type {ResourceType} from '../third_party/index.js'; + +import {ToolCategory} from './categories.js'; +import {definePageTool} from './ToolDefinition.js'; + +const FILTERABLE_RESOURCE_TYPES: readonly [ResourceType, ...ResourceType[]] = [ + 'document', + 'stylesheet', + 'image', + 'media', + 'font', + 'script', + 'texttrack', + 'xhr', + 'fetch', + 'prefetch', + 'e...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:14.489001,386,4184,141 +github_ChromeDevTools_chrome-devtools-mcp_38eacf119e64612030bd4d8bc5bc550d6e226300,src/tools/memory.ts,memory.ts,,1760,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import {zod} from '../third_party/index.js'; +import {ensureExtension} from '../utils/files.js'; + +import {ToolCategory} from './categories.js'; +import {definePageTool, defineTool} from './ToolDefinition.js'; + +export const takeMemorySnapshot = definePageTool({ + name: 'take_memory_snapshot', + description: `Capture a heap snapshot of the currently selected page. Use to analyze the memory distribution of JavaSc...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:14.180158,171,1760,59 +github_ChromeDevTools_chrome-devtools-mcp_51b0a3f7bc17acafa6870535ff502c73bbf517cb,src/utils/keyboard.ts,keyboard.ts,,3825,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import type {KeyInput} from '../third_party/index.js'; + +// See the KeyInput type for the list of supported keys. +const validKeys = new Set([ + '0', + '1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9', + 'Power', + 'Eject', + 'Abort', + 'Help', + 'Backspace', + 'Tab', + 'Numpad5', + 'NumpadEnter', + 'Enter', + '\r', + '\n', + 'ShiftLeft', + 'ShiftRight', + 'ControlLeft', + 'ControlRight', + 'AltLeft...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:20.590204,415,3825,306 +github_ChromeDevTools_chrome-devtools-mcp_abdba3ed8419c156167e87e169296d47a0463eb8,src/utils/files.ts,files.ts,,813,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import fs from 'node:fs/promises'; +import os from 'node:os'; +import path from 'node:path'; + +export async function saveTemporaryFile( + data: Uint8Array, + filename: string, +): Promise<{filepath: string}> { + try { + const dir = await fs.mkdtemp( + path.join(os.tmpdir(), 'chrome-devtools-mcp-'), + ); + + const filepath = path.join(dir, filename); + await fs.writeFile(filepath, data...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:20.309672,93,813,35 +github_ChromeDevTools_chrome-devtools-mcp_0cb1b6ba73b4b2912c83f41974534b021a13305c,src/tools/inPage.ts,inPage.ts,,4561,TypeScript,"/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import { + zod, + ajv, + type JSONSchema7, + type ElementHandle, +} from '../third_party/index.js'; + +import {ToolCategory} from './categories.js'; +import {definePageTool} from './ToolDefinition.js'; + +export interface ToolDefinition { + name: string; + description: string; + inputSchema: JSONSchema7; +} + +export interface ToolGroup { + name: string; + description: string; + tools: T[]; +...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:12.568061,504,4561,155 +github_ChromeDevTools_chrome-devtools-mcp_dd8059bbfd8baf88e887b051274367f64f73e7fe,src/tools/console.ts,console.ts,,2654,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import {zod} from '../third_party/index.js'; +import type {ConsoleMessageType} from '../third_party/index.js'; + +import {ToolCategory} from './categories.js'; +import {definePageTool} from './ToolDefinition.js'; +type ConsoleResponseType = ConsoleMessageType | 'issue'; + +const FILTERABLE_MESSAGE_TYPES: [ + ConsoleResponseType, + ...ConsoleResponseType[], +] = [ + 'log', + 'debug', + 'info', + 'error', + 'warn', + ...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:11.579984,257,2654,107 +github_ChromeDevTools_chrome-devtools-mcp_7dc151853d937a860e91bfa38f471b1fa13b2871,src/tools/categories.ts,categories.ts,,758,TypeScript,"/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +export enum ToolCategory { + INPUT = 'input', + NAVIGATION = 'navigation', + EMULATION = 'emulation', + PERFORMANCE = 'performance', + NETWORK = 'network', + DEBUGGING = 'debugging', + EXTENSIONS = 'extensions', + IN_PAGE = 'in-page', + MEMORY = 'memory', +} + +export const labels = { + [ToolCategory.INPUT]: 'Input automation', + [ToolCategory.NAVIGATION]: 'Navigation automation', + [ToolCategory.EMULATION]: 'E...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:10.743012,71,758,30 +github_ChromeDevTools_chrome-devtools-mcp_d3caf3934d894e018f5b5a52d52d0dd70dc3afce,src/telemetry/types.ts,types.ts,,2031,TypeScript,"/** + * @license + * Copyright 2026 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +// Protobuf message interfaces +export interface ChromeDevToolsMcpExtension { + os_type?: OsType; + mcp_client?: McpClient; + app_version?: string; + session_id?: string; + tool_invocation?: ToolInvocation; + server_start?: ServerStart; + daily_active?: DailyActive; + server_shutdown?: ServerShutdown; +} + +export type ServerShutdown = Record; + +export interface ToolInvocation { + tool_name: string...[truncated]",ChromeDevTools/chrome-devtools-mcp,ChromeDevTools,35846,2192,Chrome DevTools for coding agents,"['browser' 'chrome' 'chrome-devtools' 'debugging' 'devtools' 'mcp' + 'mcp-server' 'puppeteer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:08.433527,233,2031,96 +github_goharbor_harbor_c8eb7e428b9190365fbdd8127ba9ab9eda74a853,src/portal/cypress.config.ts,cypress.config.ts,,135,TypeScript,"import { defineConfig } from 'cypress'; + +export default defineConfig({ + e2e: { + baseUrl: 'http://localhost:4200', + }, +}); +...[truncated]",goharbor/harbor,goharbor,28287,5198,"An open source trusted cloud native registry project that stores, signs, and scans content.","['cloud-native' 'cncf' 'cncf-project' 'container' 'container-management' + 'container-registry' 'containers' 'docker' 'hacktoberfest' 'helm' + 'kubernetes' 'registry']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T08:25:36.292600,15,135,8 +github_tree-sitter_tree-sitter_64ed3bf27f18e0ff0ccb9bab6fa45350619d1a8a,lib/binding_web/vitest.config.ts,vitest.config.ts,,316,TypeScript,"import { defineConfig } from 'vitest/config' + +export default defineConfig({ + test: { + globals: true, + environment: 'node', + coverage: { + include: [ + 'web-tree-sitter.js', + ], + exclude: [ + 'test/**', + 'dist/**', + 'lib/**', + 'wasm/**' + ], + }, + } +}) +...[truncated]",tree-sitter/tree-sitter,tree-sitter,24792,2582,An incremental parsing system for programming tools,['c' 'incremental' 'parser' 'parsing' 'rust' 'tree-sitter' 'wasm'],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:33:44.041941,31,316,20 +github_pubkey_rxdb_7121b0030774c2699e3f2ad5beb8621f4f0a224a,src/rx-query-helper.ts,rx-query-helper.ts,,12627,TypeScript,"import { LOGICAL_OPERATORS, getQueryPlan } from './query-planner.ts'; +import { getPrimaryFieldOfPrimaryKey } from './rx-schema-helper.ts'; +import type { + DeepReadonly, + DeterministicSortComparator, + FilledMangoQuery, + MangoQuery, + MangoQuerySortDirection, + PreparedQuery, + QueryMatcher, + RxDocument, + RxDocumentData, + RxJsonSchema, + RxQuery +} from './types/index.d.ts'; +import { + clone, + firstPropertyNameOfObject, + toArray, + isMaybeReadonlyArray, + obj...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:06.794445,1290,12627,344 +github_pubkey_rxdb_5dd9afbd63176f21dfe2479a76eb3cef26c77329,src/types/rx-change-event.d.ts,rx-change-event.d.ts,,2593,TypeScript,"import type { + RxDocumentData, + RxStorageChangeEvent, + RxStorageDefaultCheckpoint +} from './rx-storage.d.ts'; + + +export type RxChangeEventBase = { + operation: 'INSERT' | 'UPDATE' | 'DELETE'; + + readonly documentId: string; + + // optional, does not exist on changes to localdocs of the database + readonly collectionName?: string; + + // true if the event is about a local document, false if not. + readonly isLocal: boolean; + + documentData: RxDocumentData...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:12.766844,307,2593,86 +github_pubkey_rxdb_fb3fab026dbfcb5a2fb7bf5538a7149be8d457de,src/types/rx-attachment.d.ts,rx-attachment.d.ts,,979,TypeScript,"import type { + RxDocument +} from './rx-document.d.ts'; + +declare type Buffer = any; + +export type RxAttachmentCreator = { + id: string; + /** + * Content type like 'plain/text' + */ + type: string; + /** + * The data of the attachment. + */ + data: Blob; +}; + +export type RxAttachmentCreatorBase64 = { + id: string; + /** + * Content type like 'plain/text' + */ + type: string; + /** + * The data of the attachment as base64. + */ + data: string; + + // m...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:12.464876,115,979,47 +github_pubkey_rxdb_e9a9176644235719b2e59f548ddb02971fd8cb3e,src/types/replication-protocol.d.ts,replication-protocol.d.ts,,9843,TypeScript,"import { BehaviorSubject, Observable, Subject } from 'rxjs'; +import type { + RxConflictHandler, + RxConflictHandlerInput +} from './conflict-handling.d.ts'; +import type { RxError, RxTypeError } from './rx-error.d.ts'; +import type { + BulkWriteRow, + RxDocumentData, + WithDeleted, + WithDeletedAndAttachments +} from './rx-storage.d.ts'; +import type { + RxStorageInstance +} from './rx-storage.interface.d.ts'; +import type { HashFunction } from './util.d.ts'; + +export type RxStorageReplica...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:12.167516,1198,9843,297 +github_pubkey_rxdb_3f2be3e0ca30a0313d680baefbf6b9cdff5473fd,src/types/query-planner.d.ts,query-planner.d.ts,,1214,TypeScript,"export type RxQueryPlanKey = string | number | undefined; + +export type RxQueryPlanerOpts = { + startKey: RxQueryPlanKey; + endKey: RxQueryPlanKey; + /** + * True if the first matching document + * must also be included into the result set. + */ + inclusiveStart: boolean; + /** + * True if the last matching document + * must also be included into the result set. + */ + inclusiveEnd: boolean; +}; + +export type RxQueryPlan = { + index: string[]; + /** + * If the i...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:11.836151,167,1214,48 +github_pubkey_rxdb_2183d2f87b549b4a4632e4c765fc40ca9ee22f2f,src/types/couchdb.d.ts,couchdb.d.ts,,6524,TypeScript,"import type { + MangoQuery, + MangoQuerySelector, + MangoQuerySortPart +} from './rx-query.d.ts'; +import type { BulkWriteRow } from './rx-storage.d.ts'; + +/** + * This file contains types that are CouchDB specific + */ + +export interface CouchReplicationOptions { + live?: boolean; + retry?: boolean; + filter?: Function; + doc_ids?: string[]; + query_params?: any; + view?: any; + since?: number | 'now'; + heartbeat?: number; + timeout?: number; + batch_size?: number; + batc...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:10.761164,733,6524,294 +github_pubkey_rxdb_c0245806958a13266a31932f4eb785149303113b,src/types/conflict-handling.d.ts,conflict-handling.d.ts,,1491,TypeScript,"import type { WithDeleted } from './rx-storage.d.ts'; + +/** + * Notice that the conflict handler input/output + * does not work on RxDocumentData, but only on WithDeleted. + * This is because the _meta attributes are meant for the local storing of document data, they not replicated + * and therefore cannot be used to resolve conflicts. + */ +export type RxConflictHandlerInput = { + assumedMasterState?: WithDeleted; + realMasterState: WithDeleted = { + /** + * The top level field of the document that will be used + * to store the composite ke...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:16.259180,915,7246,215 +github_pubkey_rxdb_ba42833bac9c214c031ecd89e89fc62090313625,src/types/rx-query.d.ts,rx-query.d.ts,,5628,TypeScript,"import type { + RxQueryBase +} from '../rx-query.d.ts'; +import type { Paths, StringKeys } from './util.d.ts'; + +/** + * Typed Mango Query Selector + * @link https://github.com/mongodb/node-mongodb-native/blob/26bce4a8debb65df5a42dc8599e886c9c83de10d/src/mongo_types.ts + * @link https://stackoverflow.com/a/58436959/3443137 + */ + + +export type PropertyType = string extends Property + ? unknown + : Property extends keyof Type + ? Type[Property] + : Property extends...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:15.960784,602,5628,145 +github_pubkey_rxdb_a43249f5e8b11d934de0481368be031a65300447,src/types/rx-plugin.d.ts,rx-plugin.d.ts,,5106,TypeScript,"import type { + RxQuery, + RxQueryOP, + MangoQuery +} from './rx-query.d.ts'; +import type { + RxCollection, + RxCollectionCreator +} from './rx-collection.d.ts'; +import type { + RxStorageInstanceCreationParams +} from './rx-storage.d.ts'; +import type { + DeepReadonly, + FilledMangoQuery, + RxDatabase, + RxDatabaseCreator, + RxDocument, + RxStorage, + RxReplicationWriteToMasterRow, + WithDeleted, + RxState, + BulkWriteRow, + RxStorageInstance +} from './index.d.ts'; +...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:15.179817,453,5106,168 +github_pubkey_rxdb_6223d5a94e2a7de8fb39b987743e3edeaf84ba65,src/types/rx-error.d.ts,rx-error.d.ts,,6577,TypeScript,"import type { RxJsonSchema } from './rx-schema.d.ts'; +import { + RxSchema +} from '../rx-schema.ts'; +import type { RxPlugin } from './rx-plugin.d.ts'; +import { ERROR_MESSAGES } from '../plugins/dev-mode/error-messages.ts'; +import type { RxReplicationWriteToMasterRow } from './replication-protocol.d.ts'; +import type { BulkWriteRow, RxDocumentData } from './rx-storage.d.ts'; + +type KeyOf = Extract; +export type RxErrorKey = KeyOf; + +export ty...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:14.695831,738,6577,226 +github_pubkey_rxdb_f17d98997d3e95e4fb9491a0c9cd93d98c1721c0,src/types/rx-database.d.ts,rx-database.d.ts,,4007,TypeScript,"import type { + RxCollection, + RxDumpCollection, + RxDumpCollectionAsAny +} from './rx-collection.d.ts'; +import type { + RxDatabaseBase +} from '../rx-database.d.ts'; +import { Observable } from 'rxjs'; +import type { RxStorage } from './rx-storage.interface.d.ts'; +import type { RxLocalDocument } from './plugins/local-documents.d.ts'; +import type { RxCleanupPolicy } from './plugins/cleanup.d.ts'; +import type { ById, HashFunction } from './util.d.ts'; +import type { RxReactivityFactory } from...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:14.115318,424,4007,125 +github_pubkey_rxdb_80157cf826f41a7c51efd1669378433cf46c711b,src/types/rx-collection.d.ts,rx-collection.d.ts,,4269,TypeScript,"import type { + RxJsonSchema, + RxDocument, + MigrationStrategies, + RxConflictHandler +} from './index.d.ts'; +import type { + RxCollectionBase +} from '../rx-collection.d.ts'; +import type { QueryCache } from '../query-cache.d.ts'; +import type { RxLocalDocumentMutation } from './rx-database.d.ts'; + +export interface KeyFunctionMap { + [key: string]: Function; +} +export interface NumberFunctionMap { + [key: number]: Function; +} + + +/** + * Params to create a new collection. + * Notice the n...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:13.061098,417,4269,118 +github_pubkey_rxdb_3f9f233fcb506f98b29fbefa326018930c605f84,src/rx-error.ts,rx-error.ts,,5096,TypeScript,"/** + * here we use custom errors with the additional field 'parameters' + */ + +import { overwritable } from './overwritable.ts'; +import type { + RxErrorParameters, + RxErrorKey, + RxStorageWriteError, + RxStorageWriteErrorConflict +} from './types/index.d.ts'; + +/** + * transform an object of parameters to a presentable string + */ +function parametersToString(parameters: any): string { + let ret = ''; + if (Object.keys(parameters).length === 0) + return ret; + ret += '-'.repeat(20)...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:06.425629,565,5096,191 +github_pubkey_rxdb_1000561d5d8100e72112f9dddcb1f453543a1c01,src/rx-query-mingo.ts,rx-query-mingo.ts,,1782,TypeScript,"import { Context } from 'mingo/core'; +import { Query } from 'mingo/query'; +import type { MangoQuerySelector } from './types/index.d.ts'; +import { + $project, + $sort +} from 'mingo/operators/pipeline'; +import { + +} from 'mingo/operators/expression'; +import { +} from 'mingo/operators/projection'; +import { + $elemMatch, + $eq, + $nor, + $exists, + $regex, + $ne, + $gte, + $lt, + $lte, + $nin, + $in, + $gt, + $or, + $and, + $not, + $type, + $size, + $mod +} from ...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:07.587595,175,1782,88 +github_pubkey_rxdb_fa7b9368ab263627f5cf60d78578a76234f4bc46,src/types/index.d.ts,index.d.ts,,1344,TypeScript,"export type * from './couchdb.d.ts'; +export type * from './rx-attachment.d.ts'; +export type * from './rx-collection.d.ts'; +export type * from './rx-database.d.ts'; +export type * from './rx-database-internal-store.d.ts'; +export type * from './rx-document.d.ts'; +export type * from './rx-error.d.ts'; +export type * from './rx-plugin.d.ts'; +export type * from './rx-query.d.ts'; +export type * from './rx-schema.d.ts'; +export type * from './rx-storage.d.ts'; +export type * from './rx-storage.interface.d....[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:11.051401,152,1344,33 +github_pubkey_rxdb_e9d558895ef8e5b432f722f7a1fb51870f849fba,src/rx-query-single-result.ts,rx-query-single-result.ts,,4041,TypeScript,"import { mapDocumentsDataToCacheDocs } from './doc-cache.ts'; +import { overwriteGetterForCaching } from './plugins/utils/index.ts'; +import { newRxError } from './rx-error.ts'; +import { RxQueryBase } from './rx-query.ts'; +import type { + RxDocument, + RxDocumentData +} from './types'; + +/** + * Counter to create unique result IDs cheaply. + * Used instead of now() to avoid expensive timestamp computation + * when we only need uniqueness for change detection. + */ +let _resultIdCounter = 0; + +/** + * R...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:07.883265,460,4041,118 +github_pubkey_rxdb_58308ce81daaadc08063049043aa73f65808cc86,src/types/rx-storage.d.ts,rx-storage.d.ts,,11386,TypeScript,"import type { ChangeEvent } from 'event-reduce-js'; +import type { RxChangeEvent } from './rx-change-event.d.ts'; +import type { RxDocumentMeta } from './rx-document.d.ts'; +import type { RxStorageWriteError } from './rx-error.d.ts'; +import type { RxJsonSchema } from './rx-schema.d.ts'; +import type { Override } from './util.d.ts'; + +/** + * The document data how it comes out of the storage instance. + * Contains all meta data like revision, attachments and deleted-flag. + */ +export type RxDocumentData<...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:16.545782,1554,11386,348 +github_pubkey_rxdb_0992a18a19803ed5bb0b355d34a39f7506427f81,src/types/rx-storage.interface.d.ts,rx-storage.interface.d.ts,,10818,TypeScript,"import type { + BulkWriteRow, + EventBulk, + RxDocumentData, + RxStorageBulkWriteResponse, + RxStorageChangeEvent, + RxStorageCountResult, + RxStorageInstanceCreationParams, + RxStorageQueryResult +} from './rx-storage.ts'; +import type { + MangoQuerySelector, + MangoQuerySortPart, + RxJsonSchema, + RxQueryPlan +} from './index.d.ts'; +import type { + Observable +} from 'rxjs'; + +/** + * RxStorage + * This is an interface that abstracts the storage engine. + * This allows us to ...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:16.845756,1487,10818,316 +github_pubkey_rxdb_222cdde3437d548dcd1e855fb94b97f5ae490c7d,src/types/util.d.ts,util.d.ts,,5194,TypeScript,"import type { RxStorage } from './rx-storage.interface'; + +export type MaybePromise = Promise | T; + + +export type PlainJsonValue = + string | + number | + boolean | + PlainSimpleJsonObject | + PlainSimpleJsonObject[] | + PlainJsonValue[] | + { [key: string]: PlainJsonValue; } + ; +export type PlainSimpleJsonObject = { + [k: string]: PlainJsonValue | PlainJsonValue[]; +}; + +/** + * @link https://stackoverflow.com/a/49670389/3443137 + */ +type DeepReadonly = + T extends (infer...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:17.125267,761,5194,181 +github_pubkey_rxdb_a7c624539e602bafbf93f9d27c60630428273770,src/change-event-buffer.ts,change-event-buffer.ts,,5198,TypeScript,"/** + * a buffer-cache which holds the last X changeEvents of the collection + */ +import { + Subscription +} from 'rxjs'; +import { filter } from 'rxjs/operators'; +import type { + RxChangeEventBulk, + RxCollection, + RxStorageChangeEvent +} from './types/index.d.ts'; +import { + requestIdlePromiseNoQueue +} from './plugins/utils/index.ts'; +import { + newRxError +} from './rx-error.ts'; + + +/** + * This buffer rembemers previous change events + * so that queries can use them on .exec() + * to calc...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:23:55.395066,535,5198,175 +github_pubkey_rxdb_15234c6c2bb895345e21b7cc6eaa2d852c4fac96,src/rx-collection-helper.ts,rx-collection-helper.ts,,9424,TypeScript,"import type { + HashFunction, + InternalStoreDocType, + RxAttachmentWriteData, + RxCollection, + RxDatabase, + RxDocumentData, + RxJsonSchema, + RxStorage, + RxStorageInstance, + RxStorageInstanceCreationParams +} from './types/index.d.ts'; +import { + createRevision, + flatClone, + now +} from './plugins/utils/index.ts'; +import { + fillObjectWithDefaults, + fillPrimaryKey +} from './rx-schema-helper.ts'; +import type { RxSchema } from './rx-schema.ts'; +import { runAsync...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:03.925272,896,9420,269 +github_pubkey_rxdb_2a6b79f5f8c00d3b75721d1704e98e516396b773,src/hooks.ts,hooks.ts,,3377,TypeScript," +/** + * hook-functions that can be extended by the plugin + */ +export const HOOKS = { + /** + * Runs before a plugin is added. + * Use this to block the usage of non-compatible plugins. + */ + preAddRxPlugin: [], + /** + * functions that run before the database is created + */ + preCreateRxDatabase: [], + /** + * runs after the database is created and prepared + * but before the instance is returned to the user + * @async + */ + createRxDatabase: [], + pre...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:23:57.287973,459,3377,129 +github_pubkey_rxdb_b7906aeddf25028d3104ad2b10582078d88f5982,src/incremental-write.ts,incremental-write.ts,,8439,TypeScript,"import { + isBulkWriteConflictError, + rxStorageWriteErrorToRxError +} from './rx-error.ts'; +import type { + ModifyFunction, + BulkWriteRow, + MaybePromise, + RxDocumentData, + RxDocumentWriteData, + RxError, + RxStorageBulkWriteResponse, + RxStorageInstance, + StringKeys, + WithDeleted +} from './types/index.d.ts'; +import { + clone, + ensureNotFalsy, + getFromMapOrCreate, + getFromMapOrThrow, + getHeightOfRevision, + stripMetaDataFromDocument +} from './plugins/...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:23:57.583045,684,8439,228 +github_pubkey_rxdb_56d344cecb70c5b3a2f74aa5d4b143289d9c339a,src/rx-collection.ts,rx-collection.ts,,45457,TypeScript,"import { + filter, + map, + mergeMap +} from 'rxjs'; + +import { + ucfirst, + flatClone, + promiseSeries, + pluginMissing, + ensureNotFalsy, + getFromMapOrThrow, + PROMISE_RESOLVE_FALSE, + PROMISE_RESOLVE_VOID, + NON_PREMIUM_COLLECTION_LIMIT, + hasPremiumFlag +} from './plugins/utils/index.ts'; +import { + fillObjectDataBeforeInsert, + normalizeInlineAttachments, + createRxCollectionStorageInstance, + removeCollectionStorages, + ensureRxCollectionIsNotClosed +} from...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:04.368613,3730,45455,1338 +github_pubkey_rxdb_2bf45cc08efd1207126fc726765adada1872534a,src/rx-database-internal-store.ts,rx-database-internal-store.ts,,12047,TypeScript,"import { + isBulkWriteConflictError, + newRxError +} from './rx-error.ts'; +import { + fillWithDefaultSettings, + getComposedPrimaryKeyOfDocumentData +} from './rx-schema-helper.ts'; +import { getSingleDocument, getWrittenDocumentsFromBulkWriteResponse, writeSingle } from './rx-storage-helper.ts'; +import type { + CollectionsOfDatabase, + InternalStoreCollectionDocType, + InternalStoreDocType, + InternalStoreStorageTokenDocType, + RxCollection, + RxDatabase, + RxDocumentData, + ...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:04.737011,993,12047,403 +github_pubkey_rxdb_b3f39186e5863885e013fa6093e0bfa0124fadf6,src/rx-database.ts,rx-database.ts,,33459,TypeScript,"import { IdleQueue } from 'custom-idle-queue'; +import type { + LeaderElector +} from 'broadcast-channel'; +import { ObliviousSet } from 'oblivious-set'; +import type { + CollectionsOfDatabase, + RxDatabase, + RxCollectionCreator, + RxJsonSchema, + RxCollection, + RxDumpDatabase, + RxDumpDatabaseAny, + BackupOptions, + RxStorage, + RxStorageInstance, + RxStorageInstanceCreationParams, + BulkWriteRow, + RxChangeEvent, + RxDatabaseCreator, + RxChangeEventBulk, + RxDoc...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:05.585135,2948,33459,966 +github_pubkey_rxdb_a1897882be99e99df365e1eea16b036b0390335c,src/custom-index.ts,custom-index.ts,,16337,TypeScript,"/** + * For some RxStorage implementations, + * we need to use our custom crafted indexes + * so we can easily iterate over them. And sort plain arrays of document data. + * + * We really often have to craft an index string for a given document. + * Performance of everything in this file is very important + * which is why the code sometimes looks strange. + * Run performance tests before and after you touch anything here! + */ + +import { + getSchemaByObjectPath +} from './rx-schema-helper.ts'; +import typ...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:23:55.675746,1638,16337,471 +github_pubkey_rxdb_5b1e3aff790c2870aa01f6b745f7c7ebbfb019c3,src/types/rx-database-internal-store.d.ts,rx-database-internal-store.d.ts,,1348,TypeScript,"import type { + RxMigrationStatus +} from '../plugins/migration-schema/index.ts'; +import type { RxJsonSchema } from './rx-schema.d.ts'; + +export type InternalStoreDocType = { + id: string; + key: string; + context: string; + data: Data; +}; + +/** + * Stores information about the collections. + * The collection.name is the 'key' value. + */ +export type InternalStoreStorageTokenDocType = InternalStoreDocType<{ + rxdbVersion: string; + token: string; + instanceToken: string; + ...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:13.824532,161,1348,55 +github_pubkey_rxdb_4ab1d7e9c7739f7b8b7b3d482fd75bae6933baf1,src/plugin-helpers.ts,plugin-helpers.ts,,13264,TypeScript,"import { filter, mergeMap, tap } from 'rxjs/operators'; +import { getPrimaryFieldOfPrimaryKey } from './rx-schema-helper.ts'; +import { WrappedRxStorageInstance } from './rx-storage-helper.ts'; +import type { + BulkWriteRow, + EventBulk, + RxChangeEvent, + RxDocumentData, + RxDocumentWriteData, + RxJsonSchema, + RxStorage, + RxStorageWriteError, + RxStorageBulkWriteResponse, + RxStorageChangeEvent, + RxStorageInstance, + RxStorageInstanceCreationParams, + RxValidationError...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:23:58.492239,951,13264,330 +github_pubkey_rxdb_d6c2b887636907f8cab45c3a9d52c1a6875ffbc6,src/index.ts,index.ts,,1041,TypeScript,"/** + * this is the main entry-point + * for when the you call ""import from 'rxdb'"". + */ + +export * from './plugin.ts'; +export * from './rx-database.ts'; +export * from './rx-error.ts'; +export * from './rx-database-internal-store.ts'; +export * from './overwritable.ts'; +export * from './rx-collection.ts'; +export * from './rx-collection-helper.ts'; +export * from './rx-document.ts'; +export * from './rx-change-event.ts'; +export * from './rx-document-prototype-merge.ts'; +export * from './rx-query.ts'; +ex...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:23:57.865166,118,1041,31 +github_pubkey_rxdb_782cdf49c38b7afed821c5f0e623281003172aae,src/doc-cache.ts,doc-cache.ts,,14287,TypeScript,"import type { + RxDocument, + RxDocumentData, + RxStorageChangeEvent, + WeakRef, + FinalizationRegistry +} from './types/index.d.ts'; +import { + getFromMapOrThrow, + overwriteGetterForCaching, + requestIdlePromiseNoQueue +} from './plugins/utils/index.ts'; +import { + overwritable +} from './overwritable.ts'; +import { Observable } from 'rxjs'; + +/** + * Because we have to create many cache items, + * we use an array instead of an object with properties + * for better performance and le...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:23:56.236627,1338,14287,371 +github_pubkey_rxdb_e2ded85ffc05a71b08555e96a01596f8a53fa99b,src/event-reduce.ts,event-reduce.ts,,5753,TypeScript,"import { + ActionName, + calculateActionName, + runAction, + QueryParams, + StateResolveFunctionInput, + ChangeEvent +} from 'event-reduce-js'; +import type { + RxQuery, + MangoQuery, + StringKeys, + RxDocumentData, + RxStorageChangeEvent +} from './types/index.d.ts'; +import { rxChangeEventToEventReduceChangeEvent } from './rx-change-event.ts'; +import { + clone, + ensureNotFalsy, + getFromMapOrCreate +} from './plugins/utils/index.ts'; +import { getQueryMatcher, getSortCom...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:23:56.516306,472,5753,169 +github_pubkey_rxdb_725f9c5bf52be96fa4b206caf834c9895606b0d5,src/replication-protocol/meta-instance.ts,meta-instance.ts,,5923,TypeScript,"import { + fillWithDefaultSettings, + getComposedPrimaryKeyOfDocumentData, + getLengthOfPrimaryKey +} from '../rx-schema-helper.ts'; +import { flatCloneDocWithMeta } from '../rx-storage-helper.ts'; +import type { + BulkWriteRow, + ById, + RxDocumentData, + RxJsonSchema, + RxStorageInstanceReplicationState, + RxStorageReplicationMeta, + WithDeleted +} from '../types/index.d.ts'; +import { + getDefaultRevision, + createRevision, + now +} from '../plugins/utils/index.ts'; + + +expo...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:02.373538,456,5923,196 +github_pubkey_rxdb_1173a8b4cbfb2d468d13311d3c1454e6dbf2b0bb,src/replication-protocol/index.ts,index.ts,,12881,TypeScript,"/** + * These files contain the replication protocol. + * It can be used to replicated RxStorageInstances or RxCollections + * or even to do a client(s)-server replication. + */ + + +import { + BehaviorSubject, + combineLatest, + filter, + firstValueFrom, + mergeMap, + Subject +} from 'rxjs'; +import { + getPrimaryFieldOfPrimaryKey +} from '../rx-schema-helper.ts'; +import type { + BulkWriteRow, + ById, + DocumentsWithCheckpoint, + EventBulk, + RxConflictHandler, + RxDocumentData,...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:02.096946,831,12881,349 +github_pubkey_rxdb_4a94d90a007a6ce15bf0747ca027318a802d5781,src/replication-protocol/helper.ts,helper.ts,,2699,TypeScript,"import type { + BulkWriteRow, + RxDocumentData, + RxDocumentWriteData, + RxStorageInstance, + RxStorageInstanceReplicationState, + RxStorageReplicationMeta, + WithDeletedAndAttachments +} from '../types/index.d.ts'; +import { + clone, + createRevision, + flatClone, + getDefaultRevision, + now +} from '../plugins/utils/index.ts'; +import { stripAttachmentsDataFromDocument } from '../rx-storage-helper.ts'; + +export function docStateToWriteDoc( + databaseInstanceToke...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:01.739861,210,2699,97 +github_pubkey_rxdb_d786a59106d2b3f7dd1fc1c853b88b549e3d8176,src/replication-protocol/downstream.ts,downstream.ts,,22755,TypeScript,"import { + firstValueFrom, + filter, + mergeMap +} from 'rxjs'; +import { newRxError } from '../rx-error.ts'; +import { getWrittenDocumentsFromBulkWriteResponse, stackCheckpoints } from '../rx-storage-helper.ts'; +import type { + RxStorageInstanceReplicationState, + BulkWriteRow, + BulkWriteRowById, + RxStorageReplicationMeta, + RxDocumentData, + ById, + WithDeleted, + DocumentsWithCheckpoint, + WithDeletedAndAttachments, + RxError +} from '../types/index.d.ts'; +import { + ...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:01.448432,1558,22755,551 +github_pubkey_rxdb_4990b64202f9c11481f8d2891e315d29499ab9a0,src/replication-protocol/default-conflict-handler.ts,default-conflict-handler.ts,,1231,TypeScript,"import { + deepEqual, + flatClone +} from '../plugins/utils/index.ts'; +import { stripAttachmentsDataFromDocument } from '../rx-storage-helper.ts'; +import type { RxConflictHandler, RxDocumentData } from '../types'; + +export const defaultConflictHandler: RxConflictHandler = { + isEqual(a, b, _ctx) { + a = addAttachmentsIfNotExists(a); + b = addAttachmentsIfNotExists(b); + + /** + * If the documents are deep equal, + * we have no conflict. + * On your ...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:01.164037,130,1231,44 +github_pubkey_rxdb_f6ec0cf71692a3c6bae535a8600a505dbb8ae6be,src/query-planner.ts,query-planner.ts,,11923,TypeScript,"import { countUntilNotMatching } from './plugins/utils/index.ts'; +import { newRxError } from './rx-error.ts'; +import { getSchemaByObjectPath } from './rx-schema-helper.ts'; +import type { + FilledMangoQuery, + MangoQuerySelector, + RxDocumentData, + RxJsonSchema, + RxQueryPlan, + RxQueryPlanKey, + RxQueryPlanerOpts +} from './types/index.d.ts'; + +export const INDEX_MAX = String.fromCharCode(65535); + +/** + * Do not use -Infinity here because it would be + * transformed to null on JSON.st...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:23:59.832341,1157,11923,387 +github_pubkey_rxdb_2c51173f128beabf49f7c096f7dac8f3ddf2a04d,src/rx-document-prototype-merge.ts,rx-document-prototype-merge.ts,,4244,TypeScript,"/** + * For the ORM capabilities, + * we have to merge the document prototype + * with the ORM functions and the data + * We do this iterating over the properties and + * adding them to a new object. + * In the future we should do this by chaining the __proto__ objects + */ + +import type { + RxCollection, + RxDocument, + RxDocumentData +} from './types/index.d.ts'; +import { + createRxDocumentConstructor, + basePrototype, + createWithConstructor as createRxDocumentWithConstructor +} from './rx-...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:05.844367,414,4244,135 +github_pubkey_rxdb_289215efdf5b6bcdf72289d93f5986879910cb88,src/overwritable.ts,overwritable.ts,,1483,TypeScript,"/** + * functions that can or should be overwritten by plugins + * IMPORTANT: Do not import any big stuff from RxDB here! + * An 'overwritable' can be used inside WebWorkers for RxStorage only, + * and we do not want to have the full RxDB lib bundled in them. + */ + +import type { DeepReadonly } from './types/util.d.ts'; + +export const overwritable = { + /** + * if this method is overwritten with one + * that returns true, we do additional checks + * which help the developer but have bad perf...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:23:58.152475,205,1483,42 +github_pubkey_rxdb_dda2c8325e495cd9f95db90945629727b72942c3,src/rx-change-event.ts,rx-change-event.ts,,4523,TypeScript,"/** + * RxChangeEvents a emitted when something in the database changes + * they can be grabbed by the observables of database, collection and document + */ + +import type { + ChangeEvent as EventReduceChangeEvent, +} from 'event-reduce-js'; +import { overwritable } from './overwritable.ts'; + +import type { + EventBulk, + RxChangeEvent, + RxChangeEventBulk, + RxDocumentData, + RxStorageChangeEvent +} from './types/index.d.ts'; +import { getFromMapOrCreate } from './plugins/utils/index.ts'; + +ex...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:03.534579,397,4523,138 +github_pubkey_rxdb_465183fd66eb8ef6ef75f0fc8b4f443a033792b2,src/replication-protocol/upstream.ts,upstream.ts,,22958,TypeScript,"import { firstValueFrom, filter } from 'rxjs'; +import { + getChangedDocumentsSince, + getWrittenDocumentsFromBulkWriteResponse, + stackCheckpoints +} from '../rx-storage-helper.ts'; +import type { + BulkWriteRow, + BulkWriteRowById, + ById, + EventBulk, + RxDocumentData, + RxError, + RxReplicationWriteToMasterRow, + RxStorageChangeEvent, + RxStorageInstanceReplicationState, + RxStorageReplicationMeta, + WithDeleted +} from '../types/index.d.ts'; +import { + batchArray, +...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:03.264386,1715,22958,579 +github_pubkey_rxdb_c9fa964ed71e3a9cf48561d8b875bb6c0a653aa9,src/rx-storage-helper.ts,rx-storage-helper.ts,,43166,TypeScript,"/** + * Helper functions for accessing the RxStorage instances. + */ + +import { overwritable } from './overwritable.ts'; +import { newRxError } from './rx-error.ts'; +import { + getPrimaryFieldOfPrimaryKey +} from './rx-schema-helper.ts'; +import type { + BulkWriteRow, + BulkWriteRowProcessed, + CategorizeBulkWriteRowsOutput, + EventBulk, + RxAttachmentData, + RxAttachmentWriteData, + RxCollection, + RxDatabase, + RxDocumentData, + RxDocumentWriteData, + RxJsonSchema, + RxStor...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:09.927055,3490,43166,1141 +github_pubkey_rxdb_15386fc5fb3d6784b751d50a396f2e6644bec685,src/rx-schema.ts,rx-schema.ts,,8291,TypeScript,"import { + overwriteGetterForCaching, + isMaybeReadonlyArray, + deepEqual +} from './plugins/utils/index.ts'; +import { + newRxError, +} from './rx-error.ts'; +import { + runPluginHooks +} from './hooks.ts'; + +import type { + DeepMutable, + DeepReadonly, + HashFunction, + MaybeReadonly, + RxDocument, + RxDocumentData, + RxJsonSchema, + StringKeys +} from './types/index.d.ts'; +import { + fillWithDefaultSettings, + getComposedPrimaryKeyOfDocumentData, + getFinalFields, + ...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:08.926198,707,8291,259 +github_pubkey_rxdb_e7466df9df71ec2f30ec3c10a161bce6060486b1,src/rx-schema-helper.ts,rx-schema-helper.ts,,11436,TypeScript,"import { newRxError } from './rx-error.ts'; +import type { + CompositePrimaryKey, + DeepReadonly, + JsonSchema, + PrimaryKey, + RxDocumentData, + RxJsonSchema, + RxStorageDefaultCheckpoint, + StringKeys +} from './types/index.d.ts'; +import { + ensureNotFalsy, + flatClone, + getProperty, + isMaybeReadonlyArray, + REGEX_ALL_DOTS, + RX_META_LWT_MINIMUM, + sortObject, + trimDots +} from './plugins/utils/index.ts'; +import type { RxSchema } from './rx-schema.ts'; + +/** + * H...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:08.643977,1187,11436,395 +github_pubkey_rxdb_36d5e7d9a1e615ae9d5e271c05e4b0304c6fd634,src/rx-query.ts,rx-query.ts,,32877,TypeScript,"import { + BehaviorSubject, + Observable, + merge +} from 'rxjs'; +import { + mergeMap, + filter, + map, + startWith, + distinctUntilChanged, + shareReplay +} from 'rxjs/operators'; +import { + sortObject, + pluginMissing, + overwriteGetterForCaching, + clone, + PROMISE_RESOLVE_FALSE, + RXJS_SHARE_REPLAY_DEFAULTS, + ensureNotFalsy, + areRxDocumentArraysEqual, + promiseWait +} from './plugins/utils/index.ts'; +import { + newRxError, + rxStorageWriteErrorToRxError...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:08.272915,3224,32877,937 +github_pubkey_rxdb_5e8c1ebfe564c8e613b1c2748ba45c67fccc8dd7,src/types/rx-document.d.ts,rx-document.d.ts,,5818,TypeScript,"import { + Observable +} from 'rxjs'; + +import type { + RxCollection, +} from './rx-collection.d.ts'; +import type { + RxAttachment, + RxAttachmentCreator, + RxAttachmentCreatorBase64 +} from './rx-attachment.d.ts'; +import type { RxDocumentData, WithDeleted } from './rx-storage.d.ts'; +import type { RxChangeEvent } from './rx-change-event.d.ts'; +import type { DeepReadonly, MaybePromise, PlainJsonValue } from './util.d.ts'; +import type { UpdateQuery } from './plugins/update.d.ts'; +import type...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:14.396777,541,5818,161 +github_pubkey_rxdb_517a1f1c633175b3621c7b784b538093eb862e6f,src/replication-protocol/conflicts.ts,conflicts.ts,,1786,TypeScript,"import type { + RxConflictHandler, + RxConflictHandlerInput, + RxDocumentData, + RxStorageInstanceReplicationState +} from '../types/index.d.ts'; +import { + getDefaultRevision, + createRevision, + now, + flatClone +} from '../plugins/utils/index.ts'; + +/** + * Resolves a conflict error or determines that the given document states are equal. + * Returns the resolved document that must be written to the fork. + * Then the new document state can be pushed upstream. + * If document is not i...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:24:00.376792,182,1786,54 +github_langflow-ai_langflow_e1d06bae5b91611bdc92e331233917e3c3761a35,src/frontend/jest.config.js,jest.config.js,,1917,JavaScript,"module.exports = { + preset: ""ts-jest"", + testEnvironment: ""jsdom"", + coverageProvider: ""v8"", + injectGlobals: true, + moduleNameMapper: { + ""\\.(css|less|scss|sass)$"": ""/src/__mocks__/styleMock.js"", + ""^@/(.*)$"": ""/src/$1"", + ""^@jsonquerylang/jsonquery$"": + ""/src/__mocks__/@jsonquerylang/jsonquery.js"", + ""^vanilla-jsoneditor$"": ""/src/__mocks__/vanilla-jsoneditor.js"", + }, + setupFilesAfterEnv: [""/src/setupTests.ts""], + setupFiles: ["" ({ + useTranslation: () => ({ + t: (key) => enTranslations[key] ?? key, + i18n: { changeLanguage: jest.fn(), language: ""en"" }, + }), + Trans: ({ children }) => children, + initReactI18next: { type: ""3rdParty"", init: jest.fn() }, + withTranslation: () => (Component...[truncated]",langflow-ai/langflow,langflow-ai,147265,8829,Langflow is a powerful tool for building and deploying AI-powered agents and workflows.,"['agents' 'chatgpt' 'generative-ai' 'large-language-models' 'multiagent' + 'react-flow']",MIT,,,,,0.98,GitHub Public API,2026-04-22T21:54:37.359137,416,3387,119 +github_golang_go_dd65b19867dcf4dc98931e6ba8ba5f595f95fe62,lib/wasm/wasm_exec_node.js,wasm_exec_node.js,,1186,JavaScript,"// Copyright 2021 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +""use strict""; + +if (process.argv.length < 3) { + console.error(""usage: go_js_wasm_exec [wasm binary] [arguments]""); + process.exit(1); +} + +globalThis.require = require; +globalThis.fs = require(""fs""); +globalThis.path = require(""path""); +globalThis.TextEncoder = require(""util"").TextEncoder; +globalThis.TextDecoder = require(""util"").TextDecoder; + +...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:25.762311,134,1186,41 +github_golang_go_d71af9e97e8ca961f816f753afcf3738a50fd6a2,lib/wasm/wasm_exec.js,wasm_exec.js,,16992,JavaScript,"// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +""use strict""; + +(() => { + const enosys = () => { + const err = new Error(""not implemented""); + err.code = ""ENOSYS""; + return err; + }; + + if (!globalThis.fs) { + let outputBuf = """"; + globalThis.fs = { + constants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1, O_DIRECTORY: -1 }, // unused + writeSync(fd, b...[truncated]",golang/go,golang,133493,18928,The Go programming language,['go' 'golang' 'language' 'programming-language'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-17T06:51:25.461859,2076,16992,576 +github_django_django_2d99041cb87c8bc8378811dd814358c4638c1826,Gruntfile.js,Gruntfile.js,,369,JavaScript,"'use strict'; + +const globalThreshold = 50; // Global code coverage threshold (as a percentage) + +module.exports = function(grunt) { + grunt.initConfig({ + qunit: { + all: ['js_tests/tests.html'] + } + }); + + grunt.loadNpmTasks('grunt-contrib-qunit'); + grunt.registerTask('test', ['qunit']); + grunt.registerTask('default', ['test']); +}; +...[truncated]",django/django,django,87310,33825,The Web framework for perfectionists with deadlines.,"['apps' 'django' 'framework' 'models' 'orm' 'python' 'templates' 'views' + 'web']",BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-23T01:23:35.683747,31,369,16 +github_hoppscotch_hoppscotch_40c0e8dbacc0655e0597d2556ceaa156b11e5293,.prettierrc.js,.prettierrc.js,,132,JavaScript,"module.exports = { + semi: false, + trailingComma: ""es5"", + singleQuote: false, + printWidth: 80, + useTabs: false, + tabWidth: 2 +} +...[truncated]",hoppscotch/hoppscotch,hoppscotch,78958,5808,"Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia","['api' 'api-client' 'api-rest' 'api-testing' 'developer-tools' 'graphql' + 'http' 'http-client' 'pwa' 'rest' 'rest-api' 'spa' 'testing' + 'testing-tools' 'tools' 'vue' 'vuejs' 'websocket']",MIT,,,,,0.98,GitHub Public API,2026-04-17T17:53:10.270790,16,132,9 +github_hoppscotch_hoppscotch_5717d2571f75ad3a7cb6e5e881ff3bccafd10342,commitlint.config.js,commitlint.config.js,,69,JavaScript,"module.exports = { + extends: [""@commitlint/config-conventional""], +} +...[truncated]",hoppscotch/hoppscotch,hoppscotch,78958,5808,"Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia","['api' 'api-client' 'api-rest' 'api-testing' 'developer-tools' 'graphql' + 'http' 'http-client' 'pwa' 'rest' 'rest-api' 'spa' 'testing' + 'testing-tools' 'tools' 'vue' 'vuejs' 'websocket']",MIT,,,,,0.98,GitHub Public API,2026-04-17T17:53:10.560215,6,69,4 +github_go-gitea_gitea_0aee1a5dac2d10a115a4a3b86cbe1c5592a3756a,stylelint.config.js,stylelint.config.js,,7452,JavaScript,"// @ts-check +// TODO: Move to .ts after https://github.com/stylelint/stylelint/issues/8893 is fixed +import {fileURLToPath} from 'node:url'; + +const cssVarFiles = [ + fileURLToPath(new URL('web_src/css/base.css', import.meta.url)), + fileURLToPath(new URL('web_src/css/themes/theme-gitea-light.css', import.meta.url)), + fileURLToPath(new URL('web_src/css/themes/theme-gitea-dark.css', import.meta.url)), +]; + +/** @type {import('stylelint').Config} */ +export default { + extends: 'stylelint-config-recom...[truncated]",go-gitea/gitea,go-gitea,54955,6587,"Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD","['bitbucket' 'cicd' 'devops' 'docker-registry-v2' 'git' 'git-gui' + 'git-lfs' 'git-server' 'gitea' 'github' 'github-actions' 'gitlab' 'go' + 'golang' 'hacktoberfest' 'maven-server' 'npm-registry' 'self-hosted' + 'typescript' 'vue']",MIT,,,,,0.98,GitHub Public API,2026-04-17T07:19:32.565356,351,7452,152 +github_TanStack_query_d9a08b85eee06f27e16910d4fb209952231f4334,eslint.config.js,eslint.config.js,,2092,JavaScript,"// @ts-check + +// @ts-ignore Needed due to moduleResolution Node vs Bundler +import { tanstackConfig } from '@tanstack/eslint-config' +import pluginCspell from '@cspell/eslint-plugin' +import vitest from '@vitest/eslint-plugin' + +export default [ + ...tanstackConfig, + { + name: 'tanstack/temp', + plugins: { + cspell: pluginCspell, + }, + rules: { + 'cspell/spellchecker': [ + 'warn', + { + cspell: { + words: [ + 'Promisable', // Our public int...[truncated]",TanStack/query,TanStack,49176,3783,"🤖 Powerful asynchronous state management, server-state utilities and data fetching for the web. TS/JS, React Query, Solid Query, Svelte Query and Vue Query.","['async' 'cache' 'data' 'fetch' 'graphql' 'hooks' 'query' 'react' 'rest' + 'solid' 'stale' 'stale-while-revalidate' 'svelte' 'typescript' 'update' + 'vue']",MIT,,,,,0.98,GitHub Public API,2026-04-18T01:21:45.306683,190,2090,65 +github_TanStack_query_dbb08b111030f71191ee00be67d551fbdde7308d,prettier.config.js,prettier.config.js,,265,JavaScript,"// @ts-check + +/** @type {import('prettier').Config} */ +const config = { + semi: false, + singleQuote: true, + trailingComma: 'all', + plugins: ['prettier-plugin-svelte'], + overrides: [{ files: '*.svelte', options: { parser: 'svelte' } }], +} + +export default config +...[truncated]",TanStack/query,TanStack,49176,3783,"🤖 Powerful asynchronous state management, server-state utilities and data fetching for the web. TS/JS, React Query, Solid Query, Svelte Query and Vue Query.","['async' 'cache' 'data' 'fetch' 'graphql' 'hooks' 'query' 'react' 'rest' + 'solid' 'stale' 'stale-while-revalidate' 'svelte' 'typescript' 'update' + 'vue']",MIT,,,,,0.98,GitHub Public API,2026-04-18T01:21:45.597497,32,265,13 +github_tw93_Pake_8cc8cc3e3050576752b948258866c3ffd6f7f499,rollup.config.js,rollup.config.js,,4170,JavaScript,"import path from ""path""; +import fs from ""fs""; +import appRootPath from ""app-root-path""; +import typescript from ""rollup-plugin-typescript2""; +import alias from ""@rollup/plugin-alias""; +import commonjs from ""@rollup/plugin-commonjs""; +import json from ""@rollup/plugin-json""; +import replace from ""@rollup/plugin-replace""; +import chalk from ""chalk""; +import { spawn, exec } from ""child_process""; + +// Set macOS SDK environment variables for compatibility +if (process.platform === ""darwin"") { + process.env.MACO...[truncated]",tw93/Pake,tw93,47826,9539,🤱🏻 Turn any webpage into a desktop app with one command.,"['chatgpt' 'claude' 'desktop' 'gemini' 'hight-performance' 'linux' 'macos' + 'no-electron' 'package' 'rust' 'tauri' 'windows' 'youtube']",MIT,,,,,0.98,GitHub Public API,2026-04-17T13:18:26.768145,397,4154,136 +github_coreybutler_nvm-windows_13a65bf1c8082b76d292d9ef1b49878992622eb6,build.js,build.js,,1259,JavaScript,"// This is a deno helper script to locally build the installer using Inno Setup +// Yeah, I know it's not Node, but we need to compile this and Node SEAs on Win32 are a PITA. +const content = await Deno.readTextFile('./nvm.iss') +const data = JSON.parse(await Deno.readTextFile('./src/manifest.json')) +const {version} = data +const output = content.replaceAll('{{VERSION}}', version) +await Deno.writeTextFile('./.tmp.iss', output) + +console.log('Viewing /.tmp.iss') +output.split(""\n"").forEach((line, num)...[truncated]",coreybutler/nvm-windows,coreybutler,45978,3795,A node.js version management utility for Windows. Ironically written in Go.,"['go' 'management' 'node' 'node-version-manager' 'nodejs' 'nvm' 'switch' + 'version' 'version-manager' 'versioning' 'windows']",MIT,,,,,0.98,GitHub Public API,2026-04-17T07:26:13.299100,161,1259,49 +github_gradio-app_gradio_be776c561024a0f9648b2ca69d72cba56eb33d7e,svelte.config.js,svelte.config.js,,114,JavaScript,"import { vitePreprocess } from ""@sveltejs/vite-plugin-svelte""; + +export default { + preprocess: vitePreprocess() +}; +...[truncated]",gradio-app/gradio,gradio-app,42399,3410,"Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!","['data-analysis' 'data-science' 'data-visualization' 'deep-learning' + 'deploy' 'gradio' 'gradio-interface' 'interface' 'machine-learning' + 'models' 'python' 'python-notebook' 'ui' 'ui-components']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:32:43.673268,12,114,6 +github_gradio-app_gradio_f4bdf98d9b35af286c3688bd7911f792ea677e75,cs.js,cs.js,,5826,JavaScript,"import { readFileSync, writeFileSync, readdirSync } from ""fs""; +import path from ""path""; +import { execSync } from ""child_process""; +import { getPackages } from ""@manypkg/get-packages""; + +const changsetsFolder = path.join(process.cwd(), "".changeset""); +const files = readdirSync(changsetsFolder); +const mdFiles = files.filter( + (file) => file.endsWith("".md"") && !file.startsWith(""README.md"") +); + +const getGitInfo = (filePath) => { + const gitInfo = execSync( + `git log -n 1 --pretty=format:""%H -bingboong-...[truncated]",gradio-app/gradio,gradio-app,42399,3410,"Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!","['data-analysis' 'data-science' 'data-visualization' 'deep-learning' + 'deploy' 'gradio' 'gradio-interface' 'interface' 'machine-learning' + 'models' 'python' 'python-notebook' 'ui' 'ui-components']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:32:42.820570,541,5826,229 +github_gradio-app_gradio_f4bdf98d9b35af286c3688bd7911f792ea677e75,cs.js,cs.js,,5826,JavaScript,"import { readFileSync, writeFileSync, readdirSync } from ""fs""; +import path from ""path""; +import { execSync } from ""child_process""; +import { getPackages } from ""@manypkg/get-packages""; + +const changsetsFolder = path.join(process.cwd(), "".changeset""); +const files = readdirSync(changsetsFolder); +const mdFiles = files.filter( + (file) => file.endsWith("".md"") && !file.startsWith(""README.md"") +); + +const getGitInfo = (filePath) => { + const gitInfo = execSync( + `git log -n 1 --pretty=format:""%H -bingboong-...[truncated]",gradio-app/gradio,gradio-app,42347,3393,"Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!","['data-analysis' 'data-science' 'data-visualization' 'deep-learning' + 'deploy' 'gradio' 'gradio-interface' 'interface' 'machine-learning' + 'models' 'python' 'python-notebook' 'ui' 'ui-components']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:43:14.333014,541,5826,229 +github_gradio-app_gradio_be776c561024a0f9648b2ca69d72cba56eb33d7e,svelte.config.js,svelte.config.js,,114,JavaScript,"import { vitePreprocess } from ""@sveltejs/vite-plugin-svelte""; + +export default { + preprocess: vitePreprocess() +}; +...[truncated]",gradio-app/gradio,gradio-app,42347,3393,"Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!","['data-analysis' 'data-science' 'data-visualization' 'deep-learning' + 'deploy' 'gradio' 'gradio-interface' 'interface' 'machine-learning' + 'models' 'python' 'python-notebook' 'ui' 'ui-components']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:43:15.212460,12,114,6 +github_payloadcms_payload_1485130f4bf416811595c263e0c3165fd0e0177b,eslint.config.js,eslint.config.js,,2745,JavaScript,"import payloadEsLintConfig from '@payloadcms/eslint-config' +import payloadPlugin from '@payloadcms/eslint-plugin' +import mdxTextParser from '@payloadcms/eslint-plugin/customRules/mdx-text-parser.js' + +export const defaultESLintIgnores = [ + '**/.temp', + '**/.*', // ignore all dotfiles + '**/.git', + '**/.hg', + '**/.pnp.*', + '**/.svn', + '**/playwright.config.ts', + '**/vitest.config.ts', + '**/vitest.setup.ts', + '**/tsconfig.tsbuildinfo', + '**/README.md', + '**/eslint.config.js', + '**/paylo...[truncated]",payloadcms/payload,payloadcms,41881,3599,"Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.","['cms' 'content-management' 'content-management-system' 'express' + 'graphql' 'headless' 'headless-cms' 'jamstack' 'javascript' 'mit-license' + 'mongodb' 'nextjs' 'nodejs' 'open-source' 'payload' 'payloadcms' + 'postgres' 'react' 'typescript']",MIT,,,,,0.98,GitHub Public API,2026-04-18T01:22:14.195183,196,2745,120 +github_microsoft_qlib_0a4c1ac2ec0487695fb3aca863a01cde80ca9425,.commitlintrc.js,.commitlintrc.js,,928,JavaScript,"module.exports = { + extends: [""@commitlint/config-conventional""], + rules: { + // Configuration Format: [level, applicability, value] + // level: Error level, usually expressed as a number: + // 0 - disable rule + // 1 - Warning (does not prevent commits) + // 2 - Error (will block the commit) + // applicability: the conditions under which the rule applies, commonly used values: + // “always” - always apply the rule + // “n...[truncated]",microsoft/qlib,microsoft,41109,6478,"Qlib is an AI-oriented Quant investment platform that aims to use AI tech to empower Quant Research, from exploring ideas to implementing productions. Qlib supports diverse ML modeling paradigms, including supervised learning, market dynamics modeling, and RL, and is now equipped with https://github.com/microsoft/RD-Agent to automate R&D process.","['algorithmic-trading' 'auto-quant' 'deep-learning' 'finance' 'fintech' + 'investment' 'machine-learning' 'paper' 'platform' 'python' 'quant' + 'quant-dataset' 'quant-models' 'quantitative-finance' + 'quantitative-trading' 'research' 'research-paper' 'stock-data']",MIT,,,,,0.98,GitHub Public API,2026-04-22T13:33:24.554781,109,920,22 +github_microsoft_qlib_0a4c1ac2ec0487695fb3aca863a01cde80ca9425,.commitlintrc.js,.commitlintrc.js,,928,JavaScript,"module.exports = { + extends: [""@commitlint/config-conventional""], + rules: { + // Configuration Format: [level, applicability, value] + // level: Error level, usually expressed as a number: + // 0 - disable rule + // 1 - Warning (does not prevent commits) + // 2 - Error (will block the commit) + // applicability: the conditions under which the rule applies, commonly used values: + // “always” - always apply the rule + // “n...[truncated]",microsoft/qlib,microsoft,40835,6425,"Qlib is an AI-oriented Quant investment platform that aims to use AI tech to empower Quant Research, from exploring ideas to implementing productions. Qlib supports diverse ML modeling paradigms, including supervised learning, market dynamics modeling, and RL, and is now equipped with https://github.com/microsoft/RD-Agent to automate R&D process.","['algorithmic-trading' 'auto-quant' 'deep-learning' 'finance' 'fintech' + 'investment' 'machine-learning' 'paper' 'platform' 'python' 'quant' + 'quant-dataset' 'quant-models' 'quantitative-finance' + 'quantitative-trading' 'research' 'research-paper' 'stock-data']",MIT,,,,,0.98,GitHub Public API,2026-04-17T06:43:31.419207,109,920,22 +github_trpc_trpc_d9119d666ce25c7c59aa45d55b9a473370f2d9d9,eslint.config.js,eslint.config.js,,6294,JavaScript,"import * as path from 'node:path'; +import { includeIgnoreFile } from '@eslint/compat'; +import reactPlugin from 'eslint-plugin-react'; +import * as reactHooks from 'eslint-plugin-react-hooks'; +import unicorn from 'eslint-plugin-unicorn'; +import tseslint from 'typescript-eslint'; + +export default tseslint.config( + includeIgnoreFile(path.join(import.meta.dirname, '.gitignore')), + reactHooks.configs.recommended, + { ignores: ['**/vendor/**', '**/generated/**'] }, + { + files: ['**/*.ts', '**/*.tsx...[truncated]",trpc/trpc,trpc,40003,1582,🧙‍♀️ Move Fast and Break Nothing. End-to-end typesafe APIs made easy. ,['api' 'next' 'nextjs' 'prisma' 'react' 'typescript'],MIT,,,,,0.98,GitHub Public API,2026-04-17T17:53:35.471329,407,6291,205 +github_trpc_trpc_0a801d00122eff0a74ccd280518c478848318f6e,prettier.config.js,prettier.config.js,,1069,JavaScript,"/** @typedef {import(""@ianvs/prettier-plugin-sort-imports"").PluginConfig} SortImportsConfig*/ +/** @typedef {import(""prettier"").Config} PrettierConfig*/ +/** @typedef {{ tailwindConfig: string }} TailwindConfig*/ + +/** @type { PrettierConfig | SortImportsConfig | TailwindConfig } */ +export default { + printWidth: 80, + trailingComma: 'all', + endOfLine: 'auto', + singleQuote: true, + importOrder: [ + // Ensure test helpers are sorted first so that polyfills are loaded + '___', + '__', + ...[truncated]",trpc/trpc,trpc,40003,1582,🧙‍♀️ Move Fast and Break Nothing. End-to-end typesafe APIs made easy. ,['api' 'next' 'nextjs' 'prisma' 'react' 'typescript'],MIT,,,,,0.98,GitHub Public API,2026-04-17T17:53:35.748149,89,1069,37 +github_LAION-AI_Open-Assistant_715a67aca91dead5081ceeab1c14b84094902dcb,inlang.config.js,inlang.config.js,,515,JavaScript,"export async function defineConfig(env) { + const { default: i18nextPlugin } = await env.$import( + ""https://cdn.jsdelivr.net/npm/@inlang/plugin-i18next@2/dist/index.js"" + ); + const { default: standardLintRules } = await env.$import( + ""https://cdn.jsdelivr.net/gh/inlang/standard-lint-rules@2/dist/index.js"" + ); + + return { + referenceLanguage: ""en"", + plugins: [ + i18nextPlugin({ + pathPattern: ""./website/public/locales/{language}/*.json"", + }), + standardLintRules(),...[truncated]",LAION-AI/Open-Assistant,LAION-AI,37419,3298,"OpenAssistant is a chat-based assistant that understands tasks, can interact with third-party systems, and retrieve information dynamically to do so.","['ai' 'assistant' 'chatgpt' 'discord-bot' 'language-model' + 'machine-learning' 'nextjs' 'python' 'rlhf']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:34:38.796283,39,515,19 +github_LAION-AI_Open-Assistant_715a67aca91dead5081ceeab1c14b84094902dcb,inlang.config.js,inlang.config.js,,515,JavaScript,"export async function defineConfig(env) { + const { default: i18nextPlugin } = await env.$import( + ""https://cdn.jsdelivr.net/npm/@inlang/plugin-i18next@2/dist/index.js"" + ); + const { default: standardLintRules } = await env.$import( + ""https://cdn.jsdelivr.net/gh/inlang/standard-lint-rules@2/dist/index.js"" + ); + + return { + referenceLanguage: ""en"", + plugins: [ + i18nextPlugin({ + pathPattern: ""./website/public/locales/{language}/*.json"", + }), + standardLintRules(),...[truncated]",LAION-AI/Open-Assistant,LAION-AI,37416,3292,"OpenAssistant is a chat-based assistant that understands tasks, can interact with third-party systems, and retrieve information dynamically to do so.","['ai' 'assistant' 'chatgpt' 'discord-bot' 'language-model' + 'machine-learning' 'nextjs' 'python' 'rlhf']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:44:18.724422,39,515,19 +github_refinedev_refine_02c685cba9f2dfd011d7cb6cfc90bca411b75bc1,commitlint.config.js,commitlint.config.js,,399,JavaScript,"module.exports = { + extends: [""@commitlint/config-conventional""], + rules: { + ""header-max-length"": [1, ""always"", 160], + ""body-max-line-length"": [1, ""always"", 160], + }, + helpUrl: + ""https://refine.dev/docs/guides-concepts/contributing/#committing-your-work-and-preparing-a-pull-request"", + ignores: [ + (commit) => commit.includes(""Optimised images with calibre/image-actions""), + ], +}; +...[truncated]",refinedev/refine,refinedev,34492,2997,"A React Framework for building internal tools, admin panels, dashboards & B2B apps with unmatched flexibility.","['admin' 'admin-ui' 'ant-design' 'crud' 'developer-tools' + 'frontend-framework' 'good-first-issue' 'graphql' 'hacktoberfest' + 'headless' 'internal-tools' 'javascript' 'low-code' 'nestjs' 'nextjs' + 'open-source-project' 'react' 'react-framework' 'react-hooks' + 'typescript']",MIT,,,,,0.98,GitHub Public API,2026-04-18T01:22:34.826054,28,399,13 +github_swc-project_swc_745fd022996390996a2037691d0ef53858372afa,.mocharc.js,.mocharc.js,,447,JavaScript,"/** + * https://github.com/swc-project/swc/pull/3009 + * + * There are 2 test runners in this repo: + * - jest is being used for unit testing node-swc packages with javascript test cases + * - mocha is being used for cargo's test requires js runtime to validate its transform. + * + * This config is for the mocha test runner invoked by cargo to resolve its global setup file. + */ +module.exports = { + require: require.resolve(""./.mocha.setup.js""), +}; +...[truncated]",swc-project/swc,swc-project,33356,1385,Rust-based platform for the Web,"['babel' 'compiler' 'ecmascript' 'ecmascript-parser' 'javascript' 'parser' + 'rust' 'swc' 'typescript' 'typescript-compiler' 'typescript-parser']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:21:52.445952,70,447,13 +github_swc-project_swc_004578ba6508b22aecef86b267ab6e01394b126b,.mocha.setup.js,.mocha.setup.js,,153,JavaScript,"// Inject jest's assertion (expect) into global scope for the Mocha +// to use same assertion between node-swc & rest. +global.expect = require(""expect""); +...[truncated]",swc-project/swc,swc-project,33356,1385,Rust-based platform for the Web,"['babel' 'compiler' 'ecmascript' 'ecmascript-parser' 'javascript' 'parser' + 'rust' 'swc' 'typescript' 'typescript-compiler' 'typescript-parser']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T13:21:52.190331,23,153,4 +github_goharbor_harbor_059161f81c2089d678b9449561f0c1b7f52f4a7d,src/portal/copyright.tmpl.js,copyright.tmpl.js,,593,JavaScript,"// Copyright Project Harbor Authors +// +// Licensed under the Apache License, Version 2.0 (the ""License""); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an ""AS IS"" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the L...[truncated]",goharbor/harbor,goharbor,28287,5198,"An open source trusted cloud native registry project that stores, signs, and scans content.","['cloud-native' 'cncf' 'cncf-project' 'container' 'container-management' + 'container-registry' 'containers' 'docker' 'hacktoberfest' 'helm' + 'kubernetes' 'registry']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T08:25:35.996210,95,593,14 +github_goharbor_harbor_df3fc581a631eaaf9dd35fe9e9bcf4ca4e3f8c62,src/portal/karma.conf.js,karma.conf.js,,2099,JavaScript,"// Karma configuration file, see link for more information +// https://karma-runner.github.io/1.0/config/configuration-file.html + +module.exports = function (config) { + config.set({ + basePath: '', + frameworks: ['jasmine', '@angular-devkit/build-angular'], + plugins: [ + require('karma-jasmine'), + require('karma-chrome-launcher'), + require('karma-jasmine-html-reporter'), + require('karma-coverage'), + require('@angular-devkit/build-angular/plugins/karma') + ], + c...[truncated]",goharbor/harbor,goharbor,28287,5198,"An open source trusted cloud native registry project that stores, signs, and scans content.","['cloud-native' 'cncf' 'cncf-project' 'container' 'container-management' + 'container-registry' 'containers' 'docker' 'hacktoberfest' 'helm' + 'kubernetes' 'registry']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T08:25:36.592903,200,2099,71 +github_marmelab_react-admin_5d63db33aa1b96113522a92b6c5230e46bffb103,.prettierrc.js,.prettierrc.js,,321,JavaScript,"module.exports = { + arrowParens: 'avoid', + bracketSpacing: true, + bracketSameLine: false, + jsxSingleQuote: false, + printWidth: 80, + quoteProps: 'as-needed', + rangeStart: 0, + rangeEnd: Infinity, + semi: true, + singleQuote: true, + tabWidth: 4, + trailingComma: 'es5', + useTabs: false +} +...[truncated]",marmelab/react-admin,marmelab,26640,5450,"A frontend Framework for single-page applications on top of REST/GraphQL APIs, using TypeScript, React and Material Design","['admin' 'admin-dashboard' 'admin-on-rest' 'admin-ui' 'frontend-framework' + 'graphql' 'material-ui' 'react' 'react-admin' 'reactjs' 'rest' + 'single-page-app']",MIT,,,,,0.98,GitHub Public API,2026-04-18T01:23:39.606294,30,321,16 +github_marmelab_react-admin_ed6be90404a5a883489282916d6485b9e82305e7,test-setup.js,test-setup.js,,1555,JavaScript,"// jest-dom adds custom jest matchers for asserting on DOM nodes. +// allows you to do things like: +// expect(element).toHaveTextContent(/react/i) +// learn more: https://github.com/testing-library/jest-dom +import '@testing-library/jest-dom'; +import '@testing-library/jest-dom/jest-globals'; + +// TextEncoder/TextDecoder are required by TanStack Router +import { TextEncoder, TextDecoder } from 'util'; +global.TextEncoder = TextEncoder; +global.TextDecoder = TextDecoder; + +// Make the CI fail if console.e...[truncated]",marmelab/react-admin,marmelab,26640,5450,"A frontend Framework for single-page applications on top of REST/GraphQL APIs, using TypeScript, React and Material Design","['admin' 'admin-dashboard' 'admin-on-rest' 'admin-ui' 'frontend-framework' + 'graphql' 'material-ui' 'react' 'react-admin' 'reactjs' 'rest' + 'single-page-app']",MIT,,,,,0.98,GitHub Public API,2026-04-18T01:23:40.417149,166,1555,51 +github_marmelab_react-admin_7e69b06b3118a0580ced36bdbe76e4454e5112c5,jest.config.js,jest.config.js,,1191,JavaScript,"const path = require('path'); +const fs = require('fs'); + +const packages = fs.readdirSync(path.resolve(__dirname, './packages')); +const moduleNameMapper = packages.reduce((mapper, dirName) => { + const pkg = require( + path.resolve(__dirname, './packages', dirName, 'package.json') + ); + mapper[`^${pkg.name}(.*)$`] = path.join( + __dirname, + `./packages/${dirName}/src$1` + ); + return mapper; +}, {}); + +module.exports = { + globalSetup: './test-global-setup.js', + s...[truncated]",marmelab/react-admin,marmelab,26640,5450,"A frontend Framework for single-page applications on top of REST/GraphQL APIs, using TypeScript, React and Material Design","['admin' 'admin-dashboard' 'admin-on-rest' 'admin-ui' 'frontend-framework' + 'graphql' 'material-ui' 'react' 'react-admin' 'reactjs' 'rest' + 'single-page-app']",MIT,,,,,0.98,GitHub Public API,2026-04-18T01:23:39.884971,84,1191,43 +github_marmelab_react-admin_c5d3ba7225845049b69362f4e1d00a21bce4a38c,test-global-setup.js,test-global-setup.js,,71,JavaScript,"module.exports = async () => { + process.env.TZ = 'Europe/Paris'; +}; +...[truncated]",marmelab/react-admin,marmelab,26640,5450,"A frontend Framework for single-page applications on top of REST/GraphQL APIs, using TypeScript, React and Material Design","['admin' 'admin-dashboard' 'admin-on-rest' 'admin-ui' 'frontend-framework' + 'graphql' 'material-ui' 'react' 'react-admin' 'reactjs' 'rest' + 'single-page-app']",MIT,,,,,0.98,GitHub Public API,2026-04-18T01:23:40.142791,10,71,4 +github_microsoft_typescript-go_b167b3a3628d80cb8c6daee46ad1975fe555740e,.gulp.js,.gulp.js,,353,JavaScript,"const cp = require(""child_process""); +const path = require(""path""); + +const argv = process.argv.slice(2); + +const args = [ + ...process.execArgv, + path.join(__dirname, ""node_modules"", ""hereby"", ""bin"", ""hereby.js""), + ...argv, +]; + +const { status } = cp.spawnSync(process.execPath, args, { stdio: ""inherit"" }); +process.exit(status ?? 1); +...[truncated]",microsoft/typescript-go,microsoft,24802,893,Staging repo for development of native port of TypeScript,[],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T08:41:11.459290,38,353,14 +github_plotly_dash_e4449e59cdb18d99db7105287a644dc32a6a3463,.lintstagedrc.js,.lintstagedrc.js,,3624,JavaScript,"// .lintstagedrc.js +const path = require(""path""); +const fs = require(""fs""); + +// Helper to resolve path to venv executables +const venvBin = (command) => { + let bin = ""bin""; + if (process.platform == ""win32"") { + bin = ""Scripts""; + } + if (fs.existsSync(""venv"")) { + return path.join(""venv"", bin, command); + } + if (fs.existsSync("".venv"")) { + return path.join("".venv"", bin, command); + } +}; + +// Allow to cd into a subdirectory +const sh_cd = (directory, command) => { +...[truncated]",plotly/dash,plotly,24208,2275,Data Apps & Dashboards for Python. No JavaScript Required.,"['bioinformatics' 'charting' 'dash' 'data-science' 'data-visualization' + 'finance' 'flask' 'gui-framework' 'jupyter' 'modeling' 'plotly' + 'plotly-dash' 'productivity' 'python' 'react' 'rstats' + 'technical-computing' 'web-app']",MIT,,,,,0.98,GitHub Public API,2026-04-17T16:36:42.040534,284,3624,114 +github_plotly_dash_e4449e59cdb18d99db7105287a644dc32a6a3463,.lintstagedrc.js,.lintstagedrc.js,,3624,JavaScript,"// .lintstagedrc.js +const path = require(""path""); +const fs = require(""fs""); + +// Helper to resolve path to venv executables +const venvBin = (command) => { + let bin = ""bin""; + if (process.platform == ""win32"") { + bin = ""Scripts""; + } + if (fs.existsSync(""venv"")) { + return path.join(""venv"", bin, command); + } + if (fs.existsSync("".venv"")) { + return path.join("".venv"", bin, command); + } +}; + +// Allow to cd into a subdirectory +const sh_cd = (directory, command) => { +...[truncated]",plotly/dash,plotly,24137,2278,Data Apps & Dashboards for Python. No JavaScript Required.,"['bioinformatics' 'charting' 'dash' 'data-science' 'data-visualization' + 'finance' 'flask' 'gui-framework' 'jupyter' 'modeling' 'plotly' + 'plotly-dash' 'productivity' 'python' 'react' 'rstats' + 'technical-computing' 'web-app']",MIT,,,,,0.98,GitHub Public API,2026-04-22T18:13:05.521802,284,3624,114 +github_pubkey_rxdb_e291eec4dc108401aabde97ec8c3ea7101b0631f,babel.config.js,babel.config.js,,1444,JavaScript,"const plugins = [ + '@babel/plugin-transform-explicit-resource-management', + '@babel/plugin-transform-typescript', + 'transform-class-properties', + ['@babel/transform-template-literals', { + 'loose': true + }], + '@babel/transform-literals', + '@babel/transform-block-scoped-functions', + ['@babel/plugin-transform-classes', { + 'loose': true + }], + '@babel/transform-sticky-regex', + '@babel/transform-unicode-regex', + '@babel/transform-block-scoping', + ['...[truncated]",pubkey/rxdb,pubkey,23146,1160,"A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/","['angular' 'browser-database' 'couchdb' 'crdt' 'database' 'firebase' + 'graphql' 'indexeddb' 'ionic' 'local-first' 'localstorage' 'nodejs' + 'nosql' 'postgres' 'pouchdb' 'react-native' 'realtime' + 'realtime-database' 'rxdb' 'sqlite']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:23:55.112449,90,1444,59 +github_facebook_flow_1219f8a1d6c667f3ca641335806dd751b8b1e274,src/js/unix.js,unix.js,,583,JavaScript,"/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +//Provides: caml_unix_getpid const +function caml_unix_getpid() { + return 0; +} + +//Provides: caml_unix_sleep const +function caml_unix_sleep() { + return; +} + +// TODO: remove once we fully migrate to OCaml 5.2 +//Provides: unix_getpid const +function unix_getpid() { + return; +} + +// TODO: remove once we fully mig...[truncated]",facebook/flow,facebook,22210,1886,Adds static typing to JavaScript to improve developer productivity and code quality.,[],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:37:14.824698,88,583,29 +github_facebook_flow_f07d5bf55e8b837a9f2b26f7227934c5e830ac08,src/js/caml_mutex_new.js,caml_mutex_new.js,,300,JavaScript,"/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +//Provides: caml_mutex_new const + +function caml_mutex_new() { + throw 'caml_mutex_new: not implemented' +} +...[truncated]",facebook/flow,facebook,22210,1886,Adds static typing to JavaScript to improve developer productivity and code quality.,[],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:37:13.850218,46,300,13 +github_facebook_flow_af7c62764169d580f034f3770368594029092404,src/js/caml_thread_cleanup.js,caml_thread_cleanup.js,,315,JavaScript,"/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +//Provides: caml_thread_cleanup const + +function caml_thread_cleanup() { + throw 'caml_thread_cleanup: not implemented' +} +...[truncated]",facebook/flow,facebook,22210,1886,Adds static typing to JavaScript to improve developer productivity and code quality.,[],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:37:14.236673,46,315,13 +github_facebook_flow_befe3aad4b597e062122dc766e0317ddee80617e,src/js/caml_thread_initialize.js,caml_thread_initialize.js,,324,JavaScript,"/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +//Provides: caml_thread_initialize const + +function caml_thread_initialize() { + throw 'caml_thread_initialize: not implemented' +} +...[truncated]",facebook/flow,facebook,22210,1886,Adds static typing to JavaScript to improve developer productivity and code quality.,[],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:37:14.529759,46,324,13 +github_facebook_flow_4d507d8e6c0894f8880c00d42cbcace9aff79167,src/heap/hh_shared.js,hh_shared.js,,382,JavaScript,"/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +//Provides: hh_counter_next +var __hh_counter = 0; +function hh_counter_next() { + return ++__hh_counter; +} + +//Provides: hh_check_should_cancel +function hh_check_should_cancel() { + return; +} +...[truncated]",facebook/flow,facebook,22210,1886,Adds static typing to JavaScript to improve developer productivity and code quality.,[],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:37:13.554698,54,382,18 +github_facebook_flow_0a7cb7030d18dff320380d2384e758dda6866424,lib/core.js,core.js,,152691,JavaScript,"/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * Copyright (c) Microsoft Corporation. All rights reserved. + * Modifications Copyright (c) Meta Platforms, Inc. and affiliates. + * + * Licensed under the Apache License, Version 2.0 (the ""License""); you may not use + * this file except in compliance with the License. You may obtain a copy of the + * License at ...[truncated]",facebook/flow,facebook,22210,1886,Adds static typing to JavaScript to improve developer productivity and code quality.,[],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:37:11.089849,22175,152691,3247 +github_facebook_flow_b9ee795374c37a2aa847a8806087e7b06a4585bf,lib/react.js,react.js,,35349,JavaScript,"/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @flow + */ + +/** + * A UI node that can be rendered by React. React can render most primitives in + * addition to elements and arrays of nodes. + */ + +declare type React$Node = + | void + | null + | boolean + | number + | string + | ExactReactElement_DEPRECATED + | React$Portal + | Iterable; + +d...[truncated]",facebook/flow,facebook,22210,1886,Adds static typing to JavaScript to improve developer productivity and code quality.,[],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:37:11.590201,4043,35333,1065 +github_facebook_flow_dad8ce3ba4c650c0ba1c7641d03f3cdcc1c86bab,src/__tests__/flow_dot_js_smoke_test.js,flow_dot_js_smoke_test.js,,4157,JavaScript,"/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + */ + +const flowJSPath = process.argv[2]; +// js_of_ocaml uses the existence of process global to decide whether we are in node or browser +// environment. +// See https://github.com/ocsigen/js_of_ocaml/blob/3feaa1c6bf1647e670ebc8a8fabfda61a66aff8e/runtime/fs_node.js#L21-L26 +// We want to smoke test be...[truncated]",facebook/flow,facebook,22210,1886,Adds static typing to JavaScript to improve developer productivity and code quality.,[],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:37:11.937323,481,4157,183 +github_antonmedv_fx_636d828dc5f19839e6ac9aa68c83f7adfcd53060,internal/complete/prelude.js,prelude.js,,726,JavaScript,"const __keys = new Set() + +Object.prototype.__keys = function () { + if (Array.isArray(this)) return + if (typeof this === 'string') return + if (this instanceof String) return + if (this === globalThis) return + if (typeof this === 'object' && this !== null) + Object.keys(this).forEach(x => __keys.add(x)) +} + +function __autocomplete() { + const keys = [] + for (const key of Object.keys(globalThis)) { + if (key.startsWith('__')) continue + keys.push(key) + } + keys.push( + 'JSON.stringify'...[truncated]",antonmedv/fx,antonmedv,20412,478,Terminal JSON viewer & processor,['cli' 'command-line' 'json' 'tui'],MIT,,,,,0.98,GitHub Public API,2026-04-17T09:28:21.713774,76,726,33 +github_antonmedv_fx_ef5ff855116462f94a93f8f5c67fbcd6b596781d,internal/engine/stdlib.js,stdlib.js,,4390,JavaScript,"'use strict' + +const console = { + log: function (...args) { + const parts = [] + for (const arg of args) { + if (typeof arg === 'undefined') { + parts.push('undefined') + } else if (typeof arg === 'string') { + parts.push(arg) + } else { + parts.push(JSON.stringify(arg, null, 2)) + } + } + println(parts.join(' ')) + }, +} + +const skip = Symbol('skip') + +function apply(fn, ...args) { + if (typeof fn === 'function') return fn(...args) + return fn +} + +function ...[truncated]",antonmedv/fx,antonmedv,20412,478,Terminal JSON viewer & processor,['cli' 'command-line' 'json' 'tui'],MIT,,,,,0.98,GitHub Public API,2026-04-17T09:28:25.530538,634,4390,205 +github_wagtail_wagtail_6666012e0080869c353d497865abe0cf9b23fd27,tailwind.config.js,tailwind.config.js,,842,JavaScript,"import baseConfig from './client/tailwind.config'; + +/** + * Tailwind config file for Wagtail itself. + * @see https://v3.tailwindcss.com/docs/configuration + * @type {import('tailwindcss').Config} + */ +const config = { + presets: [baseConfig], + content: [ + './wagtail/**/*.{py,html,ts,tsx}', + './wagtail/**/static_src/**/*.js', + // Make sure NOT to include the `client/scss` directory, + // even if we don't specify `*.scss` files here. + // The directory would still be scanned for files, ...[truncated]",wagtail/wagtail,wagtail,20301,4515,A Django content management system focused on flexibility and user experience,['cms' 'django' 'hacktoberfest' 'python' 'wagtail'],BSD-3-Clause,,,,,0.98,GitHub Public API,2026-04-23T01:24:52.010648,88,842,28 +github_GoogleCloudPlatform_microservices-demo_77f0516263d7342aacdd9aa5bb541884be22b150,src/paymentservice/index.js,index.js,,2159,JavaScript,"/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the ""License""); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an ""AS IS"" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Lic...[truncated]",GoogleCloudPlatform/microservices-demo,GoogleCloudPlatform,20118,9776,"Sample cloud-first application with 10 microservices showcasing Kubernetes, Istio, and gRPC.","['gcp' 'gke' 'google-cloud' 'grpc' 'istio' 'kubernetes' 'kustomize' + 'sample-application' 'samples' 'skaffold' 'terraform']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T09:30:44.589262,224,2159,76 +github_GoogleCloudPlatform_microservices-demo_5e7985bc3b2f5fe60f1ae0fe8e360c825a0d8e18,src/paymentservice/logger.js,logger.js,,848,JavaScript,"/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the ""License""); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an ""AS IS"" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + *...[truncated]",GoogleCloudPlatform/microservices-demo,GoogleCloudPlatform,20118,9776,"Sample cloud-first application with 10 microservices showcasing Kubernetes, Istio, and gRPC.","['gcp' 'gke' 'google-cloud' 'grpc' 'istio' 'kubernetes' 'kustomize' + 'sample-application' 'samples' 'skaffold' 'terraform']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T09:30:44.888663,122,848,27 +github_GoogleCloudPlatform_microservices-demo_8d468999f553396ac4136770aa9ba4cedf25f6ef,src/currencyservice/server.js,server.js,,5429,JavaScript,"/* + * Copyright 2018 Google LLC. + * + * Licensed under the Apache License, Version 2.0 (the ""License""); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an ""AS IS"" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Lic...[truncated]",GoogleCloudPlatform/microservices-demo,GoogleCloudPlatform,20118,9776,"Sample cloud-first application with 10 microservices showcasing Kubernetes, Istio, and gRPC.","['gcp' 'gke' 'google-cloud' 'grpc' 'istio' 'kubernetes' 'kustomize' + 'sample-application' 'samples' 'skaffold' 'terraform']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T09:30:38.398439,564,5429,199 +github_GoogleCloudPlatform_microservices-demo_ffeae340b689c736a5b38a8a295de40af8d6b2f7,src/paymentservice/charge.js,charge.js,,2821,JavaScript,"// Copyright 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the ""License""); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an ""AS IS"" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the Licens...[truncated]",GoogleCloudPlatform/microservices-demo,GoogleCloudPlatform,20118,9776,"Sample cloud-first application with 10 microservices showcasing Kubernetes, Istio, and gRPC.","['gcp' 'gke' 'google-cloud' 'grpc' 'istio' 'kubernetes' 'kustomize' + 'sample-application' 'samples' 'skaffold' 'terraform']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T09:30:44.283988,362,2821,87 +github_GoogleCloudPlatform_microservices-demo_64c7c7ca453b40bddb57495c298859790433832f,src/currencyservice/client.js,client.js,,1826,JavaScript,"/* + * + * Copyright 2015 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the ""License""); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an ""AS IS"" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See th...[truncated]",GoogleCloudPlatform/microservices-demo,GoogleCloudPlatform,20118,9776,"Sample cloud-first application with 10 microservices showcasing Kubernetes, Istio, and gRPC.","['gcp' 'gke' 'google-cloud' 'grpc' 'istio' 'kubernetes' 'kustomize' + 'sample-application' 'samples' 'skaffold' 'terraform']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T09:30:38.082837,218,1826,69 +github_GoogleCloudPlatform_microservices-demo_67271e4e7dc0354e3bc42780f378ef2214cfb4b7,src/paymentservice/server.js,server.js,,2838,JavaScript,"// Copyright 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the ""License""); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an ""AS IS"" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the Licens...[truncated]",GoogleCloudPlatform/microservices-demo,GoogleCloudPlatform,20118,9776,"Sample cloud-first application with 10 microservices showcasing Kubernetes, Istio, and gRPC.","['gcp' 'gke' 'google-cloud' 'grpc' 'istio' 'kubernetes' 'kustomize' + 'sample-application' 'samples' 'skaffold' 'terraform']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T09:30:45.202481,278,2838,107 +github_cjpais_Handy_20e027e3ab0c8eaeae34d1c58dea328bf219c50b,eslint.config.js,eslint.config.js,,820,JavaScript,"import i18next from ""eslint-plugin-i18next""; +import tsParser from ""@typescript-eslint/parser""; + +export default [ + { + files: [""src/**/*.{ts,tsx}""], + languageOptions: { + parser: tsParser, + parserOptions: { + ecmaFeatures: { + jsx: true, + }, + }, + }, + plugins: { + i18next, + }, + rules: { + // Catch text in JSX that should be translated + ""i18next/no-literal-string"": [ + ""error"", + { + markupOnly: true, // Only chec...[truncated]",cjpais/Handy,cjpais,20113,1637,"A free, open source, and extensible speech-to-text application that works completely offline.",['accessibility' 'cross-platform' 'speech-to-text' 'tauri-v2'],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:43:25.358230,77,820,39 +github_cjpais_Handy_edb044709b2986b8328ac6412c18cae708f46a28,tailwind.config.js,tailwind.config.js,,437,JavaScript,"/** @type {import('tailwindcss').Config} */ +export default { + content: [""./index.html"", ""./src/**/*.{js,ts,jsx,tsx}""], + theme: { + extend: { + colors: { + text: ""var(--color-text)"", + background: ""var(--color-background)"", + ""logo-primary"": ""var(--color-logo-primary)"", + ""logo-stroke"": ""var(--color-logo-stroke)"", + ""text-stroke"": ""var(--color-text-stroke)"", + }, + }, + }, + plugins: [], +}; +...[truncated]",cjpais/Handy,cjpais,20113,1637,"A free, open source, and extensible speech-to-text application that works completely offline.",['accessibility' 'cross-platform' 'speech-to-text' 'tauri-v2'],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:43:29.782366,32,437,17 +github_apollographql_apollo-client_71c536f4005de852abe82b48a40eed6f92aea322,knip.config.js,knip.config.js,,2397,JavaScript,"// @ts-check + +import { readFileSync } from ""node:fs""; +import { join } from ""node:path""; + +import { entryPoints } from ""./config/entryPoints.js""; + +const packageJSON = JSON.parse(readFileSync(""package.json"", ""utf-8"")); + +const packageEntries = entryPoints.map(({ dirs }) => + join(""src"", ...dirs, ""index.ts"") +); + +const scriptEntries = Array.from( + Object.values(packageJSON.scripts) + .join(""\n"") + .matchAll(/(config\/.*?\.[jt]s)/g) +) + .map((match) => match[1]) + .filter((value, index, arr) => in...[truncated]",apollographql/apollo-client,apollographql,19717,2702,"The industry-leading GraphQL client for TypeScript, JavaScript, React, Vue, Angular, and more. Apollo Client delivers powerful caching, intuitive APIs, and comprehensive developer tools to accelerate your app development.",['apollo-client' 'apollographql' 'graphql' 'graphql-client' 'typescript'],MIT,,,,,0.98,GitHub Public API,2026-04-18T01:25:34.321742,173,2397,89 +github_wavetermdev_waveterm_6e98b1d80564c2c0d9c826de9a6c1dffc11f8655,eslint.config.js,eslint.config.js,,2338,JavaScript,"// @ts-check + +import eslint from ""@eslint/js""; +import eslintConfigPrettier from ""eslint-config-prettier""; +import globals from ""globals""; +import path from ""node:path""; +import { fileURLToPath } from ""node:url""; +import tseslint from ""typescript-eslint""; + +const tsconfigRootDir = path.dirname(fileURLToPath(new URL(import.meta.url))); + +export default [ + { + languageOptions: { + parserOptions: { + tsconfigRootDir, + }, + }, + }, + + { + ignores:...[truncated]",wavetermdev/waveterm,wavetermdev,19626,898,"An open-source, AI-integrated, cross-platform terminal for seamless workflows","['command-line' 'developer-tools' 'linux' 'macos' 'productivity' + 'terminal' 'terminal-emulators' 'windows']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T09:33:56.750054,151,2338,99 +github_facebook_relay_6a15b48764b2040ad2b65fad942c972d26b18156,.eslintrc.js,.eslintrc.js,,4754,JavaScript,"/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + * @oncall relay + */ + +'use strict'; + +module.exports = { + root: true, + // TODO - migrate this onto @react-native-community/eslint-config + extends: ['fbjs'], + plugins: ['jest', 'relay', 'react-hooks', 'relay-internal'], + parser: 'hermes-eslint', + rules: { + // Consistency with internal config...[truncated]",facebook/relay,facebook,18930,1888,Relay is a JavaScript framework for building data-driven React applications.,[],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:45:11.184469,354,4754,143 +github_facebook_relay_521e03ae69485621a9923b88b20229fcef6fccdf,gulpfile.js,gulpfile.js,,8094,JavaScript,"/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + * @oncall relay + */ + +'use strict'; + +const babelOptions = require('./scripts/getBabelOptions')({ + ast: false, + plugins: [ + 'babel-plugin-syntax-hermes-parser', + '@babel/plugin-transform-flow-strip-types', + [ + '@babel/plugin-transform-runtime', + {version: require('@babel/runtime...[truncated]",facebook/relay,facebook,18930,1888,Relay is a JavaScript framework for building data-driven React applications.,[],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:45:12.154735,727,8094,315 +github_facebook_relay_b590dd3dd49114648f0a704243f8487e9577a727,.prettierrc.js,.prettierrc.js,,535,JavaScript,"/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + * @oncall relay + */ + +let plugins = ['prettier-plugin-hermes-parser']; +try { + plugins = require('./.prettier-plugins.fb.js'); +} catch {} + +module.exports = { + arrowParens: 'avoid', + bracketSameLine: true, + bracketSpacing: false, + requirePragma: true, + singleQuote: true, + trailingComma: 'all',...[truncated]",facebook/relay,facebook,18930,1888,Relay is a JavaScript framework for building data-driven React applications.,[],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:45:11.840302,72,535,26 +github_facebook_relay_8e8c72d4eca777ca9ef6de99940b6e7df8cae598,.prettier-plugins.fb.js,.prettier-plugins.fb.js,,360,JavaScript,"/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + */ + +module.exports = [ + require.resolve( + '../../../../../../../tools/third-party/prettier/node_modules/prettier-plugin-hermes-parser/index.mjs', + ), +]; +...[truncated]",facebook/relay,facebook,18930,1888,Relay is a JavaScript framework for building data-driven React applications.,[],MIT,,,,,0.98,GitHub Public API,2026-04-17T13:45:11.511974,45,360,15 +github_TecharoHQ_anubis_caab0a5ed013490aff6c62eafc572e8c30096ace,yeetfile.js,yeetfile.js,,3012,JavaScript,"$`npm run assets`; + +[""amd64"", ""arm64"", ""ppc64le"", ""riscv64""].forEach((goarch) => { + [deb, rpm, tarball].forEach((method) => + method.build({ + name: ""anubis"", + description: + ""Anubis weighs the souls of incoming HTTP requests and uses a sha256 proof-of-work challenge in order to protect upstream resources from scraper bots."", + homepage: ""https://anubis.techaro.lol"", + license: ""MIT"", + goarch, + + documentation: { + ""./README.md"": ""README.md"", + ""./L...[truncated]",TecharoHQ/anubis,TecharoHQ,18537,565,Weighs the soul of incoming HTTP requests to stop AI crawlers,['defense' 'security'],MIT,,,,,0.98,GitHub Public API,2026-04-17T09:39:48.464440,346,3012,85 +github_matryer_xbar_f3943af8c4bd55c6b85659886565471fbfb7ba82,app/frontend/rollup.config.js,rollup.config.js,,2512,JavaScript,"import svelte from 'rollup-plugin-svelte' +import resolve from '@rollup/plugin-node-resolve' +import commonjs from '@rollup/plugin-commonjs' +import livereload from 'rollup-plugin-livereload' +import { terser } from 'rollup-plugin-terser' +import postcss from 'rollup-plugin-postcss' +import autoPreprocess from 'svelte-preprocess' +import image from '@rollup/plugin-image' +import { string } from 'rollup-plugin-string' +import url from '@rollup/plugin-url' + +const production = !process.env.ROLLUP_WATCH; + +ex...[truncated]",matryer/xbar,matryer,18017,651,Put the output from any script or program into your macOS Menu Bar (the BitBar reboot),['bitbar' 'mac' 'macos-menu' 'macosx' 'menubar' 'scripting' 'xbar'],MIT,,,,,0.98,GitHub Public API,2026-04-17T09:43:52.148828,299,2512,113 +github_matryer_xbar_d39019abd698d2447c1b9424ed944db0dbbc6f7d,app/frontend/postcss.config.js,postcss.config.js,,142,JavaScript,"module.exports = { + plugins: [ + require('postcss-import'), + require('tailwindcss'), + require('autoprefixer'), + ], +}...[truncated]",matryer/xbar,matryer,18017,651,Put the output from any script or program into your macOS Menu Bar (the BitBar reboot),['bitbar' 'mac' 'macos-menu' 'macosx' 'menubar' 'scripting' 'xbar'],MIT,,,,,0.98,GitHub Public API,2026-04-17T09:43:51.339617,10,142,7 +github_matryer_xbar_8788e8557d65b5c2976645af3a013e9bf5e6588f,app/frontend/tailwind.config.js,tailwind.config.js,,343,JavaScript," +const colors = require('tailwindcss/colors') + +module.exports = { + purge: [ + './src/**/*.html', + './src/**/*.js', + './src/**/*.svelte', + ], + theme: { + colors: { + transparent: 'transparent', + + gray: colors.neutral, + blue: colors.blue, + black: colors.black, + white: colors.white, + yellow: colors.yellow, + }, + }, + plugins: [], +} +...[truncated]",matryer/xbar,matryer,18017,651,Put the output from any script or program into your macOS Menu Bar (the BitBar reboot),['bitbar' 'mac' 'macos-menu' 'macosx' 'menubar' 'scripting' 'xbar'],MIT,,,,,0.98,GitHub Public API,2026-04-17T09:43:52.435245,34,343,23 +github_mswjs_msw_651b7e54c87a7af61f8f48e946900093120b6f6e,commitlint.config.js,commitlint.config.js,,183,JavaScript,"module.exports = { + extends: ['@commitlint/config-conventional'], + rules: { + 'body-max-line-length': [0, 'always', Infinity], + 'footer-max-line-length': [1, 'always'], + }, +} +...[truncated]",mswjs/msw,mswjs,17848,615,Industry standard API mocking for JavaScript.,"['api' 'api-mocking' 'devtools' 'mock' 'mock-service-worker' 'mocking' + 'mocking-framework' 'mocking-library' 'msw' 'mswjs' 'service-worker']",MIT,,,,,0.98,GitHub Public API,2026-04-17T17:54:31.455835,16,183,8 +github_mswjs_msw_d02b80689f69c49ce2568e50a600c53f73609f61,src/mockServiceWorker.js,mockServiceWorker.js,,9119,JavaScript,"/* eslint-disable */ +/* tslint:disable */ + +/** + * Mock Service Worker. + * @see https://github.com/mswjs/msw + * - Please do NOT modify this file. + */ + +const PACKAGE_VERSION = '' +const INTEGRITY_CHECKSUM = '' +const IS_MOCKED_RESPONSE = Symbol('isMockedResponse') +const activeClientIds = new Set() + +addEventListener('install', function () { + self.skipWaiting() +}) + +addEventListener('activate', function (event) { + event.waitUntil(self.clients.claim()) +}) + +addEvent...[truncated]",mswjs/msw,mswjs,17848,615,Industry standard API mocking for JavaScript.,"['api' 'api-mocking' 'devtools' 'mock' 'mock-service-worker' 'mocking' + 'mocking-framework' 'mocking-library' 'msw' 'mswjs' 'service-worker']",MIT,,,,,0.98,GitHub Public API,2026-04-17T17:54:43.305957,987,9119,350 +github_redwoodjs_graphql_bc406fb9ac329fa65d6d4f65aaa265696b166465,babel.config.js,babel.config.js,,5598,JavaScript,"const path = require('path') + +const packageJSON = require(path.join(__dirname, 'package.json')) + +const TARGETS_NODE = '20.10' + +// Run `npx browserslist ""defaults""` to see a list of target browsers. +const TARGETS_BROWSERS = ['defaults'] + +// Warning! Recommended to specify used minor core-js version, like corejs: '3.6', +// instead of corejs: '3', since with '3' it will not be injected modules +// which were added in minor core-js releases. +// https://github.com/zloirock/core-js/blob/master/README.m...[truncated]",redwoodjs/graphql,redwoodjs,17623,1002,RedwoodGraphQL,['apollo' 'graphql' 'jamstack' 'prisma' 'react'],MIT,,,,,0.98,GitHub Public API,2026-04-18T01:26:29.433154,545,5596,156 +github_redwoodjs_graphql_81b3f87b61ef1e7f97f7359dfcb18f94ab136883,.eslintrc.js,.eslintrc.js,,12700,JavaScript,"const { findUp } = require('@redwoodjs/project-config') + +// Framework Babel config is monorepo root ./babel.config.js +// `yarn lint` runs for each workspace, which needs findUp for path to root +const findBabelConfig = (cwd = process.cwd()) => { + const configPath = findUp('babel.config.js', cwd) + if (!configPath) { + throw new Error(`Eslint-parser could not find a ""babel.config.js"" file`) + } + return configPath +} + +module.exports = { + extends: [ + 'eslint:recommended', + 'plugin:react/re...[truncated]",redwoodjs/graphql,redwoodjs,17623,1002,RedwoodGraphQL,['apollo' 'graphql' 'jamstack' 'prisma' 'react'],MIT,,,,,0.98,GitHub Public API,2026-04-18T01:26:29.147166,1023,12700,394 +github_redwoodjs_graphql_956faa5471a066baaf9aa9f132dee326ee28c61f,prettier.config.js,prettier.config.js,,363,JavaScript,"/* eslint-env node */ +// @ts-check + +/** + * @see https://prettier.io/docs/en/configuration.html + * @type {import(""prettier"").Config} + */ +const config = { + bracketSpacing: true, + tabWidth: 2, + semi: false, + singleQuote: true, + plugins: [ + 'prettier-plugin-curly', + 'prettier-plugin-sh', + 'prettier-plugin-packagejson', + ], +} + +module.exports = config +...[truncated]",redwoodjs/graphql,redwoodjs,17623,1002,RedwoodGraphQL,['apollo' 'graphql' 'jamstack' 'prisma' 'react'],MIT,,,,,0.98,GitHub Public API,2026-04-18T01:26:29.684848,36,363,21 +github_graphql_graphiql_50347139e3dc445e836fc090b60aa9da458cc5bf,babel.config.js,babel.config.js,,1183,JavaScript,"// for ESM don't transpile modules + +const envConfig = { + modules: 'commonjs', +}; + +if (process.env.ESM) { + envConfig.modules = false; + envConfig.targets = { node: 'current' }; + envConfig.bugfixes = true; +} + +if (process.env.CDN) { + envConfig.modules = 'umd'; + envConfig.targets = null; +} + +module.exports = { + presets: [ + [require.resolve('@babel/preset-env'), envConfig], + require.resolve('@babel/preset-react'), + require.resolve('@babel/preset-typescript'), + ], + env: { + test: { + ...[truncated]",graphql/graphiql,graphql,16822,1825,GraphiQL & the GraphQL LSP Reference Ecosystem for building browser & IDE tools.,"['codemirror' 'graphiql' 'graphql' 'lsp-mode' 'lsp-server' 'monaco-editor' + 'vscode']",MIT,,,,,0.98,GitHub Public API,2026-04-18T01:26:45.658146,86,1183,46 +github_graphql_graphiql_136eb2f83747a3a5598f12cb6f22de4ee07c9d9d,wg.config.js,wg.config.js,,1002,JavaScript,"// @ts-check + +/** @type {import('wgutils').Config} */ +const config = { + name: 'GraphiQL WG', + repoUrl: 'https://github.com/graphql/graphiql', + repoSubpath: 'working-group', + videoConferenceDetails: `https://zoom.us/j/760146252 + - _Password:_ graphiql`, + liveNotesUrl: + 'https://docs.google.com/document/d/1AjbUDhfQV2TXn13RZqrmL7PfETTslzkbVZGtNl_SLcU/edit?usp=sharing', + timezone: 'UTC', + frequency: 'monthly', + nth: 2, + weekday: 'Tu', // M, Tu, W, Th, F, Sa, Su + time: '16:00-17:00', //...[truncated]",graphql/graphiql,graphql,16822,1825,GraphiQL & the GraphQL LSP Reference Ecosystem for building browser & IDE tools.,"['codemirror' 'graphiql' 'graphql' 'lsp-mode' 'lsp-server' 'monaco-editor' + 'vscode']",MIT,,,,,0.98,GitHub Public API,2026-04-18T01:26:46.518843,90,1002,29 +github_graphql_graphiql_f67d727fa67078f52deda91544a412fdb6d7ec7c,jest.config.base.js,jest.config.base.js,,1239,JavaScript,"module.exports = dir => { + const package = require(`${dir}/package.json`); + return { + globals: { + 'ts-jest': { + tsConfig: `${__dirname}/resources/tsconfig.base.esm.json`, + }, + }, + clearMocks: true, + collectCoverage: true, + coverageDirectory: `${__dirname}/coverage/jest`, + moduleNameMapper: { + '^graphql-language-service-([^/]+)': `${__dirname}/packages/graphql-language-service/src/$1`, + '^graphql-language-([^/]+)': `${__dirname}/packages/graphql-lang...[truncated]",graphql/graphiql,graphql,16822,1825,GraphiQL & the GraphQL LSP Reference Ecosystem for building browser & IDE tools.,"['codemirror' 'graphiql' 'graphql' 'lsp-mode' 'lsp-server' 'monaco-editor' + 'vscode']",MIT,,,,,0.98,GitHub Public API,2026-04-18T01:26:45.958947,78,1239,42 +github_graphql_graphiql_0728611dbe86f776f25756175bfa3618e53619aa,.eslintrc.js,.eslintrc.js,,21463,JavaScript,"/** + * Copyright (c) Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the license found in the + * LICENSE file in the root directory of this source tree. + * + */ + +const RESTRICTED_IMPORTS = [ + { name: 'graphql/type', message: 'use `graphql`' }, + { name: 'graphql/language', message: 'use `graphql`' }, + { name: 'graphql/type/introspection', message: 'use `graphql`' }, + { name: 'graphql/type/definition', message: 'use `graphql`' }, + { name: 'graphql/type/direc...[truncated]",graphql/graphiql,graphql,16822,1825,GraphiQL & the GraphQL LSP Reference Ecosystem for building browser & IDE tools.,"['codemirror' 'graphiql' 'graphql' 'lsp-mode' 'lsp-server' 'monaco-editor' + 'vscode']",MIT,,,,,0.98,GitHub Public API,2026-04-18T01:26:45.382602,1331,21455,595 +github_graphql_graphiql_3ef34f68be137935a51a3d1573fb9f1615c1d69c,jest.config.js,jest.config.js,,75,JavaScript,"module.exports = { + projects: ['/packages/*/jest.config.js'], +}; +...[truncated]",graphql/graphiql,graphql,16822,1825,GraphiQL & the GraphQL LSP Reference Ecosystem for building browser & IDE tools.,"['codemirror' 'graphiql' 'graphql' 'lsp-mode' 'lsp-server' 'monaco-editor' + 'vscode']",MIT,,,,,0.98,GitHub Public API,2026-04-18T01:26:46.237761,6,75,4 +github_suitenumerique_docs_a4db989cea23a0b4862e2f04d5df65a138ff6084,src/frontend/.prettierrc.js,.prettierrc.js,,114,JavaScript,"module.exports = { + semi: true, + trailingComma: 'all', + singleQuote: true, + printWidth: 80, + tabWidth: 2, +}; +...[truncated]",suitenumerique/docs,suitenumerique,16422,575,"A collaborative note taking, wiki and documentation platform that scales. Built with Django and React. ","['blocknotejs' 'collaborative' 'django' 'documentation' 'g2g' 'government' + 'knowledge' 'knowledge-base' 'mit' 'mit-license' 'opensource' 'reactjs' + 'realtime-collaboration' 'self-hosted' 'wiki' 'yjs']",MIT,,,,,0.98,GitHub Public API,2026-04-23T01:25:10.195824,14,114,8 +github_AsyncFuncAI_deepwiki-open_c0b8e61dffbe0c1fcb9ba5eba04b30c09f91ec2f,tailwind.config.js,tailwind.config.js,,197,JavaScript,"module.exports = { + darkMode: 'selector', + content: [ + './src/pages/**/*.{js,ts,jsx,tsx,mdx}', + './src/components/**/*.{js,ts,jsx,tsx,mdx}', + './src/app/**/*.{js,ts,jsx,tsx,mdx}', + ], +}...[truncated]",AsyncFuncAI/deepwiki-open,AsyncFuncAI,15812,1772,Open Source DeepWiki: AI-Powered Wiki Generator for GitHub/Gitlab/Bitbucket Repositories. Join the discord: https://discord.gg/gMwThUMeme,"['ai' 'gemini' 'github' 'ollama' 'open-source' 'openai' 'openrouter' + 'self-hosted' 'wiki']",MIT,,,,,0.98,GitHub Public API,2026-04-22T17:11:54.243018,12,197,8 +github_AsyncFuncAI_deepwiki-open_c0b8e61dffbe0c1fcb9ba5eba04b30c09f91ec2f,tailwind.config.js,tailwind.config.js,,197,JavaScript,"module.exports = { + darkMode: 'selector', + content: [ + './src/pages/**/*.{js,ts,jsx,tsx,mdx}', + './src/components/**/*.{js,ts,jsx,tsx,mdx}', + './src/app/**/*.{js,ts,jsx,tsx,mdx}', + ], +}...[truncated]",AsyncFuncAI/deepwiki-open,AsyncFuncAI,15708,1765,Open Source DeepWiki: AI-Powered Wiki Generator for GitHub/Gitlab/Bitbucket Repositories. Join the discord: https://discord.gg/gMwThUMeme,"['ai' 'gemini' 'github' 'ollama' 'open-source' 'openai' 'openrouter' + 'self-hosted' 'wiki']",MIT,,,,,0.98,GitHub Public API,2026-04-17T15:32:32.127365,12,197,8 +github_cvat-ai_cvat_81bdce34a805de5d87bf816c70ffe71587fd3142,.remarkrc.js,.remarkrc.js,,729,JavaScript,"exports.settings = { bullet: '*', paddedTable: false }; + +exports.plugins = [ + 'remark-frontmatter', + 'remark-gfm', + 'remark-preset-lint-recommended', + 'remark-preset-lint-consistent', + ['remark-lint-list-item-indent', 'one'], + ['remark-lint-no-dead-urls', false], // Does not work because of github protection system + ['remark-lint-maximum-line-length', 120], + ['remark-lint-maximum-heading-length', 120], + ['remark-lint-strong-marker', '*'], + ['remark-lint-emphasis-mar...[truncated]",cvat-ai/cvat,cvat-ai,15689,3655,"Annotate better with CVAT, the industry-leading data engine for machine learning. Used and trusted by teams at any scale, for data of any scale.","['annotation' 'annotation-tool' 'annotations' 'boundingbox' + 'computer-vision' 'computer-vision-annotation' 'dataset' 'deep-learning' + 'image-annotation' 'image-classification' 'image-labeling' + 'image-labelling-tool' 'imagenet' 'labeling' 'labeling-tool' + 'object-detection' 'pytorch' 'semantic-segmentation' 'tensorflow' + 'video-annotation']",MIT,,,,,0.98,GitHub Public API,2026-04-22T13:55:30.663794,45,729,19 +github_cvat-ai_cvat_58e387f7976c9a38eb88e81f484bc93e439f8d81,lint-staged.config.js,lint-staged.config.js,,1668,JavaScript,"// lint-staged.config.js + +const micromatch = require('micromatch'); + +function containsInPath(pattern, list) { + return list.filter((item) => micromatch.contains(item, pattern)); +} + +function makePattern(extension) { + return `**/*.${extension}`; +} + +module.exports = (stagedFiles) => { + const eslintExtensions = ['ts', 'tsx', 'js'].map(makePattern); + const scssExtensions = ['scss'].map(makePattern); + const eslintFiles = micromatch(stagedFiles, eslintExtensions); + const scssFiles = mi...[truncated]",cvat-ai/cvat,cvat-ai,15689,3655,"Annotate better with CVAT, the industry-leading data engine for machine learning. Used and trusted by teams at any scale, for data of any scale.","['annotation' 'annotation-tool' 'annotations' 'boundingbox' + 'computer-vision' 'computer-vision-annotation' 'dataset' 'deep-learning' + 'image-annotation' 'image-classification' 'image-labeling' + 'image-labelling-tool' 'imagenet' 'labeling' 'labeling-tool' + 'object-detection' 'pytorch' 'semantic-segmentation' 'tensorflow' + 'video-annotation']",MIT,,,,,0.98,GitHub Public API,2026-04-22T13:55:30.957288,154,1668,45 +github_cvat-ai_cvat_81bdce34a805de5d87bf816c70ffe71587fd3142,.remarkrc.js,.remarkrc.js,,729,JavaScript,"exports.settings = { bullet: '*', paddedTable: false }; + +exports.plugins = [ + 'remark-frontmatter', + 'remark-gfm', + 'remark-preset-lint-recommended', + 'remark-preset-lint-consistent', + ['remark-lint-list-item-indent', 'one'], + ['remark-lint-no-dead-urls', false], // Does not work because of github protection system + ['remark-lint-maximum-line-length', 120], + ['remark-lint-maximum-heading-length', 120], + ['remark-lint-strong-marker', '*'], + ['remark-lint-emphasis-mar...[truncated]",cvat-ai/cvat,cvat-ai,15663,3650,"Annotate better with CVAT, the industry-leading data engine for machine learning. Used and trusted by teams at any scale, for data of any scale.","['annotation' 'annotation-tool' 'annotations' 'boundingbox' + 'computer-vision' 'computer-vision-annotation' 'dataset' 'deep-learning' + 'image-annotation' 'image-classification' 'image-labeling' + 'image-labelling-tool' 'imagenet' 'labeling' 'labeling-tool' + 'object-detection' 'pytorch' 'semantic-segmentation' 'tensorflow' + 'video-annotation']",MIT,,,,,0.98,GitHub Public API,2026-04-17T17:17:17.194984,45,729,19 +github_cvat-ai_cvat_58e387f7976c9a38eb88e81f484bc93e439f8d81,lint-staged.config.js,lint-staged.config.js,,1668,JavaScript,"// lint-staged.config.js + +const micromatch = require('micromatch'); + +function containsInPath(pattern, list) { + return list.filter((item) => micromatch.contains(item, pattern)); +} + +function makePattern(extension) { + return `**/*.${extension}`; +} + +module.exports = (stagedFiles) => { + const eslintExtensions = ['ts', 'tsx', 'js'].map(makePattern); + const scssExtensions = ['scss'].map(makePattern); + const eslintFiles = micromatch(stagedFiles, eslintExtensions); + const scssFiles = mi...[truncated]",cvat-ai/cvat,cvat-ai,15663,3650,"Annotate better with CVAT, the industry-leading data engine for machine learning. Used and trusted by teams at any scale, for data of any scale.","['annotation' 'annotation-tool' 'annotations' 'boundingbox' + 'computer-vision' 'computer-vision-annotation' 'dataset' 'deep-learning' + 'image-annotation' 'image-classification' 'image-labeling' + 'image-labelling-tool' 'imagenet' 'labeling' 'labeling-tool' + 'object-detection' 'pytorch' 'semantic-segmentation' 'tensorflow' + 'video-annotation']",MIT,,,,,0.98,GitHub Public API,2026-04-17T17:17:17.492948,154,1668,45 +github_BrainJS_brain.js_539f7b4cec08264df88553f1fd28f983b993814f,rollup.config.browser.js,rollup.config.browser.js,,1248,JavaScript,"import commonjs from '@rollup/plugin-commonjs'; +import json from '@rollup/plugin-json'; +import resolve from '@rollup/plugin-node-resolve'; +import typescript from '@rollup/plugin-typescript'; +import { fileURLToPath } from 'node:url'; + +const name = 'brain'; +const extensions = ['.js', '.json', '.node', '.ts']; +const file = 'dist/browser.js'; + +export default { + input: './src/index.ts', + + // Specify here external modules which you don't want to include in your bundle (for instance: 'lodash', 'momen...[truncated]",BrainJS/brain.js,BrainJS,14860,1078,🤖 GPU accelerated Neural networks in JavaScript for Browsers and Node.js,"['api' 'brain' 'browser' 'convolutional-neural-networks' 'easy-to-use' + 'hacktoberfest' 'neural-network' 'node' 'nodejs' + 'recurrent-neural-networks' 'stream' 'web']",MIT,,,,,0.98,GitHub Public API,2026-04-17T17:55:44.888874,137,1248,52 +github_BrainJS_brain.js_968709466d7fab0549118c00ea138bf857c00a24,rollup.config.js,rollup.config.js,,971,JavaScript,"import commonjs from '@rollup/plugin-commonjs'; +import json from '@rollup/plugin-json'; +import resolve from '@rollup/plugin-node-resolve'; +import typescript from '@rollup/plugin-typescript'; +import * as pkg from './package.json'; + +const extensions = ['.js', '.json', '.node', '.ts']; + +export default { + input: './src/index.ts', + + // Specify here external modules which you don't want to include in your bundle (for instance: 'lodash', 'moment' etc.) + // https://rollupjs.org/guide/en#external-e-ex...[truncated]",BrainJS/brain.js,BrainJS,14860,1078,🤖 GPU accelerated Neural networks in JavaScript for Browsers and Node.js,"['api' 'brain' 'browser' 'convolutional-neural-networks' 'easy-to-use' + 'hacktoberfest' 'neural-network' 'node' 'nodejs' + 'recurrent-neural-networks' 'stream' 'web']",MIT,,,,,0.98,GitHub Public API,2026-04-17T17:55:45.175232,105,971,44 +github_apollographql_apollo-server_55a9fb00fe1c3860493a16778ee8d0ad232b2211,jest.config.base.js,jest.config.base.js,,723,JavaScript,"import { defaults } from 'jest-config'; +import { createRequire } from 'node:module'; + +export default { + testEnvironment: 'node', + setupFilesAfterEnv: ['/../../jest.setup.js'], + preset: 'ts-jest', + testMatch: null, + testRegex: '/__tests__/.*\\.test\\.(js|ts)$', + testPathIgnorePatterns: ['/node_modules/', '/dist/'], + moduleFileExtensions: [...defaults.moduleFileExtensions, 'ts', 'tsx'], + clearMocks: true, + transform: { + '^.+\\.test.ts$': [ + 'ts-jest', + { + tsco...[truncated]",apollographql/apollo-server,apollographql,13936,2007,"🌍  Spec-compliant and production ready JavaScript GraphQL server that lets you develop in a schema-first way. Built for Express, Connect, Hapi, Koa, and more.","['apollographql' 'express' 'express-graphql' 'graphql' 'graphql-schema' + 'graphql-server' 'hapi' 'koa' 'node' 'resolvers' 'restify']",MIT,,,,,0.98,GitHub Public API,2026-04-18T01:26:59.985183,65,723,27 +github_apollographql_apollo-server_2c7eed0933c5f0aeea8bdc3e03f61884fca69730,jest.setup.js,jest.setup.js,,978,JavaScript,"// It's awkward to read `npm test` output if it is littered with console logs. +// This (from https://github.com/facebook/jest/issues/6121) makes the test fail +// if it writes anything to console. (Feel free to set $ALLOW_CONSOLE if you are +// logging while developing and want to see if your tests pass.) +// +// Typically you can turn off the info/debug in tests by passing a loglevel +// logger with level WARN to the logger option to `new ApolloServer`. +if (!process.env.ALLOW_CONSOLE) { + let usedCo...[truncated]",apollographql/apollo-server,apollographql,13936,2007,"🌍  Spec-compliant and production ready JavaScript GraphQL server that lets you develop in a schema-first way. Built for Express, Connect, Hapi, Koa, and more.","['apollographql' 'express' 'express-graphql' 'graphql' 'graphql-schema' + 'graphql-server' 'hapi' 'koa' 'node' 'resolvers' 'restify']",MIT,,,,,0.98,GitHub Public API,2026-04-18T01:27:00.274112,146,978,27 +github_kopia_kopia_c5963e4174dfb4827188beaae2c90e6c3668b25b,app/public/utils.js,utils.js,,1470,JavaScript,"import { app } from ""electron""; +import path from ""path""; +const __dirname = import.meta.dirname; + +const osShortName = (function () { + switch (process.platform) { + case ""win32"": + return ""win""; + case ""darwin"": + return ""mac""; + case ""linux"": + return ""linux""; + default: + return null; + } +})(); + +export function iconsPath() { + if (!app.isPackaged) { + return path.join(__dirname, "".."", ""resources"", osShortName, ""icons""); + } + + return path.join(process.resourcesPath, ""i...[truncated]",kopia/kopia,kopia,13024,637,"Cross-platform backup tool for Windows, macOS & Linux with fast, incremental backups, client-side end-to-end encryption, compression and data deduplication. CLI and GUI included.",['backup' 'cloud' 'deduplication' 'encryption' 'google-cloud-storage'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T11:30:13.798817,134,1470,73 +github_kopia_kopia_75473917bdcb313aba7a97f06e7d15dbc73eb0f5,app/public/server.js,server.js,,7962,JavaScript,"import { ipcMain } from ""electron""; +const path = await import(""path""); +const https = await import(""https""); + +import { defaultServerBinary } from ""./utils.js""; +import { spawn } from ""child_process""; +import log from ""electron-log""; +import { configDir, isPortableConfig } from ""./config.js""; + +let servers = {}; + +function newServerForRepo(repoID) { + let runningServerProcess = null; + let runningServerCertSHA256 = """"; + let runningServerPassword = """"; + let runningServerControlPassword = """"; + let run...[truncated]",kopia/kopia,kopia,13024,637,"Cross-platform backup tool for Windows, macOS & Linux with fast, incremental backups, client-side end-to-end encryption, compression and data deduplication. CLI and GUI included.",['backup' 'cloud' 'deduplication' 'encryption' 'google-cloud-storage'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T11:30:13.465783,631,7962,299 +github_kopia_kopia_ac4be3014a6fdc93361d6e663a584da43f4f3034,app/public/preload.js,preload.js,,324,JavaScript,"const { contextBridge, ipcRenderer } = require(""electron""); + +contextBridge.exposeInMainWorld(""kopiaUI"", { + selectDirectory: function (onSelected) { + ipcRenderer.invoke(""select-dir"").then((v) => { + onSelected(v); + }); + }, + browseDirectory: function (path) { + ipcRenderer.invoke(""browse-dir"", path); + }, +}); +...[truncated]",kopia/kopia,kopia,13024,637,"Cross-platform backup tool for Windows, macOS & Linux with fast, incremental backups, client-side end-to-end encryption, compression and data deduplication. CLI and GUI included.",['backup' 'cloud' 'deduplication' 'encryption' 'google-cloud-storage'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T11:30:12.545650,27,324,13 +github_kopia_kopia_4857982f2c800ebbff8feb0c4078df2fdc7a7156,app/public/notifications.js,notifications.js,,845,JavaScript,"import { ipcMain } from ""electron""; +import { configDir } from ""./config.js""; + +const path = await import(""path""); +const fs = await import(""fs""); + +export const LevelDisabled = 0; +export const LevelWarningsAndErrors = 1; +export const LevelAll = 2; + +let level = -1; + +export function getNotificationLevel() { + if (level === -1) { + try { + const cfg = fs.readFileSync(path.join(configDir(), ""notifications.json"")); + return JSON.parse(cfg).level; + } catch (e) { + level = LevelWarningsAn...[truncated]",kopia/kopia,kopia,13024,637,"Cross-platform backup tool for Windows, macOS & Linux with fast, incremental backups, client-side end-to-end encryption, compression and data deduplication. CLI and GUI included.",['backup' 'cloud' 'deduplication' 'encryption' 'google-cloud-storage'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T11:30:12.208595,101,845,39 +github_kopia_kopia_d8c082aa7a8d3b1116e18a71e1ea6aa1033650c4,app/public/electron.js,electron.js,,18610,JavaScript,"import { + app, + BrowserWindow, + Notification, + screen, + Menu, + Tray, + ipcMain, + dialog, + shell, +} from ""electron""; +import pkg from ""electron-updater""; +const autoUpdater = pkg.autoUpdater; +import { iconsPath, publicPath, selectByOS } from ""./utils.js""; +import { + toggleLaunchAtStartup, + willLaunchAtStartup, + refreshWillLaunchAtStartup, +} from ""./auto-launch.js""; +import { + setNotificationLevel, + getNotificationLevel, + LevelDisabled, + LevelWarningsAndErrors, +} from ""./notifications.j...[truncated]",kopia/kopia,kopia,13024,637,"Cross-platform backup tool for Windows, macOS & Linux with fast, incremental backups, client-side end-to-end encryption, compression and data deduplication. CLI and GUI included.",['backup' 'cloud' 'deduplication' 'encryption' 'google-cloud-storage'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T11:30:11.902651,1850,18610,726 +github_kopia_kopia_997f0452fa60abeba22fd7e367d1486534c33847,app/public/config.js,config.js,,3507,JavaScript,"const fs = await import(""fs""); +const path = await import(""path""); +const Electron = await import(""electron""); +const log = await import(""electron-log""); + +let configs = {}; +const configFileSuffix = "".config""; + +let myConfigDir = """"; +let isPortable = false; +let firstRun = false; + +// returns the list of directories to be checked for portable configurations +function portableConfigDirs() { + let result = []; + + if (process.env.KOPIA_UI_PORTABLE_CONFIG_DIR) { + result.push(process.env.KOPIA_UI_PORTABLE...[truncated]",kopia/kopia,kopia,13024,637,"Cross-platform backup tool for Windows, macOS & Linux with fast, incremental backups, client-side end-to-end encryption, compression and data deduplication. CLI and GUI included.",['backup' 'cloud' 'deduplication' 'encryption' 'google-cloud-storage'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T11:30:11.458430,390,3507,167 +github_kopia_kopia_adbdff239fa8cc30cf82a96f9a89d3581897ad89,app/tests/main.spec.js,main.spec.js,,6097,JavaScript,"import { test, expect } from ""@playwright/test""; +import { _electron as electron } from ""playwright""; + +import fs from ""fs""; +import os from ""os""; +import path from ""path""; + +const DEFAULT_REPO_ID = ""repository""; + +let electronApp; +let mainPath; +let executablePath; +let tmpAppDataDir; + +function getKopiaUIDir() { + switch (process.platform + ""/"" + process.arch) { + case ""darwin/x64"": + return path.resolve(""../dist/kopia-ui/mac""); + case ""darwin/arm64"": + return path.resolve(""../dist/kopia-ui...[truncated]",kopia/kopia,kopia,13024,637,"Cross-platform backup tool for Windows, macOS & Linux with fast, incremental backups, client-side end-to-end encryption, compression and data deduplication. CLI and GUI included.",['backup' 'cloud' 'deduplication' 'encryption' 'google-cloud-storage'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T11:30:14.111013,615,6097,237 +github_kopia_kopia_ce3d9731ca00a35563285904a1b845345e1d81d1,app/public/auto-launch.js,auto-launch.js,,1072,JavaScript,"import { ipcMain } from ""electron""; +import log from ""electron-log""; + +import AutoLaunch from ""auto-launch""; + +const autoLauncher = new AutoLaunch({ + name: ""Kopia"", + mac: { + useLaunchAgent: true, + }, +}); + +let enabled = false; + +export function willLaunchAtStartup() { + return enabled; +} + +export function toggleLaunchAtStartup() { + if (enabled) { + log.info(""disabling autorun""); + autoLauncher + .disable() + .then(() => { + enabled = false; + ipcMain.emit(""launch-at-star...[truncated]",kopia/kopia,kopia,13024,637,"Cross-platform backup tool for Windows, macOS & Linux with fast, incremental backups, client-side end-to-end encryption, compression and data deduplication. CLI and GUI included.",['backup' 'cloud' 'deduplication' 'encryption' 'google-cloud-storage'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T11:30:11.165299,105,1072,51 +github_graphile_crystal_353831508742e00ef391a4a51270ad1ecc8ae4fc,.jest-babel-transform.js,.jest-babel-transform.js,,93,JavaScript,"module.exports = require(""babel-jest"").default.createTransformer({ + rootMode: ""upward"", +}); +...[truncated]",graphile/crystal,graphile,12917,618,"🔮 Graphile's Crystal Monorepo; home to Grafast, PostGraphile, pg-introspection, pg-sql2 and much more!","['api' 'automatic-api' 'express' 'graphile' 'graphql' 'graphql-api' + 'graphql-js' 'http' 'instant' 'koa' 'koa2' 'node' 'nodejs' 'pg' 'pgsql' + 'postgraphql' 'postgres' 'postgresql' 'schema' 'typescript']",MIT,,,,,0.98,GitHub Public API,2026-04-17T17:56:48.180434,6,93,4 +github_graphile_crystal_f80c7edba351713e12c950e74562f0c8ed4195fe,jest.config.js,jest.config.js,,223,JavaScript,"module.exports = { + projects: [ + ""/utils/*/jest.config.js"", + ""/grafast/*/jest.config.js"", + ""/graphile-build/*/jest.config.js"", + // ""/postgraphile/*/jest.config.cjs"", + ], +}; +...[truncated]",graphile/crystal,graphile,12917,618,"🔮 Graphile's Crystal Monorepo; home to Grafast, PostGraphile, pg-introspection, pg-sql2 and much more!","['api' 'automatic-api' 'express' 'graphile' 'graphql' 'graphql-api' + 'graphql-js' 'http' 'instant' 'koa' 'koa2' 'node' 'nodejs' 'pg' 'pgsql' + 'postgraphql' 'postgres' 'postgresql' 'schema' 'typescript']",MIT,,,,,0.98,GitHub Public API,2026-04-17T17:56:50.156825,12,223,9 +github_graphile_crystal_b041803d64cfa84bec1a520e41888ca9cafee6c3,.prettierrc.js,.prettierrc.js,,727,JavaScript,"module.exports = { + trailingComma: ""all"", + proseWrap: ""always"", + overrides: [ + { + files: ""CRYSTAL_FLOW.md"", + options: { + printWidth: 120, + }, + }, + { + // Due to the following Prettier issue, it's unsafe to proseWrap MDX currently + // https://github.com/prettier/prettier/issues/13586 + files: [""**/website/**/*.mdx"", ""**/website/**/*.md""], + options: { + proseWrap: ""preserve"", + }, + }, + { + // Wrapping commands in yaml is gross...[truncated]",graphile/crystal,graphile,12917,618,"🔮 Graphile's Crystal Monorepo; home to Grafast, PostGraphile, pg-introspection, pg-sql2 and much more!","['api' 'automatic-api' 'express' 'graphile' 'graphql' 'graphql-api' + 'graphql-js' 'http' 'instant' 'koa' 'koa2' 'node' 'nodejs' 'pg' 'pgsql' + 'postgraphql' 'postgres' 'postgresql' 'schema' 'typescript']",MIT,,,,,0.98,GitHub Public API,2026-04-17T17:56:48.485641,70,727,34 +github_graphile_crystal_bd5d24b7357a68821c09a7fb2265237c614863ea,babel.config.js,babel.config.js,,580,JavaScript,"// Babel config, used by Jest +module.exports = { + plugins: [""@babel/plugin-transform-modules-commonjs""], + presets: [ + [ + ""@babel/env"", + { + targets: { + node: ""16.12"", + }, + }, + ], + ""@babel/preset-typescript"", + ""@babel/preset-react"", + ], + env: { + test: { + plugins: [""babel-plugin-transform-import-meta""], + presets: [ + [ + ""@babel/env"", + { + targets: { + node: ""current"", + }, + ...[truncated]",graphile/crystal,graphile,12917,618,"🔮 Graphile's Crystal Monorepo; home to Grafast, PostGraphile, pg-introspection, pg-sql2 and much more!","['api' 'automatic-api' 'express' 'graphile' 'graphql' 'graphql-api' + 'graphql-js' 'http' 'instant' 'koa' 'koa2' 'node' 'nodejs' 'pg' 'pgsql' + 'postgraphql' 'postgres' 'postgresql' 'schema' 'typescript']",MIT,,,,,0.98,GitHub Public API,2026-04-17T17:56:48.797759,49,580,33 +github_graphile_crystal_0e0986c33fc7b1b88177ffe572117d095b8a8d55,heir.js,heir.js,,1839,JavaScript,"const child_process = require(""child_process""); +const { readFileSync } = require(""fs""); + +const output = child_process.execSync( + ""yarn workspaces list --json --recursive --no-private"", + { + encoding: ""utf8"", + }, +); + +// TODO: handle special characters if any +const mermaidEscape = (str) => str; + +const nodeName = (str) => str.replace(/[^a-z0-9]+/g, ""_""); + +/** @type {Array<{location: string, name: string}>} */ +const workspaces = JSON.parse( + ""["" + output.replace(/\n/g, "","").replace(/,+$/, """") ...[truncated]",graphile/crystal,graphile,12917,618,"🔮 Graphile's Crystal Monorepo; home to Grafast, PostGraphile, pg-introspection, pg-sql2 and much more!","['api' 'automatic-api' 'express' 'graphile' 'graphql' 'graphql-api' + 'graphql-js' 'http' 'instant' 'koa' 'koa2' 'node' 'nodejs' 'pg' 'pgsql' + 'postgraphql' 'postgres' 'postgresql' 'schema' 'typescript']",MIT,,,,,0.98,GitHub Public API,2026-04-17T17:56:49.078636,192,1839,63 +github_graphile_crystal_32f06cd2bbaa7a41a6b1f27b3aadc1b2b52acca2,jest.config.base.js,jest.config.base.js,,1514,JavaScript,"if (!(""GRAPHILE_ENV"" in process.env)) { + process.env.GRAPHILE_ENV = ""test""; +} +module.exports = (dir) => { + const packageJson = require(`${dir}/package.json`); + + return { + testEnvironment: ""node"", + transform: { + ""^.+\\.jsx?$"": `${__dirname}/.jest-babel-transform.js`, + ""^.+\\.tsx?$"": `${__dirname}/.jest-babel-transform.js`, + }, + testMatch: [""/**/__tests__/**/*.test.[jt]s?(x)""], + moduleFileExtensions: [""js"", ""json"", ""jsx"", ""ts"", ""tsx"", ""node""], + roots: [`/packages/*/src/**/*.test.ts', + '/devEnv/**/*.test.ts', + ], + moduleNameMapper: { + ...require('./devEnv/getAliasesFromTsConfig').getAliasesFromTsConfigForJest(), + '\\.(css|svg|png)$': 'identity-obj-proxy', + 'lodash-es/(.*)': 'lodash/$1', + 'react-use/esm/(.*)': 'react-use/lib/$1', + 'lodash-es': 'lodash', + // ES modules that jest can't handle at the moment. + uuid: '/node_...[truncated]",theatre-js/theatre,theatre-js,12370,450,Motion design editor for the web,['animation' 'devtools' 'generative-art' 'motion-design' 'r3f' 'threejs'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:34.197671,91,1362,48 +github_theatre-js_theatre_f01a67bf38d6a554a57ba8d86c233ceb8296595e,wallaby.conf.js,wallaby.conf.js,,250,JavaScript,"module.exports = () => { + return { + autoDetect: true, + tests: [ + 'theatre/**/*.test.ts', + 'packages/dataverse/**/*.test.ts', + '!**/node_modules/**', + ], + testFramework: { + configFile: './jest.config.js', + }, + } +} +...[truncated]",theatre-js/theatre,theatre-js,12370,450,Motion design editor for the web,['animation' 'devtools' 'generative-art' 'motion-design' 'r3f' 'threejs'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:34.470595,22,250,14 +github_theatre-js_theatre_d618b5ba0edfdec7d95382628f4540c88bd922bc,jest.compat-tests.config.js,jest.compat-tests.config.js,,1126,JavaScript,"/** @type {import('jest').Config} */ +module.exports = { + testMatch: [ + '/compat-tests/fixtures/*/*.compat-test.ts', + '/compat-tests/*.compat-test.ts', + ], + moduleNameMapper: {}, + modulePathIgnorePatterns: ['/compat-tests/verdaccio'], + automock: false, + // transform: { + // '^.+\\.tsx?$': [ + // 'esbuild-jest', + // { + // sourcemap: true, + // }, + // ], + // '^.+\\.js$': [ + // 'esbuild-jest', + // { + // sourcemap: tr...[truncated]",theatre-js/theatre,theatre-js,12370,450,Motion design editor for the web,['animation' 'devtools' 'generative-art' 'motion-design' 'r3f' 'threejs'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:33.941359,125,1126,49 +github_theatre-js_theatre_942da75125a4eede5feafd4133f3c0266fa0a6ab,.eslintrc.js,.eslintrc.js,,2491,JavaScript,"/** + * @remarks + * Notes on plugins we _don't_ use: + * + * ## plugin:react-hooks + * We don't use the react hooks plugin because it disallows valid use-cases + * such as this: + * + * ```ts + * export default function useValToAtom(val: S): Atom { + * const atom = useMemo(() => { + * return new Atom(val) + * }, []) // <-- we don't _need_ to include `val` here, but the lint rule will require it + * + * useLayoutEffect(() => { + * atom.setState(val) + * }, [val]) // <-- we also know `atom` ...[truncated]",theatre-js/theatre,theatre-js,12370,450,Motion design editor for the web,['animation' 'devtools' 'generative-art' 'motion-design' 'r3f' 'threejs'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:21:33.667839,237,2491,99 +github_Chainlit_chainlit_12dd5aa324fe6a024d4c1bd26e1a0f3b7a2a9fa8,lint-staged.config.js,lint-staged.config.js,,948,JavaScript,"module.exports = { + // Prettier: globs only — skip nested `.(cursor|claude)/**` and symlink names (see `.shared/`). + '!(.(cursor|claude))/**': ['pnpm format:files'], + '.(cursor|claude)/!(agents|commands|rules|skills)': ['pnpm format:files'], + + '**/*.{ts,tsx,js,cjs,mjs}': ['pnpm lint:fix'], + + 'frontend/**/*.{ts,tsx}': [() => 'pnpm --filter @chainlit/app type-check'], + + 'libs/react-client/**/*.{ts,tsx}': [ + () => 'pnpm --filter @chainlit/react-client type-check' + ], + + // TODO: Re-enable...[truncated]",Chainlit/chainlit,Chainlit,11984,1696,Build Conversational AI in minutes ⚡️,['chatgpt' 'langchain' 'llm' 'openai' 'openai-chatgpt' 'python' 'ui'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T15:07:37.905187,92,946,28 +github_Chainlit_chainlit_12dd5aa324fe6a024d4c1bd26e1a0f3b7a2a9fa8,lint-staged.config.js,lint-staged.config.js,,948,JavaScript,"module.exports = { + // Prettier: globs only — skip nested `.(cursor|claude)/**` and symlink names (see `.shared/`). + '!(.(cursor|claude))/**': ['pnpm format:files'], + '.(cursor|claude)/!(agents|commands|rules|skills)': ['pnpm format:files'], + + '**/*.{ts,tsx,js,cjs,mjs}': ['pnpm lint:fix'], + + 'frontend/**/*.{ts,tsx}': [() => 'pnpm --filter @chainlit/app type-check'], + + 'libs/react-client/**/*.{ts,tsx}': [ + () => 'pnpm --filter @chainlit/react-client type-check' + ], + + // TODO: Re-enable...[truncated]",Chainlit/chainlit,Chainlit,11961,1694,Build Conversational AI in minutes ⚡️,['chatgpt' 'langchain' 'llm' 'openai' 'openai-chatgpt' 'python' 'ui'],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T22:53:00.448914,92,946,28 +github_robotframework_robotframework_3abcbd94670c03671629f5b54f5fcae1b960f872,src/web/jest.config.js,jest.config.js,,124,JavaScript,"/** @type {import('ts-jest').JestConfigWithTsJest} */ +module.exports = { + preset: ""ts-jest"", + testEnvironment: ""node"", +}; +...[truncated]",robotframework/robotframework,robotframework,11569,2538,Generic automation framework for acceptance testing and RPA,"['attd' 'automation' 'bdd' 'python' 'robotframework' 'rpa' + 'testautomation' 'testing']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T01:42:57.544956,12,124,6 +github_nerfstudio-project_nerfstudio_3b519289bb6fe834b8ed9a6589ab098a399eb37b,.prettierrc.js,.prettierrc.js,,126,JavaScript,"module.exports = { + trailingComma: 'all', + arrowParens: 'always', + singleQuote: true, + jsxSingleQuote: false, + };...[truncated]",nerfstudio-project/nerfstudio,nerfstudio-project,11476,1609,A collaboration friendly studio for NeRFs,"['3d' '3d-graphics' '3d-reconstruction' 'computer-vision' 'deep-learning' + 'gaussian-splatting' 'machine-learning' 'nerf' 'photogrammetry' 'pytorch']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:48:52.702667,12,126,6 +github_nerfstudio-project_nerfstudio_3b519289bb6fe834b8ed9a6589ab098a399eb37b,.prettierrc.js,.prettierrc.js,,126,JavaScript,"module.exports = { + trailingComma: 'all', + arrowParens: 'always', + singleQuote: true, + jsxSingleQuote: false, + };...[truncated]",nerfstudio-project/nerfstudio,nerfstudio-project,11453,1604,A collaboration friendly studio for NeRFs,"['3d' '3d-graphics' '3d-reconstruction' 'computer-vision' 'deep-learning' + 'gaussian-splatting' 'machine-learning' 'nerf' 'photogrammetry' 'pytorch']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:48:30.810737,12,126,6 +github_dotansimha_graphql-code-generator_fa522d8587cbc09a91d99e883cad4c715b45dd34,babel.config.js,babel.config.js,,191,JavaScript,"module.exports = { + presets: [ + ['@babel/preset-env', { targets: { node: process.versions.node.split('.')[0] } }], + ['@babel/preset-typescript', { allowDeclareFields: true }], + ], +}; +...[truncated]",dotansimha/graphql-code-generator,dotansimha,11233,1391,"A tool for generating code based on a GraphQL schema and GraphQL operations (query/mutation/subscription), with flexible support for custom plugins. ","['android' 'angular' 'code-generator' 'codegen' 'csharp' 'graphql' + 'graphql-schema' 'java' 'react' 'resolvers' 'schema' 'the-guild' + 'typescript']",MIT,,,,,0.98,GitHub Public API,2026-04-18T01:27:37.959582,20,191,7 +github_triggerdotdev_jsonhero-web_d5a47621d9bc9e49aad95fc70a9e4276ad10fb24,remix.config.js,remix.config.js,,313,JavaScript,"/** + * @type {import('@remix-run/dev/config').AppConfig} + */ +module.exports = { + appDirectory: ""app"", + assetsBuildDirectory: ""public/build"", + publicPath: ""/build/"", + serverBuildTarget: ""cloudflare-workers"", + serverBuildPath: ""build/index.js"", + devServerBroadcastDelay: 1000, + ignoredRouteFiles: ["".*""], +}; +...[truncated]",triggerdotdev/jsonhero-web,triggerdotdev,10697,663,"JSON Hero is an open-source, beautiful JSON explorer for the web that lets you browse, search and navigate your JSON files at speed. 🚀. Built with 💜 by the Trigger.dev team.","['developer-tools' 'devtools' 'hacktoberfest' 'json' 'json-viewer' 'react' + 'tools' 'typescript' 'viewer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:22:30.869319,23,313,13 +github_triggerdotdev_jsonhero-web_e9897cd69eb37b87c31055e0b43e114be75d2d7a,tailwind.config.js,tailwind.config.js,,1217,JavaScript,"module.exports = { + content: [""./app/**/*.{js,ts,jsx,tsx}""], + darkMode: ""class"", + theme: { + fontSize: { + tiny: "".5rem"", // 8px + xs: "".625rem"", // 10px + sm: "".75rem"", // 12px (SmallBody) + base: "".875rem"", // 14px (Body)

+ lg: ""1rem"", // 16px (SmallTitle)

+ xl: ""1.125rem"", // 18px (Title)

+ ""2xl"": ""1.375rem"", // 22px (LargeTitle)

+ ""3xl"": ""1.5rem"", // 24px + ""4xl"": ""1.875rem"", // 30px + ""5xl"": ""2rem...[truncated]",triggerdotdev/jsonhero-web,triggerdotdev,10697,663,"JSON Hero is an open-source, beautiful JSON explorer for the web that lets you browse, search and navigate your JSON files at speed. 🚀. Built with 💜 by the Trigger.dev team.","['developer-tools' 'devtools' 'hacktoberfest' 'json' 'json-viewer' 'react' + 'tools' 'typescript' 'viewer']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-18T00:22:31.463992,126,1217,40 +github_voxel51_fiftyone_d6824328bcc0ced8765f9fa4eb57f024ebc408be,.prettierrc.js,.prettierrc.js,,370,JavaScript,"module.exports = { + trailingComma: ""es5"", + tabWidth: 2, + semi: true, + useTabs: false, + singleQuote: false, + printWidth: 80, + overrides: [ + { + files: ""*.md"", + options: { + printWidth: 79, + proseWrap: ""always"", + tabWidth: 4, + }, + }, + { + files: ""*.json"", + options: { + tabWidth: 4, + }, + }, + ], +}; +...[truncated]",voxel51/fiftyone,voxel51,10591,742,Refine high-quality datasets and visual AI models,"['active-learning' 'artificial-intelligence' 'computer-vision' + 'data-centric-ai' 'data-cleaning' 'data-curation' 'data-quality' + 'data-science' 'deep-learning' 'developer-tools' 'image-classification' + 'machine-learning' 'object-detection' 'python' 'unstructured-data' + 'vector-search' 'visualization']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:50:26.151400,41,370,25 +github_voxel51_fiftyone_eef66691bfa4f3139b7856bee56d391450db6741,app/typedoc.js,typedoc.js,,384,JavaScript,"const packages = [ + ""plugins"", + ""state"", + ""aggregations"", + ""utilities"", + ""relay"", + ""operators"", + ""spaces"", +]; + +/** + * @type {import('typedoc').TypeDocOptions} + */ +module.exports = { + entryPoints: packages.map((p) => `packages/${p}`), + entryPointStrategy: ""packages"", + exclude: [""**/node_modules/**"", ""**/test/**""], + skipErrorChecking: true, + tsconfig: ""tsconfig.json"", +}; +...[truncated]",voxel51/fiftyone,voxel51,10591,742,Refine high-quality datasets and visual AI models,"['active-learning' 'artificial-intelligence' 'computer-vision' + 'data-centric-ai' 'data-cleaning' 'data-curation' 'data-quality' + 'data-science' 'deep-learning' 'developer-tools' 'image-classification' + 'machine-learning' 'object-detection' 'python' 'unstructured-data' + 'vector-search' 'visualization']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:50:28.276742,34,384,21 +github_voxel51_fiftyone_991c777c05d63add103ddbcb5e656221f5f9bec2,app/gen-docs.js,gen-docs.js,,38086,JavaScript,"const _ = require(""lodash""); +const fs = require(""fs""); +const path = require(""path""); + +const docs = require(""./docs.json""); + +//////// +/// RST +//////// +class RstString { + constructor(value) { + this.value = value; + } + toSource() { + let src = []; + if (this.value !== undefined && this.value !== null) + src = this.value.split(""\n""); + src.push(""""); + return src; + } +} + +const SECTION_CHARS = [""="", ""-"", ""~"", ""^"", '""', ""'"", ""*"", ""+"", ""#"", "".""]; + +class RstSection { + constructor(label,...[truncated]",voxel51/fiftyone,voxel51,10591,742,Refine high-quality datasets and visual AI models,"['active-learning' 'artificial-intelligence' 'computer-vision' + 'data-centric-ai' 'data-cleaning' 'data-curation' 'data-quality' + 'data-science' 'deep-learning' 'developer-tools' 'image-classification' + 'machine-learning' 'object-detection' 'python' 'unstructured-data' + 'vector-search' 'visualization']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:50:27.463651,4124,38086,1644 +github_voxel51_fiftyone_5c746dc77ae4d51e6c1306ae4b58baa88715373a,app/.eslintrc.js,.eslintrc.js,,1564,JavaScript,"/* eslint-disable */ + +module.exports = { + env: { + browser: true, + es6: true, + }, + extends: [ + ""eslint:recommended"", + ""plugin:react/recommended"", + ""plugin:react-hooks/recommended"", + ""plugin:react/jsx-runtime"", + ""plugin:@typescript-eslint/recommended"", + ""prettier"", + ], + globals: { + Atomics: ""readonly"", + SharedArrayBuffer: ""readonly"", + JSX: true, + }, + parser: ""@typescript-eslint/parser"", + parserOptions: { + ecmaVersion: 2021, + sourceType: ""module"", + },...[truncated]",voxel51/fiftyone,voxel51,10591,742,Refine high-quality datasets and visual AI models,"['active-learning' 'artificial-intelligence' 'computer-vision' + 'data-centric-ai' 'data-cleaning' 'data-curation' 'data-quality' + 'data-science' 'deep-learning' 'developer-tools' 'image-classification' + 'machine-learning' 'object-detection' 'python' 'unstructured-data' + 'vector-search' 'visualization']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-22T13:50:26.477132,132,1564,73 +github_voxel51_fiftyone_5c746dc77ae4d51e6c1306ae4b58baa88715373a,app/.eslintrc.js,.eslintrc.js,,1564,JavaScript,"/* eslint-disable */ + +module.exports = { + env: { + browser: true, + es6: true, + }, + extends: [ + ""eslint:recommended"", + ""plugin:react/recommended"", + ""plugin:react-hooks/recommended"", + ""plugin:react/jsx-runtime"", + ""plugin:@typescript-eslint/recommended"", + ""prettier"", + ], + globals: { + Atomics: ""readonly"", + SharedArrayBuffer: ""readonly"", + JSX: true, + }, + parser: ""@typescript-eslint/parser"", + parserOptions: { + ecmaVersion: 2021, + sourceType: ""module"", + },...[truncated]",voxel51/fiftyone,voxel51,10582,740,Refine high-quality datasets and visual AI models,"['active-learning' 'artificial-intelligence' 'computer-vision' + 'data-centric-ai' 'data-cleaning' 'data-curation' 'data-quality' + 'data-science' 'deep-learning' 'developer-tools' 'image-classification' + 'machine-learning' 'object-detection' 'python' 'unstructured-data' + 'vector-search' 'visualization']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:49:02.452137,132,1564,73 +github_voxel51_fiftyone_eef66691bfa4f3139b7856bee56d391450db6741,app/typedoc.js,typedoc.js,,384,JavaScript,"const packages = [ + ""plugins"", + ""state"", + ""aggregations"", + ""utilities"", + ""relay"", + ""operators"", + ""spaces"", +]; + +/** + * @type {import('typedoc').TypeDocOptions} + */ +module.exports = { + entryPoints: packages.map((p) => `packages/${p}`), + entryPointStrategy: ""packages"", + exclude: [""**/node_modules/**"", ""**/test/**""], + skipErrorChecking: true, + tsconfig: ""tsconfig.json"", +}; +...[truncated]",voxel51/fiftyone,voxel51,10582,740,Refine high-quality datasets and visual AI models,"['active-learning' 'artificial-intelligence' 'computer-vision' + 'data-centric-ai' 'data-cleaning' 'data-curation' 'data-quality' + 'data-science' 'deep-learning' 'developer-tools' 'image-classification' + 'machine-learning' 'object-detection' 'python' 'unstructured-data' + 'vector-search' 'visualization']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:49:04.243153,34,384,21 +github_voxel51_fiftyone_991c777c05d63add103ddbcb5e656221f5f9bec2,app/gen-docs.js,gen-docs.js,,38086,JavaScript,"const _ = require(""lodash""); +const fs = require(""fs""); +const path = require(""path""); + +const docs = require(""./docs.json""); + +//////// +/// RST +//////// +class RstString { + constructor(value) { + this.value = value; + } + toSource() { + let src = []; + if (this.value !== undefined && this.value !== null) + src = this.value.split(""\n""); + src.push(""""); + return src; + } +} + +const SECTION_CHARS = [""="", ""-"", ""~"", ""^"", '""', ""'"", ""*"", ""+"", ""#"", "".""]; + +class RstSection { + constructor(label,...[truncated]",voxel51/fiftyone,voxel51,10582,740,Refine high-quality datasets and visual AI models,"['active-learning' 'artificial-intelligence' 'computer-vision' + 'data-centric-ai' 'data-cleaning' 'data-curation' 'data-quality' + 'data-science' 'deep-learning' 'developer-tools' 'image-classification' + 'machine-learning' 'object-detection' 'python' 'unstructured-data' + 'vector-search' 'visualization']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:49:03.481781,4124,38086,1644 +github_voxel51_fiftyone_d6824328bcc0ced8765f9fa4eb57f024ebc408be,.prettierrc.js,.prettierrc.js,,370,JavaScript,"module.exports = { + trailingComma: ""es5"", + tabWidth: 2, + semi: true, + useTabs: false, + singleQuote: false, + printWidth: 80, + overrides: [ + { + files: ""*.md"", + options: { + printWidth: 79, + proseWrap: ""always"", + tabWidth: 4, + }, + }, + { + files: ""*.json"", + options: { + tabWidth: 4, + }, + }, + ], +}; +...[truncated]",voxel51/fiftyone,voxel51,10582,740,Refine high-quality datasets and visual AI models,"['active-learning' 'artificial-intelligence' 'computer-vision' + 'data-centric-ai' 'data-cleaning' 'data-curation' 'data-quality' + 'data-science' 'deep-learning' 'developer-tools' 'image-classification' + 'machine-learning' 'object-detection' 'python' 'unstructured-data' + 'vector-search' 'visualization']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T06:49:02.155878,41,370,25 +github_hatoo_oha_2d8219d2707dce4daf32889c30396a828f7bbf58,pgo.js,pgo.js,,485,JavaScript,"import { $ } from ""bun""; + +let additional = []; + +if (Bun.argv.length >= 3) { + additional = Bun.argv.slice(2); +} + +let server = null; + +try { + server = Bun.spawn(['cargo', 'run', '--release', '--manifest-path', 'pgo/server/Cargo.toml']); + await $`cargo pgo run -- --profile pgo ${additional} -- -z 3m -c 900 --no-tui http://localhost:8888`; + await $`cargo pgo optimize build -- --profile pgo ${additional}` +} finally { + if (server !== null) { + server.kill(); + } +} +...[truncated]",hatoo/oha,hatoo,10193,288,"Ohayou(おはよう), HTTP load generator, inspired by rakyll/hey with tui animation.","['benchmark' 'cli' 'command-line' 'http' 'http2' 'load-generator' + 'load-testing' 'rust' 'tui']",MIT,,,,,0.98,GitHub Public API,2026-04-17T14:24:54.502472,67,485,20 +github_frappe_frappe_0fc5a37189e4e49ac64a1bb850669d1e3f100d5a,node_utils.js,node_utils.js,,2047,JavaScript,"const fs = require(""fs""); +const path = require(""path""); +const redis = require(""@redis/client""); +let bench_path; +if (process.env.FRAPPE_BENCH_ROOT) { + bench_path = process.env.FRAPPE_BENCH_ROOT; +} else { + bench_path = path.resolve(__dirname, "".."", ""..""); +} + +const dns = require(""dns""); + +// Since node17, node resolves to ipv6 unless system is configured otherwise. +// In Frappe context using ipv4 - 127.0.0.1 is fine. +dns.setDefaultResultOrder(""ipv4first""); + +function get_conf() { + // defaults + var co...[truncated]",frappe/frappe,frappe,9945,4834,"Low code web framework for real world applications, in Python and Javascript","['cms' 'email' 'erpnext' 'frappe' 'full-stack' 'javascript' 'low-code' + 'mariadb' 'multitenant' 'postgres' 'python' 'rest-api' 'security' + 'socket-io' 'web-framework' 'webhooks']",MIT,,,,,0.98,GitHub Public API,2026-04-18T00:35:56.302766,219,2047,80 +github_frappe_frappe_ca2b0df6735ae0efb7b97d4794dd179c23a83e4b,generate_bootstrap_theme.js,generate_bootstrap_theme.js,,568,JavaScript,"const sass = require(""sass""); +const fs = require(""fs""); +const sass_options = require(""./esbuild/sass_options""); +let output_path = process.argv[2]; +let scss_content = process.argv[3]; +scss_content = scss_content.replace(/\\n/g, ""\n""); + +sass.render( + { + data: scss_content, + outputStyle: ""compressed"", + ...sass_options, + }, + function (err, result) { + if (err) { + console.error(err.formatted); + return; + } + + fs.writeFile(output_path, result.css, function (err) { + if (!err) { + console.log...[truncated]",frappe/frappe,frappe,9945,4834,"Low code web framework for real world applications, in Python and Javascript","['cms' 'email' 'erpnext' 'frappe' 'full-stack' 'javascript' 'low-code' + 'mariadb' 'multitenant' 'postgres' 'python' 'rest-api' 'security' + 'socket-io' 'web-framework' 'webhooks']",MIT,,,,,0.98,GitHub Public API,2026-04-18T00:35:56.026328,59,568,29 +github_frappe_frappe_d8c24119f764786cef1833725411cd3e3833af8a,cypress.config.js,cypress.config.js,,1656,JavaScript,"const { defineConfig } = require(""cypress""); +const fs = require(""fs""); +const path = require(""path""); +const cypressSplit = require(""cypress-split""); + +module.exports = defineConfig({ + projectId: ""92odwv"", + adminPassword: ""admin"", + testUser: ""frappe@example.com"", + defaultCommandTimeout: 20000, + pageLoadTimeout: 15000, + video: true, + videosFolder: path.resolve(__dirname, "".."", "".."") + ""/cypressVideos/"", + viewportHeight: 960, + viewportWidth: 1400, + retries: { + runMode: 1, + openMode: 1, + }, + e2e: { +...[truncated]",frappe/frappe,frappe,9945,4834,"Low code web framework for real world applications, in Python and Javascript","['cms' 'email' 'erpnext' 'frappe' 'full-stack' 'javascript' 'low-code' + 'mariadb' 'multitenant' 'postgres' 'python' 'rest-api' 'security' + 'socket-io' 'web-framework' 'webhooks']",MIT,,,,,0.98,GitHub Public API,2026-04-18T00:35:55.744695,155,1656,54 +github_frappe_frappe_0c582f542f49766a85f2e798b19ecbdf17decec3,commitlint.config.js,commitlint.config.js,,435,JavaScript,"module.exports = { + parserPreset: ""conventional-changelog-conventionalcommits"", + rules: { + ""subject-empty"": [2, ""never""], + ""type-case"": [2, ""always"", ""lower-case""], + ""type-empty"": [2, ""never""], + ""type-enum"": [ + 2, + ""always"", + [ + ""build"", + ""chore"", + ""ci"", + ""docs"", + ""feat"", + ""fix"", + ""perf"", + ""refactor"", + ""revert"", + ""style"", + ""test"", + ""deprecate"", // deprecation decision + ], + ], + }, +}; +...[truncated]",frappe/frappe,frappe,9945,4834,"Low code web framework for real world applications, in Python and Javascript","['cms' 'email' 'erpnext' 'frappe' 'full-stack' 'javascript' 'low-code' + 'mariadb' 'multitenant' 'postgres' 'python' 'rest-api' 'security' + 'socket-io' 'web-framework' 'webhooks']",MIT,,,,,0.98,GitHub Public API,2026-04-18T00:35:55.476208,41,435,27 +github_keystonejs_keystone_30fa1dcc0890ec4c9d36648c15b46783c9d5a922,babel.config.js,babel.config.js,,467,JavaScript,"module.exports = { + presets: [ + [ + '@babel/preset-env', + { + targets: { + node: 10, + browsers: [ + 'last 2 chrome versions', + 'last 2 firefox versions', + 'last 2 safari versions', + 'last 2 edge versions', + ], + }, + }, + ], + ['@babel/preset-react', { runtime: 'automatic' }], + '@babel/preset-typescript', + ], + plugins: ['@babel/plugin-transform-runtime'], +} +...[truncated]",keystonejs/keystone,keystonejs,9861,1248,The superpowered headless CMS for Node.js — built with GraphQL and React,['cms' 'cms-framework' 'graphql' 'keystonejs' 'nodejs' 'react'],MIT,,,,,0.98,GitHub Public API,2026-04-18T01:28:10.944039,44,467,22 +github_BloopAI_bloop_6dc55e08b6fba614f11158fd7422bd11069f24b1,playwright.config.js,playwright.config.js,,2205,JavaScript,"// @ts-check +const { devices } = require('@playwright/test'); +const dotenv = require('dotenv'); +dotenv.config({ path: './tests/.env' }); +/** + * Read environment variables from file. + * https://github.com/motdotla/dotenv + */ + +/** + * @see https://playwright.dev/docs/test-configuration + * @type {import('@playwright/test').PlaywrightTestConfig} + */ +const config = { + testDir: './tests', + /* Maximum time one test can run for. */ + timeout: 120 * 1000, + expect: { + /** + * Maximum time expect()...[truncated]",BloopAI/bloop,BloopAI,9509,602,bloop is a fast code search engine written in Rust.,[],Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T14:27:50.389283,292,2205,77 +github_ritz078_transform_7900a6a64ef8156cf909852f876d45665af4bf09,next.config.js,next.config.js,,1073,JavaScript,"const webpack = require(""webpack""); + +const config = { + webpack(config, options) { + config.node = { + fs: ""empty"", + module: ""empty"", + net: ""mock"", + tls: ""mock"" + }; + + config.plugins.push( + new webpack.DefinePlugin({ + ""process.env.DEV"": JSON.stringify(options.dev), + IN_BROWSER: !options.isServer, + IS_DEV: options.dev + }) + ); + + config.module.rules.unshift({ + test: /\.worker\.ts/, + use: { + loader: ""worker-loader"", + ...[truncated]",ritz078/transform,ritz078,9140,702,A polyglot web converter.,"['css' 'flow' 'golang' 'graphql' 'jsx' 'react' 'react-native' 'rust' + 'transformations' 'typescript']",MIT,,,,,0.98,GitHub Public API,2026-04-18T01:28:30.296292,89,1073,47 +github_nhost_nhost_6fafe97626a0de022517ddcc50b7a6b3478d1b21,.prettierrc.js,.prettierrc.js,,641,JavaScript,"module.exports = { + $schema: 'http://json.schemastore.org/prettierrc', + arrowParens: 'always', + bracketSameLine: false, + bracketSpacing: true, + endOfLine: 'lf', + printWidth: 100, + proseWrap: 'preserve', + semi: false, + singleQuote: true, + tabWidth: 2, + trailingComma: 'none', + useTabs: false, + // TODO: add import sort configuration to match ESLint rules + // plugins: ['./node_modules/@trivago/prettier-plugin-sort-imports'], + // importOrderSeparation: true, + // importOrderSortSpecifi...[truncated]",nhost/nhost,nhost,9128,567,The Open Source Firebase Alternative with GraphQL.,"['authentication' 'backend' 'backend-as-a-service' 'database' 'firebase' + 'flutter' 'graphql' 'graphql-api' 'hasura' 'javascript' 'nextjs' 'nhost' + 'postgres' 'react' 'serverless' 'serverless-functions' 'storage' + 'typescript' 'vue']",MIT,,,,,0.98,GitHub Public API,2026-04-18T01:28:47.549963,62,641,28 +github_iib0011_omni-tools_422b19445bd83d06acea0d73d2a05410b7b94b44,commitlint.config.js,commitlint.config.js,,67,JavaScript,"module.exports = { extends: ['@commitlint/config-conventional'] }; +...[truncated]",iib0011/omni-tools,iib0011,9110,600,"Self-hosted collection of powerful web-based tools for everyday tasks. No ads, no tracking, just fast, accessible utilities right from your browser!","['alternative' 'converter' 'data-manipulation' 'developer-tools' + 'devtools' 'frontend' 'good-first-issue' 'image-manipulation' + 'image-processing' 'javascript' 'pdf-manipulation' 'productivity' 'react' + 'self-hosted' 'swissarmyknife' 'tools' 'typescript' 'video-manipulation' + 'webapp' 'website']",MIT,,,,,0.98,GitHub Public API,2026-04-18T00:23:09.550968,6,67,2 +github_coaidev_coai_98a633c2652da92014c274d6c5756d89590c9e1f,app/public/service.js,service.js,,532,JavaScript," +const SERVICE_NAME = ""coai""; + +self.addEventListener('activate', function (event) { + console.debug(""[service] service worker activated""); +}); + +self.addEventListener('install', function (event) { + event.waitUntil( + caches.open(SERVICE_NAME) + .then(function (cache) { + return cache.addAll([]); + }) + ); +}); + +self.addEventListener('fetch', function (event) { + event.respondWith( + caches.match(event.request) + .then(function (response) { + return response || fetch(ev...[truncated]",coaidev/coai,coaidev,9081,1202,"🚀 Next Generation Multi-tenant AI One-Stop Solution. Builtin Admin & Billing System. Enterprise-Grade Unified LLM Gateway Support for 200+ Models And 35+ Providers, Load Balacing w/ Priority-base Routing, Cost Management, Chat Share, Cloud Sync, Credit/Subscription Billing, All File Parsing, Web Search, Built-in Model Cache.","['ai-gateway' 'api' 'chat' 'chatgpt' 'cross-platform' 'gemini' 'golang' + 'llm-gateway' 'openai' 'proxy' 'react']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T17:57:17.373804,43,532,25 +github_coaidev_coai_9d94d1bbcb6dfc905c6d1c8e424a53c88245cc29,app/public/workbox.js,workbox.js,,379,JavaScript," +if ('serviceWorker' in navigator) { + window.addEventListener('load', function () { + navigator.serviceWorker.register('/service.js').then(function (registration) { + console.debug(`[service] service worker registered with scope: ${registration.scope}`); + }, function (err) { + console.debug(`[service] service worker registration failed: ${err}`); + }); + }); +} +...[truncated]",coaidev/coai,coaidev,9081,1202,"🚀 Next Generation Multi-tenant AI One-Stop Solution. Builtin Admin & Billing System. Enterprise-Grade Unified LLM Gateway Support for 200+ Models And 35+ Providers, Load Balacing w/ Priority-base Routing, Cost Management, Chat Share, Cloud Sync, Credit/Subscription Billing, All File Parsing, Web Search, Built-in Model Cache.","['ai-gateway' 'api' 'chat' 'chatgpt' 'cross-platform' 'gemini' 'golang' + 'llm-gateway' 'openai' 'proxy' 'react']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T17:57:17.659440,32,379,11 +github_coaidev_coai_bf16059b1387ada81ff45faff1979b9c5803dd27,app/tailwind.config.js,tailwind.config.js,,7950,JavaScript,"/** @type {import('tailwindcss').Config} */ +import colors from 'tailwindcss/colors'; + +module.exports = { + darkMode: [""class""], + content: [ + './pages/**/*.{ts,tsx}', + './components/**/*.{ts,tsx}', + './app/**/*.{ts,tsx}', + './src/**/*.{ts,tsx}', + ""./node_modules/@tremor/**/*.{js,ts,jsx,tsx}"", + ], + theme: { + transparent: 'transparent', + current: 'currentColor', + container: { + center: true, + padding: ""2rem"", + screens: { + ""2xl"": ""1400px"", + }, + ...[truncated]",coaidev/coai,coaidev,9081,1202,"🚀 Next Generation Multi-tenant AI One-Stop Solution. Builtin Admin & Billing System. Enterprise-Grade Unified LLM Gateway Support for 200+ Models And 35+ Providers, Load Balacing w/ Priority-base Routing, Cost Management, Chat Share, Cloud Sync, Credit/Subscription Billing, All File Parsing, Web Search, Built-in Model Cache.","['ai-gateway' 'api' 'chat' 'chatgpt' 'cross-platform' 'gemini' 'golang' + 'llm-gateway' 'openai' 'proxy' 'react']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T17:57:19.275589,532,7950,247 +github_coaidev_coai_2e7af2b7f1a6f391da1631d93968a9d487ba977d,app/postcss.config.js,postcss.config.js,,80,JavaScript,"export default { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} +...[truncated]",coaidev/coai,coaidev,9081,1202,"🚀 Next Generation Multi-tenant AI One-Stop Solution. Builtin Admin & Billing System. Enterprise-Grade Unified LLM Gateway Support for 200+ Models And 35+ Providers, Load Balacing w/ Priority-base Routing, Cost Management, Chat Share, Cloud Sync, Credit/Subscription Billing, All File Parsing, Web Search, Built-in Model Cache.","['ai-gateway' 'api' 'chat' 'chatgpt' 'cross-platform' 'gemini' 'golang' + 'llm-gateway' 'openai' 'proxy' 'react']",Apache-2.0,,,,,0.98,GitHub Public API,2026-04-17T17:57:17.044251,11,80,7 +github_apex_up_6b675f6b74061b50e9eb09c44139dfbb2e688ec1,internal/shim/index.js,index.js,,3609,JavaScript,"const child = require('child_process'); + +/** + * Debug env var. + */ + +const debug = process.env.DEBUG_SHIM; + +/** + * A map of string(id) to callback function, used for when + * many concurrent requests are outstanding. + */ + +const callbacks = new Map(); + +/** + * The last id attached to a request / callback pair + */ + +let lastId = (Date.now() / 1000) | 0; + +/** + * nextId generates ids which will only be repeated every 2^52 times being generated + */ + +function nextId(){ + // Prevent bugs where integer prec...[truncated]",apex/up,apex,8809,389,"Deploy infinitely scalable serverless apps, apis, and sites in seconds to AWS.","['api' 'api-gateway' 'aws' 'aws-infrastructure' 'aws-lambda' 'deploy-tool' + 'deployment' 'golang' 'graphql' 'heroku' 'http' 'lambda' 'microservice' + 'microservices' 'nodejs' 'serverless' 'static' 'up']",MIT,,,,,0.98,GitHub Public API,2026-04-18T00:52:17.212439,522,3609,159 +github_howtographql_howtographql_b7c441c7c7b5261c8efb5358c9fc07a9dc9b8c4f,algoliasync.js,algoliasync.js,,1168,JavaScript,"const {request} = require('graphql-request') +const algoliasearch = require('algoliasearch') +// +// const query = `{ +// allMarkdownRemark { +// edges { +// node { +// frontmatter { +// title +// } +// fields { +// slug +// } +// excerpt(pruneLength: 1000) +// } +// } +// } +// }` +// +// request('http://localhost:8000/___graphql', query) +// .then(data => { +// }) + +module.exports = { + syncToAlgolia: function syncToAlgolia(data)...[truncated]",howtographql/howtographql,howtographql,8728,1137,The Fullstack Tutorial for GraphQL,['apollographql' 'graphql' 'prisma' 'tutorial'],MIT,,,,,0.98,GitHub Public API,2026-04-18T01:29:17.975282,123,1168,48 +github_howtographql_howtographql_a2c591fa27b51b47edccc7f29c16b119b825b561,gatsby-browser.js,gatsby-browser.js,,1221,JavaScript,"// import React from 'react' +// import {Provider} from 'react-redux' +// import createStore from './src/createStore' +// +// const store = createStore() +// +// exports.wrapRootComponent = function wrapRootComponent({Root}) { +// return function wrapRootComponentComponent(props) { +// return ( +// +// +// +// ) +// } +// } +// +// +// +// +// +// +// +// + +import React from 'react' +import { BrowserRouter as Router } from 'react-router-dom' +...[truncated]",howtographql/howtographql,howtographql,8728,1137,The Fullstack Tutorial for GraphQL,['apollographql' 'graphql' 'prisma' 'tutorial'],MIT,,,,,0.98,GitHub Public API,2026-04-18T01:29:18.264328,154,1221,56 +github_howtographql_howtographql_e157885bf5b831d9ddec66dbb65ab19fccbc69b1,src/html.js,html.js,,2369,JavaScript,"import React from ""react"" + +let stylesStr +if (process.env.NODE_ENV === `production`) { + try { + stylesStr = require(`!raw-loader!../public/styles.css`) + } catch (e) { + console.log(e) + } +} + +module.exports = class Html extends React.Component { + render() { + let css + if (process.env.NODE_ENV === `production`) { + css = ( +