gator-command 1.0.0__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.
- gator_command/__init__.py +2 -0
- gator_command/cli.py +137 -0
- gator_command/scripts/crawler.py +633 -0
- gator_command/scripts/dashboard/dashboard.css +982 -0
- gator_command/scripts/dashboard/dashboard.html +84 -0
- gator_command/scripts/dashboard/dashboard.js +419 -0
- gator_command/scripts/dashboard/views/audit.js +270 -0
- gator_command/scripts/dashboard/views/fleet.js +307 -0
- gator_command/scripts/dashboard/views/repo.js +599 -0
- gator_command/scripts/dashboard/views/settings.js +173 -0
- gator_command/scripts/dashboard/views/updates.js +308 -0
- gator_command/scripts/enforcer-prompt.md +22 -0
- gator_command/scripts/extract-claude-sessions.py +489 -0
- gator_command/scripts/extract-codex-sessions.py +477 -0
- gator_command/scripts/extract-gemini-sessions.py +410 -0
- gator_command/scripts/gator-audit.py +956 -0
- gator_command/scripts/gator-charter-draft.py +919 -0
- gator_command/scripts/gator-charter-lint.py +427 -0
- gator_command/scripts/gator-charter-verify.py +606 -0
- gator_command/scripts/gator-dashboard.py +1271 -0
- gator_command/scripts/gator-deploy.py +916 -0
- gator_command/scripts/gator-drift.py +569 -0
- gator_command/scripts/gator-enforce.py +82 -0
- gator_command/scripts/gator-fleet-intel.py +460 -0
- gator_command/scripts/gator-fleet-report.py +615 -0
- gator_command/scripts/gator-init-command-post.py +315 -0
- gator_command/scripts/gator-init.py +434 -0
- gator_command/scripts/gator-machine-id.py +153 -0
- gator_command/scripts/gator-policy-status.py +631 -0
- gator_command/scripts/gator-pulse.py +459 -0
- gator_command/scripts/gator-repo-status.py +649 -0
- gator_command/scripts/gator-session-common.py +372 -0
- gator_command/scripts/gator-session-sink.py +831 -0
- gator_command/scripts/gator-sessions.py +1244 -0
- gator_command/scripts/gator-update.py +615 -0
- gator_command/scripts/gator-version.py +38 -0
- gator_command/scripts/gator_core.py +489 -0
- gator_command/scripts/gator_remote.py +381 -0
- gator_command/scripts/gator_runtime.py +142 -0
- gator_command/scripts/gatorize-actions.sh +989 -0
- gator_command/scripts/gatorize-lib.sh +166 -0
- gator_command/scripts/gatorize-post.sh +394 -0
- gator_command/scripts/gatorize.py +1163 -0
- gator_command/scripts/gatorize.sh +185 -0
- gator_command/scripts/generate_markdown.py +212 -0
- gator_command/scripts/generate_wiki.py +424 -0
- gator_command/scripts/graph_health.py +780 -0
- gator_command/scripts/memex-lint.py +286 -0
- gator_command/scripts/memex-lint.sh +205 -0
- gator_command/scripts/memex.py +1472 -0
- gator_command/scripts/memex_formatters.py +191 -0
- gator_command/scripts/memex_state.py +236 -0
- gator_command/scripts/spawn.py +650 -0
- gator_command/templates/gator-starter/blueprints/README.md +32 -0
- gator_command/templates/gator-starter/charterignore +53 -0
- gator_command/templates/gator-starter/charters/README.md +178 -0
- gator_command/templates/gator-starter/charters/_template.md +31 -0
- gator_command/templates/gator-starter/commands/commit.md +33 -0
- gator_command/templates/gator-starter/commands/init.md +11 -0
- gator_command/templates/gator-starter/commands/update.md +5 -0
- gator_command/templates/gator-starter/constitution.md +165 -0
- gator_command/templates/gator-starter/field-guides/README.md +25 -0
- gator_command/templates/gator-starter/gator-start-up.md +119 -0
- gator_command/templates/gator-starter/procedures/charter-alignment.md +83 -0
- gator_command/templates/gator-starter/procedures/enforcer-review.md +317 -0
- gator_command/templates/gator-starter/procedures/field-guide-generation.md +176 -0
- gator_command/templates/gator-starter/procedures/knowledge-capture.md +57 -0
- gator_command/templates/gator-starter/procedures/significance-check.md +69 -0
- gator_command/templates/gator-starter/reference-notes/concierge-responses.md +535 -0
- gator_command/templates/gator-starter/reference-notes/dangerous-patterns.md +91 -0
- gator_command/templates/gator-starter/reference-notes/dashboard-operations.md +22 -0
- gator_command/templates/gator-starter/reference-notes/enforcer-configuration.md +232 -0
- gator_command/templates/gator-starter/reference-notes/example-project.md +289 -0
- gator_command/templates/gator-starter/reference-notes/failure-modes-and-self-correction.md +72 -0
- gator_command/templates/gator-starter/reference-notes/git-workflow.md +60 -0
- gator_command/templates/gator-starter/reference-notes/identity-and-ownership.md +37 -0
- gator_command/templates/gator-starter/reference-notes/refactor-approach.md +155 -0
- gator_command/templates/gator-starter/reference-notes/what-gator-requires-from-a-model.md +108 -0
- gator_command/templates/gator-starter/reference-notes/why-navigation-coding-feels-different.md +99 -0
- gator_command/templates/gator-starter/reference-notes/workflow-profiles.md +155 -0
- gator_command/templates/gator-starter/scripts/__pycache__/enforcer-review.cpython-313.pyc +0 -0
- gator_command/templates/gator-starter/scripts/__pycache__/gator-approve.cpython-313.pyc +0 -0
- gator_command/templates/gator-starter/scripts/__pycache__/gator-init.cpython-313.pyc +0 -0
- gator_command/templates/gator-starter/scripts/__pycache__/gator-pre-commit.cpython-313.pyc +0 -0
- gator_command/templates/gator-starter/scripts/__pycache__/gator-update.cpython-313.pyc +0 -0
- gator_command/templates/gator-starter/scripts/enforcer-prompt.md +55 -0
- gator_command/templates/gator-starter/scripts/enforcer-review.py +1551 -0
- gator_command/templates/gator-starter/scripts/gator-approve.py +139 -0
- gator_command/templates/gator-starter/scripts/gator-enforce.py +82 -0
- gator_command/templates/gator-starter/scripts/gator-init.py +434 -0
- gator_command/templates/gator-starter/scripts/gator-pre-commit.py +2670 -0
- gator_command/templates/gator-starter/scripts/gator-pulse.py +459 -0
- gator_command/templates/gator-starter/scripts/gator-update.py +615 -0
- gator_command/templates/gator-starter/scripts/gator-version.py +38 -0
- gator_command/templates/gator-starter/scripts/gator_core.py +487 -0
- gator_command/templates/gator-starter/scripts/hooks/__pycache__/commit-msgcpython-313.pyc +0 -0
- gator_command/templates/gator-starter/scripts/hooks/__pycache__/post-commitcpython-313.pyc +0 -0
- gator_command/templates/gator-starter/scripts/hooks/__pycache__/pre-commitcpython-313.pyc +0 -0
- gator_command/templates/gator-starter/scripts/hooks/commit-msg +5 -0
- gator_command/templates/gator-starter/scripts/hooks/post-commit +7 -0
- gator_command/templates/gator-starter/scripts/hooks/pre-commit +5 -0
- gator_command/templates/gator-starter/sessions/.gitignore +7 -0
- gator_command/templates/gator-starter/vault/.gitkeep +0 -0
- gator_command/templates/gator-starter/whiteboard.md +5 -0
- gator_command-1.0.0.dist-info/METADATA +122 -0
- gator_command-1.0.0.dist-info/RECORD +110 -0
- gator_command-1.0.0.dist-info/WHEEL +5 -0
- gator_command-1.0.0.dist-info/entry_points.txt +2 -0
- gator_command-1.0.0.dist-info/licenses/LICENSE +21 -0
- gator_command-1.0.0.dist-info/top_level.txt +1 -0
gator_command/cli.py
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"""
|
|
2
|
+
gator — unified CLI for Gator Command.
|
|
3
|
+
|
|
4
|
+
Dispatches to existing Gator scripts. This is the thin wrapper that makes
|
|
5
|
+
`pipx install gator-command` → `gator <command>` work.
|
|
6
|
+
|
|
7
|
+
For source-checkout and public-clone modes, scripts are resolved from the
|
|
8
|
+
filesystem relative to gator_runtime.py. For installed-package mode,
|
|
9
|
+
scripts are resolved from the package installation.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
import argparse
|
|
13
|
+
import subprocess
|
|
14
|
+
import sys
|
|
15
|
+
from pathlib import Path
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# ---------------------------------------------------------------------------
|
|
19
|
+
# Script resolution
|
|
20
|
+
# ---------------------------------------------------------------------------
|
|
21
|
+
|
|
22
|
+
def _find_scripts_dir():
|
|
23
|
+
"""Find the Gator scripts directory.
|
|
24
|
+
|
|
25
|
+
Resolution order:
|
|
26
|
+
1. Package-bundled scripts (works for pip install and pipx install)
|
|
27
|
+
2. Source checkout: gator-command/scripts/ relative to repo root
|
|
28
|
+
3. Public clone: gator-engine/scripts/ relative to repo root
|
|
29
|
+
"""
|
|
30
|
+
cli_dir = Path(__file__).resolve().parent
|
|
31
|
+
|
|
32
|
+
# Installed package: scripts bundled as package data
|
|
33
|
+
candidate = cli_dir / "scripts"
|
|
34
|
+
if candidate.is_dir() and (candidate / "gator_core.py").exists():
|
|
35
|
+
return candidate
|
|
36
|
+
|
|
37
|
+
# Source checkout: cli.py is at src/gator_command/cli.py → repo root is ../../
|
|
38
|
+
repo_root = cli_dir.parent.parent
|
|
39
|
+
candidate = repo_root / "gator-command" / "scripts"
|
|
40
|
+
if candidate.is_dir() and (candidate / "gator_core.py").exists():
|
|
41
|
+
return candidate
|
|
42
|
+
|
|
43
|
+
# Public clone: gator-engine/scripts/
|
|
44
|
+
candidate = repo_root / "gator-engine" / "scripts"
|
|
45
|
+
if candidate.is_dir() and (candidate / "gator_core.py").exists():
|
|
46
|
+
return candidate
|
|
47
|
+
|
|
48
|
+
return None
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def _run_script(scripts_dir, script_name, args):
|
|
52
|
+
"""Run a Gator script by name, forwarding arguments."""
|
|
53
|
+
script_path = scripts_dir / script_name
|
|
54
|
+
if not script_path.exists():
|
|
55
|
+
print(f" Error: script not found: {script_name}", file=sys.stderr)
|
|
56
|
+
print(f" Looked in: {scripts_dir}", file=sys.stderr)
|
|
57
|
+
sys.exit(1)
|
|
58
|
+
result = subprocess.run(
|
|
59
|
+
[sys.executable, str(script_path)] + args,
|
|
60
|
+
)
|
|
61
|
+
sys.exit(result.returncode)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
# ---------------------------------------------------------------------------
|
|
65
|
+
# Command definitions
|
|
66
|
+
# ---------------------------------------------------------------------------
|
|
67
|
+
|
|
68
|
+
COMMANDS = {
|
|
69
|
+
"version": ("gator-version.py", "Show Gator version"),
|
|
70
|
+
"init": ("gator-init.py", "Run session-opening procedure"),
|
|
71
|
+
"pulse": ("gator-pulse.py", "Generate strategic operations brief"),
|
|
72
|
+
"dashboard": ("gator-dashboard.py", "Start the governance dashboard"),
|
|
73
|
+
"audit": ("gator-audit.py", "Run governance audit"),
|
|
74
|
+
"drift": ("gator-drift.py", "Check fleet for governance drift"),
|
|
75
|
+
"fleet": ("gator-fleet-report.py", "Fleet status report"),
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
# ---------------------------------------------------------------------------
|
|
80
|
+
# Entry point
|
|
81
|
+
# ---------------------------------------------------------------------------
|
|
82
|
+
|
|
83
|
+
def main():
|
|
84
|
+
parser = argparse.ArgumentParser(
|
|
85
|
+
prog="gator",
|
|
86
|
+
description="Gator — Git-native governance for AI-assisted engineering",
|
|
87
|
+
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
88
|
+
epilog=(
|
|
89
|
+
"examples:\n"
|
|
90
|
+
" gator version Show installed version\n"
|
|
91
|
+
" gator init Start a governed session\n"
|
|
92
|
+
" gator dashboard Launch the governance dashboard\n"
|
|
93
|
+
" gator pulse Generate the strategic operations brief\n"
|
|
94
|
+
),
|
|
95
|
+
)
|
|
96
|
+
parser.add_argument(
|
|
97
|
+
"--version", "-V",
|
|
98
|
+
action="version",
|
|
99
|
+
version=f"%(prog)s {_get_version()}",
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
sub = parser.add_subparsers(dest="command")
|
|
103
|
+
for cmd_name, (_, help_text) in COMMANDS.items():
|
|
104
|
+
sub.add_parser(cmd_name, help=help_text, add_help=False)
|
|
105
|
+
|
|
106
|
+
args, remaining = parser.parse_known_args()
|
|
107
|
+
|
|
108
|
+
if not args.command:
|
|
109
|
+
parser.print_help()
|
|
110
|
+
sys.exit(0)
|
|
111
|
+
|
|
112
|
+
scripts_dir = _find_scripts_dir()
|
|
113
|
+
if not scripts_dir:
|
|
114
|
+
print(" Error: Gator scripts directory not found.", file=sys.stderr)
|
|
115
|
+
print(" Run from a Gator checkout, or install with: pipx install gator-command", file=sys.stderr)
|
|
116
|
+
sys.exit(1)
|
|
117
|
+
|
|
118
|
+
script_name, _ = COMMANDS[args.command]
|
|
119
|
+
_run_script(scripts_dir, script_name, remaining)
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def _get_version():
|
|
123
|
+
"""Get version from package metadata or VERSION file."""
|
|
124
|
+
try:
|
|
125
|
+
from gator_command import __version__
|
|
126
|
+
return __version__
|
|
127
|
+
except ImportError:
|
|
128
|
+
pass
|
|
129
|
+
# Fallback: read VERSION file
|
|
130
|
+
version_file = Path(__file__).resolve().parent.parent.parent / "VERSION"
|
|
131
|
+
if version_file.exists():
|
|
132
|
+
return version_file.read_text(encoding="utf-8").strip()
|
|
133
|
+
return "unknown"
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
if __name__ == "__main__":
|
|
137
|
+
main()
|