{"_id":"swayrouter","_rev":"8-b52f4676b3299fe85a53d019b54d29d9","name":"swayrouter","dist-tags":{"latest":"1.0.7"},"versions":{"1.0.0":{"name":"swayrouter","version":"1.0.0","keywords":["ai","api-gateway","llm","router","oauth","openai-compatible","bun"],"license":"MIT","_id":"swayrouter@1.0.0","maintainers":[{"name":"enviel","email":"novalgans1908@gmail.com"}],"homepage":"https://github.com/envielxyz/SwayRouter#readme","bugs":{"url":"https://github.com/envielxyz/SwayRouter/issues"},"bin":{"swayrouter":"cli/cli.js"},"dist":{"shasum":"a88314988df76a8dc83a1f5dc0b818ec985ffb74","tarball":"https://registry.npmjs.org/swayrouter/-/swayrouter-1.0.0.tgz","fileCount":643,"integrity":"sha512-ZBH88b7RM3k4UttLP2NJNR7fllZIzkL/wBNHF0veSLHXv6WxkOKQj7fe+Qha30ROeqvoXt4OXBW0avQck87bcw==","signatures":[{"sig":"MEUCICa0vVhOmLXhgDOn839OCkZ/6u8DNEaYDYt+fNHAoqbCAiEAtp3xZnyiNwq15332xDousLHsmw+vCy/6IlbCNvMDOu0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4450823},"type":"module","module":"src/server.ts","engines":{"bun":">=1.3.0"},"gitHead":"e24e200fb329ee057d20392d5e19c543694f7b15","scripts":{"dev":"bun run --watch src/server.ts","test":"bun test","start":"bun run src/server.ts","prepack":"bun run build:dashboard","test:e2e":"bun run build:dashboard && playwright test","typecheck":"tsc --noEmit","build:binary":"bun scripts/build-binary.mjs","routes:check":"bun scripts/gen-routes.mjs --check","smoke:binary":"bun scripts/smoke-binary.mjs","package:check":"bun pm pack --dry-run --ignore-scripts","build:dashboard":"bun run --cwd dashboard build","test:e2e:install":"playwright install chromium"},"_npmUser":{"name":"enviel","email":"novalgans1908@gmail.com"},"repository":{"url":"git+https://github.com/envielxyz/SwayRouter.git","type":"git"},"_npmVersion":"10.8.3","description":"Self-hosted AI gateway with a clean local dashboard","directories":{},"_nodeVersion":"22.9.0","dependencies":{"ora":"^9","hono":"^4.13.1","jose":"^6.2.8","open":"^11","uuid":"^13","chalk":"^5","sql.js":"^1.14.1","undici":"^7.19.2","confbox":"^0.2.4","bcryptjs":"^3.0.3","node-machine-id":"^1.1.12","socks-proxy-agent":"^10.1.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.14","typescript":"^5","better-sqlite3":"^13.0.3","@playwright/test":"^1.63.0"},"optionalDependencies":{"systray2":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/swayrouter_1.0.0_1789212379234_0.6689067769239239","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"swayrouter","version":"1.0.1","keywords":["ai","api-gateway","llm","router","oauth","openai-compatible","bun"],"license":"MIT","_id":"swayrouter@1.0.1","maintainers":[{"name":"enviel","email":"novalgans1908@gmail.com"}],"homepage":"https://github.com/envielxyz/SwayRouter#readme","bugs":{"url":"https://github.com/envielxyz/SwayRouter/issues"},"bin":{"swayrouter":"cli/cli.js"},"dist":{"shasum":"7c199cf2f646d84d1168c9043e6f086c362aaaf7","tarball":"https://registry.npmjs.org/swayrouter/-/swayrouter-1.0.1.tgz","fileCount":643,"integrity":"sha512-F0nIU8aiU5vNO5pIVqH8DE+UP8YFkoXojEnDMqPL8Zy3BHEOJtalguUxLgTjzWsWBs3fVUPSmcMbAfVvpFwmxw==","signatures":[{"sig":"MEYCIQDMZcju2NcZ7+6ieUNs8gQjOXGbLO9jM1UuoajVr9qKJgIhAJGrrVDzV5vgrY8LYU+eY7O25Yw1RPFtzTB9wLzCOi8c","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQDMmMNVYnKIibIKsdeTMPxY0Y4OOYdVgU/wwgdlKCT+xgIhAOYc9XXFbJpJgw35uoqH5rUOw8cXaBHFT+TrxyKsgHED","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4451061},"type":"module","module":"src/server.ts","engines":{"bun":">=1.3.0"},"gitHead":"02e40c65805010087211c23db797fe5d7e74e110","scripts":{"dev":"bun run --watch src/server.ts","test":"bun test","start":"bun run src/server.ts","prepack":"bun run build:dashboard","test:e2e":"bun run build:dashboard && playwright test","typecheck":"tsc --noEmit","build:binary":"bun scripts/build-binary.mjs","routes:check":"bun scripts/gen-routes.mjs --check","smoke:binary":"bun scripts/smoke-binary.mjs","package:check":"bun pm pack --dry-run --ignore-scripts","build:dashboard":"bun run --cwd dashboard build","test:e2e:install":"playwright install chromium"},"_npmUser":{"name":"enviel","email":"novalgans1908@gmail.com"},"repository":{"url":"git+https://github.com/envielxyz/SwayRouter.git","type":"git"},"_npmVersion":"10.8.3","description":"Self-hosted AI gateway with a clean local dashboard","directories":{},"_nodeVersion":"22.9.0","dependencies":{"ora":"^9","hono":"^4.13.1","jose":"^6.2.8","open":"^11","uuid":"^13","chalk":"^5","sql.js":"^1.14.1","undici":"^7.19.2","confbox":"^0.2.4","bcryptjs":"^3.0.3","node-machine-id":"^1.1.12","socks-proxy-agent":"^10.1.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.14","typescript":"^5","better-sqlite3":"^13.0.3","@playwright/test":"^1.63.0"},"optionalDependencies":{"systray2":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/swayrouter_1.0.1_1789212595065_0.12783843956732666","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"swayrouter","version":"1.0.2","keywords":["ai","api-gateway","llm","router","oauth","openai-compatible","bun"],"license":"MIT","_id":"swayrouter@1.0.2","maintainers":[{"name":"enviel","email":"novalgans1908@gmail.com"}],"homepage":"https://github.com/envielxyz/SwayRouter#readme","bugs":{"url":"https://github.com/envielxyz/SwayRouter/issues"},"bin":{"swayrouter":"cli/cli.js"},"dist":{"shasum":"5c094661371717f62357022719e0daa21c3e5c54","tarball":"https://registry.npmjs.org/swayrouter/-/swayrouter-1.0.2.tgz","fileCount":643,"integrity":"sha512-WcMfphmyaU/H7rBBB4c6mZaY/2r+LhgWCZAQTUwbaxx7tPWz7ip0hqWRfFEUPmCBNTMOvuEjm8D5MOcVsjNNwg==","signatures":[{"sig":"MEYCIQCeCuUQ222j/FKD77QkGHBR66mJrfnooyCV6gNG3n8ZAwIhAJVfN60U0mLU58Ki6m8a3SXUwlIJyIVdAegtcrPQfesz","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQDMOi22L8QPqdcd/WQm+bHpwLpeAV+QRUhvc5MNkJiR9QIhAOqP78id/hjJ5QqSYxi49Yjte1K0dmajmKMqrSYQ2F19","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4452914},"type":"module","module":"src/server.ts","engines":{"bun":">=1.3.0"},"gitHead":"683854a7badc9ea43b1d353d91053aecfeecca56","scripts":{"dev":"bun run --watch src/server.ts","test":"bun test","start":"bun run src/server.ts","prepack":"bun run build:dashboard","test:e2e":"bun run build:dashboard && playwright test","typecheck":"tsc --noEmit","build:binary":"bun scripts/build-binary.mjs","routes:check":"bun scripts/gen-routes.mjs --check","smoke:binary":"bun scripts/smoke-binary.mjs","package:check":"bun pm pack --dry-run --ignore-scripts","build:dashboard":"bun run --cwd dashboard build","test:e2e:install":"playwright install chromium"},"_npmUser":{"name":"enviel","email":"novalgans1908@gmail.com"},"repository":{"url":"git+https://github.com/envielxyz/SwayRouter.git","type":"git"},"_npmVersion":"10.8.3","description":"Self-hosted AI gateway with a clean local dashboard","directories":{},"_nodeVersion":"22.9.0","dependencies":{"ora":"^9","hono":"^4.13.1","jose":"^6.2.8","open":"^11","uuid":"^13","chalk":"^5","sql.js":"^1.14.1","undici":"^7.19.2","confbox":"^0.2.4","bcryptjs":"^3.0.3","node-machine-id":"^1.1.12","socks-proxy-agent":"^10.1.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.14","typescript":"^5","better-sqlite3":"^13.0.3","@playwright/test":"^1.63.0"},"optionalDependencies":{"systray2":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/swayrouter_1.0.2_1789247020081_0.4478069354527232","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"swayrouter","version":"1.0.3","keywords":["ai","api-gateway","llm","router","oauth","openai-compatible","bun"],"license":"MIT","_id":"swayrouter@1.0.3","maintainers":[{"name":"enviel","email":"novalgans1908@gmail.com"}],"homepage":"https://github.com/envielxyz/SwayRouter#readme","bugs":{"url":"https://github.com/envielxyz/SwayRouter/issues"},"bin":{"swayrouter":"cli/cli.js"},"dist":{"shasum":"5c6a7fe90dce97c54c96de2da2f31adb3b669d8a","tarball":"https://registry.npmjs.org/swayrouter/-/swayrouter-1.0.3.tgz","fileCount":643,"integrity":"sha512-suByTpQgTw46SHSG1LY2e8JYdCdh8GQJFlBYpc9OKHfXGcipDcDA8lHRFzFfeSoKOPXeVmYXhLLajODZQkymLg==","signatures":[{"sig":"MEUCIQCbM7Gd6w4hTqlrxpO9G+Md/0TW9nfU3AH8zSPXKmozxgIgPbtgI5BfOkU1Pc6SIL6QaC6hSZJjXuVBv9iZEbaT57o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIFDi6QroXo75SVBo5Xjs4HBclFpwbqaoA2AjqnE7lcarAiBO1nYL70PICGtEJCJTZvNVmf0MRVjomUIFmH+rmtqtyA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4456068},"type":"module","module":"src/server.ts","engines":{"bun":">=1.3.0"},"gitHead":"b267a02da3681e552a979e32eff1c7a57d3428c1","scripts":{"dev":"bun run --watch src/server.ts","test":"bun test","start":"bun run src/server.ts","prepack":"bun run build:dashboard","test:e2e":"bun run build:dashboard && playwright test","typecheck":"tsc --noEmit","build:binary":"bun scripts/build-binary.mjs","routes:check":"bun scripts/gen-routes.mjs --check","smoke:binary":"bun scripts/smoke-binary.mjs","package:check":"bun pm pack --dry-run --ignore-scripts","build:dashboard":"bun run --cwd dashboard build","test:e2e:install":"playwright install chromium"},"_npmUser":{"name":"enviel","email":"novalgans1908@gmail.com"},"repository":{"url":"git+https://github.com/envielxyz/SwayRouter.git","type":"git"},"_npmVersion":"10.8.3","description":"Self-hosted AI gateway with a clean local dashboard","directories":{},"_nodeVersion":"22.9.0","dependencies":{"ora":"^9","hono":"^4.13.1","jose":"^6.2.8","open":"^11","uuid":"^13","chalk":"^5","sql.js":"^1.14.1","undici":"^7.19.2","confbox":"^0.2.4","bcryptjs":"^3.0.3","node-machine-id":"^1.1.12","socks-proxy-agent":"^10.1.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.14","typescript":"^5","better-sqlite3":"^13.0.3","@playwright/test":"^1.63.0"},"optionalDependencies":{"systray2":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/swayrouter_1.0.3_1789291089751_0.10601395083226661","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"swayrouter","version":"1.0.4","keywords":["ai","api-gateway","llm","router","oauth","openai-compatible","bun"],"license":"MIT","_id":"swayrouter@1.0.4","maintainers":[{"name":"enviel","email":"novalgans1908@gmail.com"}],"homepage":"https://github.com/envielxyz/SwayRouter#readme","bugs":{"url":"https://github.com/envielxyz/SwayRouter/issues"},"bin":{"swayrouter":"cli/cli.js"},"dist":{"shasum":"f19cd6fd36c483ddcd07182b3fc798dd1066158f","tarball":"https://registry.npmjs.org/swayrouter/-/swayrouter-1.0.4.tgz","fileCount":645,"integrity":"sha512-NBpmWNJUnKf+z5WzIXAUQGGx74/ikxG9LAPnmDTpCGxZZCeGNEMMK9Lf25kyeE40Yvn4XCRhWGwd/pklCggI3g==","signatures":[{"sig":"MEQCIAwAKE7WRDRQp+wxWpSMPqSrjj/XiExsbe1SqEkTJ7TFAiBYAWykaHZMWNoCV0N7KKHymnPFNbRiLCnOoeI+t/CHEQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIBAjUCG44tNUVI2z4nxKQmMP9jzxCY/FsZfOj2hW2eovAiEAzOj6VCx52Ej0KhjJLZLZJ0ca018tQmwzt5SXfStzQfo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4470235},"type":"module","module":"src/server.ts","engines":{"bun":">=1.3.0"},"gitHead":"f82bdda12fc0e256ea7b11e098d6efd473d45c7b","scripts":{"dev":"bun run --watch src/server.ts","test":"bun test","start":"bun run src/server.ts","prepack":"bun run build:dashboard","test:e2e":"bun run build:dashboard && playwright test","typecheck":"tsc --noEmit","build:binary":"bun scripts/build-binary.mjs","routes:check":"bun scripts/gen-routes.mjs --check","smoke:binary":"bun scripts/smoke-binary.mjs","package:check":"bun pm pack --dry-run --ignore-scripts","build:dashboard":"bun run --cwd dashboard build","test:e2e:install":"playwright install chromium"},"_npmUser":{"name":"enviel","email":"novalgans1908@gmail.com"},"repository":{"url":"git+https://github.com/envielxyz/SwayRouter.git","type":"git"},"_npmVersion":"10.8.3","description":"Self-hosted AI gateway with a clean local dashboard","directories":{},"_nodeVersion":"22.9.0","dependencies":{"ora":"^9","hono":"^4.13.1","jose":"^6.2.8","open":"^11","uuid":"^13","chalk":"^5","sql.js":"^1.14.1","undici":"^7.19.2","confbox":"^0.2.4","bcryptjs":"^3.0.3","node-machine-id":"^1.1.12","socks-proxy-agent":"^10.1.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.14","typescript":"^5","better-sqlite3":"^13.0.3","@playwright/test":"^1.63.0"},"optionalDependencies":{"systray2":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/swayrouter_1.0.4_1789770238472_0.522565064093776","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"swayrouter","version":"1.0.5","keywords":["ai","api-gateway","llm","router","oauth","openai-compatible","bun"],"license":"MIT","_id":"swayrouter@1.0.5","maintainers":[{"name":"enviel","email":"novalgans1908@gmail.com"}],"homepage":"https://github.com/envielxyz/SwayRouter#readme","bugs":{"url":"https://github.com/envielxyz/SwayRouter/issues"},"bin":{"swayrouter":"cli/cli.js"},"dist":{"shasum":"c1e1b53e8d294bbc2144b1a744497d3f6f29b471","tarball":"https://registry.npmjs.org/swayrouter/-/swayrouter-1.0.5.tgz","fileCount":645,"integrity":"sha512-1QZwOhwhm0QszjKBhhUiOE7x3vBDrdnIDHBohU9dw4XArD/cHvLDZkyaCfKeTo4lEw8whUS++Y8Mw+K3I2dirA==","signatures":[{"sig":"MEYCIQCqb1KnPwmHMMFxAMFLjOBFi/rYvG1A5H9s1yKF4Z9swAIhAOha7s61G7JsApJ6bh8NpLdhx8WjObNKAJuqqOtiESiG","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIFQm6kHzjsIOA5T4yPR1d/GPJGep9tAtkTuLm0ZkJqDQAiEAlhViMG9St3u2IvwvRW5KbxqlbtEUYpPx5h1v0AAu86E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4476713},"type":"module","module":"src/server.ts","engines":{"bun":">=1.3.0"},"gitHead":"86a842623bc624c28f2122ef8c0711fd34ce938d","scripts":{"dev":"bun run --watch src/server.ts","test":"bun test","start":"bun run src/server.ts","prepack":"bun run build:dashboard","test:e2e":"bun run build:dashboard && playwright test","typecheck":"tsc --noEmit","build:binary":"bun scripts/build-binary.mjs","routes:check":"bun scripts/gen-routes.mjs --check","smoke:binary":"bun scripts/smoke-binary.mjs","package:check":"bun pm pack --dry-run --ignore-scripts","build:dashboard":"bun run --cwd dashboard build","test:e2e:install":"playwright install chromium"},"_npmUser":{"name":"enviel","email":"novalgans1908@gmail.com"},"repository":{"url":"git+https://github.com/envielxyz/SwayRouter.git","type":"git"},"_npmVersion":"10.8.3","description":"Self-hosted AI gateway with a clean local dashboard","directories":{},"_nodeVersion":"22.9.0","dependencies":{"ora":"^9","hono":"^4.13.1","jose":"^6.2.8","open":"^11","uuid":"^13","chalk":"^5","sql.js":"^1.14.1","undici":"^7.19.2","confbox":"^0.2.4","bcryptjs":"^3.0.3","node-machine-id":"^1.1.12","socks-proxy-agent":"^10.1.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.14","typescript":"^5","better-sqlite3":"^13.0.3","@playwright/test":"^1.63.0"},"optionalDependencies":{"systray2":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/swayrouter_1.0.5_1789830337292_0.6215975544310968","host":"s3://npm-registry-packages-npm-production"}},"1.0.6":{"name":"swayrouter","version":"1.0.6","keywords":["ai","api-gateway","llm","router","oauth","openai-compatible","bun"],"license":"MIT","_id":"swayrouter@1.0.6","maintainers":[{"name":"enviel","email":"novalgans1908@gmail.com"}],"homepage":"https://github.com/envielxyz/SwayRouter#readme","bugs":{"url":"https://github.com/envielxyz/SwayRouter/issues"},"bin":{"swayrouter":"cli/cli.js"},"dist":{"shasum":"f0499786eb78ceb912a8dbce9f7a6e0eab119c07","tarball":"https://registry.npmjs.org/swayrouter/-/swayrouter-1.0.6.tgz","fileCount":645,"integrity":"sha512-wNM7M9w79T60UTO9UdjXIYWd6esWFCIkrn2zGScfWBJl20VqA/AByHc2v/uwtGMVhtkDJ0saSVrUYR38ysZQiA==","signatures":[{"sig":"MEQCIFrcBNVXBw04okbusSgc7gMR98jd+MdPKtLpYgxIBNlIAiByY6/g8X4hlt673w/A36RxVAYYhQtBzV95g2KpHdhB7Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIEmmOuUm1OAqzenAb0+ZwBjZSVjYLTn846VnnL3x+JPTAiEA+2tJgo0vYqE3StXnqtR8YNYQ/pQZb7zzrMWQ6spjerI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4476903},"type":"module","module":"src/server.ts","engines":{"bun":">=1.3.0"},"gitHead":"5927f3ec31fe4a04f6b0d018f5a96f06397ace33","scripts":{"dev":"bun run --watch src/server.ts","test":"bun test","start":"bun run src/server.ts","prepack":"bun run build:dashboard","test:e2e":"bun run build:dashboard && playwright test","typecheck":"tsc --noEmit","build:binary":"bun scripts/build-binary.mjs","routes:check":"bun scripts/gen-routes.mjs --check","smoke:binary":"bun scripts/smoke-binary.mjs","package:check":"bun pm pack --dry-run --ignore-scripts","build:dashboard":"bun run --cwd dashboard build","test:e2e:install":"playwright install chromium"},"_npmUser":{"name":"enviel","email":"novalgans1908@gmail.com"},"repository":{"url":"git+https://github.com/envielxyz/SwayRouter.git","type":"git"},"_npmVersion":"10.8.3","description":"Self-hosted AI gateway with a clean local dashboard","directories":{},"_nodeVersion":"22.9.0","dependencies":{"ora":"^9","hono":"^4.13.1","jose":"^6.2.8","open":"^11","uuid":"^13","chalk":"^5","sql.js":"^1.14.1","undici":"^7.19.2","confbox":"^0.2.4","bcryptjs":"^3.0.3","node-machine-id":"^1.1.12","socks-proxy-agent":"^10.1.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.14","typescript":"^5","better-sqlite3":"^13.0.3","@playwright/test":"^1.63.0"},"optionalDependencies":{"systray2":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/swayrouter_1.0.6_1789837312363_0.5361858418002889","host":"s3://npm-registry-packages-npm-production"}},"1.0.7":{"_id":"swayrouter@1.0.7","bin":{"swayrouter":"cli/cli.js"},"bugs":{"url":"https://github.com/envielxyz/SwayRouter/issues"},"dist":{"shasum":"bb4f4fff99a1494b148b57a6a4a4c701455e63c0","tarball":"https://registry.npmjs.org/swayrouter/-/swayrouter-1.0.7.tgz","fileCount":645,"integrity":"sha512-YDln1vvh6YrJZoSEMpcOFf8DB+39usgfNxEPJmDUpdSCHY0QbEFuT28xBXzeJE/LovgFeDXNxK4vxIz2K3Iasw==","signatures":[{"sig":"MEYCIQDSqadrjJ/gRDtpJ9oTJcL/+PycI5I9OTRTnR1EEso+QQIhAIDSHTOTti9Xq5XnM+2si2SNZParuCF4niwEL7xsEj86","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIE+C2FmNELxa0OHquXrsDOYO0MinhB9dk+xe08lRUC7MAiB5I+PUFrz396KEXOhQQFMFDsHIaE9EErAAQBIdFrFLZw=="}],"unpackedSize":4480269},"name":"swayrouter","type":"module","module":"src/server.ts","engines":{"bun":">=1.3.0"},"gitHead":"787ecdfbbe7c85d6e29a59b34f7cc4c7414b705c","license":"MIT","scripts":{"dev":"bun run --watch src/server.ts","test":"bun test","start":"bun run src/server.ts","prepack":"bun run build:dashboard","test:e2e":"bun run build:dashboard && playwright test","typecheck":"tsc --noEmit","build:binary":"bun scripts/build-binary.mjs","routes:check":"bun scripts/gen-routes.mjs --check","smoke:binary":"bun scripts/smoke-binary.mjs","package:check":"bun pm pack --dry-run --ignore-scripts","build:dashboard":"bun run --cwd dashboard build","test:e2e:install":"playwright install chromium"},"version":"1.0.7","_npmUser":{"name":"enviel","email":"novalgans1908@gmail.com"},"homepage":"https://github.com/envielxyz/SwayRouter#readme","keywords":["ai","api-gateway","llm","router","oauth","openai-compatible","bun"],"repository":{"url":"git+https://github.com/envielxyz/SwayRouter.git","type":"git"},"_npmVersion":"10.8.3","description":"Self-hosted AI gateway with a clean local dashboard","directories":{},"maintainers":[{"name":"enviel","email":"novalgans1908@gmail.com"}],"_nodeVersion":"22.9.0","dependencies":{"ora":"^9","hono":"^4.13.1","jose":"^6.2.8","open":"^11","uuid":"^13","chalk":"^5","sql.js":"^1.14.1","undici":"^7.19.2","confbox":"^0.2.4","bcryptjs":"^3.0.3","node-machine-id":"^1.1.12","socks-proxy-agent":"^10.1.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.3.14","typescript":"^5","better-sqlite3":"^13.0.3","@playwright/test":"^1.63.0"},"optionalDependencies":{"systray2":"^2.1.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/swayrouter_1.0.7_1790287394096_0.7908705512690652"}}},"time":{"created":"2026-09-12T11:26:19.118Z","modified":"2026-09-24T22:03:14.358Z","1.0.0":"2026-09-12T11:26:19.413Z","1.0.1":"2026-09-12T11:29:55.190Z","1.0.2":"2026-09-12T21:03:40.249Z","1.0.3":"2026-09-13T09:18:09.876Z","1.0.4":"2026-09-18T22:23:58.615Z","1.0.5":"2026-09-19T15:05:37.422Z","1.0.6":"2026-09-19T17:01:52.478Z","1.0.7":"2026-09-24T22:03:14.200Z"},"bugs":{"url":"https://github.com/envielxyz/SwayRouter/issues"},"license":"MIT","homepage":"https://github.com/envielxyz/SwayRouter#readme","keywords":["ai","api-gateway","llm","router","oauth","openai-compatible","bun"],"repository":{"url":"git+https://github.com/envielxyz/SwayRouter.git","type":"git"},"description":"Self-hosted AI gateway with a clean local dashboard","maintainers":[{"name":"enviel","email":"novalgans1908@gmail.com"}],"readme":"<div align=\"center\">\n  <img src=\"./assets/BannerGithubSway.png\" alt=\"Sway Router banner\" />\n  <h1 style=\"margin: 8px 0 0;\">Sway Router</h1>\n</div>\n\n<p align=\"center\">\n  <strong>One gateway. Every model.</strong><br />\n  Connect once, route anywhere.\n</p>\n\n<p align=\"center\">\n  <a href=\"./README.md\"><img src=\"https://img.shields.io/badge/English-README-2563EB?style=for-the-badge\" alt=\"English README\" /></a>\n  <a href=\"./README.id.md\"><img src=\"https://img.shields.io/badge/Bahasa_Indonesia-README.id-16A34A?style=for-the-badge\" alt=\"Bahasa Indonesia README\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://github.com/envielxyz/SwayRouter/stargazers\"><img src=\"https://img.shields.io/github/stars/envielxyz/SwayRouter?style=flat\" alt=\"GitHub stars\" /></a>\n  <a href=\"./LICENSE\"><img src=\"https://img.shields.io/badge/license-MIT-blue.svg\" alt=\"MIT License\" /></a>\n  <a href=\"https://bun.sh\"><img src=\"https://img.shields.io/badge/runtime-Bun-black?logo=bun\" alt=\"Bun\" /></a>\n  <a href=\"https://www.typescriptlang.org\"><img src=\"https://img.shields.io/badge/code-TypeScript-3178C6?logo=typescript&logoColor=white\" alt=\"TypeScript\" /></a>\n  <a href=\"https://react.dev\"><img src=\"https://img.shields.io/badge/dashboard-React-61DAFB?logo=react&logoColor=111827\" alt=\"React\" /></a>\n  <a href=\"https://sqlite.org\"><img src=\"https://img.shields.io/badge/storage-SQLite-003B57?logo=sqlite&logoColor=white\" alt=\"SQLite\" /></a>\n</p>\n\n<p align=\"center\">\n  <img src=\"./docs/media/screenshots/dashboard.png\" alt=\"Sway Router dashboard\" width=\"960\" />\n</p>\n\nSway Router brings all your AI providers into one clean gateway, with a simple\ndashboard to manage models, routing, and usage.\n\n## Contents\n\n- [Get started](#get-started)\n- [Uninstall](#uninstall)\n- [Requirements](#requirements)\n- [HTTP API](#one-http-api-for-your-whole-stack)\n- [Dashboard](#the-dashboard-you-actually-want-to-use)\n- [Migrate from 9Router](#migrate-from-9router)\n- [Providers](#providers)\n- [Supported CLI Tools](#supported-cli-tools)\n- [Features](#what-sway-router-can-do)\n- [Comparison](#sway-router-vs-9router-vs-omniroute)\n- [Operations and security](#operations-and-security)\n- [Tech stack](#tech-stack)\n- [Configuration](#configuration)\n- [Attribution and license](#attribution)\n\n## Get started\n\n### Global CLI — the quick way\n\nInstall it globally and start the router:\n\n```bash\nbun install -g swayrouter@latest\nswayrouter\n```\n\nThe CLI can start, stop, restart, and check the router status. It also checks\nfor a newer version when starting up, but it will never update itself without\nyou saying so.\n\n### Windows — local install\n\nThe easiest Windows setup is a local global install. If Bun is already\ninstalled, skip the first step.\n\n1. Open PowerShell and install Bun:\n\n   ```powershell\n   powershell -c \"irm bun.sh/install.ps1 | iex\"\n   ```\n\n2. Close and reopen PowerShell, then verify Bun:\n\n   ```powershell\n   bun --version\n   ```\n\n3. Install and start Sway Router:\n\n   ```powershell\n   bun install -g swayrouter@latest\n   swayrouter start -b\n   ```\n\n4. Open `http://127.0.0.1:14045/dashboard` in your browser and finish the\n   first-run setup.\n\n5. Check or stop the local instance whenever you need:\n\n   ```powershell\n   swayrouter status\n   swayrouter stop\n   ```\n\nThe CLI keeps Sway Router's runtime data under `%APPDATA%\\.swayrouter`.\nYou do not need to create a `.env` file for a normal local install.\n\n### Uninstall\n\nStop the local router before removing the global CLI:\n\n```powershell\nswayrouter stop\nbun remove -g swayrouter\n```\n\nIf you installed it with npm, use `npm uninstall -g swayrouter` instead.\nUninstalling the package does not remove your provider credentials, settings,\nAPI keys, or usage data. To remove those as well, export a JSON backup first,\nstop the router, then delete `%APPDATA%\\.swayrouter` on Windows or\n`~/.swayrouter` on Linux/macOS.\n\n### Windows — run from source\n\nFor contributors working from a checkout:\n\n```powershell\ngit clone https://github.com/envielxyz/SwayRouter.git\ncd SwayRouter\nbun install --frozen-lockfile\nPush-Location dashboard\nbun install --frozen-lockfile\nbun run build\nPop-Location\nbun run dev\n```\n\nThen open `http://127.0.0.1:14045/dashboard`. Keep the terminal open while\nthe development server is running.\n\n### Run from source (macOS/Linux)\n\n```bash\nbun install --frozen-lockfile\ncd dashboard\nbun install --frozen-lockfile\nbun run build\ncd ..\nbun run dev\n```\n\nThen open `http://127.0.0.1:14045/dashboard` and connect your first provider.\n\nWant to work on the dashboard? Run `bun run dev` inside `dashboard/` in a\nsecond terminal.\n\n### Docker — isolated and persistent\n\nUse the public image from Docker Hub:\n\n```bash\ndocker pull envielxyz/swayrouter:latest\ndocker compose up -d\ndocker compose ps\n```\n\nTo build the image from source instead, run `docker build -t envielxyz/swayrouter:latest .`\nbefore starting Compose.\n\nDocker also generates persistent secrets in its data volume. Copy\n`.env.example` to `.env` only when you want explicit deployment overrides.\n\nOpen `http://127.0.0.1:14045/dashboard`. Follow the logs with:\n\n```bash\ndocker compose logs -f swayrouter\n```\n\nThe compose setup keeps the data in the `swayrouter-data` volume, publishes\nthe port to localhost only, runs as an unprivileged user, uses a read-only\nroot filesystem, and includes a readiness health check. Keep the volume if\nyou want to keep your provider connections, keys, settings, and usage data.\n\n## Requirements\n\n| Deployment | You need | Process manager |\n| --- | --- | --- |\n| Global CLI | Bun `1.3+`, a writable data directory, and provider network access | The CLI for local use; add a supervisor for production |\n| Docker | Docker Engine with the Compose plugin and a persistent volume | Docker Compose handles restart and health checks; PM2 is not needed |\n| Native VPS | Bun `1.3+`, a writable data directory, and provider network access | `systemd` is recommended; PM2 is optional |\n\nFor a small native VPS, start with **2 vCPU, 2 GB RAM, and 10 GB SSD**. A local\ndev machine can run with less. Put Sway Router behind an HTTPS reverse proxy before\nexposing it outside your private network.\n\n### Native VPS with PM2 (optional)\n\nPM2 supports Bun, but it is only needed when you run Sway Router directly on the VPS\ninstead of using Docker or another supervisor:\n\n```bash\nnpm install -g pm2\npm2 start src/server.ts --name swayrouter --interpreter bun\npm2 save\npm2 startup\n```\n\nRun `pm2 startup` exactly as instructed by PM2 so it can restore the process\nafter a reboot. Do not run PM2 on top of Docker Compose for the same container.\n\n## One HTTP API for your whole stack\n\nUse the client format you already know. Sway Router translates requests and\nresponses for the provider behind the scenes.\n\n| Client / feature | Endpoint |\n| --- | --- |\n| OpenAI Chat Completions | `POST /v1/chat/completions` |\n| OpenAI Responses | `POST /v1/responses` |\n| Compact Responses | `POST /v1/responses/compact` |\n| Anthropic Messages | `POST /v1/messages` |\n| Anthropic token count | `POST /v1/messages/count_tokens` |\n| Ollama-style chat | `POST /v1/api/chat` |\n| Image generation | `POST /v1/images/generations` |\n| Image editing | `POST /v1/images/edits` |\n| Model list | `GET /v1/models` |\n\nStreaming and non-streaming requests are supported where the selected provider\nand model support them. `/codex` and `/responses` aliases are included for\ncommon client setups.\n\n### Tiny example\n\n```bash\nexport SWAY_API_KEY=\"swy-your_gateway_key\"\ncurl http://127.0.0.1:14045/v1/chat/completions \\\n  --oauth2-bearer \"${SWAY_API_KEY}\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"your-active-model-id\",\n    \"messages\": [{\"role\": \"user\", \"content\": \"Say hello\"}]\n  }'\n```\n\nYour Sway Router gateway key is separate from the provider credentials behind it.\nProvider secrets stay on the server.\n\n## The dashboard you actually want to use\n\nThe dashboard is not an afterthought. It is a focused control room for your\nproviders, models, accounts, quotas, usage, logs, and routing. Compact cards,\nclear status badges, search and filters, responsive layouts, and smooth\nloading/refresh states keep everything easy to scan and manage on desktop,\ntablet, and mobile.\n\n| Dashboard | Providers |\n| --- | --- |\n| ![Sway Router dashboard](./docs/media/screenshots/dashboard.png) | ![Provider management](./docs/media/screenshots/providers.png) |\n| Provider models | Custom provider |\n| ![Provider models](./docs/media/screenshots/provider-models.png) | ![Custom provider](./docs/media/screenshots/custom-provider.png) |\n| Usage & cost | Quota monitor |\n| ![Usage and cost](./docs/media/screenshots/usage.png) | ![Quota monitor](./docs/media/screenshots/quota.png) |\n| Settings | CLI Tools |\n| ![Settings](./docs/media/screenshots/settings.png) | ![CLI Tools](./docs/media/screenshots/cli-tools.png) |\n\n[Browse the full UI showcase](./docs/SHOWCASE.md)\n\n### Main menu\n\n| Menu | What is inside |\n| --- | --- |\n| **Dashboard** | Request count, token totals, cost, latency, provider activity, and system status |\n| **API Keys** | Create, reveal, copy, rotate, enable, revoke, and delete gateway keys |\n| **Providers** | Add connections, choose auth, test accounts, manage models, and configure routing |\n| **Combos** | Build ordered model/provider fallback combos and choose combo strategies |\n| **Proxy** | Create and test proxy pools, attach connections, and deploy optional relays |\n| **Usage** | Charts, token breakdowns, estimated cost, history, filters, sorting, and request details |\n| **Quota Monitor** | Provider/account availability, quota state, diagnostics, and manual refresh |\n| **CLI Tools** | Configure supported coding tools, select models, and copy generated configs |\n| **Sway Chat** | Chat through the router with model selection and optional built-in tools |\n| **Settings** | Preferences, General, Security, Data controls, and 9Router migration |\n| **Console Logs** | Search, filter, wrap, copy, and inspect runtime/provider diagnostics |\n\n### Settings, properly mapped\n\n- **Preferences:** profile photo with crop/zoom, profile name, and display\n  currency (USD by default, IDR available).\n- **General:** RTK token saver, Caveman, Ponytail, request payload capture,\n  and Cloudflare Tunnel settings.\n- **Security:** gateway API-key requirement, dashboard login requirement,\n  dashboard password, login protection, and graceful shutdown.\n- **Data:** database location, JSON backup/restore, and 9Router migration.\n\n## Migrate from 9Router\n\nMoving from 9Router is built into **Settings → Data → Migrate from 9Router**.\nSway Router supports both migration sources:\n\n- **Local installation:** automatically finds a supported 9Router database on\n  the same machine.\n- **9Router JSON backup:** import an exported backup from this or another\n  device.\n\nBefore importing, choose exactly what to bring over:\n\n- Provider accounts and credentials\n- Custom providers\n- Custom models\n- Combos\n- Routing settings — off by default\n- Activate imported accounts immediately — off by default\n\nSway Router previews the migration first and shows what is ready, already present,\nor skipped. It validates the source, maps provider and model references to\nSway Router's format, removes duplicates, and reports incompatible or unavailable\nproviders instead of importing broken entries. Previewing does not change your\ndata.\n\nWhen you confirm with your dashboard password, Sway Router creates a safety backup,\nmerges the selected data into the existing database, and refreshes the\ndashboard. Existing Sway Router data is not replaced, and imported accounts remain\ninactive unless you explicitly enable them during migration. Use **Import JSON**\nfor Sway Router backups; use **Migrate from 9Router** for 9Router backups.\n\n## Providers\n\nThe built-in catalog currently shows **65 providers**. The list below is\ngenerated from the providers available in the dashboard, not from a marketing\nlist. Provider availability and auth options can change as upstream services\nchange.\n\n### API key — 44\n\n| Provider | ID |\n| --- | --- |\n| Alibaba Coding | `alicode-intl` |\n| Alibaba | `alicode` |\n| Alibaba Studio | `alims-intl` |\n| Anthropic | `anthropic` |\n| Azure OpenAI | `azure` |\n| Baidu Qianfan | `baidu` |\n| Blackbox AI | `blackbox` |\n| BytePlus ModelArk | `byteplus` |\n| Cerebras | `cerebras` |\n| Chutes AI | `chutes` |\n| Cloudflare | `cloudflare-ai` |\n| Command Code | `commandcode` |\n| DeepSeek | `deepseek` |\n| Featherless | `featherless` |\n| Fireworks AI | `fireworks` |\n| Gemini | `gemini` |\n| GLM (China) | `glm-cn` |\n| GLM Coding | `glm` |\n| Groq | `groq` |\n| Kilo Gateway | `kilo-gateway` |\n| Minimax (China) | `minimax-cn` |\n| Minimax Coding | `minimax` |\n| Mistral | `mistral` |\n| Morph | `morph` |\n| Nebius AI | `nebius` |\n| NVIDIA NIM | `nvidia` |\n| Ollama Local | `ollama-local` |\n| Ollama Cloud | `ollama` |\n| OpenAI | `openai` |\n| OpenCode Go | `opencode-go` |\n| OpenRouter | `openrouter` |\n| Perplexity AI | `perplexity` |\n| Poolside | `poolside` |\n| Tencent Hunyuan | `tencent` |\n| Together AI | `together` |\n| Venice AI | `venice` |\n| Vercel AI Gateway | `vercel-ai-gateway` |\n| Vertex Partner | `vertex-partner` |\n| Vertex AI | `vertex` |\n| Xiaomi MiMo | `xiaomi-mimo` |\n| Xiaomi MiMo (Token Plan) | `xiaomi-tokenplan` |\n| Meta AI | `meta` |\n| Agent Router | `agentrouter` |\n| SumoPod | `sumopod` |\n\nPerplexity AI uses the official [Perplexity Router API](https://docs.perplexity.ai/docs/router/quickstart): one API key, one connection, and one live model catalog across OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages.\n\n### OAuth, device code, or token import — 19\n\n| Provider | ID |\n| --- | --- |\n| Antigravity | `antigravity` |\n| Claude Code | `claude` |\n| Cline | `cline` |\n| ClinePass | `clinepass` |\n| CodeBuddy CN | `codebuddy-cn` |\n| CodeBuddy | `codebuddy-intl` |\n| OpenAI Codex | `codex` |\n| Cursor IDE | `cursor` |\n| Gemini CLI | `gemini-cli` |\n| GitHub Copilot | `github` |\n| Grok CLI (Grok Build) | `grok-cli` |\n| Kilo Code | `kilocode` |\n| Kimchi | `kimchi` |\n| Kimi | `kimi` |\n| Kiro AI | `kiro` |\n| Qoder | `qoder` |\n| Trae | `trae` |\n| Windsurf | `windsurf` |\n| xAI (Grok) | `xai` |\n\n### Web cookie — 1\n\n| Provider | ID |\n| --- | --- |\n| Grok Web (Subscription) | `grok-web` |\n\n### No auth — 1\n\n| Provider | ID |\n| --- | --- |\n| OpenCode Free | `opencode` |\n\n## Supported CLI Tools\n\nSway Router can detect and configure these coding tools to use the gateway:\n\n- Claude Code\n- Codex CLI\n- OpenCode\n- Hermes Agent\n- Claude Cowork\n- Kilo Code\n- Grok Build\n- OMP (oh-my-pi)\n\n## What Sway Router can do\n\n### Providers and accounts\n\n- Connect providers with API keys, OAuth, device code, cookies/sessions, or\n  access/refresh tokens when that provider supports the flow.\n- Add multiple accounts to one provider and set their priority or enabled state.\n- Test a connection, test individual models, or test a whole provider batch.\n- Import live model catalogs when an upstream endpoint is available.\n- Add custom providers, custom nodes, custom models, aliases, and pricing.\n- Mark model capabilities such as vision, audio, video, search, tools, and\n  reasoning.\n- Keep provider-specific IDs, endpoints, headers, and compatibility rules.\n\n### Routing and fallbacks\n\n- `fill-first` for predictable account usage.\n- `round-robin` for simple rotation.\n- `least-inflight` for spreading active work.\n- `sticky` and `cache-affine` behavior when account stability matters.\n- Per-provider routing overrides and sticky controls.\n- Combos for ordered multi-model or multi-provider fallback.\n- Account cooldowns, locks, endpoint fallback, and bounded retries.\n\n### Translation and model support\n\n- OpenAI, Anthropic, Responses, and Ollama-style request formats.\n- Provider-specific request and response translation.\n- Streaming conversion over SSE plus normal JSON responses.\n- Tool calls, thinking/reasoning, vision, image input, media, and usage\n  handling where supported by the selected model.\n- Compatibility fallbacks for optional parameters that an upstream rejects.\n- Dynamic model discovery, static catalogs, custom models, aliases, disabled\n  models, and capability-aware filtering.\n\n### Usage, cost, and quota\n\n- Request history with provider, model, account, endpoint, status, and latency.\n- Input, output, cached, and total token tracking.\n- Estimated cost with USD as the default display currency and IDR as an option.\n- Provider totals, charts, recent activity, and request detail views.\n- Quota monitor cards with provider/account status and refresh actions.\n- Optional request/response payload capture with retention controls.\n\n### Backup and migration\n\n- Export and restore Sway Router data as JSON.\n- Migrate from a local 9Router installation or a 9Router JSON backup.\n- Select which accounts, custom providers, models, combos, and routing settings\n  to import.\n- Preview compatibility and duplicates before making changes, then create a\n  safety backup before the migration is applied.\n\n### Performance and reliability\n\n- Global request admission control and bounded queues.\n- Per-provider and per-account concurrency limits.\n- Adaptive capacity based on available memory and CPU.\n- Request-body budgets plus upload, connection, stream, and queue timeouts.\n- Upstream retry and endpoint fallback with controlled attempt counts.\n- Automatic OAuth token refresh and refresh de-duplication.\n- Safe handling for disconnects, cancelled streams, failed providers, and 429s.\n- Graceful shutdown so active work can finish cleanly.\n\n### Built-in tools\n\n- Sway Chat with optional Tavily or Brave web search.\n- Shell, curl, and router-inspection tools with explicit controls.\n- RTK, Caveman, and Ponytail token-saving features.\n- CLI model mappings for supported coding tools.\n\n## Sway Router vs. 9Router vs. OmniRoute\n\nAll three projects solve a similar problem and cover the usual routing,\naccount, fallback, and provider workflows. The simple architecture comparison\nis:\n\nSway Router also has multi-account rotation, quota-aware selection, token saving,\nretry, fallback, and provider token refresh; this section is intentionally about\nruntime weight, not a feature scoreboard.\n\n- **Sway Router:** Bun + Hono + SQLite, with a React/Vite dashboard. One core\n  server designed for local use and small VPS deployments.\n- **[9Router](https://github.com/decolua/9router):** Node + Next.js/React +\n  Express + SQLite. More framework layers and a separate CLI runtime.\n- **[OmniRoute](https://github.com/diegosouzapw/OmniRoute):** Node + Next.js/\n  React + SQLite/sql.js, with optional Redis, browser, desktop, and PWA layers.\n\n### Which one is lighter?\n\nFor a comparable local or small-VPS gateway setup, **Sway Router is the\nlighter default**. Bun and Hono have less server overhead than a full Next.js\napplication, and Sway Router's core does not require extra services to run.\n\nThat is an architecture comparison, not a fixed RAM promise. Real usage still\ndepends on concurrent streams, request size, account count, proxy layers, and\noptional services. Sway Router's documented small-VPS starting point is 2 vCPU and\n2 GB RAM, with bounded queues, concurrency, retries, and request bodies.\n\n### Why choose Sway Router?\n\n- **Smaller default footprint.** A Bun server and SQLite cover the core use\n  case without requiring Redis, a hosted sync service, a desktop shell, or a\n  browser pool.\n- **A dashboard built for daily use.** Providers, accounts, models, routing,\n  usage, quotas, proxy, logs, and settings stay in one clean control room.\n- **Built-in resource guardrails.** Sway Router detects the host profile and keeps\n  concurrency, queues, request bodies, retries, and background work bounded.\n- **Easy to ship and inspect.** Run it locally, on a small VPS, in Docker, or\n  as a standalone binary, with SQLite backup/import and an inspectable API.\n\nThe Sway Router figures and menu map come from the [provider registry](./src/providers/registry/index.js),\n[dashboard navigation](./dashboard/src/components/Sidebar.tsx),\n[route table](./src/routes/table.js), and [package manifest](./package.json).\n\n## Operations and security\n\n- Dashboard sessions with JWT and bcrypt password hashing.\n- Login limiting and protected admin routes.\n- Gateway authentication through `Authorization: Bearer ...` or `x-api-key`.\n- Localhost-first defaults and server-side provider credentials.\n- Environment-based secrets and SSRF protection.\n- Health, readiness, version, runtime status, and Prometheus-style metrics.\n- SQLite WAL mode, migrations, indexes, backups, export, and import.\n- Docker/Compose, native source runs, Bun CLI, and standalone binaries.\n\nSway Router protects its own process and account pools, but it does not create\nprovider quota or promise a fixed RPS. Your real capacity still depends on\nprovider limits, account count, network latency, prompt size, and stream\nduration.\n\n## Tech stack\n\n- **Runtime:** Bun, with Node-compatible fallbacks where practical\n- **Gateway:** TypeScript, Hono, native HTTP, and SSE\n- **Dashboard:** React, Vite, Tailwind CSS, React Router, and TanStack Query\n- **Storage:** SQLite with WAL mode, migrations, backups, and `sql.js` fallback\n- **Auth:** JWT, bcrypt, OAuth/PKCE, provider-specific token refresh\n- **Shipping:** Bun CLI, Docker, standalone binaries, GitHub Actions\n\n## Configuration\n\nConfiguration is optional for a single local or Docker instance. On first\nstart, Sway Router creates strong JWT, gateway-key, and machine-salt secrets under\nthe persistent data directory. Use `.env` when you need to override the\ndefaults, bind another host, or manage secrets externally:\n\n```dotenv\nPORT=14045\nHOSTNAME=127.0.0.1\nDATA_DIR=/var/lib/swayrouter\nNODE_ENV=production\nJWT_SECRET=replace-with-a-random-secret-at-least-32-characters\nAPI_KEY_SECRET=replace-with-a-random-secret-at-least-32-characters\nMACHINE_ID_SALT=replace-with-a-random-private-salt\n```\n\nNever point multiple independent Sway Router instances at the same SQLite data\ndirectory. If a supervisor injects secrets, keep their values stable across\nrestarts so dashboard sessions and the instance identity remain stable.\n\nDefault database paths:\n\n```text\nLinux/macOS: ~/.swayrouter/db/data.sqlite\nWindows:     %APPDATA%\\\\.swayrouter\\\\db\\\\data.sqlite\nDocker:      /app/data/db/data.sqlite\n```\n\nKeep the data directory persistent. It contains provider credentials,\nconfiguration, and usage data. Never commit `.env`, database files, backups,\nOAuth tokens, cookies, or logs.\n\n## Why SQLite?\n\nSQLite keeps one private Sway Router instance small, portable, and easy to back up.\nPostgreSQL and Redis make more sense for a separate commercial app with\ndistributed users, billing, background jobs, or multiple Sway Router instances.\n\n## Development checks\n\n```bash\nbun run typecheck\nbun test\nbun run routes:check\nbun run package:check\nbun run build:binary\nbun run smoke:binary\nbun run build:dashboard\nbun run test:e2e:install\nbun run test:e2e\n```\n\n## Attribution\n\nSway Router is built as a standalone project. It reuses selected OAuth, tunnel, CLI,\nand utility pieces from [9Router](https://github.com/decolua/9router), while the\ngateway, routing, dashboard, storage, API, performance, and release setup are\nbuilt and maintained here.\n\nSee [`LICENSE`](./LICENSE) for the MIT attribution.\n\n## License\n\nMIT. See [`LICENSE`](./LICENSE).\n\nSway Router is a gateway and administration tool. You are responsible for\nyour provider accounts, credentials, traffic, privacy, compliance, and\ndeployment security.\n","readmeFilename":"README.md"}