OpenSite/Reference/Commands/Settings commands: Difference between revisions

From BathAfrica Documentation
Jump to navigation Jump to search
Publish Cursor documentation reconciled with OpenSite source 77c3fee; tests not rerun
 
Link adjacent OpenSite reference pages in reading order
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
__NOTOC__
{{OpenSite scope}}
{{BathAfrica Command
{{BathAfrica Command
|review=Development documentation for OpenSite 0.0.1, source snapshot 77c3fee (Phase 13C). Reviewed against implementation on 29 October 2026. Tests and the Windows desktop were not rerun for this publication; this is not a released-product support claim.
|id=cli.settings
|id=cli.settings
|summary=Inspect, change, reset, save, or load a user setting.
|summary=Inspect, change, reset, save, or load a user setting.
Line 15: Line 16:
<code>opensite-cli settings set locale.country FR --file preferences.json</code> writes the user value and prints <code>source=user</code>. <code>settings reset locale.country --file preferences.json</code> prints <code>reset locale.country</code>. The next get on that file prints <code>source=application</code>.
<code>opensite-cli settings set locale.country FR --file preferences.json</code> writes the user value and prints <code>source=user</code>. <code>settings reset locale.country --file preferences.json</code> prints <code>reset locale.country</code>. The next get on that file prints <code>source=application</code>.


== Try this workflow ==
[[OpenSite/Guides/Set preferences|Set preferences]] — a worked lesson with expected results.


== Documentation basis ==
== Documentation basis ==
Line 26: Line 30:
[[OpenSite|OpenSite overview]] · [[OpenSite/Reference|Reference]] · [[OpenSite/Guides|Guides]]
[[OpenSite|OpenSite overview]] · [[OpenSite/Reference|Reference]] · [[OpenSite/Guides|Guides]]
[[Category:OpenSite documentation]]
[[Category:OpenSite documentation]]
<div class="os-page-nav">{{Docnav|OpenSite/Reference/Commands/Command line|OpenSite/Reference/Commands/Unit commands|OpenSite/Guides|All guides}}</div>

Latest revision as of 14:14, 29 October 2026

OpenSite 0.0.1 · DevelopmentSource scope and availability


Inspect, change, reset, save, or load a user setting.

Stable identifier
cli.settings

Implementation milestone

Roadmap phase 3.

Units

The printed value is the setting value. It is not an SI quantity.

Terminal example

opensite-cli settings get locale.country

Python access

opensite.execute('settings.get', {'key': 'locale.language'})

Output

Stdout is key=locale.country, value=, and source=application when no file is loaded.

Errors

Exit 0 on success. Exit 1 when the key or file is rejected. Exit 2 when the arguments are not supported.

Limitations

Set and reset write the user scope. Pass --workspace or --document on get to name a context id. The service does not open that workspace or document.

Verification evidence

Repository evidence references (not rerun for this publication): CTest cli.preferences, including a path that contains a space.


opensite-cli settings set locale.country FR --file preferences.json writes the user value and prints source=user. settings reset locale.country --file preferences.json prints reset locale.country. The next get on that file prints source=application.


Try this workflow

Set preferences — a worked lesson with expected results.

Documentation basis

Source-reviewed against development commit 77c3fee13944bcc4b5d487c77eb1f82fbe4c6ea7, branch feature/phase-13c-properties-python-expressions. This review inspected the implementation and repository evidence; it did not run the Windows application or repeat CTest.

  • src/cli/main.cpp
  • src/cli/document_commands.cpp
  • src/cli/preference_commands.cpp
  • src/application/builtins.cpp

OpenSite overview · Reference · Guides