monitor-with-permissions

Windows only

Like upload-folder-with-permissions, this command only runs on the Windows build of the CLI.

Continuous version of upload-folder-with-permissions. Performs the initial permissioned sync, then keeps watching the folder and re-syncing — both file content and ACL changes — until you stop the process.

Syntax

Usage: curiosity-cli monitor-with-permissions --server <url> --token <token> --path <dir> --permissions-cache <file> --fetch-server-state <bool> [options]

curiosity-cli monitor-with-permissions \
  --server             https://my-workspace.example.com/ \
  --token              $CURIOSITY_TOKEN \
  --path               \\\\fileserver\\Shared \
  --permissions-cache  C:\\curiosity\\acl-cache.json \
  --fetch-server-state true

Options

Same set as monitor, plus:

Option Description
--permissions-cache Path to a .json file used to cache resolved ACL → user/group mappings between runs. Alias -c. Required.

As with the one-shot variant:

  • --upload-to is forced to Custom.
  • The CLI invokes graph.MapPermissionsAsync for new/changed files and graph.CheckPermissionsChanged to re-evaluate ACLs on files that already exist in the graph.

Running it as a service

The same systemd / NSSM / Windows Service pattern from monitor applies — wrap the command in your platform's service supervisor so it restarts on failure and starts on boot. On Windows specifically:

nssm install CuriosityMonitor "C:\Users\svc\.dotnet\tools\curiosity-cli.exe"
nssm set CuriosityMonitor AppParameters monitor-with-permissions ^
   --server http://localhost:8080 ^
   --token  %CURIOSITY_TOKEN% ^
   --path   \\fileserver\Shared ^
   --permissions-cache C:\curiosity\acl-cache.json ^
   --fetch-server-state true
nssm set CuriosityMonitor AppEnvironmentExtra CURIOSITY_TOKEN=...
nssm start CuriosityMonitor

Remarks

  • Use this command on Windows to keep a folder's content and its Active Directory ACLs continuously in sync with the workspace; for a single pass use upload-folder-with-permissions.
  • It runs only on the Windows build of the CLI and forces --upload-to Custom.
  • The process runs until stopped — wrap it in a service supervisor (NSSM, Windows Service) for production, and keep the --permissions-cache path stable across runs.

See also

© 2026 Curiosity. All rights reserved.