scip-cli 1.0.0__tar.gz → 1.0.2__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.
Files changed (25) hide show
  1. {scip_cli-1.0.0/scip_cli.egg-info → scip_cli-1.0.2}/PKG-INFO +10 -6
  2. {scip_cli-1.0.0 → scip_cli-1.0.2}/README.md +9 -5
  3. {scip_cli-1.0.0 → scip_cli-1.0.2}/scip_cli/__init__.py +1 -1
  4. {scip_cli-1.0.0 → scip_cli-1.0.2}/scip_cli/__main__.py +2 -0
  5. {scip_cli-1.0.0 → scip_cli-1.0.2}/scip_cli/lib.py +21 -0
  6. {scip_cli-1.0.0 → scip_cli-1.0.2/scip_cli.egg-info}/PKG-INFO +10 -6
  7. {scip_cli-1.0.0 → scip_cli-1.0.2}/setup.py +1 -1
  8. {scip_cli-1.0.0 → scip_cli-1.0.2}/LICENSE +0 -0
  9. {scip_cli-1.0.0 → scip_cli-1.0.2}/MANIFEST.in +0 -0
  10. {scip_cli-1.0.0 → scip_cli-1.0.2}/pyproject.toml +0 -0
  11. {scip_cli-1.0.0 → scip_cli-1.0.2}/scip_cli/SKILL.md +0 -0
  12. {scip_cli-1.0.0 → scip_cli-1.0.2}/scip_cli/commands/__init__.py +0 -0
  13. {scip_cli-1.0.0 → scip_cli-1.0.2}/scip_cli/commands/def_cmd.py +0 -0
  14. {scip_cli-1.0.0 → scip_cli-1.0.2}/scip_cli/commands/members.py +0 -0
  15. {scip_cli-1.0.0 → scip_cli-1.0.2}/scip_cli/commands/rdeps.py +0 -0
  16. {scip_cli-1.0.0 → scip_cli-1.0.2}/scip_cli/commands/refs.py +0 -0
  17. {scip_cli-1.0.0 → scip_cli-1.0.2}/scip_cli/commands/search.py +0 -0
  18. {scip_cli-1.0.0 → scip_cli-1.0.2}/scip_cli/commands/skill.py +0 -0
  19. {scip_cli-1.0.0 → scip_cli-1.0.2}/scip_cli/commands/symbols.py +0 -0
  20. {scip_cli-1.0.0 → scip_cli-1.0.2}/scip_cli.egg-info/SOURCES.txt +0 -0
  21. {scip_cli-1.0.0 → scip_cli-1.0.2}/scip_cli.egg-info/dependency_links.txt +0 -0
  22. {scip_cli-1.0.0 → scip_cli-1.0.2}/scip_cli.egg-info/entry_points.txt +0 -0
  23. {scip_cli-1.0.0 → scip_cli-1.0.2}/scip_cli.egg-info/top_level.txt +0 -0
  24. {scip_cli-1.0.0 → scip_cli-1.0.2}/setup.cfg +0 -0
  25. {scip_cli-1.0.0 → scip_cli-1.0.2}/tests/test_pure_functions.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scip-cli
3
- Version: 1.0.0
3
+ Version: 1.0.2
4
4
  Summary: Fast code intelligence via SCIP indexes
5
5
  Home-page: https://github.com/flesler/scip-cli
6
6
  Author: Ariel Flesler
@@ -44,11 +44,15 @@ Fast code intelligence CLI for TypeScript/JavaScript projects. Query SCIP indexe
44
44
  pip install scip-cli
45
45
  ```
46
46
 
47
- ### 2. Install prerequisites
47
+ ### 2. Install prerequisites (optional)
48
48
 
49
- scip-cli requires two external tools for indexing:
49
+ scip-cli can automatically download the required indexing tools when needed, or you can install them globally for faster performance:
50
50
 
51
- **For TypeScript/JavaScript projects:**
51
+ **Option A: Let scip-cli handle it (recommended)**
52
+
53
+ Just use scip-cli - it will automatically download the required tools via `npx` on first use. No global installation needed.
54
+
55
+ **Option B: Install globally for better performance**
52
56
 
53
57
  ```bash
54
58
  # Install scip-typescript (SCIP indexer)
@@ -62,8 +66,8 @@ npm install -g @sourcegraph/scip
62
66
 
63
67
  ```bash
64
68
  scip-cli --help
65
- scip-typescript --version
66
- scip --version
69
+ scip-typescript --version # Only if you chose Option B
70
+ scip --version # Only if you chose Option B
67
71
  ```
68
72
 
69
73
  ## Prerequisites
@@ -20,11 +20,15 @@ Fast code intelligence CLI for TypeScript/JavaScript projects. Query SCIP indexe
20
20
  pip install scip-cli
21
21
  ```
22
22
 
23
- ### 2. Install prerequisites
23
+ ### 2. Install prerequisites (optional)
24
24
 
25
- scip-cli requires two external tools for indexing:
25
+ scip-cli can automatically download the required indexing tools when needed, or you can install them globally for faster performance:
26
26
 
27
- **For TypeScript/JavaScript projects:**
27
+ **Option A: Let scip-cli handle it (recommended)**
28
+
29
+ Just use scip-cli - it will automatically download the required tools via `npx` on first use. No global installation needed.
30
+
31
+ **Option B: Install globally for better performance**
28
32
 
29
33
  ```bash
30
34
  # Install scip-typescript (SCIP indexer)
@@ -38,8 +42,8 @@ npm install -g @sourcegraph/scip
38
42
 
39
43
  ```bash
40
44
  scip-cli --help
41
- scip-typescript --version
42
- scip --version
45
+ scip-typescript --version # Only if you chose Option B
46
+ scip --version # Only if you chose Option B
43
47
  ```
44
48
 
45
49
  ## Prerequisites
@@ -1,2 +1,2 @@
1
1
  """scip-cli: Fast code intelligence via SCIP indexes."""
2
- __version__ = "1.0.0"
2
+ __version__ = "1.0.2"
@@ -3,6 +3,7 @@
3
3
  import argparse
4
4
  import sys
5
5
 
6
+ from . import __version__
6
7
  from .commands import refs, def_cmd, search, symbols, rdeps, members, skill
7
8
 
8
9
 
@@ -11,6 +12,7 @@ def main():
11
12
  prog="scip-cli",
12
13
  description="Fast code intelligence via SCIP indexes"
13
14
  )
15
+ parser.add_argument("--version", action="version", version=f"scip-cli {__version__}")
14
16
  subparsers = parser.add_subparsers(dest="command", help="Available commands")
15
17
 
16
18
  # refs
@@ -77,8 +77,10 @@ def get_db(project_root=None):
77
77
 
78
78
  if lang == "typescript":
79
79
  indexer_cmd = ["scip-typescript", "index", "--output", index_scip]
80
+ npx_cmd = ["npx", "-y", "@sourcegraph/scip-typescript", "index", "--output", index_scip]
80
81
  elif lang == "python":
81
82
  indexer_cmd = ["scip-python", "index", ".", "--output", index_scip]
83
+ npx_cmd = ["npx", "-y", "@sourcegraph/scip-python", "index", ".", "--output", index_scip]
82
84
  else:
83
85
  print(f"Error: Unsupported language '{lang}'", file=sys.stderr)
84
86
  sys.exit(1)
@@ -90,6 +92,16 @@ def get_db(project_root=None):
90
92
  text=True
91
93
  )
92
94
 
95
+ # If command not found, try npx
96
+ if result.returncode != 0 and "not found" in result.stderr.lower():
97
+ print(f"Tool not found, trying npx (will download automatically)...", file=sys.stderr)
98
+ result = subprocess.run(
99
+ npx_cmd,
100
+ cwd=str(root),
101
+ capture_output=True,
102
+ text=True
103
+ )
104
+
93
105
  if result.returncode != 0:
94
106
  print(f"Error: Failed to index project", file=sys.stderr)
95
107
  print(result.stderr, file=sys.stderr)
@@ -103,6 +115,15 @@ def get_db(project_root=None):
103
115
  text=True
104
116
  )
105
117
 
118
+ # If command not found, try npx
119
+ if result.returncode != 0 and "not found" in result.stderr.lower():
120
+ print(f"Tool not found, trying npx (will download automatically)...", file=sys.stderr)
121
+ result = subprocess.run(
122
+ ["npx", "-y", "@sourcegraph/scip", "expt-convert", index_scip, "--output", str(index_db)],
123
+ capture_output=True,
124
+ text=True
125
+ )
126
+
106
127
  if result.returncode != 0:
107
128
  print(f"Error: Failed to convert index", file=sys.stderr)
108
129
  print(result.stderr, file=sys.stderr)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scip-cli
3
- Version: 1.0.0
3
+ Version: 1.0.2
4
4
  Summary: Fast code intelligence via SCIP indexes
5
5
  Home-page: https://github.com/flesler/scip-cli
6
6
  Author: Ariel Flesler
@@ -44,11 +44,15 @@ Fast code intelligence CLI for TypeScript/JavaScript projects. Query SCIP indexe
44
44
  pip install scip-cli
45
45
  ```
46
46
 
47
- ### 2. Install prerequisites
47
+ ### 2. Install prerequisites (optional)
48
48
 
49
- scip-cli requires two external tools for indexing:
49
+ scip-cli can automatically download the required indexing tools when needed, or you can install them globally for faster performance:
50
50
 
51
- **For TypeScript/JavaScript projects:**
51
+ **Option A: Let scip-cli handle it (recommended)**
52
+
53
+ Just use scip-cli - it will automatically download the required tools via `npx` on first use. No global installation needed.
54
+
55
+ **Option B: Install globally for better performance**
52
56
 
53
57
  ```bash
54
58
  # Install scip-typescript (SCIP indexer)
@@ -62,8 +66,8 @@ npm install -g @sourcegraph/scip
62
66
 
63
67
  ```bash
64
68
  scip-cli --help
65
- scip-typescript --version
66
- scip --version
69
+ scip-typescript --version # Only if you chose Option B
70
+ scip --version # Only if you chose Option B
67
71
  ```
68
72
 
69
73
  ## Prerequisites
@@ -5,7 +5,7 @@ long_description = Path("README.md").read_text(encoding="utf-8")
5
5
 
6
6
  setup(
7
7
  name="scip-cli",
8
- version="1.0.0",
8
+ version="1.0.2",
9
9
  description="Fast code intelligence via SCIP indexes",
10
10
  long_description=long_description,
11
11
  long_description_content_type="text/markdown",
File without changes
File without changes
File without changes
File without changes
File without changes