Add install/uninstall safety check via --signature flag

Automated-By: Claude Sonnet 4.6
This commit is contained in:
2026-05-28 22:24:48 -04:00
parent 3fa83858e4
commit f0bd10ef66
2 changed files with 30 additions and 7 deletions
+9
View File
@@ -1,12 +1,15 @@
import Foundation
import ArgumentParser
let buildSignature = "CODEMAPPER-SIGNATURE-izackp"
struct CodeMapper: ParsableCommand {
static let configuration = CommandConfiguration(
commandName: "CodeMapper",
abstract: "Generate LLM-friendly architectural maps from Swift source files."
)
@Option(name: .long, help: "Root of the Swift package to analyze.")
var sources: String
@@ -103,4 +106,10 @@ struct CodeMapper: ParsableCommand {
// Ignore SIGPIPE so LSP subprocess death returns an error instead of killing this process
signal(SIGPIPE, SIG_IGN)
if CommandLine.arguments.contains("--signature") {
print(buildSignature)
exit(0)
}
CodeMapper.main()