Skip to content

[feature] Epic: Add CLI command for trusted-client sessions #296

@marwannettour

Description

@marwannettour

Summary

Add command-line support to create automatic cloud sessions with already trusted clients.

The target user experience is a command such as:

bytesync session-start <clientId1>,<clientId2>,<clientId3>

The command should create a session including the current client and invite the selected trusted clients through the automatic trusted-device flow.

Context

ByteSync already has command-line and headless concepts such as --join, --inventory, --synchronize, and --no-gui. This epic turns trusted-client automation into an operator-friendly workflow.

Proposed scope

  • Add a command or argument set for starting an automatic trusted session.
  • Accept one or more target trusted client IDs.
  • Validate client IDs before starting session creation.
  • Return clear exit codes and messages for scripting.
  • Support headless usage with --no-gui.
  • Provide optional machine-readable output for created session information and member statuses.
  • Surface actionable errors when clients are missing, offline, not mutually trusted, not granted, or rejected by challenge validation.

Out of scope

  • Full synchronization scripting DSL.
  • Automatic enrollment of new clients.
  • UI changes.

Acceptance criteria

  • A CLI command can start a cloud session with one or more already trusted clients.
  • The command includes the local client automatically.
  • The command validates the maximum remote client limit.
  • The command fails safely when any selected client cannot be auto-joined.
  • Exit codes are documented for success, validation failure, trust failure, grant failure, network failure, and timeout.
  • The command works in --no-gui mode.
  • Tests cover argument parsing, validation, success, and main failure paths.

Dependencies

  • Requires the automatic session domain flow.
  • Requires trusted-device grant validation.
  • Requires signed challenge-response for automatic joins.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions