kash-shell 0.3.17__tar.gz → 0.3.18__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (311) hide show
  1. {kash_shell-0.3.17 → kash_shell-0.3.18}/.copier-answers.yml +1 -1
  2. kash_shell-0.3.18/.cursor/rules/general.mdc +67 -0
  3. kash_shell-0.3.18/.cursor/rules/python.mdc +230 -0
  4. {kash_shell-0.3.17 → kash_shell-0.3.18}/.github/workflows/ci.yml +1 -1
  5. {kash_shell-0.3.17 → kash_shell-0.3.18}/.github/workflows/publish.yml +1 -1
  6. {kash_shell-0.3.17 → kash_shell-0.3.18}/.gitignore +4 -0
  7. kash_shell-0.3.18/Makefile +46 -0
  8. {kash_shell-0.3.17 → kash_shell-0.3.18}/PKG-INFO +75 -72
  9. {kash_shell-0.3.17 → kash_shell-0.3.18}/README.md +74 -72
  10. {kash_shell-0.3.17 → kash_shell-0.3.18}/devtools/lint.py +5 -2
  11. {kash_shell-0.3.17 → kash_shell-0.3.18}/pyproject.toml +3 -1
  12. kash_shell-0.3.18/src/kash/actions/core/minify_html.py +41 -0
  13. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/commands/base/show_command.py +11 -1
  14. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/config/colors.py +6 -2
  15. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/docs/markdown/topics/a1_what_is_kash.md +52 -23
  16. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/docs/markdown/topics/a2_installation.md +17 -30
  17. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/docs/markdown/topics/a3_getting_started.md +5 -19
  18. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/exec/action_exec.py +1 -1
  19. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/exec/fetch_url_metadata.py +9 -0
  20. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/exec/precondition_registry.py +3 -3
  21. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/file_storage/file_store.py +18 -1
  22. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/llm_utils/llm_features.py +5 -1
  23. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/llm_utils/llms.py +18 -8
  24. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/media_base/media_cache.py +48 -24
  25. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/media_base/media_services.py +63 -14
  26. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/media_base/services/local_file_media.py +9 -1
  27. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/model/items_model.py +4 -5
  28. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/model/media_model.py +9 -1
  29. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/model/params_model.py +9 -3
  30. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/common/function_inspect.py +97 -1
  31. kash_shell-0.3.18/src/kash/utils/common/testing.py +58 -0
  32. kash_shell-0.3.18/src/kash/utils/common/url_slice.py +329 -0
  33. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/file_utils/file_formats.py +1 -1
  34. kash_shell-0.3.18/src/kash/utils/text_handling/markdown_utils.py +712 -0
  35. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/web_gen/templates/base_styles.css.jinja +137 -15
  36. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/web_gen/templates/base_webpage.html.jinja +13 -17
  37. kash_shell-0.3.18/src/kash/web_gen/templates/components/toc_scripts.js.jinja +319 -0
  38. kash_shell-0.3.18/src/kash/web_gen/templates/components/toc_styles.css.jinja +284 -0
  39. kash_shell-0.3.18/src/kash/web_gen/templates/components/tooltip_scripts.js.jinja +730 -0
  40. kash_shell-0.3.18/src/kash/web_gen/templates/components/tooltip_styles.css.jinja +482 -0
  41. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/web_gen/templates/content_styles.css.jinja +13 -8
  42. kash_shell-0.3.18/src/kash/web_gen/templates/simple_webpage.html.jinja +86 -0
  43. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/workspaces/workspaces.py +10 -1
  44. {kash_shell-0.3.17 → kash_shell-0.3.18}/uv.lock +538 -509
  45. kash_shell-0.3.17/Makefile +0 -35
  46. kash_shell-0.3.17/src/kash/utils/text_handling/markdown_utils.py +0 -304
  47. kash_shell-0.3.17/src/kash/web_gen/templates/simple_webpage.html.jinja +0 -552
  48. {kash_shell-0.3.17 → kash_shell-0.3.18}/.env.template +0 -0
  49. {kash_shell-0.3.17 → kash_shell-0.3.18}/LICENSE +0 -0
  50. {kash_shell-0.3.17 → kash_shell-0.3.18}/development.md +0 -0
  51. {kash_shell-0.3.17 → kash_shell-0.3.18}/devtools/generate_readme.xsh +0 -0
  52. {kash_shell-0.3.17 → kash_shell-0.3.18}/devtools/profile_main.py +0 -0
  53. {kash_shell-0.3.17 → kash_shell-0.3.18}/installation.md +0 -0
  54. {kash_shell-0.3.17 → kash_shell-0.3.18}/publishing.md +0 -0
  55. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/__init__.py +0 -0
  56. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/__main__.py +0 -0
  57. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/actions/__init__.py +0 -0
  58. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/actions/core/assistant_chat.py +0 -0
  59. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/actions/core/chat.py +0 -0
  60. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/actions/core/format_markdown_template.py +0 -0
  61. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/actions/core/markdownify.py +0 -0
  62. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/actions/core/readability.py +0 -0
  63. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/actions/core/render_as_html.py +0 -0
  64. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/actions/core/show_webpage.py +0 -0
  65. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/actions/core/strip_html.py +0 -0
  66. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/actions/core/summarize_as_bullets.py +0 -0
  67. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/actions/core/tabbed_webpage_config.py +0 -0
  68. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/actions/core/tabbed_webpage_generate.py +0 -0
  69. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/actions/meta/write_instructions.py +0 -0
  70. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/actions/meta/write_new_action.py +0 -0
  71. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/commands/__init__.py +0 -0
  72. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/commands/base/basic_file_commands.py +0 -0
  73. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/commands/base/browser_commands.py +0 -0
  74. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/commands/base/debug_commands.py +0 -0
  75. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/commands/base/diff_commands.py +0 -0
  76. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/commands/base/files_command.py +0 -0
  77. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/commands/base/general_commands.py +0 -0
  78. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/commands/base/logs_commands.py +0 -0
  79. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/commands/base/model_commands.py +0 -0
  80. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/commands/base/reformat_command.py +0 -0
  81. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/commands/base/search_command.py +0 -0
  82. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/commands/extras/parse_uv_lock.py +0 -0
  83. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/commands/extras/utils_commands.py +0 -0
  84. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/commands/help/assistant_commands.py +0 -0
  85. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/commands/help/doc_commands.py +0 -0
  86. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/commands/help/help_commands.py +0 -0
  87. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/commands/help/logo.py +0 -0
  88. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/commands/help/welcome.py +0 -0
  89. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/commands/workspace/selection_commands.py +0 -0
  90. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/commands/workspace/workspace_commands.py +0 -0
  91. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/config/__init__.py +0 -0
  92. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/config/capture_output.py +0 -0
  93. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/config/env_settings.py +0 -0
  94. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/config/init.py +0 -0
  95. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/config/lazy_imports.py +0 -0
  96. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/config/logger.py +0 -0
  97. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/config/logger_basic.py +0 -0
  98. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/config/logo.txt +0 -0
  99. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/config/server_config.py +0 -0
  100. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/config/settings.py +0 -0
  101. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/config/setup.py +0 -0
  102. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/config/suppress_warnings.py +0 -0
  103. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/config/text_styles.py +0 -0
  104. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/docs/__init__.py +0 -0
  105. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/docs/all_docs.py +0 -0
  106. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/docs/load_actions_info.py +0 -0
  107. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/docs/load_api_docs.py +0 -0
  108. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/docs/load_help_topics.py +0 -0
  109. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/docs/load_source_code.py +0 -0
  110. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/docs/markdown/api_docs_template.md +0 -0
  111. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/docs/markdown/assistant_instructions_template.md +0 -0
  112. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/docs/markdown/readme_template.md +0 -0
  113. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/docs/markdown/topics/a4_elements.md +0 -0
  114. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/docs/markdown/topics/a5_tips_for_use_with_other_tools.md +0 -0
  115. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/docs/markdown/topics/b0_philosophy_of_kash.md +0 -0
  116. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/docs/markdown/topics/b1_kash_overview.md +0 -0
  117. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/docs/markdown/topics/b2_workspace_and_file_formats.md +0 -0
  118. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/docs/markdown/topics/b3_modern_shell_tool_recommendations.md +0 -0
  119. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/docs/markdown/topics/b4_faq.md +0 -0
  120. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/docs/markdown/warning.md +0 -0
  121. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/docs/markdown/welcome.md +0 -0
  122. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/docs_base/docs_base.py +0 -0
  123. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/docs_base/load_custom_command_info.py +0 -0
  124. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/docs_base/load_faqs.py +0 -0
  125. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/docs_base/load_recipe_snippets.py +0 -0
  126. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/docs_base/recipes/general_system_commands.sh +0 -0
  127. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/docs_base/recipes/python_dev_commands.sh +0 -0
  128. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/docs_base/recipes/tldr_standard_commands.sh +0 -0
  129. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/embeddings/cosine.py +0 -0
  130. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/embeddings/embeddings.py +0 -0
  131. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/embeddings/text_similarity.py +0 -0
  132. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/exec/__init__.py +0 -0
  133. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/exec/action_decorators.py +0 -0
  134. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/exec/action_registry.py +0 -0
  135. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/exec/combiners.py +0 -0
  136. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/exec/command_exec.py +0 -0
  137. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/exec/command_registry.py +0 -0
  138. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/exec/history.py +0 -0
  139. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/exec/importing.py +0 -0
  140. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/exec/llm_transforms.py +0 -0
  141. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/exec/precondition_checks.py +0 -0
  142. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/exec/preconditions.py +0 -0
  143. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/exec/resolve_args.py +0 -0
  144. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/exec/runtime_settings.py +0 -0
  145. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/exec/shell_callable_action.py +0 -0
  146. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/exec_model/__init__.py +0 -0
  147. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/exec_model/args_model.py +0 -0
  148. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/exec_model/commands_model.py +0 -0
  149. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/exec_model/script_model.py +0 -0
  150. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/exec_model/shell_model.py +0 -0
  151. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/file_storage/__init__.py +0 -0
  152. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/file_storage/item_file_format.py +0 -0
  153. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/file_storage/metadata_dirs.py +0 -0
  154. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/file_storage/persisted_yaml.py +0 -0
  155. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/file_storage/store_cache_warmer.py +0 -0
  156. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/file_storage/store_filenames.py +0 -0
  157. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/help/__init__.py +0 -0
  158. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/help/assistant.py +0 -0
  159. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/help/assistant_instructions.py +0 -0
  160. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/help/assistant_output.py +0 -0
  161. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/help/docstring_utils.py +0 -0
  162. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/help/function_param_info.py +0 -0
  163. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/help/help_embeddings.py +0 -0
  164. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/help/help_lookups.py +0 -0
  165. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/help/help_pages.py +0 -0
  166. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/help/help_printing.py +0 -0
  167. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/help/help_types.py +0 -0
  168. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/help/recommended_commands.py +0 -0
  169. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/help/tldr_help.py +0 -0
  170. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/llm_utils/__init__.py +0 -0
  171. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/llm_utils/clean_headings.py +0 -0
  172. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/llm_utils/custom_sliding_transforms.py +0 -0
  173. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/llm_utils/fuzzy_parsing.py +0 -0
  174. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/llm_utils/init_litellm.py +0 -0
  175. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/llm_utils/llm_api_keys.py +0 -0
  176. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/llm_utils/llm_completion.py +0 -0
  177. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/llm_utils/llm_messages.py +0 -0
  178. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/llm_utils/llm_names.py +0 -0
  179. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/local_server/__init__.py +0 -0
  180. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/local_server/local_server.py +0 -0
  181. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/local_server/local_server_commands.py +0 -0
  182. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/local_server/local_server_routes.py +0 -0
  183. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/local_server/local_url_formatters.py +0 -0
  184. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/local_server/port_tools.py +0 -0
  185. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/local_server/rich_html_template.py +0 -0
  186. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/mcp/__init__.py +0 -0
  187. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/mcp/mcp_cli.py +0 -0
  188. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/mcp/mcp_main.py +0 -0
  189. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/mcp/mcp_server_commands.py +0 -0
  190. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/mcp/mcp_server_routes.py +0 -0
  191. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/mcp/mcp_server_sse.py +0 -0
  192. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/mcp/mcp_server_stdio.py +0 -0
  193. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/media_base/__init__.py +0 -0
  194. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/media_base/audio_processing.py +0 -0
  195. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/media_base/media_tools.py +0 -0
  196. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/media_base/timestamp_citations.py +0 -0
  197. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/media_base/transcription_deepgram.py +0 -0
  198. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/media_base/transcription_format.py +0 -0
  199. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/media_base/transcription_whisper.py +0 -0
  200. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/model/__init__.py +0 -0
  201. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/model/actions_model.py +0 -0
  202. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/model/assistant_response_model.py +0 -0
  203. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/model/compound_actions_model.py +0 -0
  204. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/model/concept_model.py +0 -0
  205. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/model/exec_model.py +0 -0
  206. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/model/graph_model.py +0 -0
  207. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/model/language_list.py +0 -0
  208. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/model/llm_actions_model.py +0 -0
  209. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/model/operations_model.py +0 -0
  210. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/model/paths_model.py +0 -0
  211. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/model/preconditions_model.py +0 -0
  212. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/shell/__init__.py +0 -0
  213. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/shell/completions/completion_scoring.py +0 -0
  214. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/shell/completions/completion_types.py +0 -0
  215. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/shell/completions/shell_completions.py +0 -0
  216. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/shell/file_icons/color_for_format.py +0 -0
  217. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/shell/file_icons/nerd_icons.py +0 -0
  218. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/shell/input/__init__.py +0 -0
  219. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/shell/input/input_prompts.py +0 -0
  220. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/shell/input/inquirer_settings.py +0 -0
  221. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/shell/input/param_inputs.py +0 -0
  222. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/shell/input/shell_confirm.py +0 -0
  223. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/shell/output/__init__.py +0 -0
  224. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/shell/output/kerm_code_utils.py +0 -0
  225. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/shell/output/kerm_codes.py +0 -0
  226. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/shell/output/kmarkdown.py +0 -0
  227. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/shell/output/shell_formatting.py +0 -0
  228. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/shell/output/shell_output.py +0 -0
  229. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/shell/shell_main.py +0 -0
  230. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/shell/ui/__init__.py +0 -0
  231. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/shell/ui/shell_results.py +0 -0
  232. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/shell/ui/shell_syntax.py +0 -0
  233. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/shell/utils/exception_printing.py +0 -0
  234. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/shell/utils/native_utils.py +0 -0
  235. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/shell/utils/shell_function_wrapper.py +0 -0
  236. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/shell/version.py +0 -0
  237. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/__init__.py +0 -0
  238. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/common/__init__.py +0 -0
  239. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/common/format_utils.py +0 -0
  240. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/common/import_utils.py +0 -0
  241. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/common/lazyobject.py +0 -0
  242. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/common/obj_replace.py +0 -0
  243. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/common/parse_key_vals.py +0 -0
  244. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/common/parse_shell_args.py +0 -0
  245. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/common/stack_traces.py +0 -0
  246. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/common/task_stack.py +0 -0
  247. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/common/type_utils.py +0 -0
  248. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/common/uniquifier.py +0 -0
  249. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/common/url.py +0 -0
  250. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/errors.py +0 -0
  251. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/file_formats/chat_format.py +0 -0
  252. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/file_utils/__init__.py +0 -0
  253. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/file_utils/dir_info.py +0 -0
  254. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/file_utils/file_ext.py +0 -0
  255. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/file_utils/file_formats_model.py +0 -0
  256. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/file_utils/file_sort_filter.py +0 -0
  257. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/file_utils/file_walk.py +0 -0
  258. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/file_utils/filename_parsing.py +0 -0
  259. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/file_utils/ignore_files.py +0 -0
  260. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/file_utils/mtime_cache.py +0 -0
  261. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/file_utils/path_utils.py +0 -0
  262. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/lang_utils/__init__.py +0 -0
  263. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/lang_utils/capitalization.py +0 -0
  264. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/rich_custom/__init__.py +0 -0
  265. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/rich_custom/ansi_cell_len.py +0 -0
  266. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/rich_custom/rich_char_transform.py +0 -0
  267. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/rich_custom/rich_indent.py +0 -0
  268. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/rich_custom/rich_markdown_fork.py +0 -0
  269. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/text_handling/doc_normalization.py +0 -0
  270. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/text_handling/escape_html_tags.py +0 -0
  271. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/text_handling/markdown_render.py +0 -0
  272. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/text_handling/markdownify_utils.py +0 -0
  273. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/utils/text_handling/unified_diffs.py +0 -0
  274. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/web_content/canon_url.py +0 -0
  275. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/web_content/dir_store.py +0 -0
  276. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/web_content/file_cache_utils.py +0 -0
  277. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/web_content/file_processing.py +0 -0
  278. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/web_content/local_file_cache.py +0 -0
  279. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/web_content/web_extract.py +0 -0
  280. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/web_content/web_extract_justext.py +0 -0
  281. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/web_content/web_extract_readabilipy.py +0 -0
  282. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/web_content/web_fetch.py +0 -0
  283. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/web_content/web_page_model.py +0 -0
  284. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/web_gen/__init__.py +0 -0
  285. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/web_gen/simple_webpage.py +0 -0
  286. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/web_gen/tabbed_webpage.py +0 -0
  287. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/web_gen/template_render.py +0 -0
  288. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/web_gen/templates/explain_view.html.jinja +0 -0
  289. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/web_gen/templates/item_view.html.jinja +0 -0
  290. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/web_gen/templates/tabbed_webpage.html.jinja +0 -0
  291. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/workspaces/__init__.py +0 -0
  292. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/workspaces/param_state.py +0 -0
  293. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/workspaces/selections.py +0 -0
  294. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/workspaces/source_items.py +0 -0
  295. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/workspaces/workspace_dirs.py +0 -0
  296. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/workspaces/workspace_output.py +0 -0
  297. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/workspaces/workspace_registry.py +0 -0
  298. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/xonsh_custom/command_nl_utils.py +0 -0
  299. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/xonsh_custom/custom_shell.py +0 -0
  300. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/xonsh_custom/customize_prompt.py +0 -0
  301. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/xonsh_custom/load_into_xonsh.py +0 -0
  302. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/xonsh_custom/shell_load_commands.py +0 -0
  303. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/xonsh_custom/shell_which.py +0 -0
  304. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/xonsh_custom/xonsh_completers.py +0 -0
  305. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/xonsh_custom/xonsh_env.py +0 -0
  306. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/xonsh_custom/xonsh_keybindings.py +0 -0
  307. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/xonsh_custom/xonsh_modern_tools.py +0 -0
  308. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/xonsh_custom/xonsh_ranking_completer.py +0 -0
  309. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/xontrib/fnm.py +0 -0
  310. {kash_shell-0.3.17 → kash_shell-0.3.18}/src/kash/xontrib/kash_extension.py +0 -0
  311. {kash_shell-0.3.17 → kash_shell-0.3.18}/tests/test_shell.py +0 -0
@@ -1,5 +1,5 @@
1
1
  # Changes here will be overwritten by Copier. Do not edit manually.
2
- _commit: v0.2.8
2
+ _commit: v0.2.10
3
3
  _src_path: gh:jlevy/simple-modern-uv
4
4
  package_author_email: joshua@cal.berkeley.edu
5
5
  package_author_name: Joshua Levy
@@ -0,0 +1,67 @@
1
+ ---
2
+ description: General Guidelines
3
+ globs:
4
+ alwaysApply: true
5
+ ---
6
+ # General Responses
7
+
8
+ Remember you are a senior engineer and have a serious responsibility to be clear,
9
+ factual, think step by step and be systematic, express expert opinion, and make use of
10
+ the user's attention wisely.
11
+
12
+ Therefore:
13
+
14
+ - Be concise. State answers or responses directly, without extra commentary.
15
+ Or (if it is clear) directly do what is asked.
16
+
17
+ - If instructions are unclear or there are two or more ways to fulfill the request that
18
+ are substantially different, make a tentative plan (or offer options) and ask for
19
+ confirmation.
20
+
21
+ - If you can think of a much better approach that the user requests, be sure to mention
22
+ it. It's your responsibility to suggest approaches that lead to better, simpler
23
+ solutions.
24
+
25
+ - Give thoughtful opinions on better/worse approaches, but never say "great idea!"
26
+ or "good job" or other non-essential banter or encouragement.
27
+ Your job is to give expert opinions and to solve problems, not to motivate the user.
28
+
29
+ - Avoid gratuitous enthusiasm or generalizations.
30
+ Use thoughtful comparisons like saying which code is "cleaner" but don't congratulate
31
+ yourself. Avoid subjective descriptions.
32
+ For example, don't say "I've meticulously improved the code and it is in great shape!"
33
+ That is useless generalization.
34
+ Instead, specifically say what you've done, e.g., "I've added types, including
35
+ generics, to all the methods in `Foo` and fixed all linter errors."
36
+
37
+ # General Coding Guidelines
38
+
39
+ ## Using Comments
40
+
41
+ - Keep all comments concise and clear and suitable for inclusion in final production.
42
+
43
+ - DO use comments whenever the intent of a given piece of code is subtle or confusing or
44
+ avoids a bug or is not obvious from the code itself.
45
+
46
+ - DO NOT repeat in comments what is obvious from the names of functions or variables or
47
+ types.
48
+
49
+ - DO NOT include comments that reflect what you did, such as "Added this function" as
50
+ this is meaningless to anyone reading the code later.
51
+ (Instead, describe in your message to the user any other contextual information.)
52
+
53
+ - DO NOT use fancy headings like "===== STEP 1: ... =====" in comments
54
+
55
+ - DO NOT scatter numbered steps in comments.
56
+ These are hard to maintain if the code changes.
57
+ Wrong: "// Step 3: Fetch the data from the cache" Correct: "// Now fetch the data from
58
+ the cache"
59
+
60
+ ## Using Emojis
61
+
62
+ - DO NOT use emojis or special unicode characters like ① or • or – or — in comments.
63
+
64
+ - Use emojis in output if it enhances the clarity and can be done consistently.
65
+ You may use ✔︎ and ✘ to indicate success and failure, and ∆ and ‼︎ for user-facing
66
+ warnings and errors, for example, but be sure to do it consistently.
67
+ But but do not use emojis gratuitously as it clutters the output.
@@ -0,0 +1,230 @@
1
+ ---
2
+ description: Python Coding Guidelines
3
+ globs: *.py,pyproject.toml
4
+ alwaysApply: false
5
+ ---
6
+ # Python Coding Guidelines
7
+
8
+ These are rules for a modern Python project using uv.
9
+
10
+ ## Python Version
11
+
12
+ Write for Python 3.11-3.13. Do NOT write code to support earlier versions of Python.
13
+ Always use modern Python practices appropriate for Python 3.11-3.13.
14
+
15
+ Always use full type annotations, generics, and other modern practices.
16
+
17
+ ## Project Setup and Developer Workflows
18
+
19
+ - This project has a modern pyproject.toml file and a Makefile.
20
+ Be sure you read and understand both.
21
+
22
+ - Use uv for running all code and managing dependencies.
23
+ Never use direct `pip` or `python` commands.
24
+
25
+ - Use modern uv commands: `uv sync`, `uv run ...`, etc.
26
+ Prefer `uv add` over `uv pip install`.
27
+
28
+ - You may use the following shortcuts
29
+ ```shell
30
+
31
+ # Install all dependencies:
32
+ make install
33
+
34
+ # Run linting (with ruff) and type checking (with basedpyright).
35
+ # Note when you run this, ruff will auto-format and sort imports, resolving any
36
+ # linter warnings about import ordering:
37
+ make lint
38
+
39
+ # Run tests:
40
+ make test
41
+
42
+ # Run uv sync, lint, and test in one command:
43
+ make
44
+ ```
45
+
46
+ - The usual `make test` like standard pytest does not show test output.
47
+ Run individual tests and see output with `uv run pytest -s some/file.py`.
48
+
49
+ - Always run `make lint` and `make test` to check your code after changes.
50
+
51
+ - You must verify there are zero linter warnings/errors or test failures before
52
+ considering any task complete.
53
+
54
+ ## General Development Practices
55
+
56
+ - Be sure to resolve the pyright (basedpyright) linter errors as you develop and make
57
+ changes.
58
+
59
+ - If type checker errors are hard to resolve, check pyproject.toml to see if they are an
60
+ excessively pedantic error.
61
+ In special cases you may consider disabling it globally it in pyproject.toml but you
62
+ *must ask for confirmation* from the user before doing this.
63
+
64
+ - Never change an existing comment, pydoc, or a log statement, unless it is directly
65
+ fixing the issue you are changing, or the user has asked you to clean up the code.
66
+ Do not drop existing comments when editing code!
67
+ And do not delete or change logging statements.
68
+
69
+ ## Coding Conventions and Imports
70
+
71
+ - Always use full, absolute imports for paths.
72
+ do NOT use `from .module1.module2 import ...`. Such relative paths make it hard to
73
+ refactor. Use `from toplevel_pkg.module1.modlule2 import ...` instead.
74
+
75
+ - Be sure to import things like `Callable` and other types from the right modules,
76
+ remembering that many are now in `collections.abc` or `typing_extensions`. For
77
+ example: `from collections.abc import Callable, Coroutine`
78
+
79
+ - Use `typing_extensions` for things like `@override` (you need to use this, and not
80
+ `typing` since we want to support Python 3.11).
81
+
82
+ - Add `from __future__ import annotations` on files with types whenever applicable.
83
+
84
+ - Use pathlib `Path` instead of strings.
85
+ Use `Path(filename).read_text()` instead of two-line `with open(...)` blocks.
86
+
87
+ - Use strif's `atomic_output_file` context manager when writing files to ensure output
88
+ files are written atomically.
89
+
90
+ - Use `uv add` and `uv sync` as needed to add dependencies.
91
+
92
+ ## Testing
93
+
94
+ - Don't write one-off test code in extra files or within `if __name__ == "__main__":`
95
+ blocks. Instead, for simple tests, create simple test functions in the original file
96
+ below a `## Tests` comment.
97
+ This keeps the tests clear and close to the code.
98
+
99
+ - For longer tests `test_somename.py` in the `tests/` directory.
100
+
101
+ - Then you can run such tests with `uv run python -s src/.../path/to/test`
102
+
103
+ - Don't add docs to assertions unless it's not obvious what they're checking - the
104
+ assertion appears in the stack trace.
105
+ Do NOT write `assert x == 5, "x should be 5"`. Do NOT write `assert x == 5 # Check if
106
+ x is 5`. That is redundant.
107
+ Just write `assert x == 5`.
108
+
109
+ - NEVER write `assert False`. If a test reaches an unexpected branch and must fail
110
+ explicitly, `raise AssertionError("Explanation")` instead.
111
+ This is best typical best practice in Python since assertions can be removed with
112
+ optimization.
113
+
114
+ - Don't use pytest fixtures like parameterized tests or expected exception decorators
115
+ unless absolutely necessary in more complex tests.
116
+ It is often far simpler to use simple assertions and put the checks inside the test.
117
+ This is preferable because then we want simple tests in original source files but
118
+ don't want pytest dependencies at runtime.
119
+
120
+ ## Types and Type Annotations
121
+
122
+ - Use modern union syntax: `str | None` instead of `Optional[str]`, `dict[str]` instead
123
+ of `Dict[str]`, `list[str]` instead of `List[str]`, etc.
124
+
125
+ - Never use/import `Optional` for new code.
126
+
127
+ - Use modern enums like `StrEnum` if appropriate.
128
+
129
+ - One exception to common practice on enums: If an enum has many values that are
130
+ strings, and they have a literal value as a string (like in a JSON protocol), it's
131
+ fine to use lower_snake_case for enum values to match the actual value.
132
+ This is more readable than LONG_ALL_CAPS_VALUES, and you can simply set the value to
133
+ be the same as the name for each.
134
+ For example:
135
+ ```python
136
+ class MediaType(Enum):
137
+ """
138
+ Media types. For broad categories only, to determine what processing
139
+ is possible.
140
+ """
141
+
142
+ text = "text"
143
+ image = "image"
144
+ audio = "audio"
145
+ video = "video"
146
+ webpage = "webpage"
147
+ binary = "binary"
148
+ ```
149
+
150
+ ## Guidelines for Formatting Literal strings
151
+
152
+ - For multi-line strings NEVER put multi-line strings flush against the left margin.
153
+ ALWAYS use a `dedent()` function to make it more readable.
154
+ You may wish to add a `strip()` as well.
155
+ Example:
156
+ ```python
157
+ from textwrap import dedent
158
+ markdown_content = dedent("""
159
+ # Title 1
160
+ Some text.
161
+ ## Subtitle 1.1
162
+ More text.
163
+ """).strip()
164
+ ```
165
+
166
+ ## Guidelines for Docstrings
167
+
168
+ - Here is an example of the correct style for docstrings:
169
+ ```python
170
+ def check_if_url(
171
+ text: UnresolvedLocator, only_schemes: list[str] | None = None
172
+ ) -> ParseResult | None:
173
+ """
174
+ Convenience function to check if a string or Path is a URL and if so return
175
+ the `urlparse.ParseResult`.
176
+
177
+ Also returns false for Paths, so that it's easy to use local paths and URLs
178
+ (`Locator`s) interchangeably. Can provide `HTTP_ONLY` or `HTTP_OR_FILE` to
179
+ restrict to only certain schemes.
180
+ """
181
+ # Function body
182
+
183
+ def is_url(text: UnresolvedLocator, only_schemes: list[str] | None = None) -> bool:
184
+ """
185
+ Check if a string is a URL. For convenience, also returns false for
186
+ Paths, so that it's easy to use local paths and URLs interchangeably.
187
+ """
188
+ return check_if_url(text, only_schemes) is not None
189
+ ```
190
+
191
+ - Use concise pydoc strings with triple quotes on their own lines.
192
+
193
+ - Use `backticks` around variable names and inline code excerpts.
194
+
195
+ - Use plain fences (```) around code blocks inside of pydocs.
196
+
197
+ - For classes with many methods, use a concise docstring on the class that explains all
198
+ the common information, and avoid repeating the same information on every method.
199
+
200
+ - Docstrings should provide context or as concisely as possible explain "why", not
201
+ obvious details evident from the class names, function names, parameter names, and
202
+ type annotations.
203
+
204
+ - Docstrings *should* mention any key rationale or pitfalls when using the class or
205
+ function.
206
+
207
+ - Don't add pydocs that just repeat information obvious from the function, variable
208
+ names, or concise description.
209
+ That is silly and obvious and makes the code longer for no reason.
210
+
211
+ - Do NOT list args and return values if they're obvious.
212
+ In the above examples, you do not need and `Arguments:` or `Returns:` section, since
213
+ their meaning as obvious from context.
214
+ do list these if there are many arguments and their meaning isn't clear.
215
+ If it returns a less obvious type like a tuple, do explain in the pydoc.
216
+
217
+ - Exported/public variables, functions, or methods SHOULD have concise docstrings.
218
+ Internal/local variables, functions, and methods DO NOT need docstrings unless their
219
+ purpose is not obvious.
220
+
221
+ ## General Clean Coding Practices
222
+
223
+ - When writing a class DO NOT blindly make delegation methods for consistency.
224
+ For exmaple DO NOT write methods like this:
225
+ ```python
226
+ def reassemble(self) -> str:
227
+ """Call the original reassemble method."""
228
+ return self.paragraph.reassemble()
229
+ ```
230
+ In general, the user can just call the enclosed objects methods, reducing code bloat.
@@ -42,7 +42,7 @@ jobs:
42
42
  uses: astral-sh/setup-uv@v5
43
43
  with:
44
44
  # Update this as needed:
45
- version: "0.7.3"
45
+ version: "0.7.11"
46
46
  enable-cache: true
47
47
  python-version: ${{ matrix.python-version }}
48
48
 
@@ -25,7 +25,7 @@ jobs:
25
25
  - name: Install uv (official Astral action)
26
26
  uses: astral-sh/setup-uv@v5
27
27
  with:
28
- version: "0.7.3"
28
+ version: "0.7.11"
29
29
  enable-cache: true
30
30
  python-version: "3.12"
31
31
 
@@ -1,3 +1,7 @@
1
+ # Generated by Makefile
2
+ CLAUDE.md
3
+ AGENTS.md
4
+
1
5
  # Additions to standard GitHub .gitignore:
2
6
  *.bak
3
7
  *.orig
@@ -0,0 +1,46 @@
1
+ # Makefile for easy development workflows.
2
+ # See development.md for docs.
3
+ # Note GitHub Actions call uv directly, not this Makefile.
4
+
5
+ .DEFAULT_GOAL := default
6
+
7
+ .PHONY: default install lint test test-full upgrade build clean agent-rules
8
+
9
+ default: agent-rules install lint test
10
+
11
+ install:
12
+ uv sync --all-extras --dev
13
+
14
+ lint:
15
+ uv run python devtools/lint.py
16
+
17
+ test:
18
+ uv run pytest
19
+
20
+ test-full:
21
+ ENABLE_TESTS_LLM=1 ENABLE_TESTS_INTEGRATION=1 uv run pytest
22
+
23
+ upgrade:
24
+ uv sync --upgrade --all-extras --dev
25
+
26
+ build:
27
+ uv build
28
+
29
+ agent-rules: CLAUDE.md AGENTS.md
30
+
31
+ # Use .cursor/rules for sources of rules.
32
+ # Create Claude and Codex rules from these.
33
+ CLAUDE.md: .cursor/rules/general.mdc .cursor/rules/python.mdc
34
+ cat .cursor/rules/general.mdc .cursor/rules/python.mdc > CLAUDE.md
35
+
36
+ AGENTS.md: .cursor/rules/general.mdc .cursor/rules/python.mdc
37
+ cat .cursor/rules/general.mdc .cursor/rules/python.mdc > AGENTS.md
38
+
39
+ clean:
40
+ -rm -rf dist/
41
+ -rm -rf *.egg-info/
42
+ -rm -rf .pytest_cache/
43
+ -rm -rf .mypy_cache/
44
+ -rm -rf .venv/
45
+ -rm -rf CLAUDE.md AGENTS.md
46
+ -find . -type d -name "__pycache__" -exec rm -rf {} +
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kash-shell
3
- Version: 0.3.17
3
+ Version: 0.3.18
4
4
  Summary: The knowledge agent shell (core)
5
5
  Project-URL: Repository, https://github.com/jlevy/kash-shell
6
6
  Author-email: Joshua Levy <joshua@cal.berkeley.edu>
@@ -19,7 +19,7 @@ Requires-Python: <4.0,>=3.11
19
19
  Requires-Dist: anyio>=4.8.0
20
20
  Requires-Dist: audioop-lts>=0.2.1; python_version >= '3.13'
21
21
  Requires-Dist: cachetools>=5.5.2
22
- Requires-Dist: chopdiff>=0.2.1
22
+ Requires-Dist: chopdiff>=0.2.3
23
23
  Requires-Dist: clideps>=0.1.4
24
24
  Requires-Dist: colour>=0.1.5
25
25
  Requires-Dist: cssselect>=1.2.0
@@ -38,6 +38,7 @@ Requires-Dist: litellm>=1.63.11
38
38
  Requires-Dist: markdownify>=0.13.1
39
39
  Requires-Dist: mcp-proxy>=0.5.0
40
40
  Requires-Dist: mcp>=1.6.0
41
+ Requires-Dist: minify-tw-html>=0.1.3
41
42
  Requires-Dist: openai>=1.66.3
42
43
  Requires-Dist: pandas>=2.2.3
43
44
  Requires-Dist: patch-ng>=1.18.1
@@ -83,35 +84,64 @@ src="https://github.com/user-attachments/assets/a5d62ae4-17e6-46bb-a9cb-3b6ec8d8
83
84
  > “*Simple should be simple.
84
85
  > Complex should be possible.*” —Alan Kay
85
86
 
86
- Kash (“Knowledge Agent SHell”) is an **interactive, AI-native command-line** shell for
87
- practical knowledge tasks.
87
+ Kash (“Knowledge Agent SHell”) is an experiment in making software tasks more modular,
88
+ exploratory, and flexible using Python and current AI tools.
88
89
 
89
- It's also **a Python library** that lets you convert a simple Python function into a
90
- command and an MCP tool, so it integrates with other tools like Anthropic Desktop or
91
- Cursor.
90
+ The philosophy behind kash is similar to Unix shell tools: simple commands that can be
91
+ combined in flexible and powerful ways.
92
+ It operates on "items" such as URLs, files, or Markdown notes within a workspace
93
+ directory.
92
94
 
93
- You can think of it a kind of power-tool for technical users who want to use Python and
94
- APIs, a kind of hybrid between an AI assistant, a shell, and a developer tool like
95
- Cursor or Claude Code.
95
+ You can use Kash as an **interactive, AI-native command-line** shell for practical
96
+ knowledge tasks. It's also **a Python library** that lets you convert a simple Python
97
+ function into a command and an MCP tool, so it integrates with other tools like
98
+ Anthropic Desktop or Cursor.
96
99
 
97
- It's my attempt at finding a way to remix, combine, and interactively explore and then
98
- gradually automate complex tasks by composing AI tools, APIs, and libraries.
100
+ It's new and still has some rough edges, but it's now working well enough it is feeling
101
+ quite powerful. It now serves as a replacement for my usual shell (previously bash or
102
+ zsh). I use it routinely to remix, combine, and interactively explore and then gradually
103
+ automate complex tasks by composing AI tools, APIs, and libraries.
104
+ And last but not least, the same framework lets me build other tools (like
105
+ [textpress](https://github.com/jlevy/textpress)).
99
106
 
100
107
  And of course, kash can read its own functionality and enhance itself by writing new
101
108
  actions.
102
109
 
110
+ ### Kash Packages
111
+
112
+ The [kash-shell](https://github.com/jlevy/kash) package is the base package and includes
113
+ the Python framework, a few core utilities, and the Kash command-line shell.
114
+
115
+ Additional actions for handling more complex tasks like converting documents and
116
+ transcribing, researching, or annotating videos, are in the
117
+ [kash-docs](https://github.com/jlevy/kash-docs) and
118
+ [kash-media](https://github.com/jlevy/kash-docs) packages, all available on PyPI and
119
+ quick to install via uv.
120
+
103
121
  ### Key Concepts
104
122
 
105
- - **Actions:** The core of Kash are **Kash actions**. By decorating a Python function,
106
- you can turn it into an action, which makes it more flexible and powerful, able to
107
- work with file inputs stored and outputs in a given directory, also called a
108
- **workspace**.
123
+ - **Actions:** The core of Kash are **actions**. By decorating a Python function with
124
+ `@kash_action`, you can turn it into an action, which makes it more flexible and
125
+ powerful. It can then be used like a command line command as well as a Python function
126
+ or an MCP tool.
127
+
128
+ - **Workspaces:** A key element of Kash is that it does most nontrivial work in the
129
+ context of a **workspace**. A workspace is just a directory of files that have a few
130
+ conventions to make it easier to maintain context and perform actions.
131
+ A bit like how Git repos work, it has a `.kash/` directory that holds metadata and
132
+ cached content. The rest can be anything, but is typically directories of resources
133
+ (like .docx or .pdf or links to web pages) or content, typically Markdown files with
134
+ YAML frontmatter. All text files use
135
+ [frontmatter-format](https://github.com/jlevy/frontmatter-format) so have easy-to-read
136
+ YAML metadata that includes not just title or description, but also the names of the
137
+ actions that created it.
109
138
 
110
139
  - **Compositionality:** An action is composable with other actions simply as a Python
111
- function, so complex (like transcribing and annotating a video) actions can be built
112
- from simpler actions (like downloading and caching a YouTube video, identifying the
113
- speakers in a transcript, etc.). The goal is to reduce the "interstitial complexity"
114
- of combining tools, so it's easy for you (or an LLM!) to combine tools in flexible and
140
+ function, so complex operations (for example, transcribing and annotating a video and
141
+ publishing it on a website) actions can be built from simpler actions (say downloading
142
+ and caching a YouTube video, identifying the speakers in a transcript, formatting it
143
+ as pretty HTML, etc.). The goal is to reduce the "interstitial complexity" of
144
+ combining tools, so it's easy for you (or an LLM!) to combine tools in flexible and
115
145
  powerful ways.
116
146
 
117
147
  - **Command-line usage:** In addition to using the function in other libraries and
@@ -120,9 +150,6 @@ actions.
120
150
  video. In kash you have **smart tab completions**, **Python expressions**, and an **LLM
121
151
  assistant** built into the shell.
122
152
 
123
- - **MCP support:** Finally, an action is also an **MCP tool server** so you can use it
124
- in any MCP client, like Anthropic Desktop or Cursor.
125
-
126
153
  - **Support for any API:** Kash is tool agnostic and runs locally, on file inputs in
127
154
  simple formats, so you own and manage your data and workspaces however you like.
128
155
  You can use it with any models or APIs you like, and is already set up to use the APIs
@@ -131,6 +158,9 @@ actions.
131
158
  **Perplexity**, **Firecrawl**, **Exa**, and any Python libraries.
132
159
  There is also some experimental support for **LlamaIndex** and **ChromaDB**.
133
160
 
161
+ - **MCP support:** Finally, an action is also an **MCP tool server** so you can use it
162
+ in any MCP client, like Anthropic Desktop or Cursor.
163
+
134
164
  ### What Can Kash Do?
135
165
 
136
166
  You can use kash actions to do deep research, transcribe videos, summarize and organize
@@ -175,9 +205,9 @@ ideas, feedback, or use cases for Kash!
175
205
 
176
206
  ### Running the Kash Shell
177
207
 
178
- Kash offers a shell environment based on [xonsh](https://xon.sh/) augmented with an LLM
179
- assistant and a variety of other enhanced commands and customizations.
180
- If you've used a bash or Python shell before, xonsh is very intuitive.
208
+ Kash offers a shell environment based on [xonsh](https://xon.sh/) augmented with a bunch
209
+ of enhanced commands and customizations.
210
+ If you've used a bash or Python shell before, it should be very intuitive.
181
211
 
182
212
  Within the kash shell, you get a full environment with all actions and commands.
183
213
  You also get intelligent auto-complete, a built-in assistant to help you perform tasks,
@@ -211,30 +241,17 @@ These are for `kash-media` but you can use a `kash-shell` for a more basic setup
211
241
  Kash is easiest to use via [**uv**](https://docs.astral.sh/uv/), the new package
212
242
  manager for Python. `uv` replaces traditional use of `pyenv`, `pipx`, `poetry`, `pip`,
213
243
  etc. Installing `uv` also ensures you get a compatible version of Python.
214
-
215
- If you don't have `uv` installed, a quick way to install it is:
216
-
244
+ See [uv's docs](https://docs.astral.sh/uv/getting-started/installation/) for other
245
+ installation methods and platforms.
246
+ Usually you just want to run:
217
247
  ```shell
218
248
  curl -LsSf https://astral.sh/uv/install.sh | sh
219
249
  ```
220
250
 
221
- For macOS, you prefer [brew](https://brew.sh/) you can install or upgrade uv with:
222
-
223
- ```shell
224
- brew update
225
- brew install uv
226
- ```
227
- See [uv's docs](https://docs.astral.sh/uv/getting-started/installation/) for other
228
- installation methods and platforms.
229
-
230
251
  2. **Install additional command-line tools:**
231
252
 
232
253
  In addition to Python, it's highly recommended to install a few other dependencies to
233
- make more tools and commands work: `ripgrep` (for search), `bat` (for prettier file
234
- display), `eza` (a much improved version of `ls`), `hexyl` (a much improved hex
235
- viewer), `imagemagick` (for image display in modern terminals), `libmagic` (for file
236
- type detection), `ffmpeg` (for audio and video conversions)
237
-
254
+ make more tools and commands work.
238
255
  For macOS, you can again use brew:
239
256
 
240
257
  ```shell
@@ -255,22 +272,22 @@ These are for `kash-media` but you can use a `kash-shell` for a more basic setup
255
272
 
256
273
  For Windows or other platforms, see the uv instructions.
257
274
 
275
+ Kash auto-detects and uses `ripgrep` (for search), `bat` (for prettier file display),
276
+ `eza` (a much improved version of `ls`), `hexyl` (a much improved hex viewer),
277
+ `imagemagick` (for image display in modern terminals), `libmagic` (for file type
278
+ detection), `ffmpeg` (for audio and video conversions)
279
+
258
280
  3. **Install kash or a kash kit:**
259
281
 
282
+ For a more meaningful demo, use an enhanced version of kash that also has various
283
+ media tools (like yt-dlp and Deepgram support):
284
+
260
285
  ```shell
261
- uv tool install kash-media --python=3.13
286
+ uv tool install kash-media --upgrade --python=3.13
262
287
  ```
263
288
 
264
289
  Other versions of Python should work but 3.13 is recommended.
265
- For a setup without the media tools, use `kash-shell` instead.
266
-
267
- If you've installed an older version and want to be sure you have the latest shell,
268
- you may want to add `--upgrade --force` to be sure you get the latest version of the
269
- kit.
270
-
271
- ```shell
272
- uv tool install kash-media --python=3.13 --upgrade --force
273
- ```
290
+ For a setup without the media tools, just install `kash-shell` instead.
274
291
 
275
292
  4. **Set up API keys:**
276
293
 
@@ -362,25 +379,11 @@ Type `help` for the full documentation.
362
379
  The simplest way to illustrate how to use kash is by example.
363
380
  You can go through the commands below a few at a time, trying each one.
364
381
 
365
- This is a "real" example that uses a bunch of libraries.
382
+ This is a "real" example that uses ffmpeg and a few other libraries.
366
383
  So to get it to work you must install not just the main shell but the kash "media kit"
367
384
  with extra dependencies.
368
-
369
- You need the following tools:
370
-
371
- ```shell
372
- # On MacOS:
373
- brew install ripgrep bat eza hexyl imagemagick libmagic ffmpeg
374
- # On Linux:
375
- apt install ripgrep bat eza hexyl imagemagick libmagic ffmpeg
376
- ```
377
-
378
- Then install the `kash-media`, which includes kash-shell and many other libs like yt-dlp
379
- for YouTube handling:
380
-
381
- ```shell
382
- uv tool install kash-media
383
- ```
385
+ This is discussed in [the installation instructions](#installation-steps).
386
+ If you don't have these already installed, you can add these tools:
384
387
 
385
388
  Then run `kash` to start.
386
389
 
@@ -499,7 +502,7 @@ show_webpage
499
502
  show_webpage --help
500
503
 
501
504
  # And you can actually how this works by looking at its source:
502
- source_code show_webpage
505
+ show_webpage --show_source
503
506
 
504
507
  # What if something isn't working right?
505
508
  # Sometimes we may want to browse more detailed system logs:
@@ -518,7 +521,7 @@ transcribe_format https://www.youtube.com/watch?v=_8djNYprRDI
518
521
 
519
522
  # Getting a little fancier, this one adds little paragraph annotations and
520
523
  # a nicer summary at the top:
521
- transcribe_annotate_summarize https://www.youtube.com/watch?v=_8djNYprRDI
524
+ transcribe_annotate https://www.youtube.com/watch?v=_8djNYprRDI
522
525
 
523
526
  show_webpage
524
527
  ```