{"_id":"@alloyfs/http","name":"@alloyfs/http","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@alloyfs/http","version":"0.1.0","description":"Typed Node/Bun client for the AlloyFS HTTP API — browse, read, write, watch.","author":"obillekyle","license":"MIT","repository":{"type":"git","url":"git+https://github.com/obillekyle/alloyfs-http.git"},"homepage":"https://http.alloy.okyle.dev","bugs":{"url":"https://github.com/obillekyle/alloyfs-http/issues"},"type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"engines":{"node":">=18"},"sideEffects":false,"publishConfig":{"access":"public"},"keywords":["alloyfs","http","client","filesystem","sse","bun"],"scripts":{"build":"bun build src/index.ts --outdir dist --target node --format esm && bun run types","types":"tsc --emitDeclarationOnly --declaration --outDir dist","check":"tsc --noEmit","test":"bun test","fmt":"prettier --write src tests docs/*.json"},"devDependencies":{"@types/bun":"latest","prettier":"^3.3.3","typescript":"^5.6.0"},"_id":"@alloyfs/http@0.1.0","_integrity":"sha512-n/fjxcIKIBdJCgZy7h7YaHS2lySmSIER/QLoZ+y4+Wmv7qXQheP3jUM/zBjJfq+O//zi/7sIAMwVwAVb12PWdw==","_nodeVersion":"26.3.0","_npmVersion":"10.8.3","shasum":"9152134a2f26bbc89308533135accab0d649e346","dist":{"integrity":"sha512-n/fjxcIKIBdJCgZy7h7YaHS2lySmSIER/QLoZ+y4+Wmv7qXQheP3jUM/zBjJfq+O//zi/7sIAMwVwAVb12PWdw==","shasum":"9152134a2f26bbc89308533135accab0d649e346","tarball":"https://registry.npmjs.org/@alloyfs/http/-/http-0.1.0.tgz","fileCount":8,"unpackedSize":27675,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD45yDkHreKSYybSgZjZgn7JyreACWzBRNq7nKMQ3sZNQIgBUIQtXzdheJ9iqkG2CjJhsHI1ZBg5YAIWQjpxhzPoGc="}]},"_npmUser":{"name":"okyle","email":"obillekyle+npm@gmail.com"},"directories":{},"maintainers":[{"name":"okyle","email":"obillekyle+npm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/http_0.1.0_1787734889180_0.07929216875400336"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-26T09:01:28.995Z","0.1.0":"2026-08-26T09:01:29.312Z","modified":"2026-08-26T09:01:29.590Z"},"maintainers":[{"name":"okyle","email":"obillekyle+npm@gmail.com"}],"description":"Typed Node/Bun client for the AlloyFS HTTP API — browse, read, write, watch.","homepage":"https://http.alloy.okyle.dev","keywords":["alloyfs","http","client","filesystem","sse","bun"],"repository":{"type":"git","url":"git+https://github.com/obillekyle/alloyfs-http.git"},"author":"obillekyle","bugs":{"url":"https://github.com/obillekyle/alloyfs-http/issues"},"license":"MIT","readme":"# @alloyfs/http\n\nA typed Node and Bun client for the [AlloyFS](https://alloy.okyle.dev) HTTP\nAPI. Browse, read, write and watch an export over HTTP, without hand-rolling\n`fetch` calls and status-code ladders.\n\n```bash\nbun add @alloyfs/http     # or: npm i @alloyfs/http\n```\n\n```ts\nimport { connect } from \"@alloyfs/http\";\n\nconst agent = connect({\n  url: \"http://127.0.0.1:7441\",\n  token: process.env.ALLOYFS_TOKEN,\n});\n\nconst projects = agent.export(\"projects\");\n\nfor await (const entry of projects.walk(\"src\")) {\n  console.log(entry.name, entry.size);\n}\n```\n\n## What it is\n\nA wrapper over one HTTP API, not a second implementation of it. Every method\nis one request, the client holds no socket, and the types mirror the wire\nshapes exactly — `mtime_ms`, not `mtimeMs`, because a translation table\nbetween a client and its server is a thing that drifts.\n\nIt is **not** a mount. Mounts speak the binary protocol and give you a real\ndrive letter or mount point; this is for dashboards, scripts and CI, where a\ndrive would be the wrong tool.\n\n## What it does for you\n\nThe HTTP API is small and honest, and there are exactly four things worth\nhaving a client for:\n\n- **Paging** — `walk()` follows the cursor so you never hold a directory in\n  memory. See [Listing a directory](guides/listing).\n- **Safe writes** — the ETag from a read handed straight back to a write, so\n  a concurrent edit fails loudly instead of vanishing. See\n  [Writing without losing edits](guides/safe-writes).\n- **Large files** — `upload()` chunks past the agent's 256 MiB request cap.\n  See [Files larger than a request](guides/large-files).\n- **Batching** — `bulk()` keeps per-path results instead of throwing on the\n  first miss. See [Batching many paths](guides/bulk).\n\n## Next\n\n- [Install](getting-started/install)\n- [Your first request](getting-started/first-request)\n- [Enabling the API](getting-started/agent) on the agent side\n","readmeFilename":"README.md","_rev":"1-9413716c60c94caac84fb2514bf0430a"}