cpmf-uisor
CLI tool for UiPath Object Repository .objects/ directories. Reads, audits, and modifies Screen URLs (V2) and Element selectors (V6).
File named
!README.mdto appear first in GitHub Gist (lexicographic sort).
Installation
Requires Python 3.11+. Run directly with uv:
uv run cpmf-uisor --help
Object Repository Structure
UiPath stores UI automation targets in .objects/ with this hierarchy:
.objects/
{hash}/ # App
.type # Contains "App"
.metadata # XML: Name, Reference
{hash}/ # AppVersion
.type # Contains "AppVersion"
.metadata # XML: Name, Reference, ParentRef
{hash}/ # Screen
.type # Contains "Screen"
.metadata # XML: Name, Reference, ParentRef
.data/ObjectRepositoryScreenData/.content # V2: URL, Selector
{hash}/ # Element
.type # Contains "Element"
.metadata
.data/ObjectRepositoryTargetData/.content # V6: Selectors
Commands
inventory
List objects with parameterization status.
# Flat text (default)
cpmf-uisor inventory path/to/project.json
# Filter by type
cpmf-uisor inventory path/to/project.json --type screen
cpmf-uisor inventory path/to/project.json --type element
# Output formats
cpmf-uisor inventory path/to/project.json --format text # Flat text
cpmf-uisor inventory path/to/project.json --format json # Flat JSON array
cpmf-uisor inventory path/to/project.json --format tree # Hierarchical text
cpmf-uisor inventory path/to/project.json --format json-tree # Hierarchical JSON
cpmf-uisor inventory path/to/project.json --format markdown # Writes Documentation/inventory.md
cpmf-uisor inventory path/to/project.json --format html # Writes Documentation/inventory.html
audit
Report statistics and issues.
cpmf-uisor audit path/to/project.json
cpmf-uisor audit path/to/project.json --type screen
cpmf-uisor audit path/to/project.json --exit-code # Exit 1 if issues found
Output includes:
- Total objects (Screens, Elements)
- Hardcoded vs parameterized counts
- Variables in use
- Version distribution
- Issues (unsupported versions, literal
*in URLs)
replace
Apply parameterization rules. Dry-run by default.
# Dry-run with config file
cpmf-uisor replace path/to/project.json --config rules.toml
# Apply changes
cpmf-uisor replace path/to/project.json --config rules.toml --apply
# Interactive mode (prompt per object)
cpmf-uisor replace path/to/project.json --config rules.toml --apply --interactive
# Interactive rule creation (no config file)
cpmf-uisor replace path/to/project.json --interactive
# Include unsupported versions
cpmf-uisor replace path/to/project.json --config rules.toml --force
Rules Configuration (TOML)
Three rule types modify .content files. Rules are evaluated in order; first matching rule wins.
| Type | Purpose | Required Fields |
|---|---|---|
parameterize |
Hardcoded value → [variable] |
match, variable |
rename |
[oldVar] → [newVar] |
from_variable, to_variable |
reset |
[variable] → hardcoded value |
variable, value |
Targets
| Target | Applies To |
|---|---|
all (default) |
Screen URLs + Element selectors |
screen |
V2 Screen URLs only |
element.scope |
V6 ScopeSelectorArgument only |
element.selector |
V6 FullSelectorArgument only |
Examples
# Parameterize base URL (wildcard preserves path suffix)
# https://cms.example.com/app/login → [cmsBaseUrl]login
[[rules]]
type = "parameterize"
match = "https://cms.example.com/app/*"
variable = "cmsBaseUrl"
# Parameterize element title attribute in scope selector
# <html title='Login Page - CMS' /> → <html title='[windowTitle]' />
[[rules]]
type = "parameterize"
target = "element.scope"
attribute = "title"
match = "Login Page*"
variable = "windowTitle"
# Rename variable across all types
[[rules]]
type = "rename"
from_variable = "oldBaseUrl"
to_variable = "baseUrl"
# Reset variable to hardcoded value
[[rules]]
type = "reset"
variable = "testUrl"
value = "https://test.example.com/"
Variable Syntax
Both V2 Screens and V6 Elements use [expression] syntax. The expression can be:
- Simple variable:
[baseUrl] - Config lookup:
[Config("CmsBaseUrl").ToString()] - Any VB.NET expression UiPath accepts
Examples:
- V2 Screen URL:
[baseUrl]pages/login.xhtml - V6 Selector attribute:
<html title='[windowTitle]' />
XML special characters (", <, >, &, ') in variable expressions are automatically escaped when writing to .content files.
Supported Versions
| Type | Version | File |
|---|---|---|
| Screen | V2 | .data/ObjectRepositoryScreenData/.content |
| Element | V6 | .data/ObjectRepositoryTargetData/.content |
Unsupported versions are skipped by default. Use --force to include them.
Files
| File | Purpose |
|---|---|
cli.py |
Typer CLI commands |
discovery.py |
Traverse .objects/, build hierarchy |
models.py |
Data classes (ScreenEntry, ElementEntry, Inventory) |
parser.py |
Parse .metadata and .content XML |
adapter_screen_V2.py |
V2 Screen URL handling |
adapter_element_V6.py |
V6 Element selector handling |
rules.py |
Load and apply TOML rules |
formatters.py |
Output formatters (text, JSON, markdown, HTML) |
templates.py |
Jinja2 templates for markdown/HTML |
Metadata
Release files for cpmf-uisor 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| cpmf_uisor-0.1.2.tar.gz | 39.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cpmf_uisor-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 78.3 kB
Release files / cpmf_uisor-0.1.2.tar.gz
| Download URL | cpmf_uisor-0.1.2.tar.gz |
|---|---|
| Size | 39.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c65395b655cb21a99b5f4948cf21a25f7dc5a057064ad6e7d89a00ff62826feb
|
|
BLAKE2b-256 checksum How to use checksums |
8a90915a2a657fe9d0b46bfea29a99c7e4eccfe91651f357306308776bf7a0bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Release files / cpmf_uisor-0.1.2-py3-none-any.whl
| Download URL | cpmf_uisor-0.1.2-py3-none-any.whl |
|---|---|
| Size | 39.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2839ee880a3c967f6f8e47c9619dc56b2cc87498d19fa44836b6b656c5622853
|
|
BLAKE2b-256 checksum How to use checksums |
bb44db878194839098a8745d5a5d07dffed5064baaa9435ce414a150af1af498
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Security for cpmf-uisor 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.