extract URLs, strings, and more from JavaScript code
Project description
ṣàwárí
ṣàwárí (ṣe àwárí) means 'to discover, explore, or search' in Yorùbá
Extract URLs, strings, and more from JavaScript code using tree-sitter.
Features
- URLs Mode - Extract API endpoints, URLs, and paths with intelligent variable resolution
- Strings Mode - Extract all string literals and template strings
- Tree Mode - Visualize Abstract Syntax Tree structure
- Inspect Mode - Discover node types and code patterns
- Query Mode - Custom tree-sitter queries for pattern matching
Installation
ṣàwárí requires at least Python 3.11
pip install sawari
Usage
Read more in the documentation
Extract URLs and API endpoints
sawari urls app.js --include-templates
sawari urls bundle.js --context '{"API_URL":"https://api.example.com"}'
Find potential secrets
sawari strings app.js --min 20 | grep -i "key\|token\|secret"
Visualize code structure
sawari tree app.js --only-named
Custom pattern matching
sawari query app.js --query '(function_declaration name: (identifier) @name)'
Related Tools
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sawari-1.0.6.tar.gz
(55.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
sawari-1.0.6-py3-none-any.whl
(64.6 kB
view details)
File details
Details for the file sawari-1.0.6.tar.gz.
File metadata
- Download URL: sawari-1.0.6.tar.gz
- Upload date:
- Size: 55.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.9 Darwin/21.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b4a4c3605abab4312a74a3714955733b0aaf521f49bf0e45346f818fb08f938
|
|
| MD5 |
ccee065b18cf45ebe46955832a54e05c
|
|
| BLAKE2b-256 |
10efd96f740f1d42f70aafab9ce3929c15ba2d9ce0b6f70383fb80545b781b36
|
File details
Details for the file sawari-1.0.6-py3-none-any.whl.
File metadata
- Download URL: sawari-1.0.6-py3-none-any.whl
- Upload date:
- Size: 64.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.9 Darwin/21.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da0152570cb98243dddc57a81140667eebc7a6e4c65ed6272c3a305145d83f5d
|
|
| MD5 |
0cfe661a5d448437aa38ceeebc7b195f
|
|
| BLAKE2b-256 |
fef8a41d4d075debabe9e8ed68818e08c06200753c7299328a6758044646d380
|