{"_id":"@851-labs/refs","_rev":"3-b90de4047d4b8be0b1e9585706954526","name":"@851-labs/refs","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@851-labs/refs","version":"0.1.0","_id":"@851-labs/refs@0.1.0","maintainers":[{"name":"dylanplayer-851","email":"dylan@851.sh"},{"name":"pondorasti","email":"pondorasti@gmail.com"}],"bin":{"refs":"dist/bin.js"},"dist":{"shasum":"ed5ad96325680a3a26b56347daa293355e0d7798","tarball":"https://registry.npmjs.org/@851-labs/refs/-/refs-0.1.0.tgz","fileCount":3,"integrity":"sha512-ZU8brkHXxcS4GKXsRAf4p60GybF5wwEUF0C49yW5SJT+6ckvYxQ1QCHvgdYQOORhz7iickC13Eic9oM8sJcR3g==","signatures":[{"sig":"MEUCIFxEku5CQHXeX/NPs8eVp7VxLw/mea495NTJRS4vq/XzAiEAomYdISgjiyKNH8reYr6Wz3NFwup9ncZojJZN27/SvZc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1040689},"type":"module","gitHead":"39d66fa8623f39fded20583bb0059b70cd600854","scripts":{"cli":"bun run src/bin.ts","lint":"oxlint src test vitest.config.ts","test":"vitest run","build":"bun build ./src/bin.ts --target=node --outfile=dist/bin.js","check":"tsc --noEmit","prepack":"bun run build","prepare":"lefthook install","lint:fix":"oxlint --fix src test vitest.config.ts","release:cli:check":"bun run check && bun run lint && bun run test && bun run build && node dist/bin.js --help"},"_npmUser":{"name":"dylanplayer-851","email":"dylan@851.sh"},"_npmVersion":"11.9.0","description":"Manage shallow git reference repositories in ./references","directories":{},"_nodeVersion":"25.6.1","dependencies":{"effect":"4.0.0-beta.83","@effect/platform-node":"4.0.0-beta.83"},"_hasShrinkwrap":false,"packageManager":"bun@1.3.13","devDependencies":{"oxlint":"1.69.0","vitest":"latest","lefthook":"2.1.9","@types/bun":"latest","typescript":"latest","@types/node":"latest"},"_npmOperationalInternal":{"tmp":"tmp/refs_0.1.0_1781310368131_0.7402271638173836","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@851-labs/refs","version":"0.1.1","_id":"@851-labs/refs@0.1.1","maintainers":[{"name":"dylanplayer-851","email":"dylan@851.sh"},{"name":"pondorasti","email":"pondorasti@gmail.com"}],"homepage":"https://github.com/851-labs/refs#readme","bugs":{"url":"https://github.com/851-labs/refs/issues"},"bin":{"refs":"dist/bin.js"},"dist":{"shasum":"2c8a1d238115fa80c6dbfa7ceb9f9f02ce68e5a3","tarball":"https://registry.npmjs.org/@851-labs/refs/-/refs-0.1.1.tgz","fileCount":3,"integrity":"sha512-pYh2+nhI6WnqsYJzUUjT7GDPyBnbVCeck/xKlrXwFTi32hm3Lp1SeWKxup8e71vRYJfUIPdhUctn1tCrtA/Bug==","signatures":[{"sig":"MEYCIQCInCn4LdqY4i6XdpUYdkGORcIasNTqsMXkIJ93NltlQwIhAIvra0mJglO+VZiN6YY4aQBgItpwtTtzXRCxHQZPMIma","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@851-labs%2frefs@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1040834},"type":"module","gitHead":"9493bc3e3a3e3acbc0f1493bf52e7fd189e7e604","scripts":{"cli":"bun run src/bin.ts","lint":"oxlint src test vitest.config.ts","test":"vitest run","build":"bun build ./src/bin.ts --target=node --outfile=dist/bin.js","check":"tsc --noEmit","prepack":"bun run build","prepare":"lefthook install","lint:fix":"oxlint --fix src test vitest.config.ts","release:cli:check":"bun run check && bun run lint && bun run test && bun run build && node dist/bin.js --help"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:6bd3d48d-94f4-40da-a87f-ce31ef0ce020"}},"repository":{"url":"git+https://github.com/851-labs/refs.git","type":"git"},"_npmVersion":"11.5.1","description":"Manage shallow git reference repositories in ./references","directories":{},"_nodeVersion":"24.16.0","dependencies":{"effect":"4.0.0-beta.83","@effect/platform-node":"4.0.0-beta.83"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"bun@1.3.13","devDependencies":{"oxlint":"1.69.0","vitest":"latest","lefthook":"2.1.9","@types/bun":"latest","typescript":"latest","@types/node":"latest"},"_npmOperationalInternal":{"tmp":"tmp/refs_0.1.1_1781310723093_0.13342225753490888","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@851-labs/refs","version":"0.1.2","description":"Manage shallow git reference repositories in ./references","type":"module","packageManager":"bun@1.3.13","bin":{"refs":"dist/bin.js"},"repository":{"type":"git","url":"git+https://github.com/851-labs/refs.git"},"publishConfig":{"access":"public"},"scripts":{"cli":"bun run src/bin.ts","build":"bun build ./src/bin.ts --target=node --outfile=dist/bin.js","check":"tsc --noEmit","lint":"oxlint src test vitest.config.ts","lint:fix":"oxlint --fix src test vitest.config.ts","test":"vitest run","release:cli:check":"bun run check && bun run lint && bun run test && bun run build && node dist/bin.js --help","prepare":"lefthook install","prepack":"bun run build"},"devDependencies":{"@effect/platform-node":"4.0.0-beta.83","@types/bun":"latest","@types/node":"latest","effect":"4.0.0-beta.83","lefthook":"2.1.9","oxlint":"1.69.0","typescript":"latest","vitest":"latest"},"_id":"@851-labs/refs@0.1.2","gitHead":"c9308fe0d511d8ecc3ee9d37ce344bb73eb2f955","bugs":{"url":"https://github.com/851-labs/refs/issues"},"homepage":"https://github.com/851-labs/refs#readme","_nodeVersion":"24.16.0","_npmVersion":"11.5.1","dist":{"integrity":"sha512-L12YokSmHdRQ0E9xInkU3OIwnGBPzALbAZ0plvvUbDyrZlYqCGnfroRoazu3/BhsgdbuFjl5NU8/Al5iLuO/Og==","shasum":"cee77c89706316bbd8f4d936603654083feaaa60","tarball":"https://registry.npmjs.org/@851-labs/refs/-/refs-0.1.2.tgz","fileCount":3,"unpackedSize":1040974,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@851-labs%2frefs@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDr44ZHf6dTqKhT9GTqYArjJChT6GynopVWrZn3YgQS5gIgcaza77Xm04nfKkpPho9w+ngq6BH/Db28RYf3uKm3dDU="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:6bd3d48d-94f4-40da-a87f-ce31ef0ce020"}},"directories":{},"maintainers":[{"name":"dylanplayer-851","email":"dylan@851.sh"},{"name":"pondorasti","email":"pondorasti@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/refs_0.1.2_1781310965517_0.6498519883702694"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-13T00:26:07.994Z","modified":"2026-06-13T00:36:06.174Z","0.1.0":"2026-06-13T00:26:08.316Z","0.1.1":"2026-06-13T00:32:03.269Z","0.1.2":"2026-06-13T00:36:05.809Z"},"bugs":{"url":"https://github.com/851-labs/refs/issues"},"homepage":"https://github.com/851-labs/refs#readme","repository":{"type":"git","url":"git+https://github.com/851-labs/refs.git"},"description":"Manage shallow git reference repositories in ./references","maintainers":[{"name":"dylanplayer-851","email":"dylan@851.sh"},{"name":"pondorasti","email":"pondorasti@gmail.com"}],"readme":"# refs\n\n`refs` is a small CLI for managing shallow git reference repositories in a\nrepo-local `./references` folder.\n\nIt is meant for projects where coding agents or developers need nearby source\nreferences without committing full cloned repositories. The actual checkouts are\nignored by git; the committed `refs.json` file is the source of truth for\nrebuilding them.\n\n## Quick Start\n\nRun without installing:\n\n```sh\nnpx @851-labs/refs add https://github.com/Effect-TS/effect-smol\npnpm dlx @851-labs/refs pull\nbunx @851-labs/refs update\n```\n\nOr install globally:\n\n```sh\nnpm install -g @851-labs/refs\nrefs --help\n```\n\n## Commands\n\nAdd a reference:\n\n```sh\nrefs add https://github.com/Effect-TS/effect-smol\n```\n\nAdd a reference with a custom local folder name:\n\n```sh\nrefs add https://github.com/example/project project-reference\n```\n\nRemove a reference by name:\n\n```sh\nrefs remove effect-smol\n```\n\nRemove a reference by URL:\n\n```sh\nrefs remove https://github.com/Effect-TS/effect-smol\n```\n\nRebuild all configured references from their remote default branches:\n\n```sh\nrefs pull\nrefs update\n```\n\n`pull` and `update` both reconcile `refs.json` into `./references`: missing\ncheckouts are cloned, and existing checkouts are replaced with fresh shallow\nclones.\n\nDelete local reference checkouts while keeping `refs.json`:\n\n```sh\nrefs clean\n```\n\n## How It Works\n\n`refs add` creates or updates two repo-local files:\n\n```text\nreferences/    # ignored clone cache\nrefs.json      # committed reference registry\n```\n\nExample `refs.json`:\n\n```json\n{\n  \"version\": 1,\n  \"references\": [\n    {\n      \"url\": \"https://github.com/Effect-TS/effect-smol\"\n    },\n    {\n      \"url\": \"https://github.com/example/project\",\n      \"name\": \"project-reference\"\n    }\n  ]\n}\n```\n\nThe CLI also makes sure `.gitignore` contains:\n\n```gitignore\nreferences/\n```\n\nEach checkout is cloned with `--depth=1` from the repository's remote default\nbranch to keep disk usage low.\n\n## Development\n\nInstall dependencies:\n\n```sh\nbun install\n```\n\nRun the CLI from source:\n\n```sh\nbun run cli --help\nbun run cli add https://github.com/Effect-TS/effect-smol\n```\n\nRun checks:\n\n```sh\nbun run check\nbun run lint\nbun run test\n```\n\nBuild the published Node-compatible binary:\n\n```sh\nbun run build\nnode dist/bin.js --help\n```\n","readmeFilename":"README.md"}