Add CLI arguments and streamline documentation

- Add argparse with -p/--port, -H/--host, -d/--debug options
- Add --check-deps flag to verify tool availability
- Make host and port configurable via command line
- Consolidate README with Quick Start section
- Simplify installation into side-by-side table format
- Add Configuration section for environment variables
- Remove verbose API Endpoints and Stats Bar sections

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
James Smith
2025-12-29 21:56:59 +00:00
parent f7a08f890d
commit 32a4c096b2
2 changed files with 115 additions and 245 deletions
+47 -2
View File
@@ -173,6 +173,51 @@ def kill_all() -> Response:
def main() -> None:
"""Main entry point."""
import argparse
import config
parser = argparse.ArgumentParser(
description='INTERCEPT - Signal Intelligence Platform',
epilog='Environment variables: INTERCEPT_HOST, INTERCEPT_PORT, INTERCEPT_DEBUG, INTERCEPT_LOG_LEVEL'
)
parser.add_argument(
'-p', '--port',
type=int,
default=config.PORT,
help=f'Port to run server on (default: {config.PORT})'
)
parser.add_argument(
'-H', '--host',
default=config.HOST,
help=f'Host to bind to (default: {config.HOST})'
)
parser.add_argument(
'-d', '--debug',
action='store_true',
default=config.DEBUG,
help='Enable debug mode'
)
parser.add_argument(
'--check-deps',
action='store_true',
help='Check dependencies and exit'
)
args = parser.parse_args()
# Check dependencies only
if args.check_deps:
results = check_all_dependencies()
print("Dependency Status:")
print("-" * 40)
for mode, info in results.items():
status = "" if info['ready'] else ""
print(f"\n{status} {info['name']}:")
for tool, tool_info in info['tools'].items():
tool_status = "" if tool_info['installed'] else ""
req = " (required)" if tool_info['required'] else ""
print(f" {tool_status} {tool}{req}")
sys.exit(0)
print("=" * 50)
print(" INTERCEPT // Signal Intelligence")
print(" Pager / 433MHz / Aircraft / Satellite / WiFi / BT")
@@ -186,9 +231,9 @@ def main() -> None:
from routes import register_blueprints
register_blueprints(app)
print("Open http://localhost:5050 in your browser")
print(f"Open http://localhost:{args.port} in your browser")
print()
print("Press Ctrl+C to stop")
print()
app.run(host='0.0.0.0', port=5050, debug=False, threaded=True)
app.run(host=args.host, port=args.port, debug=args.debug, threaded=True)