Archetype Command Line Interface

There are a few archetype-specific Cyclus CLI commands that allow introspecting details of archetypes that Cyclus can find. Most expose data that is automatically generated by the Cyclus preprocessor. For example, member variables added with #pragma cyclus var are added to the generated input XML schema. Agents are referenced on the command line by their single-string form spec (e.g. :cycamore:Source) which is discussed here.

To view the auto-generated XML schema used for validating archetype configuration parameters in input files:

$ cyclus --agent-schema :agents:Source
<interleave>
    <element name="commod">
        <data type="token"/>
    </element>
    <optional>
        <element name="recipe_name">
            <data type="token"/>
        </element>
    </optional>
    <element name="capacity">
        <data type="double"/>
    </element>
</interleave>

To view a JSON structured output of all the data generated and collected from #pragma cyclus annotations for a particular archetype:

$ cyclus --agent-annotations :cycamore:Source
{
 "all_parents": [
  "cyclus::Agent",
  "cyclus::Facility",
  "cyclus::Ider",
  "cyclus::StateWrangler",
  "cyclus::TimeListener",
  "cyclus::Trader",
  "cyclus::toolkit::AgentManaged",
  "cyclus::toolkit::CommodityProducer"
 ],
 "doc": "This facility acts as a source of material with a fixed...
 ...

And to list all archetypes inside a particular library:

$ cyclus --agent-listing :cycamore
:cycamore:DeployInst
:cycamore:Enrichment
:cycamore:FuelFab
:cycamore:GrowthRegion
:cycamore:ManagerInst
:cycamore:Reactor
:cycamore:Separations
:cycamore:Sink
:cycamore:Source
:cycamore:Storage

Archetype Versioning

The cyclus::Agent class exposes a version() member function which can be queried with the Cyclus CLI. For example,

$ cyclus --agent-version :agents:Source
1.3.1-7-g9a2c9c9

This is generated from some git version control information. You can make your own version tag information for some archetype like

C++:

virtual std::string version() { return "My Version"; }

Python:

def version(self):
    return "My Version"

and then access the version with

$ cyclus --agent-version my/path:my_library:MyArchetype
My Version