lib-explorer 1.1.2__tar.gz → 1.2.0__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.
- {lib_explorer-1.1.2 → lib_explorer-1.2.0}/LICENSE +1 -1
- lib_explorer-1.2.0/PKG-INFO +330 -0
- lib_explorer-1.2.0/README.md +273 -0
- lib_explorer-1.2.0/lib_explorer.egg-info/PKG-INFO +330 -0
- lib_explorer-1.2.0/lib_explorer.egg-info/SOURCES.txt +56 -0
- lib_explorer-1.2.0/lib_explorer.egg-info/requires.txt +29 -0
- lib_explorer-1.2.0/pyproject.toml +84 -0
- lib_explorer-1.2.0/rf_explorer/__init__.py +7 -0
- lib_explorer-1.2.0/rf_explorer/audit/__init__.py +1 -0
- lib_explorer-1.2.0/rf_explorer/audit/analysis.py +590 -0
- lib_explorer-1.2.0/rf_explorer/audit/cli.py +192 -0
- {lib_explorer-1.1.2 → lib_explorer-1.2.0}/rf_explorer/audit/core.py +13 -0
- {lib_explorer-1.1.2 → lib_explorer-1.2.0}/rf_explorer/audit/exporters/excel.py +42 -6
- lib_explorer-1.2.0/rf_explorer/audit/exporters/html.py +3877 -0
- lib_explorer-1.2.0/rf_explorer/audit/exporters/i18n.py +230 -0
- {lib_explorer-1.1.2 → lib_explorer-1.2.0}/rf_explorer/audit/exporters/json.py +25 -1
- lib_explorer-1.2.0/rf_explorer/audit/scanner/__init__.py +3 -0
- lib_explorer-1.2.0/rf_explorer/audit/scanner/project_scanners.py +1040 -0
- lib_explorer-1.2.0/rf_explorer/audit/secrets.py +191 -0
- {lib_explorer-1.1.2 → lib_explorer-1.2.0}/rf_explorer/cli.py +47 -19
- lib_explorer-1.2.0/rf_explorer/core.py +774 -0
- {lib_explorer-1.1.2 → lib_explorer-1.2.0}/rf_explorer/python_doc.py +18 -8
- {lib_explorer-1.1.2 → lib_explorer-1.2.0}/rf_explorer/robot_doc.py +22 -3
- lib_explorer-1.2.0/rf_explorer/sbom/__init__.py +5 -0
- lib_explorer-1.2.0/rf_explorer/sbom/cli.py +49 -0
- lib_explorer-1.2.0/rf_explorer/sbom/core.py +263 -0
- lib_explorer-1.2.0/rf_explorer/sbom/i18n.py +188 -0
- lib_explorer-1.2.0/rf_explorer/sbom/impact.py +171 -0
- lib_explorer-1.2.0/rf_explorer/sbom/reports.py +556 -0
- lib_explorer-1.2.0/rf_explorer/scanner.py +507 -0
- {lib_explorer-1.1.2 → lib_explorer-1.2.0}/rf_explorer/utils.py +172 -23
- lib_explorer-1.2.0/rf_explorer/web/__init__.py +1 -0
- lib_explorer-1.2.0/rf_explorer/web/app.py +489 -0
- lib_explorer-1.2.0/rf_explorer/web/interpreters.py +335 -0
- lib_explorer-1.2.0/rf_explorer/web/service.py +131 -0
- lib_explorer-1.2.0/rf_explorer/web/static/app.css +7 -0
- lib_explorer-1.2.0/rf_explorer/web/static/app.js +322 -0
- lib_explorer-1.2.0/rf_explorer/web/static/htmx.min.js +1 -0
- lib_explorer-1.2.0/rf_explorer/web/static/lucide.min.js +12 -0
- lib_explorer-1.2.0/rf_explorer/web/templates/history.html +5 -0
- lib_explorer-1.2.0/rf_explorer/web/templates/index.html +122 -0
- lib_explorer-1.2.0/rf_explorer/web/templates/robot-preview.html +23 -0
- lib_explorer-1.2.0/rf_explorer/web/worker.py +326 -0
- lib_explorer-1.2.0/robocop.toml +23 -0
- lib_explorer-1.2.0/tests/test_audit_analysis.py +548 -0
- lib_explorer-1.2.0/tests/test_audit_html.py +79 -0
- lib_explorer-1.2.0/tests/test_audit_orphans.py +89 -0
- lib_explorer-1.2.0/tests/test_dynamic_keywords.py +338 -0
- lib_explorer-1.2.0/tests/test_interpreters.py +167 -0
- lib_explorer-1.2.0/tests/test_sbom.py +329 -0
- lib_explorer-1.2.0/tests/test_web.py +439 -0
- lib_explorer-1.2.0/tests/test_web_service.py +85 -0
- lib_explorer-1.1.2/PKG-INFO +0 -164
- lib_explorer-1.1.2/README.md +0 -123
- lib_explorer-1.1.2/lib_explorer.egg-info/PKG-INFO +0 -164
- lib_explorer-1.1.2/lib_explorer.egg-info/SOURCES.txt +0 -26
- lib_explorer-1.1.2/lib_explorer.egg-info/requires.txt +0 -6
- lib_explorer-1.1.2/pyproject.toml +0 -35
- lib_explorer-1.1.2/rf_explorer/__init__.py +0 -7
- lib_explorer-1.1.2/rf_explorer/audit/__init__.py +0 -1
- lib_explorer-1.1.2/rf_explorer/audit/cli.py +0 -92
- lib_explorer-1.1.2/rf_explorer/audit/exporters/html.py +0 -544
- lib_explorer-1.1.2/rf_explorer/audit/scanner/__init__.py +0 -3
- lib_explorer-1.1.2/rf_explorer/audit/scanner/project_scanners.py +0 -228
- lib_explorer-1.1.2/rf_explorer/core.py +0 -346
- lib_explorer-1.1.2/rf_explorer/scanner.py +0 -185
- {lib_explorer-1.1.2 → lib_explorer-1.2.0}/lib_explorer.egg-info/dependency_links.txt +0 -0
- {lib_explorer-1.1.2 → lib_explorer-1.2.0}/lib_explorer.egg-info/entry_points.txt +0 -0
- {lib_explorer-1.1.2 → lib_explorer-1.2.0}/lib_explorer.egg-info/top_level.txt +0 -0
- {lib_explorer-1.1.2 → lib_explorer-1.2.0}/rf_explorer/audit/exporters/__init__.py +0 -0
- {lib_explorer-1.1.2 → lib_explorer-1.2.0}/rf_explorer/rf_doc_show.py +0 -0
- {lib_explorer-1.1.2 → lib_explorer-1.2.0}/setup.cfg +0 -0
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: lib-explorer
|
|
3
|
+
Version: 1.2.0
|
|
4
|
+
Summary: A web and CLI toolkit for exploring Robot Framework projects and Python environments
|
|
5
|
+
Author: Khaled LIMAM
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2026 Khaled LIMAM
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the “Software”), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in
|
|
18
|
+
all copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
26
|
+
THE SOFTWARE.
|
|
27
|
+
Project-URL: Homepage, https://github.com/khaledlim/rf-explorer
|
|
28
|
+
Project-URL: Source, https://github.com/khaledlim/rf-explorer
|
|
29
|
+
Project-URL: Issues, https://github.com/khaledlim/rf-explorer/issues
|
|
30
|
+
Keywords: robotframework,documentation,interactive,cli,python
|
|
31
|
+
Requires-Python: >=3.9
|
|
32
|
+
Description-Content-Type: text/markdown
|
|
33
|
+
License-File: LICENSE
|
|
34
|
+
Requires-Dist: rich>=13.0
|
|
35
|
+
Requires-Dist: InquirerPy>=0.3.4
|
|
36
|
+
Requires-Dist: robotframework>=6.0
|
|
37
|
+
Requires-Dist: Pygments>=2.15
|
|
38
|
+
Requires-Dist: openpyxl>=3.0
|
|
39
|
+
Requires-Dist: PyYAML>=6.0
|
|
40
|
+
Requires-Dist: python-docx>=1.1
|
|
41
|
+
Requires-Dist: python-pptx>=1.0
|
|
42
|
+
Requires-Dist: robotframework-robocop>=6.0
|
|
43
|
+
Requires-Dist: fastapi>=0.115
|
|
44
|
+
Requires-Dist: uvicorn>=0.30
|
|
45
|
+
Requires-Dist: Jinja2>=3.1
|
|
46
|
+
Requires-Dist: bleach>=6.0
|
|
47
|
+
Provides-Extra: analysis
|
|
48
|
+
Provides-Extra: web
|
|
49
|
+
Provides-Extra: sbom
|
|
50
|
+
Requires-Dist: cyclonedx-bom<8,>=7.5; extra == "sbom"
|
|
51
|
+
Requires-Dist: cvss>=3.2; extra == "sbom"
|
|
52
|
+
Requires-Dist: packaging>=24; extra == "sbom"
|
|
53
|
+
Requires-Dist: packageurl-python>=0.16; extra == "sbom"
|
|
54
|
+
Requires-Dist: pip-audit<2.10,>=2.9; python_version < "3.10" and extra == "sbom"
|
|
55
|
+
Requires-Dist: pip-audit<3,>=2.10; python_version >= "3.10" and extra == "sbom"
|
|
56
|
+
Dynamic: license-file
|
|
57
|
+
|
|
58
|
+
# RF Explorer
|
|
59
|
+
|
|
60
|
+

|
|
61
|
+

|
|
62
|
+

|
|
63
|
+
|
|
64
|
+
PyPI: https://pypi.org/project/lib-explorer/
|
|
65
|
+
GitHub: https://github.com/khaledlim/rf-explorer
|
|
66
|
+
|
|
67
|
+
RF Explorer is a local web and command-line toolkit for exploring Robot Framework
|
|
68
|
+
projects and Python environments. Audit repositories, inspect dependencies and
|
|
69
|
+
library documentation, find reusable keywords, and generate an SBOM.
|
|
70
|
+
|
|
71
|
+
## Highlights
|
|
72
|
+
|
|
73
|
+
- Interactive terminal mode (menu-driven UI with InquirerPy)
|
|
74
|
+
- Direct CLI mode for quick commands
|
|
75
|
+
- Python module exploration: functions, classes, methods, and docstrings
|
|
76
|
+
- Robot Framework library exploration: keywords, arguments, documentation, and examples
|
|
77
|
+
- Installed package listing with filtering
|
|
78
|
+
- Environment scan (Python, Robot Framework, or full)
|
|
79
|
+
- Global Robot keyword search
|
|
80
|
+
- Repository audits with interactive HTML reports and Robocop findings
|
|
81
|
+
- CycloneDX SBOM generation with optional vulnerability checks
|
|
82
|
+
|
|
83
|
+
## Installation
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
python -m pip install lib-explorer
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Web support and Robocop analysis are included by default.
|
|
90
|
+
The legacy `lib-explorer[web]` and `lib-explorer[analysis]` extras remain accepted for compatibility.
|
|
91
|
+
|
|
92
|
+
## Quick Start
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
# Start the local web interface and open the URL printed in the terminal
|
|
96
|
+
rf-explorer start
|
|
97
|
+
|
|
98
|
+
# Interactive mode
|
|
99
|
+
rf-explorer
|
|
100
|
+
|
|
101
|
+
# Help and version
|
|
102
|
+
rf-explorer --help
|
|
103
|
+
rf-explorer --version
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Local Web Application
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
python -m pip install lib-explorer
|
|
110
|
+
rf-explorer start
|
|
111
|
+
# Choose another port if needed
|
|
112
|
+
rf-explorer start --port 8766
|
|
113
|
+
# Also show HTTP request logs (GET, POST, ...) in the console
|
|
114
|
+
rf-explorer start --logs
|
|
115
|
+
rf-explorer status
|
|
116
|
+
rf-explorer stop
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Open the local URL printed by the command (normally `http://127.0.0.1:8765`).
|
|
120
|
+
Stop the server with Ctrl+C or `rf-explorer stop` from another terminal.
|
|
121
|
+
|
|
122
|
+
### Team server (network access, no login)
|
|
123
|
+
|
|
124
|
+
Run on a server to let team members use it from their browsers:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
rf-explorer start --host 0.0.0.0 --port 8765
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Team members open `http://<server-name>:8765`. Requests are accepted for any host name
|
|
131
|
+
by default when `--host` is not loopback; restrict it with `--allowed-host <name>` (repeatable).
|
|
132
|
+
Audits then run on the server: local folders refer to the server's files, and Git URLs are cloned there.
|
|
133
|
+
There is **no authentication**: anyone who can reach the port can run audits. Only expose it on a trusted internal network.
|
|
134
|
+
Each person can also keep running `rf-explorer start` on their own PC for local audits.
|
|
135
|
+
|
|
136
|
+
For private Git repositories, open **Git credentials** in the Git repository section. Enter a password or personal access token; the username is optional (GitHub uses `x-access-token` when it is empty).
|
|
137
|
+
Credentials are optional and used only for that clone: they are not saved in the audit files or the URL. Git 2.31 or newer is required for this.
|
|
138
|
+
The application provides repository audits, Python/Robot library documentation,
|
|
139
|
+
environment discovery and global Robot keyword search using the server's interpreter.
|
|
140
|
+
Choose a local folder or an HTTPS/SSH Git URL and branch, select audit scopes, and
|
|
141
|
+
optionally upload a TOML config or enter its path. Without a config, Robocop retains
|
|
142
|
+
its normal configuration discovery. Git repositories require the Git executable;
|
|
143
|
+
private repository authentication must already be configured in Git. Credentials
|
|
144
|
+
must not be included in repository URLs.
|
|
145
|
+
|
|
146
|
+
Each task runs in a separate Python process. Reports can be previewed in the app,
|
|
147
|
+
opened separately, or downloaded as HTML/JSON; the raw Robocop log can be viewed
|
|
148
|
+
and downloaded too. Recent audit sessions remain available after restarting.
|
|
149
|
+
Artifacts are stored under `%LOCALAPPDATA%/rf_explorer/web/jobs` on Windows or
|
|
150
|
+
`~/.local/share/rf_explorer/web/jobs` elsewhere, outside the audited project.
|
|
151
|
+
Clones and temporary caches are removed when tasks finish or are cancelled. Stop the
|
|
152
|
+
server with Ctrl+C. The server binds to loopback by default, and reports run in a sandboxed
|
|
153
|
+
preview. Audit only trusted repositories: imported Robot libraries can execute
|
|
154
|
+
Python code during discovery. Do not expose this application through a public proxy.
|
|
155
|
+
|
|
156
|
+
The UI serves HTMX (2.0.4) and Lucide (0.468.0) locally, with no CDN dependency.
|
|
157
|
+
|
|
158
|
+
## CLI Usage
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
rf-explorer
|
|
162
|
+
rf-explorer --help
|
|
163
|
+
rf-explorer --version
|
|
164
|
+
|
|
165
|
+
rf-explorer python <module> [regex|--all]
|
|
166
|
+
rf-explorer robot <library> [regex|--all]
|
|
167
|
+
|
|
168
|
+
rf-explorer --list
|
|
169
|
+
rf-explorer --list --filter <text>
|
|
170
|
+
|
|
171
|
+
rf-explorer --scan robot
|
|
172
|
+
rf-explorer --scan python
|
|
173
|
+
rf-explorer --scan --all
|
|
174
|
+
|
|
175
|
+
rf-explorer --search <keyword-or-regex>
|
|
176
|
+
|
|
177
|
+
rf-explorer audit --path <folder-path> --all
|
|
178
|
+
rf-explorer audit --path <folder-path> --all --export-html report.html
|
|
179
|
+
rf-explorer audit --path <folder-path> --tests --keywords --variables
|
|
180
|
+
rf-explorer audit --path <folder-path> --tests --keywords --technical-keywords --docs --executions
|
|
181
|
+
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
## SBOM remediation impact
|
|
185
|
+
|
|
186
|
+
Install the optional dependencies first:
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
python -m pip install "lib-explorer[sbom]"
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Generate an audited HTML SBOM by enabling the vulnerability check in the web
|
|
193
|
+
interface or by running `rf-explorer sbom --audit`. The report opens
|
|
194
|
+
in English and offers the same seven languages as the audit report. It ends
|
|
195
|
+
with **Remediation impact**. Each fix listed by an advisory
|
|
196
|
+
is checked separately against the declared Python requirements of the selected
|
|
197
|
+
environment, including packages outside a library-scoped inventory. The report
|
|
198
|
+
shows only targets with blockers, existing conflicts, or fixes that are missing
|
|
199
|
+
or could not be fully checked. A target matching the latest PyPI release is
|
|
200
|
+
marked **latest**, as in the vulnerability table. No packages are installed. This is not a Conda solve,
|
|
201
|
+
an extras or distribution-file compatibility check, or a runtime test.
|
|
202
|
+
|
|
203
|
+
## Examples
|
|
204
|
+
|
|
205
|
+
### Explore a Python module
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
rf-explorer python requests
|
|
209
|
+
rf-explorer python requests get
|
|
210
|
+
rf-explorer python requests --all
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### Explore a Robot Framework library
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
rf-explorer robot JSONLibrary
|
|
217
|
+
rf-explorer robot JSONLibrary Convert
|
|
218
|
+
rf-explorer robot JSONLibrary --all
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### List installed packages
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
rf-explorer --list
|
|
225
|
+
rf-explorer --list --filter py
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Scan environment
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
rf-explorer --scan robot
|
|
232
|
+
rf-explorer --scan python
|
|
233
|
+
rf-explorer --scan --all
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
When the web app opens, it loads the cached **Environment** results for the last
|
|
237
|
+
selected Python interpreter (the server interpreter by default). If no result
|
|
238
|
+
exists, it starts a scan in the background or follows one already in progress.
|
|
239
|
+
**Environment** shows a wait cursor while the scan is running.
|
|
240
|
+
**Scan environment** lets you refresh the results manually.
|
|
241
|
+
|
|
242
|
+
On Windows, Linux, and macOS, RF Explorer looks for interpreters on `PATH` and
|
|
243
|
+
in common Conda, pyenv, and virtual environment locations. To discover Python
|
|
244
|
+
environments in additional trusted folders, set `RF_EXPLORER_INTERPRETER_ROOTS`
|
|
245
|
+
before starting the web app. Use absolute paths separated by `;` on Windows
|
|
246
|
+
or `:` on Linux and macOS. For example, use `D:\Projects;E:\Automation` on
|
|
247
|
+
Windows or `$HOME/projects:/opt/automation` on Linux and macOS. Discovery is
|
|
248
|
+
bounded and probes the Python executables it finds; do not add untrusted folders.
|
|
249
|
+
You can also enter a specific interpreter or environment folder in the Python picker.
|
|
250
|
+
|
|
251
|
+
### Search Robot keywords globally
|
|
252
|
+
|
|
253
|
+
```bash
|
|
254
|
+
rf-explorer --search browser
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
Keyword searches reuse the environment scan cache (5 minutes) and the per-library
|
|
258
|
+
keyword cache (10 minutes), across CLI invocations and search patterns. Both
|
|
259
|
+
caches are invalidated when the Python environment or installed packages change.
|
|
260
|
+
Library discovery messages are suppressed during searches; libraries that cannot
|
|
261
|
+
be loaded are skipped and cached for the keyword cache lifetime.
|
|
262
|
+
|
|
263
|
+
Dynamic keyword documentation and arguments are read through Robot Framework
|
|
264
|
+
Libdoc, including snake_case and camelCase dynamic APIs. For libraries that wrap
|
|
265
|
+
Robot resources, missing documentation and generic `*args` can also be recovered
|
|
266
|
+
from `.resource`/`.robot` sources exposed by Libdoc or `get_keyword_source`.
|
|
267
|
+
This enrichment is shared by library exploration and keyword search, and cached.
|
|
268
|
+
Existing documentation and explicit arguments are preserved. If no documentation
|
|
269
|
+
or usable source is exposed by a library, RF Explorer cannot reconstruct it.
|
|
270
|
+
|
|
271
|
+
### Audit Robot project content
|
|
272
|
+
|
|
273
|
+
```bash
|
|
274
|
+
rf-explorer audit --path <folder-path> --all --export-html audit.html
|
|
275
|
+
rf-explorer audit --path <folder-path> --all --export-html audit.html --language fr
|
|
276
|
+
rf-explorer audit --path <folder-path> --all --export-json audit.json
|
|
277
|
+
rf-explorer audit --path <folder-path> --all --export-excel audit.xlsx
|
|
278
|
+
rf-explorer audit --path <folder-path> --tests --keywords --variables
|
|
279
|
+
rf-explorer audit --path <folder-path> --technical-keywords --export-html audit.html
|
|
280
|
+
rf-explorer audit --path <folder-path> --technical-keywords --library SeleniumLibrary --export-html audit.html
|
|
281
|
+
rf-explorer audit --path <folder-path> --docs --no-executions
|
|
282
|
+
rf-explorer audit --path <folder-path> --all --export-html audit.html --no-robocop
|
|
283
|
+
rf-explorer audit --path <folder-path> --config robocop.toml --all --export-html audit.html
|
|
284
|
+
rf-explorer audit --default-config
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
The HTML report includes an **Analysis** tab with audit metrics, a phased improvement
|
|
288
|
+
plan, and filterable Robocop findings. In the web app, **Repository → Preview** opens
|
|
289
|
+
embedded Robot Framework `log.html` and `report.html` files in an isolated frame
|
|
290
|
+
without changing the audit report's script policy. Robocop is installed by default with
|
|
291
|
+
`python -m pip install lib-explorer`. Use `--no-robocop` to
|
|
292
|
+
skip linting; the rest of the analysis report is still generated. Robocop findings are
|
|
293
|
+
written to a temporary JSON file and are not added to the scanned repository.
|
|
294
|
+
The improvement plan also lists the keyword-definition files and test suites behind its
|
|
295
|
+
evidence, and flags hard-coded credentials (passwords, usernames, API keys, tokens,
|
|
296
|
+
private keys) in `.robot`, `.resource` and common configuration files. Detection is a
|
|
297
|
+
static heuristic: only locations are reported, never the matched values, and Excel or
|
|
298
|
+
CSV datasets are not scanned.
|
|
299
|
+
The improvement plan lists orphan resources before import and path findings.
|
|
300
|
+
An orphan resource has no importer detected within the repository.
|
|
301
|
+
Without `--config`, RF Explorer passes neither `--config` nor `--ignore-file-config`
|
|
302
|
+
to Robocop and does not load its personal configuration automatically. Robocop uses
|
|
303
|
+
its normal discovery: it may load a project's `robocop.toml` or `[tool.robocop]` in
|
|
304
|
+
`pyproject.toml`, otherwise it uses its built-in defaults.
|
|
305
|
+
Run `rf-explorer audit --default-config` (no `--path` required) to display and edit
|
|
306
|
+
the personal file under `%APPDATA%/rf-explorer/` on Windows or
|
|
307
|
+
`$XDG_CONFIG_HOME/rf-explorer/` on Linux/macOS. This does not activate it automatically:
|
|
308
|
+
pass its path with `--config <file>` to use it for an audit. Relative paths resolve
|
|
309
|
+
from `--path`. If the explicit file is missing, RF Explorer continues with Robocop's
|
|
310
|
+
normal configuration discovery.
|
|
311
|
+
|
|
312
|
+
The audit keeps the existing `Keywords` analysis. Add `--technical-keywords`
|
|
313
|
+
to generate a separate `Technical keywords` section containing only technical
|
|
314
|
+
keywords used by tests. `--library` or `-lib` restricts this section
|
|
315
|
+
to one imported library. `--docs` includes Markdown files that
|
|
316
|
+
contain Robot test cases. `output.xml` files are analyzed by default to
|
|
317
|
+
correlate executed tests with their keywords; use `--no-executions` to disable
|
|
318
|
+
this analysis. `--execution` and `--executions` are accepted aliases. Add
|
|
319
|
+
`--variables` when variables are required, or use `--all`. Files matching `*.robot.md` are analyzed from
|
|
320
|
+
their fenced `robot` or `robotframework` code blocks. `--language` sets the default language of the HTML
|
|
321
|
+
report (`en`, `fi`, `fr`, `it`, `nl`, `pt-br`, `pt-pt`); it can also be switched from the report itself.
|
|
322
|
+
|
|
323
|
+
## Notes
|
|
324
|
+
|
|
325
|
+
- Requires Python 3.9+
|
|
326
|
+
- Works best in a terminal that supports colors
|
|
327
|
+
|
|
328
|
+
## License
|
|
329
|
+
|
|
330
|
+
MIT (see LICENSE)
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
# RF Explorer
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
PyPI: https://pypi.org/project/lib-explorer/
|
|
8
|
+
GitHub: https://github.com/khaledlim/rf-explorer
|
|
9
|
+
|
|
10
|
+
RF Explorer is a local web and command-line toolkit for exploring Robot Framework
|
|
11
|
+
projects and Python environments. Audit repositories, inspect dependencies and
|
|
12
|
+
library documentation, find reusable keywords, and generate an SBOM.
|
|
13
|
+
|
|
14
|
+
## Highlights
|
|
15
|
+
|
|
16
|
+
- Interactive terminal mode (menu-driven UI with InquirerPy)
|
|
17
|
+
- Direct CLI mode for quick commands
|
|
18
|
+
- Python module exploration: functions, classes, methods, and docstrings
|
|
19
|
+
- Robot Framework library exploration: keywords, arguments, documentation, and examples
|
|
20
|
+
- Installed package listing with filtering
|
|
21
|
+
- Environment scan (Python, Robot Framework, or full)
|
|
22
|
+
- Global Robot keyword search
|
|
23
|
+
- Repository audits with interactive HTML reports and Robocop findings
|
|
24
|
+
- CycloneDX SBOM generation with optional vulnerability checks
|
|
25
|
+
|
|
26
|
+
## Installation
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
python -m pip install lib-explorer
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Web support and Robocop analysis are included by default.
|
|
33
|
+
The legacy `lib-explorer[web]` and `lib-explorer[analysis]` extras remain accepted for compatibility.
|
|
34
|
+
|
|
35
|
+
## Quick Start
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# Start the local web interface and open the URL printed in the terminal
|
|
39
|
+
rf-explorer start
|
|
40
|
+
|
|
41
|
+
# Interactive mode
|
|
42
|
+
rf-explorer
|
|
43
|
+
|
|
44
|
+
# Help and version
|
|
45
|
+
rf-explorer --help
|
|
46
|
+
rf-explorer --version
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Local Web Application
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
python -m pip install lib-explorer
|
|
53
|
+
rf-explorer start
|
|
54
|
+
# Choose another port if needed
|
|
55
|
+
rf-explorer start --port 8766
|
|
56
|
+
# Also show HTTP request logs (GET, POST, ...) in the console
|
|
57
|
+
rf-explorer start --logs
|
|
58
|
+
rf-explorer status
|
|
59
|
+
rf-explorer stop
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Open the local URL printed by the command (normally `http://127.0.0.1:8765`).
|
|
63
|
+
Stop the server with Ctrl+C or `rf-explorer stop` from another terminal.
|
|
64
|
+
|
|
65
|
+
### Team server (network access, no login)
|
|
66
|
+
|
|
67
|
+
Run on a server to let team members use it from their browsers:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
rf-explorer start --host 0.0.0.0 --port 8765
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Team members open `http://<server-name>:8765`. Requests are accepted for any host name
|
|
74
|
+
by default when `--host` is not loopback; restrict it with `--allowed-host <name>` (repeatable).
|
|
75
|
+
Audits then run on the server: local folders refer to the server's files, and Git URLs are cloned there.
|
|
76
|
+
There is **no authentication**: anyone who can reach the port can run audits. Only expose it on a trusted internal network.
|
|
77
|
+
Each person can also keep running `rf-explorer start` on their own PC for local audits.
|
|
78
|
+
|
|
79
|
+
For private Git repositories, open **Git credentials** in the Git repository section. Enter a password or personal access token; the username is optional (GitHub uses `x-access-token` when it is empty).
|
|
80
|
+
Credentials are optional and used only for that clone: they are not saved in the audit files or the URL. Git 2.31 or newer is required for this.
|
|
81
|
+
The application provides repository audits, Python/Robot library documentation,
|
|
82
|
+
environment discovery and global Robot keyword search using the server's interpreter.
|
|
83
|
+
Choose a local folder or an HTTPS/SSH Git URL and branch, select audit scopes, and
|
|
84
|
+
optionally upload a TOML config or enter its path. Without a config, Robocop retains
|
|
85
|
+
its normal configuration discovery. Git repositories require the Git executable;
|
|
86
|
+
private repository authentication must already be configured in Git. Credentials
|
|
87
|
+
must not be included in repository URLs.
|
|
88
|
+
|
|
89
|
+
Each task runs in a separate Python process. Reports can be previewed in the app,
|
|
90
|
+
opened separately, or downloaded as HTML/JSON; the raw Robocop log can be viewed
|
|
91
|
+
and downloaded too. Recent audit sessions remain available after restarting.
|
|
92
|
+
Artifacts are stored under `%LOCALAPPDATA%/rf_explorer/web/jobs` on Windows or
|
|
93
|
+
`~/.local/share/rf_explorer/web/jobs` elsewhere, outside the audited project.
|
|
94
|
+
Clones and temporary caches are removed when tasks finish or are cancelled. Stop the
|
|
95
|
+
server with Ctrl+C. The server binds to loopback by default, and reports run in a sandboxed
|
|
96
|
+
preview. Audit only trusted repositories: imported Robot libraries can execute
|
|
97
|
+
Python code during discovery. Do not expose this application through a public proxy.
|
|
98
|
+
|
|
99
|
+
The UI serves HTMX (2.0.4) and Lucide (0.468.0) locally, with no CDN dependency.
|
|
100
|
+
|
|
101
|
+
## CLI Usage
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
rf-explorer
|
|
105
|
+
rf-explorer --help
|
|
106
|
+
rf-explorer --version
|
|
107
|
+
|
|
108
|
+
rf-explorer python <module> [regex|--all]
|
|
109
|
+
rf-explorer robot <library> [regex|--all]
|
|
110
|
+
|
|
111
|
+
rf-explorer --list
|
|
112
|
+
rf-explorer --list --filter <text>
|
|
113
|
+
|
|
114
|
+
rf-explorer --scan robot
|
|
115
|
+
rf-explorer --scan python
|
|
116
|
+
rf-explorer --scan --all
|
|
117
|
+
|
|
118
|
+
rf-explorer --search <keyword-or-regex>
|
|
119
|
+
|
|
120
|
+
rf-explorer audit --path <folder-path> --all
|
|
121
|
+
rf-explorer audit --path <folder-path> --all --export-html report.html
|
|
122
|
+
rf-explorer audit --path <folder-path> --tests --keywords --variables
|
|
123
|
+
rf-explorer audit --path <folder-path> --tests --keywords --technical-keywords --docs --executions
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## SBOM remediation impact
|
|
128
|
+
|
|
129
|
+
Install the optional dependencies first:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
python -m pip install "lib-explorer[sbom]"
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Generate an audited HTML SBOM by enabling the vulnerability check in the web
|
|
136
|
+
interface or by running `rf-explorer sbom --audit`. The report opens
|
|
137
|
+
in English and offers the same seven languages as the audit report. It ends
|
|
138
|
+
with **Remediation impact**. Each fix listed by an advisory
|
|
139
|
+
is checked separately against the declared Python requirements of the selected
|
|
140
|
+
environment, including packages outside a library-scoped inventory. The report
|
|
141
|
+
shows only targets with blockers, existing conflicts, or fixes that are missing
|
|
142
|
+
or could not be fully checked. A target matching the latest PyPI release is
|
|
143
|
+
marked **latest**, as in the vulnerability table. No packages are installed. This is not a Conda solve,
|
|
144
|
+
an extras or distribution-file compatibility check, or a runtime test.
|
|
145
|
+
|
|
146
|
+
## Examples
|
|
147
|
+
|
|
148
|
+
### Explore a Python module
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
rf-explorer python requests
|
|
152
|
+
rf-explorer python requests get
|
|
153
|
+
rf-explorer python requests --all
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Explore a Robot Framework library
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
rf-explorer robot JSONLibrary
|
|
160
|
+
rf-explorer robot JSONLibrary Convert
|
|
161
|
+
rf-explorer robot JSONLibrary --all
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### List installed packages
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
rf-explorer --list
|
|
168
|
+
rf-explorer --list --filter py
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Scan environment
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
rf-explorer --scan robot
|
|
175
|
+
rf-explorer --scan python
|
|
176
|
+
rf-explorer --scan --all
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
When the web app opens, it loads the cached **Environment** results for the last
|
|
180
|
+
selected Python interpreter (the server interpreter by default). If no result
|
|
181
|
+
exists, it starts a scan in the background or follows one already in progress.
|
|
182
|
+
**Environment** shows a wait cursor while the scan is running.
|
|
183
|
+
**Scan environment** lets you refresh the results manually.
|
|
184
|
+
|
|
185
|
+
On Windows, Linux, and macOS, RF Explorer looks for interpreters on `PATH` and
|
|
186
|
+
in common Conda, pyenv, and virtual environment locations. To discover Python
|
|
187
|
+
environments in additional trusted folders, set `RF_EXPLORER_INTERPRETER_ROOTS`
|
|
188
|
+
before starting the web app. Use absolute paths separated by `;` on Windows
|
|
189
|
+
or `:` on Linux and macOS. For example, use `D:\Projects;E:\Automation` on
|
|
190
|
+
Windows or `$HOME/projects:/opt/automation` on Linux and macOS. Discovery is
|
|
191
|
+
bounded and probes the Python executables it finds; do not add untrusted folders.
|
|
192
|
+
You can also enter a specific interpreter or environment folder in the Python picker.
|
|
193
|
+
|
|
194
|
+
### Search Robot keywords globally
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
rf-explorer --search browser
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Keyword searches reuse the environment scan cache (5 minutes) and the per-library
|
|
201
|
+
keyword cache (10 minutes), across CLI invocations and search patterns. Both
|
|
202
|
+
caches are invalidated when the Python environment or installed packages change.
|
|
203
|
+
Library discovery messages are suppressed during searches; libraries that cannot
|
|
204
|
+
be loaded are skipped and cached for the keyword cache lifetime.
|
|
205
|
+
|
|
206
|
+
Dynamic keyword documentation and arguments are read through Robot Framework
|
|
207
|
+
Libdoc, including snake_case and camelCase dynamic APIs. For libraries that wrap
|
|
208
|
+
Robot resources, missing documentation and generic `*args` can also be recovered
|
|
209
|
+
from `.resource`/`.robot` sources exposed by Libdoc or `get_keyword_source`.
|
|
210
|
+
This enrichment is shared by library exploration and keyword search, and cached.
|
|
211
|
+
Existing documentation and explicit arguments are preserved. If no documentation
|
|
212
|
+
or usable source is exposed by a library, RF Explorer cannot reconstruct it.
|
|
213
|
+
|
|
214
|
+
### Audit Robot project content
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
rf-explorer audit --path <folder-path> --all --export-html audit.html
|
|
218
|
+
rf-explorer audit --path <folder-path> --all --export-html audit.html --language fr
|
|
219
|
+
rf-explorer audit --path <folder-path> --all --export-json audit.json
|
|
220
|
+
rf-explorer audit --path <folder-path> --all --export-excel audit.xlsx
|
|
221
|
+
rf-explorer audit --path <folder-path> --tests --keywords --variables
|
|
222
|
+
rf-explorer audit --path <folder-path> --technical-keywords --export-html audit.html
|
|
223
|
+
rf-explorer audit --path <folder-path> --technical-keywords --library SeleniumLibrary --export-html audit.html
|
|
224
|
+
rf-explorer audit --path <folder-path> --docs --no-executions
|
|
225
|
+
rf-explorer audit --path <folder-path> --all --export-html audit.html --no-robocop
|
|
226
|
+
rf-explorer audit --path <folder-path> --config robocop.toml --all --export-html audit.html
|
|
227
|
+
rf-explorer audit --default-config
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
The HTML report includes an **Analysis** tab with audit metrics, a phased improvement
|
|
231
|
+
plan, and filterable Robocop findings. In the web app, **Repository → Preview** opens
|
|
232
|
+
embedded Robot Framework `log.html` and `report.html` files in an isolated frame
|
|
233
|
+
without changing the audit report's script policy. Robocop is installed by default with
|
|
234
|
+
`python -m pip install lib-explorer`. Use `--no-robocop` to
|
|
235
|
+
skip linting; the rest of the analysis report is still generated. Robocop findings are
|
|
236
|
+
written to a temporary JSON file and are not added to the scanned repository.
|
|
237
|
+
The improvement plan also lists the keyword-definition files and test suites behind its
|
|
238
|
+
evidence, and flags hard-coded credentials (passwords, usernames, API keys, tokens,
|
|
239
|
+
private keys) in `.robot`, `.resource` and common configuration files. Detection is a
|
|
240
|
+
static heuristic: only locations are reported, never the matched values, and Excel or
|
|
241
|
+
CSV datasets are not scanned.
|
|
242
|
+
The improvement plan lists orphan resources before import and path findings.
|
|
243
|
+
An orphan resource has no importer detected within the repository.
|
|
244
|
+
Without `--config`, RF Explorer passes neither `--config` nor `--ignore-file-config`
|
|
245
|
+
to Robocop and does not load its personal configuration automatically. Robocop uses
|
|
246
|
+
its normal discovery: it may load a project's `robocop.toml` or `[tool.robocop]` in
|
|
247
|
+
`pyproject.toml`, otherwise it uses its built-in defaults.
|
|
248
|
+
Run `rf-explorer audit --default-config` (no `--path` required) to display and edit
|
|
249
|
+
the personal file under `%APPDATA%/rf-explorer/` on Windows or
|
|
250
|
+
`$XDG_CONFIG_HOME/rf-explorer/` on Linux/macOS. This does not activate it automatically:
|
|
251
|
+
pass its path with `--config <file>` to use it for an audit. Relative paths resolve
|
|
252
|
+
from `--path`. If the explicit file is missing, RF Explorer continues with Robocop's
|
|
253
|
+
normal configuration discovery.
|
|
254
|
+
|
|
255
|
+
The audit keeps the existing `Keywords` analysis. Add `--technical-keywords`
|
|
256
|
+
to generate a separate `Technical keywords` section containing only technical
|
|
257
|
+
keywords used by tests. `--library` or `-lib` restricts this section
|
|
258
|
+
to one imported library. `--docs` includes Markdown files that
|
|
259
|
+
contain Robot test cases. `output.xml` files are analyzed by default to
|
|
260
|
+
correlate executed tests with their keywords; use `--no-executions` to disable
|
|
261
|
+
this analysis. `--execution` and `--executions` are accepted aliases. Add
|
|
262
|
+
`--variables` when variables are required, or use `--all`. Files matching `*.robot.md` are analyzed from
|
|
263
|
+
their fenced `robot` or `robotframework` code blocks. `--language` sets the default language of the HTML
|
|
264
|
+
report (`en`, `fi`, `fr`, `it`, `nl`, `pt-br`, `pt-pt`); it can also be switched from the report itself.
|
|
265
|
+
|
|
266
|
+
## Notes
|
|
267
|
+
|
|
268
|
+
- Requires Python 3.9+
|
|
269
|
+
- Works best in a terminal that supports colors
|
|
270
|
+
|
|
271
|
+
## License
|
|
272
|
+
|
|
273
|
+
MIT (see LICENSE)
|