shotgun-sh 0.2.9.dev1__tar.gz → 0.2.10__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.
Potentially problematic release.
This version of shotgun-sh might be problematic. Click here for more details.
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/PKG-INFO +22 -4
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/README.md +115 -1
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/README_PYPI.md +19 -2
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/pyproject.toml +7 -2
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/config/manager.py +2 -2
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/config/models.py +8 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/config/provider.py +31 -3
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/api_endpoints.py +8 -2
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/build_constants.py +2 -2
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/cli/update.py +16 -2
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/codebase/core/manager.py +10 -1
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/main.py +64 -10
- shotgun_sh-0.2.10/src/shotgun/tui/app.py +318 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/tui/screens/chat.py +131 -49
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/tui/screens/model_picker.py +3 -2
- shotgun_sh-0.2.10/src/shotgun/tui/screens/pipx_migration.py +153 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/utils/update_checker.py +69 -14
- shotgun_sh-0.2.9.dev1/src/shotgun/tui/app.py +0 -156
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/.gitignore +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/LICENSE +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/hatch_build.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/__init__.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/__init__.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/agent_manager.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/common.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/config/__init__.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/config/constants.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/conversation_history.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/conversation_manager.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/export.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/history/__init__.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/history/compaction.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/history/constants.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/history/context_extraction.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/history/history_building.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/history/history_processors.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/history/message_utils.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/history/token_counting/__init__.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/history/token_counting/anthropic.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/history/token_counting/base.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/history/token_counting/openai.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/history/token_counting/sentencepiece_counter.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/history/token_counting/tokenizer_cache.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/history/token_counting/utils.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/history/token_estimation.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/llm.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/messages.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/models.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/plan.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/research.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/specify.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/tasks.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/tools/__init__.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/tools/codebase/__init__.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/tools/codebase/codebase_shell.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/tools/codebase/directory_lister.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/tools/codebase/file_read.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/tools/codebase/models.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/tools/codebase/query_graph.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/tools/codebase/retrieve_code.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/tools/file_management.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/tools/web_search/__init__.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/tools/web_search/anthropic.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/tools/web_search/gemini.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/tools/web_search/openai.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/tools/web_search/utils.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/agents/usage_manager.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/cli/__init__.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/cli/codebase/__init__.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/cli/codebase/commands.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/cli/codebase/models.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/cli/config.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/cli/export.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/cli/feedback.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/cli/models.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/cli/plan.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/cli/research.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/cli/specify.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/cli/tasks.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/cli/utils.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/codebase/__init__.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/codebase/core/__init__.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/codebase/core/change_detector.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/codebase/core/code_retrieval.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/codebase/core/cypher_models.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/codebase/core/ingestor.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/codebase/core/language_config.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/codebase/core/nl_query.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/codebase/core/parser_loader.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/codebase/models.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/codebase/service.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/llm_proxy/__init__.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/llm_proxy/clients.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/llm_proxy/constants.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/logging_config.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/posthog_telemetry.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/prompts/__init__.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/prompts/agents/__init__.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/prompts/agents/export.j2 +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/prompts/agents/partials/codebase_understanding.j2 +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/prompts/agents/partials/common_agent_system_prompt.j2 +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/prompts/agents/partials/content_formatting.j2 +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/prompts/agents/partials/interactive_mode.j2 +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/prompts/agents/plan.j2 +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/prompts/agents/research.j2 +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/prompts/agents/specify.j2 +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/prompts/agents/state/codebase/codebase_graphs_available.j2 +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/prompts/agents/state/system_state.j2 +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/prompts/agents/tasks.j2 +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/prompts/codebase/__init__.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/prompts/codebase/cypher_query_patterns.j2 +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/prompts/codebase/cypher_system.j2 +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/prompts/codebase/enhanced_query_context.j2 +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/prompts/codebase/partials/cypher_rules.j2 +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/prompts/codebase/partials/graph_schema.j2 +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/prompts/codebase/partials/temporal_context.j2 +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/prompts/history/__init__.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/prompts/history/incremental_summarization.j2 +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/prompts/history/summarization.j2 +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/prompts/loader.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/prompts/tools/web_search.j2 +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/py.typed +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/sdk/__init__.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/sdk/codebase.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/sdk/exceptions.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/sdk/models.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/sdk/services.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/sentry_telemetry.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/shotgun_web/__init__.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/shotgun_web/client.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/shotgun_web/constants.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/shotgun_web/models.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/telemetry.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/tui/__init__.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/tui/commands/__init__.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/tui/components/prompt_input.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/tui/components/spinner.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/tui/components/splash.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/tui/components/vertical_tail.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/tui/filtered_codebase_service.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/tui/screens/chat.tcss +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/tui/screens/chat_screen/__init__.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/tui/screens/chat_screen/command_providers.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/tui/screens/chat_screen/hint_message.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/tui/screens/chat_screen/history.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/tui/screens/directory_setup.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/tui/screens/feedback.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/tui/screens/provider_config.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/tui/screens/shotgun_auth.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/tui/screens/splash.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/tui/screens/welcome.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/tui/styles.tcss +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/tui/utils/__init__.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/tui/utils/mode_progress.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/utils/__init__.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/utils/datetime_utils.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/utils/env_utils.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/utils/file_system_utils.py +0 -0
- {shotgun_sh-0.2.9.dev1 → shotgun_sh-0.2.10}/src/shotgun/utils/source_detection.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: shotgun-sh
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.10
|
|
4
4
|
Summary: AI-powered research, planning, and task management CLI tool
|
|
5
5
|
Project-URL: Homepage, https://shotgun.sh/
|
|
6
6
|
Project-URL: Repository, https://github.com/shotgun-sh/shotgun
|
|
@@ -26,7 +26,7 @@ Requires-Dist: genai-prices>=0.0.27
|
|
|
26
26
|
Requires-Dist: httpx>=0.27.0
|
|
27
27
|
Requires-Dist: jinja2>=3.1.0
|
|
28
28
|
Requires-Dist: kuzu>=0.7.0
|
|
29
|
-
Requires-Dist: logfire
|
|
29
|
+
Requires-Dist: logfire>=2.0.0
|
|
30
30
|
Requires-Dist: openai>=1.0.0
|
|
31
31
|
Requires-Dist: packaging>=23.0
|
|
32
32
|
Requires-Dist: posthog>=3.0.0
|
|
@@ -36,6 +36,7 @@ Requires-Dist: sentencepiece>=0.2.0
|
|
|
36
36
|
Requires-Dist: sentry-sdk[pure-eval]>=2.0.0
|
|
37
37
|
Requires-Dist: tenacity>=8.0.0
|
|
38
38
|
Requires-Dist: textual-dev>=1.7.0
|
|
39
|
+
Requires-Dist: textual-serve>=0.1.0
|
|
39
40
|
Requires-Dist: textual>=6.1.0
|
|
40
41
|
Requires-Dist: tiktoken>=0.7.0
|
|
41
42
|
Requires-Dist: tree-sitter-go>=0.23.0
|
|
@@ -83,13 +84,30 @@ Every research finding, every architectural decision, every "here's why we didn'
|
|
|
83
84
|
|
|
84
85
|
## Installation
|
|
85
86
|
|
|
86
|
-
### Using
|
|
87
|
+
### Using uvx (Recommended)
|
|
88
|
+
|
|
89
|
+
**Quick start (ephemeral):**
|
|
90
|
+
```bash
|
|
91
|
+
uvx shotgun-sh
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**Install permanently:**
|
|
95
|
+
```bash
|
|
96
|
+
uv tool install shotgun-sh
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**Why uvx?** It's 10-100x faster than pipx and handles binary wheels more reliably. If you don't have `uv` installed, get it at [astral.sh/uv](https://astral.sh/uv) or `curl -LsSf https://astral.sh/uv/install.sh | sh`
|
|
100
|
+
|
|
101
|
+
### Using pipx
|
|
87
102
|
|
|
88
103
|
```bash
|
|
89
104
|
pipx install shotgun-sh
|
|
90
105
|
```
|
|
91
106
|
|
|
92
|
-
|
|
107
|
+
If you encounter build errors with kuzu on macOS:
|
|
108
|
+
```bash
|
|
109
|
+
pipx install --pip-args="--only-binary kuzu" shotgun-sh
|
|
110
|
+
```
|
|
93
111
|
|
|
94
112
|
### Using pip
|
|
95
113
|
|
|
@@ -10,7 +10,35 @@ A Python CLI tool for research, planning, and task management powered by AI agen
|
|
|
10
10
|
|
|
11
11
|
## Installation
|
|
12
12
|
|
|
13
|
-
###
|
|
13
|
+
### Using uvx (Recommended)
|
|
14
|
+
|
|
15
|
+
**Quick start (ephemeral):**
|
|
16
|
+
```bash
|
|
17
|
+
uvx shotgun-sh
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**Install permanently:**
|
|
21
|
+
```bash
|
|
22
|
+
uv tool install shotgun-sh
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**Why uvx?** It's 10-100x faster than pipx and handles binary wheels more reliably. If you don't have `uv` installed, get it at [astral.sh/uv](https://astral.sh/uv) or:
|
|
26
|
+
```bash
|
|
27
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Using pipx
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pipx install shotgun-sh
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
If you encounter build errors with kuzu on macOS:
|
|
37
|
+
```bash
|
|
38
|
+
pipx install --pip-args="--only-binary kuzu" shotgun-sh
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Using pip
|
|
14
42
|
|
|
15
43
|
```bash
|
|
16
44
|
pip install shotgun-sh
|
|
@@ -115,6 +143,8 @@ shotgun --no-update-check research "topic"
|
|
|
115
143
|
### Installation Methods
|
|
116
144
|
|
|
117
145
|
The update command automatically detects and uses the appropriate method:
|
|
146
|
+
- **uvx**: Run `uvx shotgun-sh` again or use `uv tool install shotgun-sh` for permanent installation
|
|
147
|
+
- **uv tool**: `uv tool upgrade shotgun-sh`
|
|
118
148
|
- **pipx**: `pipx upgrade shotgun-sh`
|
|
119
149
|
- **pip**: `pip install --upgrade shotgun-sh`
|
|
120
150
|
- **venv**: Updates within the virtual environment
|
|
@@ -408,6 +438,90 @@ export SENTRY_DSN=your-sentry-dsn
|
|
|
408
438
|
- **Opt-in for development**: Telemetry requires explicit environment variables
|
|
409
439
|
- **Automatic in production**: Production builds include telemetry for error tracking
|
|
410
440
|
|
|
441
|
+
## Docker
|
|
442
|
+
|
|
443
|
+
Run Shotgun in a Docker container with web access.
|
|
444
|
+
|
|
445
|
+
### Using Pre-built Images (Recommended)
|
|
446
|
+
|
|
447
|
+
Pull the official image from GitHub Container Registry:
|
|
448
|
+
|
|
449
|
+
```bash
|
|
450
|
+
# Pull latest stable version
|
|
451
|
+
docker pull ghcr.io/shotgun-sh/shotgun:latest
|
|
452
|
+
|
|
453
|
+
# Or pull a specific version
|
|
454
|
+
docker pull ghcr.io/shotgun-sh/shotgun:v0.1.0
|
|
455
|
+
|
|
456
|
+
# Or pull development version
|
|
457
|
+
docker pull ghcr.io/shotgun-sh/shotgun:dev
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
Then run:
|
|
461
|
+
|
|
462
|
+
```bash
|
|
463
|
+
docker run -p 8000:8000 \
|
|
464
|
+
-v $(pwd):/workspace \
|
|
465
|
+
-v ~/.shotgun-sh:/home/shotgun/.shotgun-sh \
|
|
466
|
+
ghcr.io/shotgun-sh/shotgun:latest --no-update-check
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
**Note:** The Docker image automatically includes `--force-reindex` to ensure fresh indexing on startup. You don't need to add any additional flags.
|
|
470
|
+
|
|
471
|
+
### Building from Source (Optional)
|
|
472
|
+
|
|
473
|
+
If you prefer to build the image yourself:
|
|
474
|
+
|
|
475
|
+
```bash
|
|
476
|
+
docker build -t shotgun:latest .
|
|
477
|
+
```
|
|
478
|
+
|
|
479
|
+
### Run the Container
|
|
480
|
+
|
|
481
|
+
The container requires two volume mounts:
|
|
482
|
+
1. Your codebase/workspace directory (mounted to `/workspace`)
|
|
483
|
+
2. Config directory for API keys and settings (mounted to `/home/shotgun/.shotgun-sh`)
|
|
484
|
+
|
|
485
|
+
```bash
|
|
486
|
+
# Basic usage (serves on port 8000)
|
|
487
|
+
docker run -p 8000:8000 \
|
|
488
|
+
-v $(pwd):/workspace \
|
|
489
|
+
-v ~/.shotgun-sh:/home/shotgun/.shotgun-sh \
|
|
490
|
+
ghcr.io/shotgun-sh/shotgun:latest --no-update-check
|
|
491
|
+
|
|
492
|
+
# Custom port
|
|
493
|
+
docker run -p 3000:3000 \
|
|
494
|
+
-v $(pwd):/workspace \
|
|
495
|
+
-v ~/.shotgun-sh:/home/shotgun/.shotgun-sh \
|
|
496
|
+
ghcr.io/shotgun-sh/shotgun:latest --no-update-check --port 3000
|
|
497
|
+
|
|
498
|
+
# Different codebase directory
|
|
499
|
+
docker run -p 8000:8000 \
|
|
500
|
+
-v /path/to/your/project:/workspace \
|
|
501
|
+
-v ~/.shotgun-sh:/home/shotgun/.shotgun-sh \
|
|
502
|
+
ghcr.io/shotgun-sh/shotgun:latest --no-update-check
|
|
503
|
+
|
|
504
|
+
# Run in background with auto-restart
|
|
505
|
+
docker run -d --restart unless-stopped \
|
|
506
|
+
--name shotgun-web \
|
|
507
|
+
-p 8000:8000 \
|
|
508
|
+
-v $(pwd):/workspace \
|
|
509
|
+
-v ~/.shotgun-sh:/home/shotgun/.shotgun-sh \
|
|
510
|
+
ghcr.io/shotgun-sh/shotgun:latest --no-update-check
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
**All Docker commands automatically include `--force-reindex`** - you don't need to specify it. The flag is baked into the Docker image's ENTRYPOINT to ensure reliable codebase indexing in containerized environments.
|
|
514
|
+
|
|
515
|
+
### Configuration
|
|
516
|
+
|
|
517
|
+
On first run, configure your API keys through the web UI. The configuration will persist in the mounted `~/.shotgun-sh` directory.
|
|
518
|
+
|
|
519
|
+
Access the web interface at `http://localhost:8000` (or your custom port).
|
|
520
|
+
|
|
521
|
+
### Codebase Indexing in Docker
|
|
522
|
+
|
|
523
|
+
The Docker image automatically prompts you to index the codebase on each startup. This ensures you're always working with up-to-date code analysis, even if the container restarts or you mount a different directory. Simply click "Index now" when prompted.
|
|
524
|
+
|
|
411
525
|
## Support
|
|
412
526
|
|
|
413
527
|
Join our discord https://discord.gg/5RmY6J2N7s
|
|
@@ -28,13 +28,30 @@ Every research finding, every architectural decision, every "here's why we didn'
|
|
|
28
28
|
|
|
29
29
|
## Installation
|
|
30
30
|
|
|
31
|
-
### Using
|
|
31
|
+
### Using uvx (Recommended)
|
|
32
|
+
|
|
33
|
+
**Quick start (ephemeral):**
|
|
34
|
+
```bash
|
|
35
|
+
uvx shotgun-sh
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**Install permanently:**
|
|
39
|
+
```bash
|
|
40
|
+
uv tool install shotgun-sh
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**Why uvx?** It's 10-100x faster than pipx and handles binary wheels more reliably. If you don't have `uv` installed, get it at [astral.sh/uv](https://astral.sh/uv) or `curl -LsSf https://astral.sh/uv/install.sh | sh`
|
|
44
|
+
|
|
45
|
+
### Using pipx
|
|
32
46
|
|
|
33
47
|
```bash
|
|
34
48
|
pipx install shotgun-sh
|
|
35
49
|
```
|
|
36
50
|
|
|
37
|
-
|
|
51
|
+
If you encounter build errors with kuzu on macOS:
|
|
52
|
+
```bash
|
|
53
|
+
pipx install --pip-args="--only-binary kuzu" shotgun-sh
|
|
54
|
+
```
|
|
38
55
|
|
|
39
56
|
### Using pip
|
|
40
57
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "shotgun-sh"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.10"
|
|
4
4
|
description = "AI-powered research, planning, and task management CLI tool"
|
|
5
5
|
readme = "README_PYPI.md"
|
|
6
6
|
license = { text = "MIT" }
|
|
@@ -27,11 +27,12 @@ dependencies = [
|
|
|
27
27
|
"pydantic-ai>=0.0.14",
|
|
28
28
|
"httpx>=0.27.0",
|
|
29
29
|
"jinja2>=3.1.0",
|
|
30
|
-
"logfire
|
|
30
|
+
"logfire>=2.0.0",
|
|
31
31
|
"sentry-sdk[pure_eval]>=2.0.0",
|
|
32
32
|
"posthog>=3.0.0",
|
|
33
33
|
"textual>=6.1.0",
|
|
34
34
|
"textual-dev>=1.7.0",
|
|
35
|
+
"textual-serve>=0.1.0",
|
|
35
36
|
"kuzu>=0.7.0",
|
|
36
37
|
"tree-sitter>=0.21.0",
|
|
37
38
|
"tree-sitter-python>=0.23.0",
|
|
@@ -65,6 +66,7 @@ dev = [
|
|
|
65
66
|
|
|
66
67
|
[project.scripts]
|
|
67
68
|
shotgun = "shotgun.main:app"
|
|
69
|
+
shotgun-sh = "shotgun.main:app"
|
|
68
70
|
|
|
69
71
|
[build-system]
|
|
70
72
|
requires = ["hatchling"]
|
|
@@ -162,3 +164,6 @@ exclude_lines = [
|
|
|
162
164
|
precision = 2
|
|
163
165
|
skip_covered = false
|
|
164
166
|
show_missing = true
|
|
167
|
+
|
|
168
|
+
[tool.uv.pip]
|
|
169
|
+
only-binary = ["kuzu"]
|
|
@@ -142,7 +142,7 @@ class ConfigManager:
|
|
|
142
142
|
# Find default model for this provider
|
|
143
143
|
provider_models = {
|
|
144
144
|
ProviderType.OPENAI: ModelName.GPT_5,
|
|
145
|
-
ProviderType.ANTHROPIC: ModelName.
|
|
145
|
+
ProviderType.ANTHROPIC: ModelName.CLAUDE_HAIKU_4_5,
|
|
146
146
|
ProviderType.GOOGLE: ModelName.GEMINI_2_5_PRO,
|
|
147
147
|
}
|
|
148
148
|
|
|
@@ -243,7 +243,7 @@ class ConfigManager:
|
|
|
243
243
|
|
|
244
244
|
provider_models = {
|
|
245
245
|
ProviderType.OPENAI: ModelName.GPT_5,
|
|
246
|
-
ProviderType.ANTHROPIC: ModelName.
|
|
246
|
+
ProviderType.ANTHROPIC: ModelName.CLAUDE_HAIKU_4_5,
|
|
247
247
|
ProviderType.GOOGLE: ModelName.GEMINI_2_5_PRO,
|
|
248
248
|
}
|
|
249
249
|
if provider_enum in provider_models:
|
|
@@ -28,6 +28,7 @@ class ModelName(StrEnum):
|
|
|
28
28
|
GPT_5_MINI = "gpt-5-mini"
|
|
29
29
|
CLAUDE_OPUS_4_1 = "claude-opus-4-1"
|
|
30
30
|
CLAUDE_SONNET_4_5 = "claude-sonnet-4-5"
|
|
31
|
+
CLAUDE_HAIKU_4_5 = "claude-haiku-4-5"
|
|
31
32
|
GEMINI_2_5_PRO = "gemini-2.5-pro"
|
|
32
33
|
GEMINI_2_5_FLASH = "gemini-2.5-flash"
|
|
33
34
|
|
|
@@ -110,6 +111,13 @@ MODEL_SPECS: dict[ModelName, ModelSpec] = {
|
|
|
110
111
|
max_output_tokens=16_000,
|
|
111
112
|
litellm_proxy_model_name="anthropic/claude-sonnet-4-5",
|
|
112
113
|
),
|
|
114
|
+
ModelName.CLAUDE_HAIKU_4_5: ModelSpec(
|
|
115
|
+
name=ModelName.CLAUDE_HAIKU_4_5,
|
|
116
|
+
provider=ProviderType.ANTHROPIC,
|
|
117
|
+
max_input_tokens=200_000,
|
|
118
|
+
max_output_tokens=64_000,
|
|
119
|
+
litellm_proxy_model_name="anthropic/claude-haiku-4-5",
|
|
120
|
+
),
|
|
113
121
|
ModelName.GEMINI_2_5_PRO: ModelSpec(
|
|
114
122
|
name=ModelName.GEMINI_2_5_PRO,
|
|
115
123
|
provider=ProviderType.GOOGLE,
|
|
@@ -32,6 +32,34 @@ logger = get_logger(__name__)
|
|
|
32
32
|
_model_cache: dict[tuple[ProviderType, KeyProvider, ModelName, str], Model] = {}
|
|
33
33
|
|
|
34
34
|
|
|
35
|
+
def get_default_model_for_provider(config: ShotgunConfig) -> ModelName:
|
|
36
|
+
"""Get the default model based on which provider/account is configured.
|
|
37
|
+
|
|
38
|
+
Checks API keys in priority order and returns appropriate default model.
|
|
39
|
+
Treats Shotgun Account as a provider context.
|
|
40
|
+
|
|
41
|
+
Args:
|
|
42
|
+
config: Shotgun configuration containing API keys
|
|
43
|
+
|
|
44
|
+
Returns:
|
|
45
|
+
Default ModelName for the configured provider/account
|
|
46
|
+
"""
|
|
47
|
+
# Priority 1: Shotgun Account
|
|
48
|
+
if _get_api_key(config.shotgun.api_key):
|
|
49
|
+
return ModelName.CLAUDE_HAIKU_4_5
|
|
50
|
+
|
|
51
|
+
# Priority 2: Individual provider keys
|
|
52
|
+
if _get_api_key(config.anthropic.api_key):
|
|
53
|
+
return ModelName.CLAUDE_HAIKU_4_5
|
|
54
|
+
if _get_api_key(config.openai.api_key):
|
|
55
|
+
return ModelName.GPT_5
|
|
56
|
+
if _get_api_key(config.google.api_key):
|
|
57
|
+
return ModelName.GEMINI_2_5_PRO
|
|
58
|
+
|
|
59
|
+
# Fallback: system-wide default
|
|
60
|
+
return ModelName.CLAUDE_HAIKU_4_5
|
|
61
|
+
|
|
62
|
+
|
|
35
63
|
def get_or_create_model(
|
|
36
64
|
provider: ProviderType,
|
|
37
65
|
key_provider: "KeyProvider",
|
|
@@ -172,7 +200,7 @@ def get_provider_model(
|
|
|
172
200
|
model_name = provider_or_model
|
|
173
201
|
else:
|
|
174
202
|
# No specific model requested - use selected or default
|
|
175
|
-
model_name = config.selected_model or ModelName.
|
|
203
|
+
model_name = config.selected_model or ModelName.CLAUDE_HAIKU_4_5
|
|
176
204
|
|
|
177
205
|
if model_name not in MODEL_SPECS:
|
|
178
206
|
raise ValueError(f"Model '{model_name.value}' not found")
|
|
@@ -247,8 +275,8 @@ def get_provider_model(
|
|
|
247
275
|
if not api_key:
|
|
248
276
|
raise ValueError("Anthropic API key not configured. Set via config.")
|
|
249
277
|
|
|
250
|
-
# Use requested model or default to claude-
|
|
251
|
-
model_name = requested_model if requested_model else ModelName.
|
|
278
|
+
# Use requested model or default to claude-haiku-4-5
|
|
279
|
+
model_name = requested_model if requested_model else ModelName.CLAUDE_HAIKU_4_5
|
|
252
280
|
if model_name not in MODEL_SPECS:
|
|
253
281
|
raise ValueError(f"Model '{model_name.value}' not found")
|
|
254
282
|
spec = MODEL_SPECS[model_name]
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
"""Shotgun backend service API endpoints and URLs."""
|
|
2
2
|
|
|
3
|
+
import os
|
|
4
|
+
|
|
3
5
|
# Shotgun Web API base URL (for authentication/subscription)
|
|
4
6
|
# Can be overridden with environment variable
|
|
5
|
-
SHOTGUN_WEB_BASE_URL =
|
|
7
|
+
SHOTGUN_WEB_BASE_URL = os.getenv(
|
|
8
|
+
"SHOTGUN_WEB_BASE_URL", "https://api-219702594231.us-east4.run.app"
|
|
9
|
+
)
|
|
6
10
|
# Shotgun's LiteLLM proxy base URL (for AI model requests)
|
|
7
|
-
LITELLM_PROXY_BASE_URL =
|
|
11
|
+
LITELLM_PROXY_BASE_URL = os.getenv(
|
|
12
|
+
"SHOTGUN_ACCOUNT_LLM_BASE_URL", "https://litellm-219702594231.us-east4.run.app"
|
|
13
|
+
)
|
|
8
14
|
|
|
9
15
|
# Provider-specific LiteLLM proxy endpoints
|
|
10
16
|
LITELLM_PROXY_ANTHROPIC_BASE = f"{LITELLM_PROXY_BASE_URL}/anthropic"
|
|
@@ -12,8 +12,8 @@ POSTHOG_API_KEY = ''
|
|
|
12
12
|
POSTHOG_PROJECT_ID = '191396'
|
|
13
13
|
|
|
14
14
|
# Logfire configuration embedded at build time (only for dev builds)
|
|
15
|
-
LOGFIRE_ENABLED = '
|
|
16
|
-
LOGFIRE_TOKEN = '
|
|
15
|
+
LOGFIRE_ENABLED = ''
|
|
16
|
+
LOGFIRE_TOKEN = ''
|
|
17
17
|
|
|
18
18
|
# Build metadata
|
|
19
19
|
BUILD_TIME_ENV = "production" if SENTRY_DSN else "development"
|
|
@@ -45,7 +45,7 @@ def update(
|
|
|
45
45
|
|
|
46
46
|
This command will:
|
|
47
47
|
- Check PyPI for the latest version
|
|
48
|
-
- Detect your installation method (pipx, pip, or venv)
|
|
48
|
+
- Detect your installation method (uvx, uv-tool, pipx, pip, or venv)
|
|
49
49
|
- Perform the appropriate upgrade command
|
|
50
50
|
|
|
51
51
|
Examples:
|
|
@@ -93,6 +93,8 @@ def update(
|
|
|
93
93
|
)
|
|
94
94
|
console.print(
|
|
95
95
|
"Use --force to update anyway, or install the stable version with:\n"
|
|
96
|
+
" uv tool install shotgun-sh\n"
|
|
97
|
+
" or\n"
|
|
96
98
|
" pipx install shotgun-sh\n"
|
|
97
99
|
" or\n"
|
|
98
100
|
" pip install shotgun-sh",
|
|
@@ -134,7 +136,19 @@ def update(
|
|
|
134
136
|
console.print(f"\n[red]✗[/red] {message}", style="bold red")
|
|
135
137
|
|
|
136
138
|
# Provide manual update instructions
|
|
137
|
-
if method == "
|
|
139
|
+
if method == "uvx":
|
|
140
|
+
console.print(
|
|
141
|
+
"\n[yellow]Run uvx again to use the latest version:[/yellow]\n"
|
|
142
|
+
" uvx shotgun-sh\n"
|
|
143
|
+
"\n[yellow]Or install permanently:[/yellow]\n"
|
|
144
|
+
" uv tool install shotgun-sh"
|
|
145
|
+
)
|
|
146
|
+
elif method == "uv-tool":
|
|
147
|
+
console.print(
|
|
148
|
+
"\n[yellow]Try updating manually:[/yellow]\n"
|
|
149
|
+
" uv tool upgrade shotgun-sh"
|
|
150
|
+
)
|
|
151
|
+
elif method == "pipx":
|
|
138
152
|
console.print(
|
|
139
153
|
"\n[yellow]Try updating manually:[/yellow]\n"
|
|
140
154
|
" pipx upgrade shotgun-sh"
|
|
@@ -371,7 +371,16 @@ class CodebaseGraphManager:
|
|
|
371
371
|
)
|
|
372
372
|
import shutil
|
|
373
373
|
|
|
374
|
-
|
|
374
|
+
# Handle both files and directories (kuzu v0.11.2+ uses files)
|
|
375
|
+
if graph_path.is_file():
|
|
376
|
+
graph_path.unlink() # Delete file
|
|
377
|
+
# Also delete WAL file if it exists
|
|
378
|
+
wal_path = graph_path.with_suffix(graph_path.suffix + ".wal")
|
|
379
|
+
if wal_path.exists():
|
|
380
|
+
wal_path.unlink()
|
|
381
|
+
logger.debug(f"Deleted WAL file: {wal_path}")
|
|
382
|
+
else:
|
|
383
|
+
shutil.rmtree(graph_path) # Delete directory
|
|
375
384
|
|
|
376
385
|
# Import the builder from local core module
|
|
377
386
|
from shotgun.codebase.core import CodebaseIngestor
|
|
@@ -125,6 +125,41 @@ def main(
|
|
|
125
125
|
help="Continue previous TUI conversation",
|
|
126
126
|
),
|
|
127
127
|
] = False,
|
|
128
|
+
web: Annotated[
|
|
129
|
+
bool,
|
|
130
|
+
typer.Option(
|
|
131
|
+
"--web",
|
|
132
|
+
help="Serve TUI as web application",
|
|
133
|
+
),
|
|
134
|
+
] = False,
|
|
135
|
+
port: Annotated[
|
|
136
|
+
int,
|
|
137
|
+
typer.Option(
|
|
138
|
+
"--port",
|
|
139
|
+
help="Port for web server (only used with --web)",
|
|
140
|
+
),
|
|
141
|
+
] = 8000,
|
|
142
|
+
host: Annotated[
|
|
143
|
+
str,
|
|
144
|
+
typer.Option(
|
|
145
|
+
"--host",
|
|
146
|
+
help="Host address for web server (only used with --web)",
|
|
147
|
+
),
|
|
148
|
+
] = "localhost",
|
|
149
|
+
public_url: Annotated[
|
|
150
|
+
str | None,
|
|
151
|
+
typer.Option(
|
|
152
|
+
"--public-url",
|
|
153
|
+
help="Public URL if behind proxy (only used with --web)",
|
|
154
|
+
),
|
|
155
|
+
] = None,
|
|
156
|
+
force_reindex: Annotated[
|
|
157
|
+
bool,
|
|
158
|
+
typer.Option(
|
|
159
|
+
"--force-reindex",
|
|
160
|
+
help="Force re-indexing of codebase (ignores existing index)",
|
|
161
|
+
),
|
|
162
|
+
] = False,
|
|
128
163
|
) -> None:
|
|
129
164
|
"""Shotgun - AI-powered CLI tool."""
|
|
130
165
|
logger.debug("Starting shotgun CLI application")
|
|
@@ -134,16 +169,35 @@ def main(
|
|
|
134
169
|
perform_auto_update_async(no_update_check=no_update_check)
|
|
135
170
|
|
|
136
171
|
if ctx.invoked_subcommand is None and not ctx.resilient_parsing:
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
172
|
+
if web:
|
|
173
|
+
logger.debug("Launching shotgun TUI as web application")
|
|
174
|
+
try:
|
|
175
|
+
tui_app.serve(
|
|
176
|
+
host=host,
|
|
177
|
+
port=port,
|
|
178
|
+
public_url=public_url,
|
|
179
|
+
no_update_check=no_update_check,
|
|
180
|
+
continue_session=continue_session,
|
|
181
|
+
force_reindex=force_reindex,
|
|
182
|
+
)
|
|
183
|
+
finally:
|
|
184
|
+
# Ensure PostHog is shut down cleanly even if server exits unexpectedly
|
|
185
|
+
from shotgun.posthog_telemetry import shutdown
|
|
186
|
+
|
|
187
|
+
shutdown()
|
|
188
|
+
else:
|
|
189
|
+
logger.debug("Launching shotgun TUI application")
|
|
190
|
+
try:
|
|
191
|
+
tui_app.run(
|
|
192
|
+
no_update_check=no_update_check,
|
|
193
|
+
continue_session=continue_session,
|
|
194
|
+
force_reindex=force_reindex,
|
|
195
|
+
)
|
|
196
|
+
finally:
|
|
197
|
+
# Ensure PostHog is shut down cleanly even if TUI exits unexpectedly
|
|
198
|
+
from shotgun.posthog_telemetry import shutdown
|
|
199
|
+
|
|
200
|
+
shutdown()
|
|
147
201
|
raise typer.Exit()
|
|
148
202
|
|
|
149
203
|
# For CLI commands, register PostHog shutdown handler
|