feat: add the aegis-gitea-mcp setup command
Verifies the Gitea instance, token and scopes, registers or reuses the aegis-gitea-mcp OAuth app, generates missing secrets and writes a 0600 env file from the template. Prints client configs and deployment snippets without any secret value.
This commit is contained in:
1 parent
465a365d89
commit
1d223e6799
7 files changed
+1798
-3
No files matched your search
@@ -10,7 +10,7 @@ import argparse
|
||||
import sys
|
||||
from collections.abc import Sequence
|
||||
|
||||
from aegis_gitea_mcp import __version__
|
||||
from aegis_gitea_mcp import __version__, setup_cmd
|
||||
|
||||
|
||||
def build_parser() -> argparse.ArgumentParser:
|
||||
@@ -29,7 +29,8 @@ def build_parser() -> argparse.ArgumentParser:
|
||||
help="transport to serve (default: MCP_TRANSPORT, else stdio)",
|
||||
)
|
||||
|
||||
subparsers.add_parser("setup", help="interactive setup against a Gitea instance")
|
||||
setup = subparsers.add_parser("setup", help="verify a Gitea instance and write the env file")
|
||||
setup_cmd.add_arguments(setup)
|
||||
subparsers.add_parser("version", help="print the version and exit")
|
||||
return parser
|
||||
|
||||
@@ -48,6 +49,8 @@ def main(argv: Sequence[str] | None = None) -> int:
|
||||
if command == "version":
|
||||
print(__version__)
|
||||
return 0
|
||||
if command == "setup":
|
||||
return setup_cmd.run_setup(args)
|
||||
return _not_implemented(command)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user