symmetry-cli 1.0.0 → 1.0.2

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.sh +60 -0
  2. package/package.json +1 -1
  3. package/readme.md +2 -2
package/install.sh ADDED
@@ -0,0 +1,60 @@
1
+ #!/usr/bin/env bash
2
+ # Symmetry CLI Install Script for macOS/Linux
3
+
4
+ set -e
5
+
6
+ RED='\033[0;31m'
7
+ GREEN='\033[0;32m'
8
+ YELLOW='\033[1;33m'
9
+ NC='\033[0m'
10
+
11
+ print_color() {
12
+ printf '%b%s%b\n' "$1" "$2" "$NC"
13
+ }
14
+
15
+ if ! command -v npm >/dev/null 2>&1; then
16
+ print_color "$RED" "Error: npm is not installed. Please install Node.js and npm first."
17
+ exit 1
18
+ fi
19
+
20
+ print_color "$YELLOW" "Installing symmetry-cli globally..."
21
+ if npm install -g .; then
22
+ print_color "$GREEN" "symmetry-cli installed successfully!"
23
+ else
24
+ print_color "$RED" "Failed to install symmetry-cli. Please check your npm configuration and try again."
25
+ exit 1
26
+ fi
27
+
28
+ config_dir="$HOME/.config/symmetry"
29
+ provider_yaml="$config_dir/provider.yaml"
30
+
31
+ mkdir -p "$config_dir"
32
+
33
+ if [ ! -f "$provider_yaml" ]; then
34
+ print_color "$YELLOW" "Creating provider.yaml file..."
35
+ cat << EOF > "$provider_yaml"
36
+ # Symmetry Configuration
37
+ apiHostname: localhost
38
+ apiKey:
39
+ apiPath: /v1/chat/completions
40
+ apiPort: 11434
41
+ apiProtocol: http
42
+ apiProvider: ollama
43
+ dataCollectionEnabled: true
44
+ maxConnections: 10
45
+ modelName: llama3.1:latest
46
+ name: $(whoami)
47
+ path: $config_dir
48
+ public: true
49
+ serverKey: 4b4a9cc325d134dee6679e9407420023531fd7e96c563f6c5d00fd5549b77435
50
+ EOF
51
+ print_color "$GREEN" "provider.yaml created successfully at $provider_yaml"
52
+ else
53
+ print_color "$YELLOW" "provider.yaml already exists at $provider_yaml"
54
+ fi
55
+
56
+ print_color "$GREEN" "Installation complete! You can now run 'symmetry-cli' to start your node."
57
+ print_color "$YELLOW" "Please edit $provider_yaml to customize your provider settings, especially:"
58
+ print_color "$YELLOW" " - apiKey: Add your API key if required"
59
+ print_color "$YELLOW" " - name: Currently set to your system username, change if needed"
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.0",
3
+ "version": "1.0.2",
4
4
  "description": "",
5
5
  "main": "dist/symmetry.js",
6
6
  "bin": "dist/symmetry.js",
package/readme.md CHANGED
@@ -15,12 +15,12 @@ To call forth Symmetry into your realm, speak these words of power:
15
15
 
16
16
  Linux and MacOs
17
17
  ```
18
- curl -fsSL https://raw.githubusercontent.com/twinnydotdev/symmetry/main/install.sh | sh
18
+ curl -fsSL https://raw.githubusercontent.com/twinnydotdev/symmetry/master/install.sh | sh
19
19
  ```
20
20
 
21
21
  Windows
22
22
  ```
23
- iwr -useb https://raw.githubusercontent.com/twinnydotdev/symmetry/main/install.ps1 | iex
23
+ iwr -useb https://raw.githubusercontent.com/twinnydotdev/symmetry/master/install.ps1 | iex
24
24
  ```
25
25
 
26
26
  ## Usage