{"id":23917944,"url":"https://github.com/codingstark-dev/dns-toys-ai-bun","last_synced_at":"2026-05-16T09:32:32.057Z","repository":{"id":270995688,"uuid":"907545047","full_name":"codingstark-dev/dns-toys-ai-bun","owner":"codingstark-dev","description":"A fun DNS server that provides utility functions like time, weather, currency conversion \u0026 AI-powered responses through DNS queries. Built with Bun.js, inspired by dns.toys with added GPT integration.","archived":false,"fork":false,"pushed_at":"2025-01-04T16:36:17.000Z","size":22515,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-23T20:15:33.812Z","etag":null,"topics":["ai","bun","bunjs","dns","dnstools","dnstoys","gpt-4o","vercel-ai-sdk"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codingstark-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-23T20:45:43.000Z","updated_at":"2025-01-04T16:42:07.000Z","dependencies_parsed_at":"2025-01-04T17:22:46.152Z","dependency_job_id":"abb9e179-668c-4fcf-82f0-f6c227561621","html_url":"https://github.com/codingstark-dev/dns-toys-ai-bun","commit_stats":null,"previous_names":["codingstark-dev/dns-toys-ai-bun"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codingstark-dev/dns-toys-ai-bun","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingstark-dev%2Fdns-toys-ai-bun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingstark-dev%2Fdns-toys-ai-bun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingstark-dev%2Fdns-toys-ai-bun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingstark-dev%2Fdns-toys-ai-bun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codingstark-dev","download_url":"https://codeload.github.com/codingstark-dev/dns-toys-ai-bun/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingstark-dev%2Fdns-toys-ai-bun/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33096870,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","bun","bunjs","dns","dnstools","dnstoys","gpt-4o","vercel-ai-sdk"],"created_at":"2025-01-05T13:11:27.276Z","updated_at":"2026-05-16T09:32:32.040Z","avatar_url":"https://github.com/codingstark-dev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DNS Toys (Bun.js Version)\n\nA fun DNS server implementation in Bun.js that provides various utility functions through DNS queries. This project is inspired by [dns.toys](https://github.com/knadh/dns.toys) created by [Kailash Nadh](https://github.com/knadh), CTO of Zerodha. While maintaining all the original functionality, this version adds AI-powered DNS responses using GPT models.\n\n## Demo\n\n![DNS Toys Demo](demo/dnsbun.gif)\n\n## Features\n\n- AI-powered DNS responses using GPT models\n- Time queries for different cities\n- Weather information\n- Currency conversion\n- Unit conversion\n- IP address lookup\n- Word to number conversion\n- Mathematical constants (Pi)\n- CIDR range calculator\n- Dice rolling\n- Coin flipping\n- Random number generation\n- Epoch time conversion\n- Aerial distance calculator\n- UUID generation\n- Sudoku solver\n- Developer excuses\n- Dictionary lookups\n- Base conversion\n\n## Tech Stack\n\n- Bun.js - JavaScript/TypeScript runtime \u0026 package manager\n- TypeScript - Type safety and developer experience\n- dns2 - DNS server implementation for custom DNS responses\n- OpenAI SDK (@ai-sdk/openai) - For AI-powered responses using GPT models\n- Luxon - DateTime handling and timezone conversions\n- Cheerio - HTML parsing for web scraping\n- AI SDK - AI/ML model integration utilities\n\n## Prerequisites\n\n- [Bun](https://bun.sh) installed on your system\n- OpenAI API key (for AI features)\n\n## Installation\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/codingstark-dev/dns-toys-ai-bun\ncd dns-toys-bun\n```\n\n2. Install dependencies:\n```bash\nbun install\n```\n\n## Environment Variables\n\nRequired environment variables (.env):\n```\nOPENAI_API_KEY=your-api-key\nEXCHANGE_RATE_API_KEY=your-api-key\n```\n\n## Running the Server\n\nThere are two ways to run the server:\n\n### Production Mode\n```bash\n# On Linux (requires root for port 53)\nsudo bun run start\n\n# On macOS or for development (using port 5353)\nbun run start\n```\n\n### Development Mode\n```bash\n# On Linux (requires root for port 53)\nsudo bun run dev\n\n# On macOS or for development (using port 5353)\nbun run dev\n```\n\nDevelopment mode features:\n- Auto-reloads when TypeScript files change\n- Watches the entire project directory\n- Provides detailed logging\n- Gracefully handles server restarts\n\nNote: On Linux, DNS servers typically need root privileges to bind to port 53. You can run the server on a different port (e.g., 5353) if you don't want to use sudo.\n\n## Usage Examples\n\nQuery the DNS server using dig:\n\n```bash\n# AI queries\ndig what-is-the-capital-of-india.ai @localhost\n\n# Time queries\ndig mumbai.time @localhost\n\n# Weather queries\ndig ahmedabad.weather @localhost\n\n# Unit conversion\ndig 42km-cm.unit @localhost\n\n# Currency conversion\ndig 99USD-INR.fx @localhost\n\n# Get your IP\ndig ip @localhost\n\n# Word to number conversion\ndig 1133.words @localhost\n\n# Mathematical constant Pi\ndig pi @localhost\n\n# CIDR range calculator\ndig 10.100.0.0/24.cidr @localhost\n\n# Dice rolling\ndig 1d6.dice @localhost\n\n# Coin flipping\ndig 2.coin @localhost\n\n# Random number generation\ndig 1-100.rand @localhost\n\n# Epoch time conversion\ndig 784783800.epoch @localhost\n\n# Aerial distance calculation\ndig A12.9352,77.6245/12.9698,77.7500.aerial @localhost\n\n# UUID generation\ndig 2.uuid @localhost\n\n# Sudoku solving\ndig 002840003.076000000.100006050.030080000.007503200.000020010.080100004.000000730.700064500.sudoku @localhost\n\n# Developer excuse\ndig excuse @localhost\n\n# Dictionary lookup\ndig fun.dict @localhost\n\n# Base conversion\ndig 100dec-hex.base @localhost\n\n# Help - list all commands\ndig help @localhost\n```\n\n## Acknowledgments\n\nThis project is a Bun.js implementation inspired by [dns.toys](https://github.com/knadh/dns.toys) created by [Kailash Nadh](https://github.com/knadh). The original project showcases the creative use of DNS for utility functions, and this version adds AI capabilities while utilizing the performance benefits of Bun.js.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodingstark-dev%2Fdns-toys-ai-bun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodingstark-dev%2Fdns-toys-ai-bun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodingstark-dev%2Fdns-toys-ai-bun/lists"}