Skip to content

Quick Reference

Complete index of all operations, conditions, and functions.

Action Syntax

Basic operations (FOR optional):

field = "value"               # Shorthand
FOR field SET "value"         # Verbose

ADD array "item"              # Shorthand
FOR array ADD "item"          # Verbose

Conditional operations (FOR...WHERE required):

FOR <target> WHERE <condition> <operation>

FOR is required only for WHERE. Otherwise it's optional.

Basic Operations

OperationDescriptionExampleLearn More
FOR ... SETSet or update fieldFOR status SET "active"Guide
FOR ... DELETERemove fieldFOR old_field DELETEGuide
FOR ... RENAME TORename fieldFOR author RENAME TO creatorGuide
FOR ... REPLACEPattern substitutionFOR author REPLACE /^Dr\.// ""Guide
FOR ... INCREMENTNumeric operationsFOR count INCREMENT 1Guide

Array Operations

Adding Items

OperationDescriptionExampleLearn More
FOR ... APPENDAdd if not presentFOR tags APPEND "urgent"Guide
FOR ... INSERT ATInsert at positionFOR tags INSERT "urgent" AT 0 (start)
FOR tags INSERT "done" AT -1 (end)
Guide

Removing Items

OperationDescriptionExampleLearn More
FOR ... WHERE ... REMOVERemove matching itemsFOR tags WHERE $ = "draft" REMOVEGuide
FOR ... REMOVE_ALLRemove all matchesFOR tags REMOVE_ALL "old"Guide
FOR ... REMOVE_ANYRemove multiple valuesFOR tags REMOVE_ANY ["draft", "wip"]Guide

Transforming Arrays

OperationDescriptionExampleLearn More
FOR ... DEDUPLICATERemove duplicatesFOR tags DEDUPLICATEGuide
FOR ... SORTSort arrayFOR tags SORT ASCGuide
FOR ... SORT BYSort objects by fieldFOR tasks SORT BY priority DESCGuide
FOR ... MOVE FROM ... TOMove by indexFOR tags MOVE FROM 0 TO 5Guide

Array of Objects Operations

OperationDescriptionExampleLearn More
FOR ... WHERE ... SETUpdate matching objectsFOR tasks WHERE status = "pending" SET status "active"Guide
FOR ... WHERE ... MOVEMove by conditionFOR tasks WHERE priority > 7 MOVE TO STARTGuide

Object Operations

OperationDescriptionExampleLearn More
FOR ... MERGEDeep merge (preserve nested)FOR metadata MERGE {author: "John"}Guide
FOR ... MERGE_OVERWRITEShallow merge (replace all)FOR settings MERGE_OVERWRITE {mode: "advanced"}Guide

Condition Operators

Comparison

OperatorDescriptionExample
=Equalsstatus = "active"
!=Not equalsstatus != "archived"
>Greater thanpriority > 5
<Less thancount < 10
>=Greater or equalscore >= 80
<=Less or equalage <= 18

Logical

OperatorDescriptionExample
ANDBoth must be truestatus = "draft" AND HAS tags
OREither can be truepriority > 5 OR deadline < ""
NOTNegates conditionNOT tags contains "archived"

Special Operators

OperatorDescriptionExampleLearn More
containsCheck if array has valuetags contains "urgent"Guide
HASCheck if field existsHAS deadlineGuide
INCheck if value in liststatus IN ["draft", "review"]Guide

Advanced Operators

OperatorDescriptionExampleLearn More
.lengthCount items/characterstags.length > 0Guide
emptyCheck if emptytags emptyGuide
!emptyCheck if not emptytags !emptyGuide
:stringCheck if string typestatus :stringGuide
:numberCheck if number typepriority :numberGuide
:booleanCheck if boolean typepublished :booleanGuide
:arrayCheck if array typetags :arrayGuide
:objectCheck if object typemetadata :objectGuide
:nullCheck if nulldeletedAt :nullGuide
ANY ... WHEREAt least one item matchesANY tasks WHERE status = "done"Guide
ALL ... WHEREEvery item matchesALL tasks WHERE verified = trueGuide

Functions

Template VariableDescriptionReturnsExample
Current timestampISO 8601 stringSET created ""
Today's dateYYYY-MM-DDSET date ""

Keywords

Action Keywords

KeywordUsed InExample
FORAll actionsFOR status SET "active"
WHEREConditional operationsFOR tags WHERE $ = "x" REMOVE
SETAssignmentFOR field SET value
ATInsert positionFOR tags INSERT "new" AT 0
BYSort fieldFOR tasks SORT BY priority
FROM / TOMove operationsFOR tags MOVE FROM 0 TO 5
ASC / DESCSort orderFOR tags SORT ASC
START / ENDMove targetsFOR tasks WHERE ... MOVE TO START
AFTER / BEFORERelative positioningFOR tasks WHERE ... MOVE TO AFTER name = "x"

Common Patterns

Mark Notes for Review

Rule 1:
  Condition: status = "draft" AND HAS tags
  Action: FOR status SET "ready-for-review"

Rule 2:
  Condition: status = "draft" AND HAS tags
  Action: FOR reviewed_date SET "2025-11-24T22:10:00"

See full example

Archive Old Notes

Condition: created_date < "2024-01-01"
Action: FOR tags APPEND "archived", SET archived_date "{{today}}"

See full example

Tag Migration

Condition: tags contains "old-tag"
Action: FOR tags WHERE $ = "old-tag" REMOVE, FOR tags APPEND "new-tag"

See full example

Clean Up Multiple Tags

Condition: HAS tags
Action: FOR tags REMOVE_ANY ["draft", "wip", "temp"]

See full example

Priority Flagging

Condition: priority > 7 AND NOT tags contains "urgent"
Action: FOR tags APPEND "urgent"

See full example

Overdue Tasks

Condition: HAS deadline AND deadline < "{{today}}" AND status != "completed"
Action: SET status "overdue"

See full example

Track View Count

Condition: HAS views
Action: FOR views INCREMENT 1

See full example

Strip Prefixes

Condition: author contains "Dr."
Action: FOR author REPLACE /^Dr\.?\s+// ""

See full example

Task Reassignment

Condition: HAS tasks
Action: FOR tasks WHERE assignee = "Bob" SET assignee "Alice"

See full example

Prioritize Items

Condition: HAS watchlist
Action: FOR watchlist WHERE watched = false MOVE TO START

See full example

Data Types

TypeExampleNotes
String"text"Always use quotes
Number42, 3.14No quotes
Booleantrue, falseNo quotes
NullnullNo quotes
Array["a", "b"]Square brackets
Object{key: "value"}Curly braces
Date"2025-01-01"ISO format string

See Also

Released under the MIT License.