Skip to main content

aware-file-system

aware-file-system is the change-detection layer behind aware-cli and the upcoming aware-sdk. It watches repository folders, persists lightweight indexes, and emits structured events so agents and automation can safely treat the filesystem as a source of truth.

Highlights

  • Recursive watcher – polls directories, classifies create/update/delete events, and normalises them into JSON-ready payloads.
  • Index snapshots – builds MsgPack-backed caches to accelerate large tree scans and cold starts.
  • Pluggable handlers – send events to aware-cli’s summary state, your own async consumers, or a queue service by registering callbacks.
  • Pure Python – easy to embed inside CI, long-running daemons, or custom tools.

Installation

pip install aware-file-system

Requires Python 3.12 or newer.

Quick start

import asyncio
from aware_file_system.config import Config, FileSystemConfig
from aware_file_system.models import ChangeType
from aware_file_system.watcher.file_system_watcher import FileSystemWatcher

async def main() -> None:
    config = Config(file_system=FileSystemConfig(root_path="docs/projects"))
    watcher = FileSystemWatcher(config, poll_interval=2.0)

    def handle(event) -> None:
        if event.change_type is ChangeType.MODIFIED:
            print(f"{event.path} updated ({event.checksum.sha256[:8]})")

    watcher.add_event_handler(handle)

    await watcher.start()
    try:
        await asyncio.sleep(10)
    finally:
        await watcher.stop()

asyncio.run(main())

Integrating with aware-cli

aware-cli summary \
  --project aware-sdk \
  --task cli-release-bundles \
  --watch-root docs/projects

The CLI wires aware-file-system under the hood to stream change events into its summary state. You can reuse the same configuration helpers (environment variables, YAML config) to point at other workspaces or embed the watcher inside your tooling.

Configuration reference

  • AWARE_FILE_SYSTEM_ROOT – override the root directory that should be scanned.
  • AWARE_FILE_SYSTEM_POLL_INTERVAL – polling cadence in seconds (default: 2.0).
  • AWARE_FILE_SYSTEM_CACHE_DIR – location for MsgPack indexes (default: .aware/fs).
  • aware_file_system.config.Config – Python API with sensible defaults and room for custom callbacks.

Testing

Run the suite from the repository root:

uv run --project libs/file_system pytest

Roadmap

  • Optional native backends (inotify/FSEvents) for lower latency on supported platforms.
  • Batched event delivery for agent-friendly payloads.
  • Additional helpers to serialise change events into the Aware receipt format.

Changelog

See CHANGELOG.md.

License

Distributed under the MIT License. See LICENSE.

Metadata

Release files for aware-file-system 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for aware-file-system 0.1.1
File Interpreter ABI Platform
aware_file_system-0.1.1-py3-none-any.whl Python 3 none any Details

Release files / aware_file_system-0.1.1-py3-none-any.whl

Download URL aware_file_system-0.1.1-py3-none-any.whl
Size 58.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
51cbf2aa5ddc22bf37d2ac2950d1e65162b40307c2a5e86afe05c0d96766c30e
BLAKE2b-256 checksum
How to use checksums
3a8cb25a4304f5a1532ac218eb37fe67bca608adc72010a7445469718673a69b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page