symmetry-cli 1.0.1 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. package/install.ps1 +6 -36
  2. package/install.sh +7 -33
  3. package/package.json +1 -1
package/install.ps1 CHANGED
@@ -1,6 +1,6 @@
1
+ # Symmetry CLI Install Script for Windows
1
2
  $ErrorActionPreference = "Stop"
2
3
 
3
- # Colors for output
4
4
  $RED = "`e[31m"
5
5
  $GREEN = "`e[32m"
6
6
  $YELLOW = "`e[33m"
@@ -10,48 +10,19 @@ function Print-Color($color, $message) {
10
10
  Write-Host "$color$message$NC"
11
11
  }
12
12
 
13
- # Check if npm is installed
14
13
  if (!(Get-Command npm -ErrorAction SilentlyContinue)) {
15
14
  Print-Color $RED "Error: npm is not installed. Please install Node.js and npm first."
16
15
  exit 1
17
16
  }
18
17
 
19
- # Install symmetry-cli globally
20
18
  Print-Color $YELLOW "Installing symmetry-cli globally..."
21
- try {
22
- npm install -g symmetry-cli
19
+ if (npm install -g .) {
23
20
  Print-Color $GREEN "symmetry-cli installed successfully!"
24
- }
25
- catch {
21
+ } else {
26
22
  Print-Color $RED "Failed to install symmetry-cli. Please check your npm configuration and try again."
27
23
  exit 1
28
24
  }
29
25
 
30
- # Prompt for API provider
31
- Print-Color $YELLOW "Please select an API provider:"
32
- $providers = @{
33
- 1 = @{name = "LiteLLM"; value = "litellm"}
34
- 2 = @{name = "LlamaCpp"; value = "llamacpp"}
35
- 3 = @{name = "LMStudio"; value = "lmstudio"}
36
- 4 = @{name = "Ollama"; value = "ollama"}
37
- 5 = @{name = "Oobabooga"; value = "oobabooga"}
38
- 6 = @{name = "OpenWebUI"; value = "openwebui"}
39
- }
40
-
41
- $providers.GetEnumerator() | ForEach-Object {
42
- Write-Host "$($_.Key): $($_.Value.name)"
43
- }
44
-
45
- do {
46
- $selection = Read-Host "Enter the number of your choice"
47
- $api_provider = $providers[$selection].value
48
- } while (-not $api_provider)
49
-
50
- # Prompt for model name
51
- Print-Color $YELLOW "Please enter the model name you want to use:"
52
- $model_name = Read-Host
53
-
54
- # Create config directory and provider.yaml file
55
26
  $config_dir = "$env:USERPROFILE\.config\symmetry"
56
27
  $provider_yaml = "$config_dir\provider.yaml"
57
28
 
@@ -66,18 +37,17 @@ apiKey:
66
37
  apiPath: /v1/chat/completions
67
38
  apiPort: 11434
68
39
  apiProtocol: http
69
- apiProvider: $api_provider
40
+ apiProvider: ollama
70
41
  dataCollectionEnabled: true
71
42
  maxConnections: 10
72
- modelName: $model_name
43
+ modelName: llama3.1:latest
73
44
  name: $env:USERNAME
74
45
  path: $config_dir
75
46
  public: true
76
47
  serverKey: 4b4a9cc325d134dee6679e9407420023531fd7e96c563f6c5d00fd5549b77435
77
48
  "@ | Set-Content $provider_yaml
78
49
  Print-Color $GREEN "provider.yaml created successfully at $provider_yaml"
79
- }
80
- else {
50
+ } else {
81
51
  Print-Color $YELLOW "provider.yaml already exists at $provider_yaml"
82
52
  }
83
53
 
package/install.sh CHANGED
@@ -1,4 +1,6 @@
1
- #!/bin/sh
1
+ #!/usr/bin/env bash
2
+ # Symmetry CLI Install Script for macOS/Linux
3
+
2
4
  set -e
3
5
 
4
6
  RED='\033[0;31m'
@@ -16,39 +18,13 @@ if ! command -v npm >/dev/null 2>&1; then
16
18
  fi
17
19
 
18
20
  print_color "$YELLOW" "Installing symmetry-cli globally..."
19
- if npm install -g symmetry-cli; then
21
+ if npm install -g .; then
20
22
  print_color "$GREEN" "symmetry-cli installed successfully!"
21
23
  else
22
24
  print_color "$RED" "Failed to install symmetry-cli. Please check your npm configuration and try again."
23
25
  exit 1
24
26
  fi
25
27
 
26
- print_color "$YELLOW" "Please select an API provider:"
27
- print_color "$NC" "1) LiteLLM"
28
- print_color "$NC" "2) LlamaCpp"
29
- print_color "$NC" "3) LMStudio"
30
- print_color "$NC" "4) Ollama"
31
- print_color "$NC" "5) Oobabooga"
32
- print_color "$NC" "6) OpenWebUI"
33
-
34
- api_provider=""
35
- while [ -z "$api_provider" ]; do
36
- printf "Enter the number of your choice: "
37
- read -r choice
38
- case $choice in
39
- 1) api_provider="litellm" ;;
40
- 2) api_provider="llamacpp" ;;
41
- 3) api_provider="lmstudio" ;;
42
- 4) api_provider="ollama" ;;
43
- 5) api_provider="oobabooga" ;;
44
- 6) api_provider="openwebui" ;;
45
- *) print_color "$RED" "Invalid option. Please try again." ;;
46
- esac
47
- done
48
-
49
- print_color "$YELLOW" "Please enter the model name you want to use:"
50
- read -r model_name
51
-
52
28
  config_dir="$HOME/.config/symmetry"
53
29
  provider_yaml="$config_dir/provider.yaml"
54
30
 
@@ -63,10 +39,10 @@ apiKey:
63
39
  apiPath: /v1/chat/completions
64
40
  apiPort: 11434
65
41
  apiProtocol: http
66
- apiProvider: $api_provider
42
+ apiProvider: ollama
67
43
  dataCollectionEnabled: true
68
44
  maxConnections: 10
69
- modelName: $model_name
45
+ modelName: llama3.1:latest
70
46
  name: $(whoami)
71
47
  path: $config_dir
72
48
  public: true
@@ -81,6 +57,4 @@ print_color "$GREEN" "Installation complete! You can now run 'symmetry-cli' to s
81
57
  print_color "$YELLOW" "Please edit $provider_yaml to customize your provider settings, especially:"
82
58
  print_color "$YELLOW" " - apiKey: Add your API key if required"
83
59
  print_color "$YELLOW" " - name: Currently set to your system username, change if needed"
84
- print_color "$YELLOW" " - public: Set to true by default, change to false if you don't want to be publicly accessible"
85
-
86
- print_color "$YELLOW" "Note: Symmetry is currently in alpha. Connections may be unstable or fail, especially when there are few active providers on the network."
60
+ print_color "$YELLOW" " - public: Set to true by default, change to false if you don't want to be publicly accessible"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "symmetry-cli",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "",
5
5
  "main": "dist/symmetry.js",
6
6
  "bin": "dist/symmetry.js",