$ pip install csdl-explore

CSDL
Explorer

Parse OData $metadata XML and explore entities, properties, and relationships from the terminal. Built for SAP SuccessFactors, but works on any OData service.

$ pip install csdl-explore # Rich REPL
$ pip install csdl-explore[tui] # + Textual TUI
csdl-explore metadata.xml
╭─────────────────────────────────────────╮
         CSDL Explorer                   
     Loaded 735 entities                 
╰─────────────────────────────────────────╯

csdl> search contract

Type    Entity      Match             Details
PROP    EmpJob      .contractType     Edm.String
NAV     EmpJob      .contractTypeNav
PROP    PerPerson   .contractEndDate  Edm.DateTime

csdl> tree EmpJob

EmpJob
├── Keys
│   ├── seqNumber Edm.Int64
│   ├── startDate Edm.DateTime
│   └── userId Edm.String
├── Properties (45)
│   ├── businessUnit Edm.String
│   └── ... and 43 more
├── Custom Fields (24)
│   ├── customString7 Edm.String
│   └── ... and 23 more
└── Navigation (8)
    ├── employmentNav  EmpEmployment
    └── ... and 7 more
csdl>
Rich REPL
Colored tables, visual trees, fuzzy search. Just point at a metadata XML and explore.
Textual TUI
Split-pane layout with tree navigation, tabbed entity views, and a navigation graph.
OData Queries
Visual query builder with $filter, $select, $expand, $orderby. Results in JSON, table, or CSV.
SAP Auth
Bearer, Basic, and OAuth2 SAML Bearer flow. Credentials persisted in .env files per metadata.
Picklist Analysis
See which entities use a picklist, impact analysis for changes, fetch live values.
Headless Mode
Every command works non-interactively. Pipe to jq, feed to scripts, use with AI agents.
Command Description
entity <name> Show all properties of an entity
tree <name> Visual tree with keys, properties, navigation
search <term> Search across entities, properties, labels
custom <entity> Show custom fields (customStringXX)
diff <e1> <e2> Compare two entities side by side
nav <entity> Show navigation properties and targets
query <entity> Execute OData query with filters
picklist <name> Fetch picklist values from live API
from csdl_explore import CSDLExplorer
from pathlib import Path

explorer = CSDLExplorer.from_file(Path("metadata.xml"))

# Search across everything
for r in explorer.search("worker"):
    print(f"{r.entity}.{r.property}: {r.prop_type}")

# Entity details, custom fields, comparison
entity = explorer.get_entity("EmpJob")
fields = explorer.get_custom_fields("EmpJob")
comp   = explorer.compare_entities("EmpCompensation", "EmpPayCompRecurring")