Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

## Project Overview

macOS CLI tool (`scripts/citrix.sh`) for safely parking and unparking Citrix Workspace using `launchctl bootout`/`bootstrap` in correct dependency order, avoiding the reboot required by naive process killing.
macOS CLI tool (`scripts/cwm.sh`) for safely parking and unparking Citrix Workspace using `launchctl bootout`/`bootstrap` in correct dependency order, avoiding the reboot required by naive process killing.

## Repository Structure

```
scripts/ # Shell scripts (citrix.sh is the main entry point)
scripts/ # Shell scripts (cwm.sh is the main entry point)
openspec/
specs/ # Living documentation of current system state
changes/ # Active change proposals (SDD workflow)
Expand Down Expand Up @@ -35,19 +35,19 @@ Manual verification on macOS:

```bash
# Full cycle test
sudo ./scripts/citrix.sh stop
./scripts/citrix.sh status # expect all unloaded, 0 processes
sudo ./scripts/citrix.sh start
./scripts/citrix.sh status # expect all loaded
sudo ./scripts/cwm.sh stop
./scripts/cwm.sh status # expect all unloaded, 0 processes
sudo ./scripts/cwm.sh start
./scripts/cwm.sh status # expect all loaded
Comment on lines +39 to +41
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

The manual verification steps run ./scripts/cwm.sh status without sudo, but the script currently uses sudo launchctl print system/... for daemon checks, which will prompt for credentials and can hang/fail in non-interactive runs. Consider updating the verification commands to use sudo for status (or adjust the script to avoid sudo prompts for status as noted in _daemon_is_loaded).

Suggested change
./scripts/cwm.sh status # expect all unloaded, 0 processes
sudo ./scripts/cwm.sh start
./scripts/cwm.sh status # expect all loaded
sudo ./scripts/cwm.sh status # expect all unloaded, 0 processes
sudo ./scripts/cwm.sh start
sudo ./scripts/cwm.sh status # expect all loaded

Copilot uses AI. Check for mistakes.
```

```bash
# Dry-run (no side effects)
sudo ./scripts/citrix.sh --dry-run stop
sudo ./scripts/cwm.sh --dry-run stop
```

## Lint / Check

```bash
shellcheck scripts/citrix.sh
shellcheck scripts/cwm.sh
```
27 changes: 18 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# osx-citrix-manager-cli
# Citrix Workspace Manager (`cwm`)

A macOS CLI tool to safely park and unpark Citrix Workspace without requiring a reboot.

Expand All @@ -13,7 +13,7 @@ Simply killing Citrix Workspace processes leaves macOS in a broken state:

## The Solution

`citrix.sh` uses `launchctl bootout`/`bootstrap` to cleanly unload and reload all Citrix services in the correct dependency order — no reboot required.
`cwm` uses `launchctl bootout`/`bootstrap` to cleanly unload and reload all Citrix services in the correct dependency order — no reboot required.

### Stop (Park)

Expand All @@ -31,29 +31,38 @@ Reloads services hub-to-edge: bootstraps system LaunchDaemons first, then user L

## Installation

### Via Homebrew (recommended)

```bash
brew tap 5L-Labs/citrix-cli
brew install citrix-workspace-manager
```

### Manual

```bash
git clone https://github.com/NickJLange/osx-citrix-manager-cli.git
git clone https://github.com/5L-Labs/osx-citrix-manager-cli.git
cd osx-citrix-manager-cli
chmod +x scripts/citrix.sh
chmod +x scripts/cwm.sh
```

## Usage

```bash
# Check current Citrix status
./scripts/citrix.sh status
cwm status

# Stop (park) all Citrix services
sudo ./scripts/citrix.sh stop
sudo cwm stop

# Start (unpark) all Citrix services
sudo ./scripts/citrix.sh start
sudo cwm start

# Preview what would happen without making changes
sudo ./scripts/citrix.sh --dry-run stop
sudo cwm --dry-run stop

# Verbose output for debugging
sudo ./scripts/citrix.sh --verbose start
sudo cwm --verbose start
Comment on lines +53 to +65
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot Feb 11, 2026

Choose a reason for hiding this comment

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

P3: Usage examples assume a cwm binary on PATH, but the manual install steps only chmod the script. This will fail for manual installs unless users add a PATH entry. Consider using ./scripts/cwm.sh in the usage section or explicitly adding a PATH step.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At README.md, line 53:

<comment>Usage examples assume a `cwm` binary on PATH, but the manual install steps only chmod the script. This will fail for manual installs unless users add a PATH entry. Consider using `./scripts/cwm.sh` in the usage section or explicitly adding a PATH step.</comment>

<file context>
@@ -31,29 +31,38 @@ Reloads services hub-to-edge: bootstraps system LaunchDaemons first, then user L
 ```bash
 # Check current Citrix status
-./scripts/citrix.sh status
+cwm status
 
 # Stop (park) all Citrix services
</file context>
Suggested change
cwm status
# Stop (park) all Citrix services
sudo ./scripts/citrix.sh stop
sudo cwm stop
# Start (unpark) all Citrix services
sudo ./scripts/citrix.sh start
sudo cwm start
# Preview what would happen without making changes
sudo ./scripts/citrix.sh --dry-run stop
sudo cwm --dry-run stop
# Verbose output for debugging
sudo ./scripts/citrix.sh --verbose start
sudo cwm --verbose start
./scripts/cwm.sh status
# Stop (park) all Citrix services
sudo ./scripts/cwm.sh stop
# Start (unpark) all Citrix services
sudo ./scripts/cwm.sh start
# Preview what would happen without making changes
sudo ./scripts/cwm.sh --dry-run stop
# Verbose output for debugging
sudo ./scripts/cwm.sh --verbose start
Fix with Cubic

```
Comment on lines +41 to 66
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

The Manual install instructions only chmod +x scripts/cwm.sh, but the Usage section assumes a cwm binary is on PATH. For manual installs this will be confusing/broken unless the user runs ./scripts/cwm.sh ... or creates a symlink/alias named cwm. Update either the manual section or the usage examples to match the expected invocation.

Copilot uses AI. Check for mistakes.

## Commands
Expand Down
File renamed without changes.