Skip to content

Commit 014d4da

Browse files
gcmsgclaude
andcommitted
feat: add --no-register flag to send-file
Allows reusing an existing identity without re-registering with the server, preserving contact trust from previous sessions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 7a6d2f8 commit 014d4da

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

internal/cmd/send_file.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ func RunSendFile(args []string, serverURL string) int {
2020
filePath := fs.String("file", "", "Path to file to send (required)")
2121
keypairPath := fs.String("keypair", "", "Path to Ed25519 keypair file")
2222
trustStorePath := fs.String("trust-store", "", "Path to trust store file")
23+
noRegister := fs.Bool("no-register", false, "Skip server registration (reuse existing identity)")
2324
fs.Parse(args)
2425

2526
if *to == "" || *filePath == "" {
@@ -40,11 +41,12 @@ func RunSendFile(args []string, serverURL string) int {
4041

4142
// Create agent for P2P transfer.
4243
a, err := agent.New(agent.Options{
43-
Name: "peerclaw-cli-sender",
44-
ServerURL: serverURL,
45-
Capabilities: []string{"file_transfer"},
46-
KeypairPath: *keypairPath,
47-
TrustStorePath: *trustStorePath,
44+
Name: "peerclaw-cli-sender",
45+
ServerURL: serverURL,
46+
Capabilities: []string{"file_transfer"},
47+
KeypairPath: *keypairPath,
48+
TrustStorePath: *trustStorePath,
49+
SkipRegistration: *noRegister,
4850
})
4951
if err != nil {
5052
fmt.Fprintf(os.Stderr, "Error creating agent: %v\n", err)

0 commit comments

Comments
 (0)