Terminal editor and site generator for SKOS taxonomies and OWL ontologies
Project description
ster
_____ ______ ______ ____
/ ___//_ __// ____// __ \
\__ \ / / / __/ / /_/ /
___/ / / / / /___ / _, _/
/____/ /_/ /_____//_/ |_|
[ Breton: "Meaning" or "Sense" ]
[ Semantic Knowledge Editor ]
ster is a terminal tool for building and publishing semantic knowledge bases. Edit SKOS taxonomies and OWL ontologies in a full-screen TUI, explore them as interactive D3 force graphs, and publish them as linked hub sites — all from your terminal, no database required.
ster is the Breton word for meaning, with homonyms for river and star. Let it guide your semantic voyage, keeping the flow and always following your star.
What's inside
| Layer | What ster does |
|---|---|
| Edit | Full-screen TUI for SKOS concepts and OWL classes / individuals / properties |
| Visualise | Interactive D3 v7 force graph — colour-coded clusters, drag, zoom, filter |
| Publish | Static site generator — one hub page per entity, neighbourhood graph, media |
| AI assist | LLM-powered concept suggestions (online or local via Ollama) |
| Git | Stage, commit, push without leaving the terminal |
| Export | pyLODE HTML documentation; SPARQL query runner |
Features
Interactive TUI — SKOS and OWL in one view
- Full-screen tree browser for SKOS concept schemes and OWL class hierarchies
- Inline concept creation, renaming, deletion, and label editing
- Detail panel: view and edit all SKOS fields (labels, definitions, scope notes, related links…)
- OWL layer: browse classes, named individuals, object/datatype properties, axioms
- Visual
⇔indicator for concepts with cross-scheme mapping links - Fold / unfold subtrees; hidden-concept count shown
- Scheme dashboard: completion rates, quality issues, concept counts at a glance
D3 force graph visualisation
Open any ontology or taxonomy as an interactive force graph in the browser:
- Colour-coded node clusters per root class or top concept
- Node types rendered distinctly: OWL classes (rectangles), individuals (ellipses), SKOS concepts (small ellipses), schemes (rounded rects)
- Representative images embedded inside nodes when
schema:imageis set - Drag, zoom, and pin nodes; hover tooltips; highlight neighbourhoods on click
- Lane-based hierarchical layout option for SKOS concept trees
Static site generator
Turn any ontology into a linked knowledge hub with a single command:
ster site my-ontology.ttl -o ./site
Each class, individual, and concept gets its own page with:
- Left panel — interactive D3 neighbourhood graph, centred on the entity
- Right panel — title, badge, representative image, description, embedded videos, external links, and related entity cards
- Index page — full-screen D3 force graph of the entire ontology, with click-to-navigate nodes
Annotate entities with schema:image, schema:video, and schema:url in your RDF file; ster picks them up automatically and renders them inline.
AI-assisted concept creation
When adding a concept (+ key), choose between entering a name manually or letting AI suggest up to 20 ordered concept names:
- AI Auto Suggest — the AI acts as a professional taxonomist who knows your domain. It proposes names ranked by relevance, you pick one (or ask for more), and the form is pre-filled.
- Before generating, ster shows you the exact prompt so you can review and adjust it.
- Supports any LLM via the
llmlibrary — including local models via Ollama. - Pull Ollama models directly from the ⚙ Configure AI wizard without leaving ster.
- Copy-paste mode — no local LLM needed: ster displays the prompt, copies it to the clipboard, and you paste the model's response from any web AI (ChatGPT, Claude, Gemini…).
Multi-file workspace
- Open several
.ttlfiles at once and see a merged taxonomy view - Edits are always written to the correct source file automatically
Cross-scheme mapping
- Add
exactMatch,closeMatch,broadMatch,narrowMatch,relatedMatchlinks between concepts in different files - Remove links from the detail view — works even when the target file has been deleted
- Both source and target files are saved and staged in git on every change
Git integration
- Stage, commit, and push changes without leaving the terminal
- Browse full commit history with diffs inside the TUI
HTML export
- Generate a browsable, wiki-style HTML page from any taxonomy via pyLODE
- One HTML file per language detected in the taxonomy
- Sticky language-switcher bar links between language versions
- Available from the main menu or
ster export
Installation
Minimal (TUI + editing)
pip install ster
With AI features
pip install "ster[ai]"
Then configure your model from the main menu: ⚙ Configure AI. No model needed if you use copy-paste mode.
With HTML export
pip install "ster[html]"
From source
git clone https://github.com/gbelbe/ster.git
cd ster
pip install -e . # core only
pip install -e ".[ai]" # with AI features
pip install -e ".[html]" # with HTML export
pip install -e ".[dev]" # with test suite
Dependencies
| Group | Package | Purpose |
|---|---|---|
| core | rdflib>=7.0 |
RDF parsing and serialisation |
| core | typer[all]>=0.12 |
CLI framework |
| core | rich>=13.0 |
Terminal rendering, prompts, tables |
[ai] |
llm>=0.19 |
LLM abstraction layer (online & offline models) |
[html] |
pylode>=3.0 |
HTML generation from SKOS / OWL (VocPub / OntPub profiles) |
[dev] |
pytest>=8.0 |
Test suite |
[dev] |
pytest-cov>=5.0 |
Coverage reporting |
Both llm and pylode are not installed by default. When you trigger a feature that needs them, ster will offer to install the package automatically.
Quick start
Launch the interactive editor
ster
The home screen lists all ontology and taxonomy files in the current directory. Use arrow keys to navigate the action menu, then press Enter to confirm.
✓ my-ontology.ttl
✓ products.ttl
▶ 1 ↵ Open Tree View
2 ⊙ Graph visualisation
3 ⎇ Browse git history
4 🌐 Generate site
5 🌐 Generate webpage
6 ⚙ Configure AI
7 ✕ Quit
Keyboard shortcuts (TUI)
| Key | Action |
|---|---|
↑ ↓ |
Navigate tree / fields |
Enter |
Expand/collapse node or open detail |
+ |
Add concept — opens a menu: enter name manually or use AI Auto Suggest |
d |
Delete selected concept |
e |
Edit selected field in detail panel |
m |
Add a mapping link to another concept |
g |
Commit & push changes |
? |
Help screen |
q / Esc |
Back / quit |
Generate a site
ster site my-ontology.ttl -o ./site
Open ./site/index.html in a browser to explore the full D3 force graph.
Click any node to navigate to its entity page.
AI Auto Suggest
Press + on any concept or scheme, then select ✦ AI Auto Suggest:
- ster renders the prompt and shows it for review — edit
prompts.pyto customise the wording - Press Enter to generate; the AI suggests up to 20 concept names ranked by relevance
- Navigate the list and press Enter to pick a name (pre-fills the creation form)
- Select Suggest more to get a fresh batch with deduplication
In copy-paste mode the prompt is displayed and copied to the clipboard; paste the model's response back and press Enter on an empty line.
Export to HTML
ster export my-taxonomy.ttl # generates ./html/my-taxonomy_en.html …
ster export my-taxonomy.ttl -l en,fr # specific languages only
ster export my-taxonomy.ttl -o /tmp # custom output directory
Or use the 🌐 Generate webpage option from the main menu.
Validate
ster validate my-taxonomy.ttl
Annotating entities with rich media
ster reads schema:image, schema:video, and schema:url triples and uses them in both the graph visualiser and the generated site:
@prefix schema: <https://schema.org/> .
<https://example.org/MyClass> a owl:Class ;
rdfs:label "My Class"@en ;
schema:image <https://upload.wikimedia.org/wikipedia/commons/thumb/.../500px-image.png> ;
schema:video <https://www.youtube.com/watch?v=...> ;
schema:url <https://en.wikipedia.org/wiki/My_Class> .
Images appear as thumbnails inside D3 node circles; videos are embedded as iframes in entity pages; URLs render as link cards.
Architecture
ster/
├── model.py — Pure dataclasses: Concept, ConceptScheme, Taxonomy, RDFClass, OWLIndividual…
├── store.py — RDF I/O via rdflib (.ttl / .rdf / .jsonld); loads SKOS + OWL layers
├── operations.py — All SKOS mutations (add, remove, move, relate…)
├── workspace.py — Multi-file workspace: merged view + per-file saves
├── workspace_ops.py — Cross-file mapping operations
├── nav.py — Full-screen TUI (curses): tree, detail, inline edit; SKOS + OWL modes
├── nav_state.py — Typed state machine: one dataclass per viewer mode
├── nav_logic.py — Pure functions: tree flattening, field builders, OWL node rendering
├── cli.py — Typer entry-points (ster, ster export, ster site…)
├── ai.py — LLM abstraction: model routing, copy-paste mode, Ollama integration
├── prompts.py — All AI prompt templates (string.Template)
├── html_export.py — pyLODE HTML export + D3 site generator (index + entity pages)
├── viz.py — Standalone D3 graph: writes HTML, opens in browser
├── owl_analysis.py — OWL axiom analysis and statistics
├── sparql_query.py — SPARQL query runner against the loaded taxonomy
├── git_manager.py — Git staging, commit, push
├── git_log.py — Git history browser (TUI)
├── handles.py — Short handle generation from camelCase URIs
└── validator.py — SKOS integrity checks
Each layer depends only on the layers below it, keeping every module independently testable.
AI prompts live in prompts.py as plain string.Template objects — edit them freely without touching any logic.
Supported formats
| Extension | Format |
|---|---|
.ttl |
Turtle (recommended) |
.rdf / .xml |
RDF/XML |
.jsonld / .json |
JSON-LD |
.owl |
OWL/XML |
Development
pip install -e ".[dev]"
pytest
pytest --cov=ster --cov-report=term-missing
CI / CD
Every push and pull request runs four parallel jobs via GitHub Actions:
| Job | Tool | What it checks |
|---|---|---|
| Lint | ruff | Code style, import order, common bugs |
| Type check | mypy | Static type correctness |
| Security | bandit + pip-audit | SAST + known CVEs in dependencies |
| Tests | pytest × Python 3.11 / 3.12 / 3.13 | Full test suite + coverage report |
Coverage is uploaded to Codecov on every run.
Run checks locally
pip install -e ".[dev]"
ruff check . # lint
ruff format --check . # format
mypy ster/ # types
bandit -r ster/ -c pyproject.toml # security
pip-audit # dependency CVEs
pytest --cov=ster # tests + coverage
Or install the pre-commit hooks to run ruff automatically on every commit:
pip install pre-commit
pre-commit install
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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
File details
Details for the file ster-0.3.1.tar.gz.
File metadata
- Download URL: ster-0.3.1.tar.gz
- Upload date:
- Size: 320.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1148f0d6290a34e59c31465adf39bc435919825d400851dbffd496937b636816
|
|
| MD5 |
fcab46b3ab9962a08f492a60e3538312
|
|
| BLAKE2b-256 |
b4356292861b1be3bce6dfb1967ee85ab023f5414fe75aa7e07df6f8476fc9df
|
Provenance
The following attestation bundles were made for ster-0.3.1.tar.gz:
Publisher:
ci.yml on gbelbe/ster
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ster-0.3.1.tar.gz -
Subject digest:
1148f0d6290a34e59c31465adf39bc435919825d400851dbffd496937b636816 - Sigstore transparency entry: 1368360515
- Sigstore integration time:
-
Permalink:
gbelbe/ster@39c7708941fbeabc9721444e6817d408ccd0f8dd -
Branch / Tag:
refs/heads/master - Owner: https://github.com/gbelbe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@39c7708941fbeabc9721444e6817d408ccd0f8dd -
Trigger Event:
push
-
Statement type:
File details
Details for the file ster-0.3.1-py3-none-any.whl.
File metadata
- Download URL: ster-0.3.1-py3-none-any.whl
- Upload date:
- Size: 203.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bce1218bc33e73a297f73df9d51293316050b806c67a9ed66ec038cfc39384ec
|
|
| MD5 |
281ecc8e4fa88f6518fe63eb00d7f61a
|
|
| BLAKE2b-256 |
926079dcc1b29350b645bb2fbbb98cc3504ede9915960bd18d24f4ea60a63f0a
|
Provenance
The following attestation bundles were made for ster-0.3.1-py3-none-any.whl:
Publisher:
ci.yml on gbelbe/ster
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ster-0.3.1-py3-none-any.whl -
Subject digest:
bce1218bc33e73a297f73df9d51293316050b806c67a9ed66ec038cfc39384ec - Sigstore transparency entry: 1368360520
- Sigstore integration time:
-
Permalink:
gbelbe/ster@39c7708941fbeabc9721444e6817d408ccd0f8dd -
Branch / Tag:
refs/heads/master - Owner: https://github.com/gbelbe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@39c7708941fbeabc9721444e6817d408ccd0f8dd -
Trigger Event:
push
-
Statement type: