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" # VerboseConditional operations (FOR...WHERE required):
FOR <target> WHERE <condition> <operation>FOR is required only for WHERE. Otherwise it's optional.
Basic Operations
| Operation | Description | Example | Learn More |
|---|---|---|---|
FOR ... SET | Set or update field | FOR status SET "active" | Guide |
FOR ... DELETE | Remove field | FOR old_field DELETE | Guide |
FOR ... RENAME TO | Rename field | FOR author RENAME TO creator | Guide |
FOR ... REPLACE | Pattern substitution | FOR author REPLACE /^Dr\.// "" | Guide |
FOR ... INCREMENT | Numeric operations | FOR count INCREMENT 1 | Guide |
Array Operations
Adding Items
| Operation | Description | Example | Learn More |
|---|---|---|---|
FOR ... APPEND | Add if not present | FOR tags APPEND "urgent" | Guide |
FOR ... INSERT AT | Insert at position | FOR tags INSERT "urgent" AT 0 (start)FOR tags INSERT "done" AT -1 (end) | Guide |
Removing Items
| Operation | Description | Example | Learn More |
|---|---|---|---|
FOR ... WHERE ... REMOVE | Remove matching items | FOR tags WHERE $ = "draft" REMOVE | Guide |
FOR ... REMOVE_ALL | Remove all matches | FOR tags REMOVE_ALL "old" | Guide |
FOR ... REMOVE_ANY | Remove multiple values | FOR tags REMOVE_ANY ["draft", "wip"] | Guide |
Transforming Arrays
| Operation | Description | Example | Learn More |
|---|---|---|---|
FOR ... DEDUPLICATE | Remove duplicates | FOR tags DEDUPLICATE | Guide |
FOR ... SORT | Sort array | FOR tags SORT ASC | Guide |
FOR ... SORT BY | Sort objects by field | FOR tasks SORT BY priority DESC | Guide |
FOR ... MOVE FROM ... TO | Move by index | FOR tags MOVE FROM 0 TO 5 | Guide |
Array of Objects Operations
| Operation | Description | Example | Learn More |
|---|---|---|---|
FOR ... WHERE ... SET | Update matching objects | FOR tasks WHERE status = "pending" SET status "active" | Guide |
FOR ... WHERE ... MOVE | Move by condition | FOR tasks WHERE priority > 7 MOVE TO START | Guide |
Object Operations
| Operation | Description | Example | Learn More |
|---|---|---|---|
FOR ... MERGE | Deep merge (preserve nested) | FOR metadata MERGE {author: "John"} | Guide |
FOR ... MERGE_OVERWRITE | Shallow merge (replace all) | FOR settings MERGE_OVERWRITE {mode: "advanced"} | Guide |
Condition Operators
Comparison
| Operator | Description | Example |
|---|---|---|
= | Equals | status = "active" |
!= | Not equals | status != "archived" |
> | Greater than | priority > 5 |
< | Less than | count < 10 |
>= | Greater or equal | score >= 80 |
<= | Less or equal | age <= 18 |
Logical
| Operator | Description | Example |
|---|---|---|
AND | Both must be true | status = "draft" AND HAS tags |
OR | Either can be true | priority > 5 OR deadline < "" |
NOT | Negates condition | NOT tags contains "archived" |
Special Operators
| Operator | Description | Example | Learn More |
|---|---|---|---|
contains | Check if array has value | tags contains "urgent" | Guide |
HAS | Check if field exists | HAS deadline | Guide |
IN | Check if value in list | status IN ["draft", "review"] | Guide |
Advanced Operators
| Operator | Description | Example | Learn More |
|---|---|---|---|
.length | Count items/characters | tags.length > 0 | Guide |
empty | Check if empty | tags empty | Guide |
!empty | Check if not empty | tags !empty | Guide |
:string | Check if string type | status :string | Guide |
:number | Check if number type | priority :number | Guide |
:boolean | Check if boolean type | published :boolean | Guide |
:array | Check if array type | tags :array | Guide |
:object | Check if object type | metadata :object | Guide |
:null | Check if null | deletedAt :null | Guide |
ANY ... WHERE | At least one item matches | ANY tasks WHERE status = "done" | Guide |
ALL ... WHERE | Every item matches | ALL tasks WHERE verified = true | Guide |
Functions
| Template Variable | Description | Returns | Example |
|---|---|---|---|
| Current timestamp | ISO 8601 string | SET created "" |
| Today's date | YYYY-MM-DD | SET date "" |
Keywords
Action Keywords
| Keyword | Used In | Example |
|---|---|---|
FOR | All actions | FOR status SET "active" |
WHERE | Conditional operations | FOR tags WHERE $ = "x" REMOVE |
SET | Assignment | FOR field SET value |
AT | Insert position | FOR tags INSERT "new" AT 0 |
BY | Sort field | FOR tasks SORT BY priority |
FROM / TO | Move operations | FOR tags MOVE FROM 0 TO 5 |
ASC / DESC | Sort order | FOR tags SORT ASC |
START / END | Move targets | FOR tasks WHERE ... MOVE TO START |
AFTER / BEFORE | Relative positioning | FOR 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"Archive Old Notes
Condition: created_date < "2024-01-01"
Action: FOR tags APPEND "archived", SET archived_date "{{today}}"Tag Migration
Condition: tags contains "old-tag"
Action: FOR tags WHERE $ = "old-tag" REMOVE, FOR tags APPEND "new-tag"Clean Up Multiple Tags
Condition: HAS tags
Action: FOR tags REMOVE_ANY ["draft", "wip", "temp"]Priority Flagging
Condition: priority > 7 AND NOT tags contains "urgent"
Action: FOR tags APPEND "urgent"Overdue Tasks
Condition: HAS deadline AND deadline < "{{today}}" AND status != "completed"
Action: SET status "overdue"Track View Count
Condition: HAS views
Action: FOR views INCREMENT 1Strip Prefixes
Condition: author contains "Dr."
Action: FOR author REPLACE /^Dr\.?\s+// ""Task Reassignment
Condition: HAS tasks
Action: FOR tasks WHERE assignee = "Bob" SET assignee "Alice"Prioritize Items
Condition: HAS watchlist
Action: FOR watchlist WHERE watched = false MOVE TO STARTData Types
| Type | Example | Notes |
|---|---|---|
| String | "text" | Always use quotes |
| Number | 42, 3.14 | No quotes |
| Boolean | true, false | No quotes |
| Null | null | No quotes |
| Array | ["a", "b"] | Square brackets |
| Object | {key: "value"} | Curly braces |
| Date | "2025-01-01" | ISO format string |