A command-line interface for interacting with the EnSync configuration management service.
# Clone the repository
git clone https://github.com/EnSync-engine/cli
cd ensync-cli
# Build the binary
go build -o ensync ./main.go
# Verify installation
./ensync versionmacOS & Linux
- Download the
tar.gzarchive for your OS/Arch from the Releases page. - Extract and install:
tar -xzf CLI_*.tar.gz chmod +x ensync sudo mv ensync /usr/local/bin/ - Verify:
ensync version
Windows
- Download the
.ziparchive for your OS/Arch from the Releases page. - Extract the zip file.
- Open PowerShell as Administrator and move the binary (optional but recommended):
mkdir C:\ensync move ensync.exe C:\ensync\ # Add to PATH (current session) $env:Path += ";C:\ensync" # Add to PATH (permanent) [Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\ensync", [EnvironmentVariableTarget]::User)
- Verify:
ensync version
go install github.com/EnSync-engine/cli@latestThe CLI can be configured using a config file or environment variables.
Create a config file at:
- macOS / Linux:
~/.ensync/config.yaml - Windows:
%UserProfile%\.ensync\config.yaml
base_url: "http://localhost:8080/api/v1/ensync"
debug: falsemacOS & Linux
export ENSYNC_ACCESS_KEY="your-access-key"
export ENSYNC_BASE_URL="http://localhost:8080/api/v1/ensync"
export ENSYNC_DEBUG=falseWindows (PowerShell)
$env:ENSYNC_ACCESS_KEY="your-access-key"
$env:ENSYNC_BASE_URL="http://localhost:8080/api/v1/ensync"
$env:ENSYNC_DEBUG="false"All commands require an access key, either via --access-key flag or ENSYNC_ACCESS_KEY environment variable.
# List events (default limit: 10)
ensync event list
ensync event list --limit 20 --order ASC
# Get event by name
ensync event get "gms/urbanhero/stripe"
# Create event
ensync event create --name "my-event" --payload '{"key":"value"}'
# Update event
ensync event update --id "event-uuid" --name "new-name"
ensync event update --id "event-uuid" --payload '{"new":"data"}'# List access keys
ensync access-key list
# Get access key details
ensync access-key get "key-uuid"
# Create access key
ensync access-key create --name "my-service" --type SERVICE --permissions '{"send":["event1"],"receive":["event2"]}'
# Delete access key
ensync access-key delete "key-uuid"
# Rotate service key pair
ensync access-key rotate "access-key-string"
# Manage Permissions
ensync access-key permissions get "access-key-string"
ensync access-key permissions set "access-key-string" --permissions '{"send":["*"],"receive":["*"]}'# List workspaces (hierarchical tree view)
ensync workspace list
# Create workspace
ensync workspace create --name "my-workspace"# Enable debug output (shows HTTP requests/responses)
ensync --debug event list
# Version info
ensync version --json--limit: Number of items per page (default: 10)--page: Page index (default: 0)--order: Sort order (ASCorDESC)--order-by: Field to sort by (e.g.,createdAt)--access-key: Authentication key--debug: Enable verbose logging
# Run tests
go test ./...
# Run integration tests
go test ./test/integration/... -v
# Build
go build -o ensync ./main.goMIT License