Skip to main content

ṣà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)'

License

MIT

Metadata

Release files for sawari 1.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sawari 1.0.6
File Size Uploaded
sawari-1.0.6.tar.gz 55.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sawari 1.0.6
File Interpreter ABI Platform
sawari-1.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 119.9 kB

Release files / sawari-1.0.6.tar.gz

Download URL sawari-1.0.6.tar.gz
Size 55.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5b4a4c3605abab4312a74a3714955733b0aaf521f49bf0e45346f818fb08f938
BLAKE2b-256 checksum
How to use checksums
10efd96f740f1d42f70aafab9ce3929c15ba2d9ce0b6f70383fb80545b781b36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.9 Darwin/21.6.0

Release files / sawari-1.0.6-py3-none-any.whl

Download URL sawari-1.0.6-py3-none-any.whl
Size 64.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
da0152570cb98243dddc57a81140667eebc7a6e4c65ed6272c3a305145d83f5d
BLAKE2b-256 checksum
How to use checksums
fef8a41d4d075debabe9e8ed68818e08c06200753c7299328a6758044646d380
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.9 Darwin/21.6.0

Release history Release notifications | RSS feed

This release

1.0.6 This release

2 release files

1.0.5

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page