kekkai-cli 1.0.0__py3-none-any.whl → 1.0.2__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.
kekkai/output.py CHANGED
@@ -10,6 +10,8 @@ import re
10
10
  from dataclasses import dataclass
11
11
  from typing import TYPE_CHECKING
12
12
 
13
+ from rich import box
14
+ from rich.align import Align
13
15
  from rich.console import Console
14
16
  from rich.panel import Panel
15
17
  from rich.table import Table
@@ -22,6 +24,7 @@ if TYPE_CHECKING:
22
24
  __all__ = [
23
25
  "console",
24
26
  "splash",
27
+ "print_splash",
25
28
  "print_scan_summary",
26
29
  "sanitize_for_terminal",
27
30
  "sanitize_error",
@@ -33,10 +36,12 @@ ANSI_ESCAPE_PATTERN = re.compile(r"\x1b\[[0-9;]*[a-zA-Z]")
33
36
  KEKKAI_THEME = Theme(
34
37
  {
35
38
  "info": "dim cyan",
36
- "warning": "yellow",
39
+ "warning": "magenta",
37
40
  "danger": "bold red",
38
41
  "success": "bold green",
39
- "header": "bold white on blue",
42
+ "header": "bold white",
43
+ "title": "bold cyan",
44
+ "text": "white",
40
45
  "muted": "dim white",
41
46
  "brand": "bold cyan",
42
47
  }
@@ -45,14 +50,77 @@ KEKKAI_THEME = Theme(
45
50
  console = Console(theme=KEKKAI_THEME)
46
51
 
47
52
  BANNER_ASCII = r"""
48
- _ __ _ _ _
49
- | |/ /___ | | _| | ____ _(_)
50
- | ' // _ \| |/ / |/ / _` | |
51
- | . \ __/| <| < (_| | |
52
- |_|\_\___|_|\_\_|\_\__,_|_|
53
+ ██ ▄█▀▓█████ ██ ▄█▀ ██ ▄█▀▄▄▄ ██▓
54
+ ██▄█▒ ▓█ ▀ ██▄█▒ ██▄█▒▒████▄ ▓██▒
55
+ ▓███▄░ ▒███ ▓███▄░ ▓███▄░▒██ ▀█▄ ▒██▒
56
+ ▓██ █▄ ▒▓█ ▓██ █▄ ▓██ █▄░██▄▄▄▄██ ░██░
57
+ ▒██▒ █▄░▒████▒▒██▒ █▄▒██▒ █▄▓█ ▓██▒░██░
58
+ ▒ ▒▒ ▓▒░░ ▒░ ░▒ ▒▒ ▓▒▒ ▒▒ ▓▒▒▒ ▓▒█░░▓
59
+ ░ ░▒ ▒░ ░ ░ ░░ ░▒ ▒░░ ░▒ ▒░ ▒ ▒▒ ░ ▒ ░
60
+ ░ ░░ ░ ░ ░ ░░ ░ ░ ░░ ░ ░ ▒
53
61
  """
54
62
 
55
- VERSION = "1.0.0"
63
+ VERSION = "1.0.2"
64
+
65
+
66
+ def print_splash() -> None:
67
+ """Print the Kekkai splash screen with menu and tips."""
68
+ header_text = Text(BANNER_ASCII, style="header")
69
+ subtitle = Text("Local-first AppSec Orchestrator", style="info")
70
+ subtitle.justify = "center"
71
+
72
+ header_panel = Panel(
73
+ Align.center(Text.assemble(header_text, "\n", subtitle)),
74
+ box=box.HEAVY,
75
+ style="info",
76
+ padding=(1, 2),
77
+ )
78
+
79
+ menu_table = Table(box=box.SIMPLE, show_header=False, padding=(0, 2), expand=True)
80
+ menu_table.add_column("Command", style="title", ratio=1)
81
+ menu_table.add_column("Description", style="text", ratio=3)
82
+
83
+ menu_table.add_row("kekkai scan", "Run a comprehensive security scan in the current directory.")
84
+ menu_table.add_row("kekkai dojo", "Interact with your DefectDojo instance (import/export).")
85
+ menu_table.add_row("kekkai report", "Generate compliance and audit reports.")
86
+ menu_table.add_row("kekkai config", "Configure local settings and API keys.")
87
+
88
+ menu_panel = Panel(
89
+ menu_table,
90
+ title="[header]COMMAND MENU[/]",
91
+ border_style="dim cyan",
92
+ padding=(1, 2),
93
+ )
94
+
95
+ tips_content = Text()
96
+ tips_content.append("Best Practices:\n", style="warning")
97
+ tips_content.append(" - Run scans locally before pushing to CI to save time.\n", style="text")
98
+ tips_content.append(" - Use .kekkaiignore to filter out known false positives.\n", style="text")
99
+ tips_content.append(
100
+ " - Keep your CLI updated to catch the latest CVE signatures.\n\n", style="text"
101
+ )
102
+
103
+ tips_content.append("Open Source:\n", style="success")
104
+ tips_content.append(
105
+ " We are looking for collaborators! Star us on GitHub or submit a PR.\n\n", style="text"
106
+ )
107
+
108
+ tips_content.append("Enterprise Features:\n", style="danger")
109
+ tips_content.append(
110
+ " ThreatFlow visualization and RBAC require an active Enterprise license.", style="text"
111
+ )
112
+
113
+ tips_panel = Panel(
114
+ tips_content,
115
+ title="[header]QUICK TIPS & INFO[/]",
116
+ border_style="dim cyan",
117
+ padding=(1, 2),
118
+ )
119
+
120
+ console.print(header_panel)
121
+ console.print(menu_panel)
122
+ console.print(tips_panel)
123
+ console.print()
56
124
 
57
125
 
58
126
  def splash(*, force_plain: bool = False) -> str:
@@ -67,15 +135,8 @@ def splash(*, force_plain: bool = False) -> str:
67
135
  if force_plain or not console.is_terminal:
68
136
  return f"Kekkai v{VERSION} - Local-First AppSec Orchestrator"
69
137
 
70
- banner_text = Text(BANNER_ASCII.strip(), style="brand")
71
- panel = Panel(
72
- banner_text,
73
- subtitle=f"[muted]v{VERSION} — Local-First AppSec Orchestrator[/muted]",
74
- border_style="blue",
75
- padding=(0, 2),
76
- )
77
138
  with console.capture() as capture:
78
- console.print(panel)
139
+ print_splash()
79
140
  result: str = capture.get()
80
141
  return result
81
142
 
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kekkai-cli
3
- Version: 1.0.0
4
- Summary: Kekkai/Regulon monorepo (local-first AppSec orchestration + compliance checker)
3
+ Version: 1.0.2
4
+ Summary: Kekkai monorepo (local-first AppSec orchestration + compliance checker)
5
5
  Requires-Python: >=3.12
6
6
  Description-Content-Type: text/markdown
7
7
  Requires-Dist: rich>=13.0.0
@@ -4,7 +4,7 @@ kekkai/config.py,sha256=LE7bKsmv5dim5KnZya0V7_LtviNQ1V0pMN_6FyAsMpc,13084
4
4
  kekkai/dojo.py,sha256=DchLaTnDBwX0D14lTRdCtwql_II8aDEZ0JEq9F-n4MI,15887
5
5
  kekkai/dojo_import.py,sha256=oI-vwpLITA7-U2_MxhaTp_PYfr5HqvcFy3VzKsWA6IY,6911
6
6
  kekkai/manifest.py,sha256=Ph5xGDKuVxMW1GVIisRhxUelaiVZQe-W5sZWsq4lHqs,1887
7
- kekkai/output.py,sha256=oEt-T49wXUvmhyAwnsdxPGrw3Ql5jUWApdXpzhlKRN8,6008
7
+ kekkai/output.py,sha256=0_7BaQOa3Jz9sHTgGeulPa9GO2YVM1MajdOUYEwBeDI,8731
8
8
  kekkai/paths.py,sha256=EcyG3CEOQFQygowu7O5Mp85dKkXWWvnm1h0j_BetGxY,1190
9
9
  kekkai/policy.py,sha256=0XCUH-SbnO1PsM-exjSFHYHRnLkiNa50QfkyPakwNko,9792
10
10
  kekkai/runner.py,sha256=MBFUiJ4sSVEGNbJ6cv-8p1WHaHqjio6yWEfr_K4GuTs,2037
@@ -83,8 +83,8 @@ portal/ops/monitoring.py,sha256=xhLbKjVaob709K4x0dEsOo4lh7Ddm2A4UE2ZmhfmMtI,1790
83
83
  portal/ops/restore.py,sha256=rgzKoBIilgoPPv5gZhSSBuLKG1skKw5ryoCRR3d7CPQ,17058
84
84
  portal/ops/secrets.py,sha256=wu2bUfJGctbGjyuGUgvUc_Y6IH1SCW16dExtqcKu_kg,14338
85
85
  portal/ops/upgrade.py,sha256=fXsIXCJYYABdWDECDXkt7F2PidzNtO6Zr-g0Y5PLlVU,20106
86
- kekkai_cli-1.0.0.dist-info/METADATA,sha256=htJH1nyVjsze_4rHWPSQ4_AVSDbZJzZYltPh-krm0pY,3660
87
- kekkai_cli-1.0.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
88
- kekkai_cli-1.0.0.dist-info/entry_points.txt,sha256=WUEX6IISnRcwlQAdhisPfIIV3Us2MYCwtJoyPpLJO44,75
89
- kekkai_cli-1.0.0.dist-info/top_level.txt,sha256=u0J4T-Rnb0cgs0LfzZAUNt6nx1d5l7wKn8vOuo9FBEY,26
90
- kekkai_cli-1.0.0.dist-info/RECORD,,
86
+ kekkai_cli-1.0.2.dist-info/METADATA,sha256=UMNnGqkAGDPPnhx7Rr5jFefUwAiCOBKkTKsIeODr16Q,3652
87
+ kekkai_cli-1.0.2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
88
+ kekkai_cli-1.0.2.dist-info/entry_points.txt,sha256=WUEX6IISnRcwlQAdhisPfIIV3Us2MYCwtJoyPpLJO44,75
89
+ kekkai_cli-1.0.2.dist-info/top_level.txt,sha256=u0J4T-Rnb0cgs0LfzZAUNt6nx1d5l7wKn8vOuo9FBEY,26
90
+ kekkai_cli-1.0.2.dist-info/RECORD,,