Zetanote Documentation

website·Indexed 30 days ago

https://docs.zetanote.com

Guides and recipes for Zetanote, featuring the Zeta API for programmatically updating knowledge base states. Includes TypeScript API references for managing notes, scripts, and tags, as well as integration recipes for OpenAI, localhost APIs, and other external HTTP services.

Tokens
20.5K
Snippets
127
Records
154
Agent score
50%

What's inside Zetanote

  1. Overview of the Zetanote UI API

    The Zetanote UI API provides a set of methods to programmatically manipulate the application's user interface. Common use cases include quickly navigating to a specific node or opening multiple nodes simultaneously within a stack.
  2. Overview of ZetaNote Scripts

    Scripts in ZetaNote are functions used to automate workflows. They allow developers to combine various methods from the Zeta API to perform tasks such as querying data, inserting elements, and manipulating the user interface.
  3. Overview of Zetanote as a computational knowledge base

    Zetanote is a note-taking application designed as a computational knowledge base. Unlike traditional note apps, it is powered by automated workflows called scripts, allowing users to automate sophisticated workflows, process large volumes of data, and efficiently retrieve information by integrating programming capabilities directly into the knowledge base.
  4. Understand Zetanote Query API behavior and constraints

    The Query API is used to fetch data from the Zetanote DB. All methods in the Query API are asynchronous and return a promise.

    Important Consistency Note: DB writes submitted via the Main API are not immediately reflected in Query API results within the same execution cycle. Results will only update after all scripts have finished executing. If you update a note and query it in the same script execution, the Query API will return the previous state of the note.

  5. Understand and use Tag Tables in Zetanote

    Tag tables in Zetanote treat every tag as a structured table with its own set of fields. When a note is tagged, it creates a row in that tag's corresponding table. A single note can belong to multiple tag tables simultaneously, allowing it to be rediscovered through different contexts and to hold different sets of structured data (fields) depending on the tag applied. For example, a note tagged with both Health and Task will have entries in both the Health table and the Task table, sharing the specific fields defined for the Task tag (e.g., "Priority" or "Done") with all other notes tagged as tasks.
  6. Identify the execution container using zeta.v1.context.getContainer()

    Use zeta.v1.context.getContainer() to retrieve information about the container (such as a note) where the current script is being executed. This is particularly useful when a script is running inside a code cell. If the script is executed outside of a container, the function returns null.

    The returned object contains:

    • type: The type of container (e.g., "Note").
    • id: The unique identifier of the container.
    • index: The position of the executable block (e.g., the code cell's index) within that container.
    // Get the current execution container
    const container = zeta.v1.context.getContainer();
    
    if (container) {
      console.log(`Executing in ${container.type} with ID ${container.id} at index ${container.index}`);
    } else {
      console.log("Script is not executing within a container.");
    }
  7. Understand the Zeta Beta API stability and risk

    The Beta API contains methods that are currently being tested before they are officially integrated into the stable Zeta API. Because these methods are in beta, they may be buggy and are subject to frequent changes. Developers should use the Beta API with caution and at their own risk.
  8. Understand the ZetaNote Context API execution context

    The Context API provides the execution context of the currently running script. This allows developers to implement conditional logic and change script behavior based on how the script was triggered or executed.
  9. Understand the purpose and behavior of the Zetanote Main API

    The Main API is the exclusive interface for writing to the Zetanote database. It allows developers to programmatically update the state of their knowledge base, specifically for tasks such as moving information, automatically organizing nodes, and populating node metadata. All write operations performed via the Main API are transactional, ensuring that a set of changes either all succeed or all fail together.
  10. Understand Zetanote core terminology

    Zetanote uses a specific set of primitives to organize data and automation:

    • Note: A container for unstructured data (e.g., journal entries, ideas, todo lists) using rich text. Notes can become computational objects when a script is invoked within them.
    • Script: An automated workflow. Scripts can be executed individually or combined to create complex logic.
    • Node: A generic term referring to either a Note or a Script.
    • Tag: A container for structured data. Unlike notes, tags have a schema with typed fields (similar to a database table) and are used to store metadata or organize nodes.