Quick Reference - the-carlisle-group/Acre-Desktop GitHub Wiki

Commands

Command Description Syntax Options
AfterSave Specify or query callback to run after saving to file #.function.name | ''
CaseCode Toggle names between case-coded and not item(s)
Changefile Putative changefile name(s) of item(s) in tracked project item(s)
Changes List changed items in project or changes to one space | item -when[=]
CloseProject Close (stop tracking) a tracked project space -all
Config Clone of project configuration namespace space
CreateProject Create a new project folder space -casecode:off -keephistory:off -variables:off
Deletefile Putative deletefile name(s) of item(s) in tracked project item(s)
EditArray Edit any named array. In APLAN if not regular text. item
Erase Erase an item, items or a space from a tracked project item(s) | space -confirm: -recursive
FromAPLAN Evaluate an APLAN expression name | "expression"
Itemname Full or relative ns path of item in putative sourcefile sourcefile(s)
Log Hide, show, clear or query the log hide | show | file | clear | all | number| find "string"
Nameclass Nameclass of item(s) item(s)
OpenProject Load project code into ws for development folder [space] -dependencies:on -track:on
Projects List spaces & folders of all tracked projects. -when[=]
PurgeHistory Fix changes to a tracked project space | item
Redo Re-apply last undone change. item(s)
Refresh Update tracked project with source changes since previous space -all
Removeacre Close all projects and remove acre from ⎕SE resetting as found
Restore Bring back items ]erased item
SetChanged Write items as if changed in the editor item(s) | space
Sourcefile Putative sourcefile name(s) of item(s) in tracked project item(s)
Stats Project Statistics space -all
ToAPLAN Format a value as APLAN name | "expression"
Undo Revert to previous version item(s)
Version Version of acre in use

For option values and defaults - see individual commands in the Command Reference

API calls

All commands can also be called as functions within the ⎕SE.acre namespace.

e.g:

]acre.CreateProject folder #.space -casecode=On -keephistory=Off

can also be called as:

⎕SE.acre.CreateProject 'folder' '#.space' ('casecode' 'On') ('keephistory' 'Off')

Note:

  • functions are ambivalent requiring a right argument and permitting a left 'though currently there is no use made of the latter
  • thus functions mirroring commands that take no argument, require at least ''
  • arguments are individual charstrings
  • options (modifiers) are specified as depth-2 name-value pairs
  • flags (switches) (value-free options) if specified must also be pairs in order to distinguish them (by depth) from arguments.

e.g.

]Close -all can be specified as ⎕SE.acre.Close '' ('all' 1)

The only other valid specification for a flag is ('flag' 0) 'though normally this would be redundant as the presence of a flag is implicitly positive.

In all other respects the command and the API call should be the same both in process and result.

Configuration Parameters

Parameter Description Default
CaseCode Should acre add case codes to filenames? 'Off' (vs 'On')
Dependencies A list of additional projects to open. ''
KeepHistory Should acre keep a local history of all changes? 'Off' (vs 'On')
ProjectSpace The namespace for the project. Defined by ]CreateProject
Startup An expression to execute on open. ''
Variables Should acre save newly edited variables? 'Off' (vs 'On')