Deta Surf Documentation

repository·main·Indexed 25 days ago

https://github.com/deta/surf

An AI-powered notebook for MacOS, Windows, and Linux designed for research and thinking. It integrates files, web content, and AI models into a single stream using the Surf Flat File System (SFFS) for local-first, open-format storage. Key features include smart notes with deep-linked citations, interactive code-based applets called Surflets, and support for various AI models via API keys or local LLMs.

Tokens
47.4K
Snippets
55
Records
363
Agent score
86%

What's inside Deta Surf

  1. Overview of Deta Surf features

    main

    Deta Surf is an AI-powered notebook designed for simultaneous research and thinking. Key capabilities include:

    • Multi-Media Library & Notebooks: Store local files, web links (YouTube, Tweets, etc.), and created media in a private library using the Surf Flat File System (SFFS) for local-first, open-format storage.
    • Smart Notes: Use @-mention to auto-generate content from any tab or library resource, trigger web searches, and use integrated citations that deep-link to original sources (webpage sections, video timestamps, or PDF pages).
    • Surflets: Generate interactive, code-based applets without writing code to visualize or explore data.
    • AI Integration: Power notes and Surflets using your own API keys for popular models, cloud models, or Local Language Models.
    • Interface: Navigate via tabs, split view for side-by-side interaction, and a sidebar for quick access to Notebooks.
  2. Overview of the Tree Component

    main
    The Tree component is a comprehensive, accessible, and customizable UI component built using Svelte 5 runes syntax. It is designed to work with any hierarchical data structure and supports features like collapsible items, action registration, and view state persistence via KV store integration. It is renderless by default, allowing for high skinnability through CSS variables and slots.
  3. Understand Surf's security model and limitations

    main

    Surf uses the Chromium engine (via Electron) and employs sandboxing to isolate websites from your system and other web pages. However, because Surf is in an early stage, it lacks certain automated security features found in standard browsers.

    Users should take the following precautions:

    • Exercise caution with untrusted websites: Surf does not yet automatically detect malicious or phishing sites.
    • Verify downloads manually: Surf does not yet automatically detect or block malicious downloads; only download files from trusted sources.
    • Note on Certificate Transparency: Certificate transparency is not currently supported.
  4. Understand Surf Basic Concepts

    main

    Surf is an AI notebook designed for personal context exploration and creation. Key concepts include:

    • Notebooks: Collections for organizing notes and personal media (PDFs, YouTube videos, documents, images, etc.).
    • Notes: Rich text documents that can be manually created or AI-generated from media. They support context-awareness, citations, web search, and app generation (surflets).
    • Tabs: Browser-like navigation. Use $MOD + T to open a new tab, $MOD + W to close the current tab, and $MOD + 1-9 to switch between tabs. Use $MOD + O to toggle between vertical and horizontal tab layouts.
    • Sidebar: Provides access to notebooks, notes, and resources. Toggle with $MOD + E. The sidebar also allows chatting with the active tab, sources, or notebooks.
  5. Implement Drag and Drop with Dragcula

    main
    Dragcula is a library designed to handle drag-and-drop interactions with support for both List-based and Generic drop zones. It features automatic support for the ViewTransitions API and provides both 'Hoist' and 'Clone' modes for item movement.
  6. Getting started with Surf

    main

    Surf is an AI-powered notebook designed for exploration and creation. You can use it to collect web content (PDFs, YouTube videos, documents, images) into private notebooks and generate rich-text, Notion-style notes.

    Core Workflows

    • Collect Data: Add bits of the internet to a notebook. Data is stored locally on your machine as files, database entries, and embeddings.
    • Create Notes: Generate or manually write rich-text documents. Notes are context-aware and can pull information from your saved media.
    • Use AI: Use the AI to write, summarize, or brainstorm based on the context of your notebook.

    Editor Commands

    • Markdown: The editor supports standard Markdown syntax for headings, lists, and text styling.
    • Command Menu: Type / to open the command menu and add various elements to your note.
    • Contextual Mentions: Type @ to mention specific media saved in your notebook or the current tab to provide context to the AI.
    • AI Prompting: Use the input box at the bottom to interact with the AI. For example, try typing: Create a interactive visualization of our solar system?
  7. Quickstart: Things to try in Deta Surf

    main

    To get started with Deta Surf, try these common workflows:

    • YouTube Notes: Visit a YouTube video and ask a question about it.
    • PDF Notes: Open a PDF and ask a question.
    • App Generation: Use the 'app generation' tool and ask for an app to create a Surflet.
    • Web Search: Use the 'web search' tool by including the word "search" in your question to bring research results into your notes.
  8. Download and install Surf

    main

    Surf is available as an open source release for macOS, Windows, and Linux. Download the latest version from the GitHub Releases page.

    Select the file corresponding to your platform:

    • macOS (Apple Silicon): Surf-x.y.z.arm64.dmg
    • macOS (Intel): Surf-x.y.z.x64.dmg
    • Windows (x64): Surf-x.y.z-setup.exe
    • Linux (x64 AppImage): Surf-x.y.z.x86_64.AppImage

    Note: Replace x.y.z with the current version number.

  9. Build sffs from source

    main

    If you need to rebuild the Node addon (index.node) without a full installation, use npm run build. This command uses cargo-cp-artifact to compile the Rust source and copy the resulting binary to ./index.node.

    To build with specific Cargo features, pass them using the -- delimiter:

    npm run build -- --feature=beetle

    To build using the release profile (faster execution, slower compilation), use:

    npm run build-release
    $ npm run build
  10. Use keyboard shortcuts in Deta Surf

    main

    Deta Surf supports keyboard shortcuts to speed up navigation, browsing, and view management.

    Note for Windows & Linux users: Substitute (Command) with Ctrl and (Option) with Alt.