-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
48 lines (42 loc) Β· 1.66 KB
/
main.go
File metadata and controls
48 lines (42 loc) Β· 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Copyright (c) 2026 talkdedsec & threatvec. All Rights Reserved.
// GhostKey β AI-Powered Secret Scanner | github.com/threatvec/ghostkey
package main
import (
"fmt"
"os"
"github.com/threatvec/ghostkey/cmd"
"github.com/threatvec/ghostkey/internal/signature"
)
func main() {
// If double-clicked (no args, no pipe), show interactive help
if len(os.Args) == 1 && !isPiped() {
fmt.Print(signature.Banner())
fmt.Println(" USAGE:")
fmt.Println(" ββββββββββββββββββββββββββββββββββββββββββββββββββββββ")
fmt.Println(" ghostkey scan . Scan current directory")
fmt.Println(" ghostkey scan <path> Scan specific path")
fmt.Println(" ghostkey audit Scan git history")
fmt.Println(" ghostkey install Install pre-commit hook")
fmt.Println(" ghostkey watch Monitor clipboard")
fmt.Println(" ghostkey env Scan .env files")
fmt.Println(" ghostkey scan . --ai AI-powered scan (Ollama)")
fmt.Println(" ghostkey version Show version info")
fmt.Println(" ββββββββββββββββββββββββββββββββββββββββββββββββββββββ")
fmt.Println()
fmt.Println(" Open a terminal (cmd/powershell) and run the commands above.")
fmt.Println()
fmt.Print(signature.Footer())
fmt.Println()
fmt.Print(" Press Enter to exit...")
fmt.Scanln()
return
}
cmd.Execute()
}
func isPiped() bool {
fi, err := os.Stdin.Stat()
if err != nil {
return false
}
return fi.Mode()&os.ModeCharDevice == 0
}