scc-cli 1.5.3__py3-none-any.whl
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 scc-cli might be problematic. Click here for more details.
- scc_cli/__init__.py +15 -0
- scc_cli/audit/__init__.py +37 -0
- scc_cli/audit/parser.py +191 -0
- scc_cli/audit/reader.py +180 -0
- scc_cli/auth.py +145 -0
- scc_cli/claude_adapter.py +485 -0
- scc_cli/cli.py +311 -0
- scc_cli/cli_common.py +190 -0
- scc_cli/cli_helpers.py +244 -0
- scc_cli/commands/__init__.py +20 -0
- scc_cli/commands/admin.py +708 -0
- scc_cli/commands/audit.py +246 -0
- scc_cli/commands/config.py +528 -0
- scc_cli/commands/exceptions.py +696 -0
- scc_cli/commands/init.py +272 -0
- scc_cli/commands/launch/__init__.py +73 -0
- scc_cli/commands/launch/app.py +1247 -0
- scc_cli/commands/launch/render.py +309 -0
- scc_cli/commands/launch/sandbox.py +135 -0
- scc_cli/commands/launch/workspace.py +339 -0
- scc_cli/commands/org/__init__.py +49 -0
- scc_cli/commands/org/_builders.py +264 -0
- scc_cli/commands/org/app.py +41 -0
- scc_cli/commands/org/import_cmd.py +267 -0
- scc_cli/commands/org/init_cmd.py +269 -0
- scc_cli/commands/org/schema_cmd.py +76 -0
- scc_cli/commands/org/status_cmd.py +157 -0
- scc_cli/commands/org/update_cmd.py +330 -0
- scc_cli/commands/org/validate_cmd.py +138 -0
- scc_cli/commands/support.py +323 -0
- scc_cli/commands/team.py +910 -0
- scc_cli/commands/worktree/__init__.py +72 -0
- scc_cli/commands/worktree/_helpers.py +57 -0
- scc_cli/commands/worktree/app.py +170 -0
- scc_cli/commands/worktree/container_commands.py +385 -0
- scc_cli/commands/worktree/context_commands.py +61 -0
- scc_cli/commands/worktree/session_commands.py +128 -0
- scc_cli/commands/worktree/worktree_commands.py +734 -0
- scc_cli/config.py +647 -0
- scc_cli/confirm.py +20 -0
- scc_cli/console.py +562 -0
- scc_cli/contexts.py +394 -0
- scc_cli/core/__init__.py +68 -0
- scc_cli/core/constants.py +101 -0
- scc_cli/core/errors.py +297 -0
- scc_cli/core/exit_codes.py +91 -0
- scc_cli/core/workspace.py +57 -0
- scc_cli/deprecation.py +54 -0
- scc_cli/deps.py +189 -0
- scc_cli/docker/__init__.py +127 -0
- scc_cli/docker/core.py +467 -0
- scc_cli/docker/credentials.py +726 -0
- scc_cli/docker/launch.py +595 -0
- scc_cli/doctor/__init__.py +105 -0
- scc_cli/doctor/checks/__init__.py +166 -0
- scc_cli/doctor/checks/cache.py +314 -0
- scc_cli/doctor/checks/config.py +107 -0
- scc_cli/doctor/checks/environment.py +182 -0
- scc_cli/doctor/checks/json_helpers.py +157 -0
- scc_cli/doctor/checks/organization.py +264 -0
- scc_cli/doctor/checks/worktree.py +278 -0
- scc_cli/doctor/render.py +365 -0
- scc_cli/doctor/types.py +66 -0
- scc_cli/evaluation/__init__.py +27 -0
- scc_cli/evaluation/apply_exceptions.py +207 -0
- scc_cli/evaluation/evaluate.py +97 -0
- scc_cli/evaluation/models.py +80 -0
- scc_cli/git.py +84 -0
- scc_cli/json_command.py +166 -0
- scc_cli/json_output.py +159 -0
- scc_cli/kinds.py +65 -0
- scc_cli/marketplace/__init__.py +123 -0
- scc_cli/marketplace/adapter.py +74 -0
- scc_cli/marketplace/compute.py +377 -0
- scc_cli/marketplace/constants.py +87 -0
- scc_cli/marketplace/managed.py +135 -0
- scc_cli/marketplace/materialize.py +846 -0
- scc_cli/marketplace/normalize.py +548 -0
- scc_cli/marketplace/render.py +281 -0
- scc_cli/marketplace/resolve.py +459 -0
- scc_cli/marketplace/schema.py +506 -0
- scc_cli/marketplace/sync.py +279 -0
- scc_cli/marketplace/team_cache.py +195 -0
- scc_cli/marketplace/team_fetch.py +689 -0
- scc_cli/marketplace/trust.py +244 -0
- scc_cli/models/__init__.py +41 -0
- scc_cli/models/exceptions.py +273 -0
- scc_cli/models/plugin_audit.py +434 -0
- scc_cli/org_templates.py +269 -0
- scc_cli/output_mode.py +167 -0
- scc_cli/panels.py +113 -0
- scc_cli/platform.py +350 -0
- scc_cli/profiles.py +960 -0
- scc_cli/remote.py +443 -0
- scc_cli/schemas/__init__.py +1 -0
- scc_cli/schemas/org-v1.schema.json +456 -0
- scc_cli/schemas/team-config.v1.schema.json +163 -0
- scc_cli/services/__init__.py +1 -0
- scc_cli/services/git/__init__.py +79 -0
- scc_cli/services/git/branch.py +151 -0
- scc_cli/services/git/core.py +216 -0
- scc_cli/services/git/hooks.py +108 -0
- scc_cli/services/git/worktree.py +444 -0
- scc_cli/services/workspace/__init__.py +36 -0
- scc_cli/services/workspace/resolver.py +223 -0
- scc_cli/services/workspace/suspicious.py +200 -0
- scc_cli/sessions.py +425 -0
- scc_cli/setup.py +589 -0
- scc_cli/source_resolver.py +470 -0
- scc_cli/stats.py +378 -0
- scc_cli/stores/__init__.py +13 -0
- scc_cli/stores/exception_store.py +251 -0
- scc_cli/subprocess_utils.py +88 -0
- scc_cli/teams.py +383 -0
- scc_cli/templates/__init__.py +2 -0
- scc_cli/templates/org/__init__.py +0 -0
- scc_cli/templates/org/minimal.json +19 -0
- scc_cli/templates/org/reference.json +74 -0
- scc_cli/templates/org/strict.json +38 -0
- scc_cli/templates/org/teams.json +42 -0
- scc_cli/templates/statusline.sh +75 -0
- scc_cli/theme.py +348 -0
- scc_cli/ui/__init__.py +154 -0
- scc_cli/ui/branding.py +68 -0
- scc_cli/ui/chrome.py +401 -0
- scc_cli/ui/dashboard/__init__.py +62 -0
- scc_cli/ui/dashboard/_dashboard.py +794 -0
- scc_cli/ui/dashboard/loaders.py +452 -0
- scc_cli/ui/dashboard/models.py +185 -0
- scc_cli/ui/dashboard/orchestrator.py +735 -0
- scc_cli/ui/formatters.py +444 -0
- scc_cli/ui/gate.py +350 -0
- scc_cli/ui/git_interactive.py +869 -0
- scc_cli/ui/git_render.py +176 -0
- scc_cli/ui/help.py +157 -0
- scc_cli/ui/keys.py +615 -0
- scc_cli/ui/list_screen.py +437 -0
- scc_cli/ui/picker.py +763 -0
- scc_cli/ui/prompts.py +201 -0
- scc_cli/ui/quick_resume.py +116 -0
- scc_cli/ui/wizard.py +576 -0
- scc_cli/update.py +680 -0
- scc_cli/utils/__init__.py +39 -0
- scc_cli/utils/fixit.py +264 -0
- scc_cli/utils/fuzzy.py +124 -0
- scc_cli/utils/locks.py +114 -0
- scc_cli/utils/ttl.py +376 -0
- scc_cli/validate.py +455 -0
- scc_cli-1.5.3.dist-info/METADATA +401 -0
- scc_cli-1.5.3.dist-info/RECORD +153 -0
- scc_cli-1.5.3.dist-info/WHEEL +4 -0
- scc_cli-1.5.3.dist-info/entry_points.txt +2 -0
- scc_cli-1.5.3.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"""Context commands for work context management."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import typer
|
|
6
|
+
|
|
7
|
+
from ... import contexts
|
|
8
|
+
from ...cli_common import console, handle_errors
|
|
9
|
+
from ...confirm import Confirm
|
|
10
|
+
from ...panels import create_info_panel, create_success_panel
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@handle_errors
|
|
14
|
+
def context_clear_cmd(
|
|
15
|
+
yes: bool = typer.Option(False, "--yes", "-y", help="Skip confirmation prompt"),
|
|
16
|
+
) -> None:
|
|
17
|
+
"""Clear all recent work contexts from cache.
|
|
18
|
+
|
|
19
|
+
Use this command when the Recent Contexts list shows stale or
|
|
20
|
+
incorrect entries that you want to reset.
|
|
21
|
+
|
|
22
|
+
Examples:
|
|
23
|
+
scc context clear # With confirmation prompt
|
|
24
|
+
scc context clear --yes # Skip confirmation
|
|
25
|
+
"""
|
|
26
|
+
cache_path = contexts._get_contexts_path()
|
|
27
|
+
|
|
28
|
+
# Show current count
|
|
29
|
+
current_count = len(contexts.load_recent_contexts())
|
|
30
|
+
if current_count == 0:
|
|
31
|
+
console.print(
|
|
32
|
+
create_info_panel(
|
|
33
|
+
"No Contexts",
|
|
34
|
+
"No work contexts to clear.",
|
|
35
|
+
"Contexts are created when you run: scc start <workspace>",
|
|
36
|
+
)
|
|
37
|
+
)
|
|
38
|
+
return
|
|
39
|
+
|
|
40
|
+
# Confirm unless --yes (improved what/why/next confirmation)
|
|
41
|
+
if not yes:
|
|
42
|
+
console.print(
|
|
43
|
+
f"[yellow]This will remove {current_count} context(s) from {cache_path}[/yellow]"
|
|
44
|
+
)
|
|
45
|
+
if not Confirm.ask("Continue?"):
|
|
46
|
+
console.print("[dim]Cancelled.[/dim]")
|
|
47
|
+
return
|
|
48
|
+
|
|
49
|
+
# Clear and report
|
|
50
|
+
cleared = contexts.clear_contexts()
|
|
51
|
+
|
|
52
|
+
console.print(
|
|
53
|
+
create_success_panel(
|
|
54
|
+
"Contexts Cleared",
|
|
55
|
+
{
|
|
56
|
+
"Removed": f"{cleared} work context(s)",
|
|
57
|
+
"Cache file": str(cache_path),
|
|
58
|
+
},
|
|
59
|
+
)
|
|
60
|
+
)
|
|
61
|
+
console.print("[dim]Run 'scc start' to repopulate.[/dim]")
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"""Session commands for Claude Code session management."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import typer
|
|
6
|
+
|
|
7
|
+
from ... import config, sessions
|
|
8
|
+
from ...cli_common import console, handle_errors, render_responsive_table
|
|
9
|
+
from ...panels import create_warning_panel
|
|
10
|
+
from ...ui.picker import TeamSwitchRequested, pick_session
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@handle_errors
|
|
14
|
+
def sessions_cmd(
|
|
15
|
+
limit: int = typer.Option(10, "-n", "--limit", help="Number of sessions to show"),
|
|
16
|
+
team: str | None = typer.Option(None, "-t", "--team", help="Filter by team"),
|
|
17
|
+
all_teams: bool = typer.Option(
|
|
18
|
+
False, "--all", help="Show sessions for all teams (ignore active team)"
|
|
19
|
+
),
|
|
20
|
+
select: bool = typer.Option(
|
|
21
|
+
False, "--select", "-s", help="Interactive picker to select a session"
|
|
22
|
+
),
|
|
23
|
+
) -> None:
|
|
24
|
+
"""List recent Claude Code sessions."""
|
|
25
|
+
cfg = config.load_user_config()
|
|
26
|
+
active_team = cfg.get("selected_profile")
|
|
27
|
+
standalone_mode = config.is_standalone_mode()
|
|
28
|
+
|
|
29
|
+
# Resolve effective filter
|
|
30
|
+
filter_team: str | None
|
|
31
|
+
if all_teams:
|
|
32
|
+
filter_team = "__all__"
|
|
33
|
+
elif team:
|
|
34
|
+
filter_team = team
|
|
35
|
+
elif standalone_mode:
|
|
36
|
+
filter_team = None
|
|
37
|
+
elif active_team:
|
|
38
|
+
filter_team = active_team
|
|
39
|
+
else:
|
|
40
|
+
filter_team = "__all__"
|
|
41
|
+
console.print(
|
|
42
|
+
"[dim]No active team selected — showing all sessions. "
|
|
43
|
+
"Use 'scc team switch' or --team to filter.[/dim]"
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
recent = sessions.list_recent(limit)
|
|
47
|
+
if filter_team != "__all__":
|
|
48
|
+
recent = [s for s in recent if s.get("team") == filter_team]
|
|
49
|
+
|
|
50
|
+
# Interactive picker mode
|
|
51
|
+
if select and recent:
|
|
52
|
+
try:
|
|
53
|
+
selected = pick_session(
|
|
54
|
+
recent,
|
|
55
|
+
title="Select Session",
|
|
56
|
+
subtitle=f"{len(recent)} recent sessions",
|
|
57
|
+
)
|
|
58
|
+
if selected:
|
|
59
|
+
console.print(f"[green]Selected session:[/green] {selected.get('name', '-')}")
|
|
60
|
+
console.print(f"[dim]Workspace: {selected.get('workspace', '-')}[/dim]")
|
|
61
|
+
except TeamSwitchRequested:
|
|
62
|
+
console.print("[dim]Use 'scc team switch' to change teams[/dim]")
|
|
63
|
+
return
|
|
64
|
+
|
|
65
|
+
if not recent:
|
|
66
|
+
hint = "Start a session with: scc start <workspace>"
|
|
67
|
+
if filter_team not in ("__all__", None):
|
|
68
|
+
hint = "Use --all to show all teams or start a new session"
|
|
69
|
+
console.print(
|
|
70
|
+
create_warning_panel(
|
|
71
|
+
"No Sessions",
|
|
72
|
+
"No recent sessions found.",
|
|
73
|
+
hint,
|
|
74
|
+
)
|
|
75
|
+
)
|
|
76
|
+
return
|
|
77
|
+
|
|
78
|
+
# Build rows for responsive table
|
|
79
|
+
rows = []
|
|
80
|
+
for s in recent:
|
|
81
|
+
# Shorten workspace path if needed
|
|
82
|
+
ws = s.get("workspace", "-")
|
|
83
|
+
if len(ws) > 40:
|
|
84
|
+
ws = "..." + ws[-37:]
|
|
85
|
+
rows.append([s.get("name", "-"), ws, s.get("last_used", "-"), s.get("team", "-")])
|
|
86
|
+
|
|
87
|
+
title = "Recent Sessions"
|
|
88
|
+
if filter_team not in ("__all__", None):
|
|
89
|
+
title = f"Recent Sessions ({filter_team})"
|
|
90
|
+
elif filter_team is None and standalone_mode:
|
|
91
|
+
title = "Recent Sessions (standalone)"
|
|
92
|
+
|
|
93
|
+
render_responsive_table(
|
|
94
|
+
title=title,
|
|
95
|
+
columns=[
|
|
96
|
+
("Session", "cyan"),
|
|
97
|
+
("Workspace", "white"),
|
|
98
|
+
],
|
|
99
|
+
rows=rows,
|
|
100
|
+
wide_columns=[
|
|
101
|
+
("Last Used", "yellow"),
|
|
102
|
+
("Team", "green"),
|
|
103
|
+
],
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
@handle_errors
|
|
108
|
+
def session_list_cmd(
|
|
109
|
+
limit: int = typer.Option(10, "-n", "--limit", help="Number of sessions to show"),
|
|
110
|
+
team: str | None = typer.Option(None, "-t", "--team", help="Filter by team"),
|
|
111
|
+
all_teams: bool = typer.Option(
|
|
112
|
+
False, "--all", help="Show sessions for all teams (ignore active team)"
|
|
113
|
+
),
|
|
114
|
+
select: bool = typer.Option(
|
|
115
|
+
False, "--select", "-s", help="Interactive picker to select a session"
|
|
116
|
+
),
|
|
117
|
+
) -> None:
|
|
118
|
+
"""List recent Claude Code sessions.
|
|
119
|
+
|
|
120
|
+
Alias for 'scc sessions'. Provides symmetric command structure.
|
|
121
|
+
|
|
122
|
+
Examples:
|
|
123
|
+
scc session list
|
|
124
|
+
scc session list -n 20
|
|
125
|
+
scc session list --select
|
|
126
|
+
"""
|
|
127
|
+
# Delegate to sessions_cmd to avoid duplication
|
|
128
|
+
sessions_cmd(limit=limit, team=team, all_teams=all_teams, select=select)
|