EveryDev.ai
Subscribe
Home
Tools

3,723+ AI tools

  • New
  • Trending
  • Featured
  • Compare
  • Arena
Categories
  • Agents2189
  • Coding1574
  • Infrastructure698
  • Marketing534
  • Projects498
  • Research456
  • Design416
  • Analytics389
  • Testing296
  • MCP290
  • Security286
  • Data262
  • Integration197
  • Prompts189
  • Communication183
  • Extensions173
  • Learning170
  • Voice151
  • Commerce135
  • DevOps123
  • Web86
  • Finance26
AI Tools by Topic
  • AI Coding Assistants
  • Agent Frameworks
  • MCP Servers
  • AI Prompt Tools
  • Vibe Coding Tools
  • AI Design Tools
  • AI Database Tools
  • AI Website Builders
  • AI Testing Tools
  • LLM Evaluations
Follow Us
  • X / Twitter
  • LinkedIn
  • Reddit
  • Discord
  • Threads
  • Bluesky
  • Mastodon
  • YouTube
  • GitHub
  • Instagram
Get Started
  • About
  • Editorial Standards
  • Corrections & Disclosures
  • Community Guidelines
  • Advertise
  • Contact Us
  • Newsletter
  • Submit a Tool
  • Start a Discussion
  • Write A Blog
  • Share A Build
  • Terms of Service
  • Privacy Policy
Explore with AI
  • ChatGPT
  • Gemini
  • Claude
  • Grok
  • Perplexity
Agent Experience
  • llms.txt
Theme
With AI, Everyone is a Dev. EveryDev.ai © 2026
    1. Home
    2. Tools
    3. use-fs
    use-fs icon

    use-fs

    AI Development Libraries
    Featured

    A React hook for the File System Access API and Origin Private File System (OPFS) that watches directories and re-renders on file changes.

    Visit Website

    At a Glance

    Pricing
    Open Source

    Fully free and open-source under the MIT License. Install via npm and use without restrictions.

    Engagement

    Available On

    Web
    API
    SDK

    Resources

    WebsiteDocsGitHubllms.txt

    Topics

    AI Development LibrariesBrowser AutomationDocument Management

    Alternatives

    Extend UILibrettoStagehand
    Developer
    Tim MikeladzeSeattle, WA

    Listed Aug 2026

    About use-fs

    use-fs is an open-source React hook built by Tim Mikeladze (linesofcode.dev) that integrates with the browser's File System Access API and the Origin Private File System (OPFS). It lets a React component point at a directory — either a real folder on disk or the browser's private storage — and automatically re-renders whenever a file is added, changed, or deleted. The library is MIT-licensed and available on npm and GitHub.

    What It Is

    use-fs wraps the FileSystemDirectoryHandle interface shared by both the directory picker and OPFS into a single useFs() hook. The hook returns a Map<string, string> of file paths to contents, a set of action methods for reading and writing files, and lifecycle callbacks (onFilesAdded, onFilesChanged, onFilesDeleted) that fire immediately on each scan. Because both storage backends expose the same handle type, the same hook, the same files map, and the same writeFile call work against either — only the backing store changes.

    How Watching Works

    The hook polls on a configurable interval (default 300ms) using a three-step scan cycle:

    • Walk — breadth-first traversal with bounded concurrency; filters that reject a directory prune the entire subtree, so node_modules is never enumerated.
    • Stat — each discovered file is stat'd first; contents are re-read only when lastModified or size changed, so a large idle tree costs no content I/O.
    • Diff — added, changed, and deleted paths are resolved against the previous scan; rendered state is coalesced by a configurable debounceInterval while callbacks always fire immediately.

    Scans never throw: a directory that cannot be enumerated keeps its last known contents and surfaces the reason through an error field.

    Two Storage Backends

    Folder on disk — the user picks a directory through the browser's native picker and grants access. The app reads and writes real files that are also visible to the user's editor, terminal, and backups. Supported on desktop Chrome, Edge, and Opera only; requires a user gesture to open the picker.

    Origin Private File System (OPFS) — a private directory tree scoped to the origin, kept across reloads, and invisible to the user. No picker, no permission prompt, and no user gesture required, so it can be mounted in a useEffect. Supported in Chrome, Edge, Opera, Safari 17+, and Firefox 111+. The hook recommends mounting a named subdirectory (e.g. addOpfsDirectory({ name: "notes" })) rather than the OPFS root to avoid walking WASM databases and other libraries sharing the same origin.

    Filters and the Full API

    commonFilters (the default) prunes build output directories (node_modules, dist, .next, etc.), drops OS scratch files (.DS_Store, Thumbs.db), and honours nested .gitignore files. Custom filters can be composed with createFilter, createExcludedDirectoryFilter, and createExcludedFileFilter. A filter that rejects a directory prunes its entire subtree before enumeration.

    The hook also exports lower-level primitives — walkDirectory, scanDirectories, toContentMap, getOpfsRoot, getDirectoryPicker, and ensurePermission — for building on top of the same internals.

    Key return values include files, handles, directories, isProcessing, isPolling, isBrowserSupported, isOpfsSupported, error, writeFile, createFile, deleteFile, deleteDirectory, refresh, startPolling, stopPolling, requestPermission, and onClear.

    Update: Release 2.0.0

    Version 2.0.0 was published on 21 August 2026, making it the current stable release. The repository was last pushed on the same date and shows active maintenance with zero open issues. The project was originally created in September 2023 and has accumulated 63 GitHub stars and 4 forks as of the latest metadata.

    use-fs - 1

    Community Discussions

    Be the first to start a conversation about use-fs

    Share your experience with use-fs, ask questions, or help others learn from your insights.

    Pricing

    OPEN SOURCE

    Open Source

    Fully free and open-source under the MIT License. Install via npm and use without restrictions.

    • Full use-fs hook with all features
    • File System Access API integration
    • OPFS support
    • MIT License — free to use, modify, and distribute
    • Community support via GitHub

    Capabilities

    Key Features

    • Watch a folder on disk or OPFS and re-render on file changes
    • onFilesAdded, onFilesChanged, onFilesDeleted lifecycle callbacks
    • Breadth-first directory walk with bounded concurrency
    • Stat-based change detection (only re-reads when lastModified or size changes)
    • commonFilters: prunes build output, OS scratch files, and .gitignore entries
    • Custom filter composition with createFilter
    • writeFile, createFile, deleteFile, deleteDirectory actions
    • addOpfsDirectory for no-prompt browser storage access
    • onDirectorySelection for native directory picker
    • addDirectory for pre-existing FileSystemDirectoryHandle
    • Configurable pollInterval, debounceInterval, batchSize, concurrency
    • startPolling / stopPolling for manual loop control
    • requestPermission for re-requesting access to watched roots
    • isBrowserSupported and isOpfsSupported feature flags
    • Lower-level exports: walkDirectory, scanDirectories, getOpfsRoot, ensurePermission

    Integrations

    React
    File System Access API
    Origin Private File System (OPFS)
    IndexedDB (for handle persistence)
    npm
    Yarn
    pnpm
    Bun
    Deno
    API Available
    View Docs

    Ratings & Reviews

    No ratings yet

    Be the first to rate use-fs and help others make informed decisions.

    Developer

    Tim Mikeladze

    Tim Mikeladze builds open-source developer tools under the linesofcode.dev brand. His projects focus on React hooks and browser-native APIs, making low-level web platform capabilities accessible through ergonomic TypeScript libraries. use-fs is his flagship project, wrapping the File System Access API and OPFS into a single composable hook.

    Seattle, WA
    Read more about Tim Mikeladze
    WebsiteGitHubX / Twitter
    1 tool in directory

    Similar Tools

    Extend UI icon

    Extend UI

    Open-source React component library for building document agents, user-facing document flows, and internal tools with PDF, DOCX, and XLSX viewers.

    Libretto icon

    Libretto

    An open-source AI toolkit for building and maintaining robust browser automations, giving coding agents a live browser and token-efficient CLI to inspect pages, capture network traffic, and replay workflows.

    Stagehand icon

    Stagehand

    An open-source AI browser automation framework built as an alternative to Playwright, enabling reliable AI-driven web interactions.

    Browse all tools

    Related Topics

    AI Development Libraries

    Programming libraries and frameworks that provide machine learning capabilities, model integration, and AI functionality for developers.

    296 tools

    Browser Automation

    AI-powered agents that autonomously navigate and interact with web applications to automate repetitive tasks, extract data, fill forms, and perform web-based workflows using intelligent understanding of page structure and content.

    129 tools

    Document Management

    AI-enhanced platforms for intelligent file storage, organization, and collaboration that automatically categorize, version, and surface relevant documents when needed.

    45 tools
    Browse all topics
    Back to all toolsSuggest an edit
    ratings
    discussions