scios-cli 0.1.6__tar.gz → 0.1.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {scios_cli-0.1.6/scios_cli.egg-info → scios_cli-0.1.8}/PKG-INFO +7 -2
- {scios_cli-0.1.6 → scios_cli-0.1.8}/README.md +6 -1
- {scios_cli-0.1.6 → scios_cli-0.1.8}/pyproject.toml +1 -1
- scios_cli-0.1.8/scios_cli/__main__.py +31 -0
- {scios_cli-0.1.6 → scios_cli-0.1.8}/scios_cli/install.py +39 -23
- {scios_cli-0.1.6 → scios_cli-0.1.8/scios_cli.egg-info}/PKG-INFO +7 -2
- {scios_cli-0.1.6 → scios_cli-0.1.8}/setup.py +1 -1
- scios_cli-0.1.6/scios_cli/__main__.py +0 -17
- {scios_cli-0.1.6 → scios_cli-0.1.8}/LICENSE +0 -0
- {scios_cli-0.1.6 → scios_cli-0.1.8}/scios_cli/__init__.py +0 -0
- {scios_cli-0.1.6 → scios_cli-0.1.8}/scios_cli/main.py +0 -0
- {scios_cli-0.1.6 → scios_cli-0.1.8}/scios_cli.egg-info/SOURCES.txt +0 -0
- {scios_cli-0.1.6 → scios_cli-0.1.8}/scios_cli.egg-info/dependency_links.txt +0 -0
- {scios_cli-0.1.6 → scios_cli-0.1.8}/scios_cli.egg-info/entry_points.txt +0 -0
- {scios_cli-0.1.6 → scios_cli-0.1.8}/scios_cli.egg-info/requires.txt +0 -0
- {scios_cli-0.1.6 → scios_cli-0.1.8}/scios_cli.egg-info/top_level.txt +0 -0
- {scios_cli-0.1.6 → scios_cli-0.1.8}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: scios-cli
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.8
|
|
4
4
|
Summary: Scios Local Agent Workspace Sync CLI — bridge your terminal to the Scios Cloud backend
|
|
5
5
|
Author: Scios Team
|
|
6
6
|
License: Apache-2.0
|
|
@@ -51,10 +51,15 @@ Scios CLI requires **Python 3.9+** and can be installed in one command:
|
|
|
51
51
|
pip install scios-cli
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
> **Note:** If `scios-init` / `scios-sync` aren't found after install, use the
|
|
54
|
+
> **Note:** If `scios-init` / `scios-sync` aren't found after install (common on Windows where Python's `Scripts` folder isn't in PATH), use the module form instead:
|
|
55
55
|
> ```bash
|
|
56
|
+
> # macOS / Linux
|
|
56
57
|
> python3 -m scios_cli init # same as scios-init
|
|
57
58
|
> python3 -m scios_cli sync # same as scios-sync
|
|
59
|
+
>
|
|
60
|
+
> # Windows
|
|
61
|
+
> python -m scios_cli init
|
|
62
|
+
> python -m scios_cli sync
|
|
58
63
|
> ```
|
|
59
64
|
|
|
60
65
|
### Install Deep Link Handler (Critical) 🔗
|
|
@@ -21,10 +21,15 @@ Scios CLI requires **Python 3.9+** and can be installed in one command:
|
|
|
21
21
|
pip install scios-cli
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
> **Note:** If `scios-init` / `scios-sync` aren't found after install, use the
|
|
24
|
+
> **Note:** If `scios-init` / `scios-sync` aren't found after install (common on Windows where Python's `Scripts` folder isn't in PATH), use the module form instead:
|
|
25
25
|
> ```bash
|
|
26
|
+
> # macOS / Linux
|
|
26
27
|
> python3 -m scios_cli init # same as scios-init
|
|
27
28
|
> python3 -m scios_cli sync # same as scios-sync
|
|
29
|
+
>
|
|
30
|
+
> # Windows
|
|
31
|
+
> python -m scios_cli init
|
|
32
|
+
> python -m scios_cli sync
|
|
28
33
|
> ```
|
|
29
34
|
|
|
30
35
|
### Install Deep Link Handler (Critical) 🔗
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "scios-cli"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.8"
|
|
8
8
|
description = "Scios Local Agent Workspace Sync CLI — bridge your terminal to the Scios Cloud backend"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = {text = "Apache-2.0"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"""Allow running scios_cli as a module: python3 -m scios_cli [init|sync] ..."""
|
|
2
|
+
import sys
|
|
3
|
+
|
|
4
|
+
def main():
|
|
5
|
+
if len(sys.argv) > 1 and sys.argv[1] == "init":
|
|
6
|
+
sys.argv = [sys.argv[0]] + sys.argv[2:]
|
|
7
|
+
from scios_cli.install import cli_install_protocol
|
|
8
|
+
cli_install_protocol()
|
|
9
|
+
else:
|
|
10
|
+
# Default to sync behavior, strip 'sync' subcommand if present
|
|
11
|
+
if len(sys.argv) > 1 and sys.argv[1] == "sync":
|
|
12
|
+
sys.argv = [sys.argv[0]] + sys.argv[2:]
|
|
13
|
+
from scios_cli.main import cli_entry
|
|
14
|
+
try:
|
|
15
|
+
cli_entry()
|
|
16
|
+
except (KeyboardInterrupt, SystemExit):
|
|
17
|
+
pass
|
|
18
|
+
except Exception as e:
|
|
19
|
+
print(f"\n❌ Error: {e}")
|
|
20
|
+
finally:
|
|
21
|
+
# On Windows, when launched via protocol handler (python.exe directly,
|
|
22
|
+
# not cmd.exe), the console window closes immediately on exit.
|
|
23
|
+
# Keep it open so the user can see output and the file watcher runs.
|
|
24
|
+
if sys.platform == "win32" and not sys.stdin.isatty():
|
|
25
|
+
try:
|
|
26
|
+
input("\nPress Enter to close this window...")
|
|
27
|
+
except EOFError:
|
|
28
|
+
pass
|
|
29
|
+
|
|
30
|
+
if __name__ == "__main__":
|
|
31
|
+
main()
|
|
@@ -160,14 +160,14 @@ if __name__ == "__main__":
|
|
|
160
160
|
def _find_scios_sync() -> str:
|
|
161
161
|
"""Find the scios-sync executable path."""
|
|
162
162
|
import sys
|
|
163
|
+
import sysconfig
|
|
163
164
|
from pathlib import Path
|
|
164
165
|
|
|
165
166
|
is_windows = sys.platform == "win32"
|
|
166
167
|
exe_name = "scios-sync.exe" if is_windows else "scios-sync"
|
|
167
168
|
|
|
168
|
-
# Check next to the current python executable (works for venvs and global installs)
|
|
169
|
+
# 1. Check next to the current python executable (works for venvs and global installs)
|
|
169
170
|
python_dir = Path(sys.executable).parent
|
|
170
|
-
# On Windows, pip installs scripts into a Scripts/ subdirectory
|
|
171
171
|
if is_windows:
|
|
172
172
|
scripts_dir = python_dir / "Scripts"
|
|
173
173
|
sibling_sync = scripts_dir / exe_name
|
|
@@ -177,28 +177,42 @@ def _find_scios_sync() -> str:
|
|
|
177
177
|
if sibling_sync.exists() and (is_windows or os.access(sibling_sync, os.X_OK)):
|
|
178
178
|
return str(sibling_sync)
|
|
179
179
|
|
|
180
|
-
# Check
|
|
180
|
+
# 2. Check the user scripts directory (pip install --user puts scripts here)
|
|
181
|
+
try:
|
|
182
|
+
user_scripts = sysconfig.get_path("scripts", scheme="nt_user" if is_windows else "posix_user")
|
|
183
|
+
if user_scripts:
|
|
184
|
+
user_sync = Path(user_scripts) / exe_name
|
|
185
|
+
if user_sync.exists():
|
|
186
|
+
return str(user_sync)
|
|
187
|
+
except Exception:
|
|
188
|
+
pass
|
|
189
|
+
|
|
190
|
+
# 3. Check common locations with dynamic version detection
|
|
191
|
+
vi = sys.version_info
|
|
192
|
+
versions = [f"{vi.major}{vi.minor}"] # Current version first
|
|
193
|
+
for minor in range(15, 8, -1): # 3.15 down to 3.9
|
|
194
|
+
v = f"3{minor}"
|
|
195
|
+
if v not in versions:
|
|
196
|
+
versions.append(v)
|
|
197
|
+
|
|
181
198
|
if is_windows:
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
str(Path.home() / "AppData" / "
|
|
185
|
-
|
|
186
|
-
] + [
|
|
187
|
-
str(Path.home() / "AppData" / "Roaming" / "Python" / f"Python{v}" / "Scripts" / exe_name)
|
|
188
|
-
for v in ["313", "312", "311", "310", "39"]
|
|
189
|
-
]
|
|
199
|
+
candidates = []
|
|
200
|
+
for v in versions:
|
|
201
|
+
candidates.append(str(Path.home() / "AppData" / "Roaming" / "Python" / f"Python{v}" / "Scripts" / exe_name))
|
|
202
|
+
candidates.append(str(Path.home() / "AppData" / "Local" / "Programs" / "Python" / f"Python{v}" / "Scripts" / exe_name))
|
|
190
203
|
else:
|
|
191
204
|
candidates = [
|
|
192
|
-
"/Library/Frameworks/Python.framework/Versions/3.12/bin/scios-sync",
|
|
193
|
-
"/Library/Frameworks/Python.framework/Versions/3.13/bin/scios-sync",
|
|
194
205
|
"/usr/local/bin/scios-sync",
|
|
195
206
|
str(Path.home() / ".local" / "bin" / "scios-sync"),
|
|
196
207
|
]
|
|
208
|
+
for v in versions:
|
|
209
|
+
candidates.append(f"/Library/Frameworks/Python.framework/Versions/3.{v[1:]}/bin/scios-sync")
|
|
210
|
+
|
|
197
211
|
for candidate in candidates:
|
|
198
212
|
if os.path.isfile(candidate) and (is_windows or os.access(candidate, os.X_OK)):
|
|
199
213
|
return candidate
|
|
200
214
|
|
|
201
|
-
# Try `which` (Unix) or `where` (Windows)
|
|
215
|
+
# 4. Try `which` (Unix) or `where` (Windows)
|
|
202
216
|
try:
|
|
203
217
|
find_cmd = "where" if is_windows else "which"
|
|
204
218
|
result = subprocess.run(
|
|
@@ -210,7 +224,7 @@ def _find_scios_sync() -> str:
|
|
|
210
224
|
except Exception:
|
|
211
225
|
pass
|
|
212
226
|
|
|
213
|
-
# Fallback — will be searched in PATH at runtime
|
|
227
|
+
# 5. Fallback — will be searched in PATH at runtime
|
|
214
228
|
return "scios-sync"
|
|
215
229
|
|
|
216
230
|
|
|
@@ -249,11 +263,11 @@ def install_windows():
|
|
|
249
263
|
print("🚀 Installing Scios Custom URI Handler (scios://) for Windows...")
|
|
250
264
|
import winreg
|
|
251
265
|
|
|
252
|
-
#
|
|
253
|
-
#
|
|
254
|
-
#
|
|
255
|
-
|
|
256
|
-
print(f"
|
|
266
|
+
# Use python.exe directly instead of cmd.exe to avoid & in URLs
|
|
267
|
+
# being interpreted as command separators by cmd.exe.
|
|
268
|
+
# python.exe is a console app so Windows will open a console window.
|
|
269
|
+
python_path = sys.executable
|
|
270
|
+
print(f" Using Python at: {python_path}")
|
|
257
271
|
|
|
258
272
|
try:
|
|
259
273
|
# Create HKEY_CURRENT_USER\Software\Classes\scios
|
|
@@ -263,9 +277,11 @@ def install_windows():
|
|
|
263
277
|
|
|
264
278
|
# Create shell\open\command
|
|
265
279
|
cmd_key = winreg.CreateKey(key, r"shell\open\command")
|
|
266
|
-
#
|
|
267
|
-
#
|
|
268
|
-
|
|
280
|
+
# Invoke python -m scios_cli directly. This avoids cmd.exe which
|
|
281
|
+
# breaks on & characters in URLs (treats them as command separators).
|
|
282
|
+
# python.exe is a console app so a terminal window will appear.
|
|
283
|
+
winreg.SetValue(cmd_key, "", winreg.REG_SZ,
|
|
284
|
+
f'"{python_path}" -m scios_cli sync "%1"')
|
|
269
285
|
|
|
270
286
|
winreg.CloseKey(cmd_key)
|
|
271
287
|
winreg.CloseKey(key)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: scios-cli
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.8
|
|
4
4
|
Summary: Scios Local Agent Workspace Sync CLI — bridge your terminal to the Scios Cloud backend
|
|
5
5
|
Author: Scios Team
|
|
6
6
|
License: Apache-2.0
|
|
@@ -51,10 +51,15 @@ Scios CLI requires **Python 3.9+** and can be installed in one command:
|
|
|
51
51
|
pip install scios-cli
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
> **Note:** If `scios-init` / `scios-sync` aren't found after install, use the
|
|
54
|
+
> **Note:** If `scios-init` / `scios-sync` aren't found after install (common on Windows where Python's `Scripts` folder isn't in PATH), use the module form instead:
|
|
55
55
|
> ```bash
|
|
56
|
+
> # macOS / Linux
|
|
56
57
|
> python3 -m scios_cli init # same as scios-init
|
|
57
58
|
> python3 -m scios_cli sync # same as scios-sync
|
|
59
|
+
>
|
|
60
|
+
> # Windows
|
|
61
|
+
> python -m scios_cli init
|
|
62
|
+
> python -m scios_cli sync
|
|
58
63
|
> ```
|
|
59
64
|
|
|
60
65
|
### Install Deep Link Handler (Critical) 🔗
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"""Allow running scios_cli as a module: python3 -m scios_cli [init|sync] ..."""
|
|
2
|
-
import sys
|
|
3
|
-
|
|
4
|
-
def main():
|
|
5
|
-
if len(sys.argv) > 1 and sys.argv[1] == "init":
|
|
6
|
-
sys.argv = [sys.argv[0]] + sys.argv[2:]
|
|
7
|
-
from scios_cli.install import cli_install_protocol
|
|
8
|
-
cli_install_protocol()
|
|
9
|
-
else:
|
|
10
|
-
# Default to sync behavior, strip 'sync' subcommand if present
|
|
11
|
-
if len(sys.argv) > 1 and sys.argv[1] == "sync":
|
|
12
|
-
sys.argv = [sys.argv[0]] + sys.argv[2:]
|
|
13
|
-
from scios_cli.main import cli_entry
|
|
14
|
-
cli_entry()
|
|
15
|
-
|
|
16
|
-
if __name__ == "__main__":
|
|
17
|
-
main()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|