Skip to content

Adding CLI client for MacOS#5

Merged
jfwoods merged 4 commits intomainfrom
feat/macOS-cli-client
Apr 4, 2026
Merged

Adding CLI client for MacOS#5
jfwoods merged 4 commits intomainfrom
feat/macOS-cli-client

Conversation

@jfwoods
Copy link
Copy Markdown
Owner

@jfwoods jfwoods commented Apr 4, 2026

System now supports daemon interaction via CLI!!! No hardware required anymore.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new local CLI (linkctl) to control an Insta360 Link camera by talking to linkctl-daemon over a new TCP control socket, enabling camera control without requiring the existing WebSocket client/hardware UI flow.

Changes:

  • Introduces host/linkctl CLI client (POSIX C) with one-shot commands and an interactive jog mode.
  • Adds a TCP control socket to linkctl-daemon (port 9001) and a background service loop to process CLI commands.
  • Updates WebSocket command handling to emit an "ack" response for non-status commands; updates .gitignore for CMake build dirs.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
host/linkctl/README.md Documents building/using the new linkctl CLI and jog mode.
host/linkctl/linkctl.c Implements TCP client commands + interactive jog mode.
host/linkctl/CMakeLists.txt Adds CMake build/install for linkctl.
host/linkctl-daemon/control.h Declares the new TCP control socket interface and default port.
host/linkctl-daemon/control.c Implements line-based TCP control protocol and camera command dispatch.
host/linkctl-daemon/main.c Starts the TCP control service loop in a new pthread; integrates init/shutdown.
host/linkctl-daemon/server.c Adds WebSocket "ack" messages for successful non-status commands.
host/linkctl-daemon/CMakeLists.txt Adds control.c to daemon build.
.gitignore Ignores host/*/build/ directories.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread host/linkctl-daemon/server.c
Comment thread host/linkctl-daemon/main.c
Comment thread host/linkctl-daemon/main.c
Comment thread host/linkctl-daemon/control.c
Comment thread host/linkctl-daemon/main.c
Comment thread host/linkctl/linkctl.c
Comment thread host/linkctl/linkctl.c
Comment thread host/linkctl/linkctl.c
Comment thread host/linkctl/README.md Outdated
Comment thread host/linkctl-daemon/control.c
@jfwoods jfwoods marked this pull request as draft April 4, 2026 19:05
@jfwoods jfwoods marked this pull request as ready for review April 4, 2026 19:11
@jfwoods jfwoods merged commit 9b44d46 into main Apr 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants