{"id":13610570,"url":"https://github.com/Bugswriter/tuxi","last_synced_at":"2025-04-12T22:34:15.939Z","repository":{"id":41964335,"uuid":"338771010","full_name":"Bugswriter/tuxi","owner":"Bugswriter","description":"Tuxi is a cli assistant. Get answers of your questions instantly.","archived":false,"fork":false,"pushed_at":"2022-02-20T01:12:46.000Z","size":371,"stargazers_count":1335,"open_issues_count":22,"forks_count":73,"subscribers_count":22,"default_branch":"main","last_synced_at":"2025-04-08T15:14:32.976Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Bugswriter.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}},"created_at":"2021-02-14T09:38:10.000Z","updated_at":"2025-04-08T01:12:17.000Z","dependencies_parsed_at":"2022-09-21T10:02:35.121Z","dependency_job_id":null,"html_url":"https://github.com/Bugswriter/tuxi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bugswriter%2Ftuxi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bugswriter%2Ftuxi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bugswriter%2Ftuxi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bugswriter%2Ftuxi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bugswriter","download_url":"https://codeload.github.com/Bugswriter/tuxi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248642308,"owners_count":21138350,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-08-01T19:01:45.986Z","updated_at":"2025-04-12T22:34:15.916Z","avatar_url":"https://github.com/Bugswriter.png","language":"Shell","funding_links":[],"categories":["Shell","Searching","Tools","\u003ca name=\"productivity\"\u003e\u003c/a\u003eProductivity"],"sub_categories":["sh"],"readme":"\u003ch1 align=\"center\"\u003eTUXI\u003c/h1\u003e\n\u003cp align=\"center\"\u003eA CLI tool that scrapes Google search results and SERPs that provides instant and concise answers\u003c/p\u003e\n\n##  \n\n\u003cimg src=\"https://i.ibb.co/sCwYpZ8/general.gif\" alt=\"Video Preview Gif\" align=\"right\" width=\"500px\"/\u003e\n\n### How does this work?\n\nThe script uses `pup` to scrape Google search results and SERPs.\nIf the query returns several results, Tuxi will choose the most \nrelevant result on the basis of priority.\n\nIn addition to scraping, `tuxi` also uses `jq`, `awk` and `sed` \nto process and return results, and `recode` to unescape html.\n\n\n[Watch this video for more info](https://youtu.be/EtwWvMa8muU)\n\u003e Also checkout BugsWriter's YouTube channel for more scripts like this.\n\n## Requirements\n\n* [pup](https://github.com/ericchiang/pup) - CLI tool for processing HTML.\n* [recode](https://github.com/rrthomas/recode) - Charset converter tool and library.\n* [jq](https://github.com/stedolan/jq) - Command-line JSON processor.\n\n## Installation\n\n### cURL\ncURL **tuxi** to your **$PATH** and give execute permissions.\n\n```sh\n$ sudo curl -sL \"https://raw.githubusercontent.com/Bugswriter/tuxi/main/tuxi\" -o /usr/local/bin/tuxi\n$ sudo chmod +x /usr/local/bin/tuxi\n```\n\u003e To update, just do `curl` again, no need to `chmod` anymore.  \n\u003e To uninstall, simply remove `tuxi` from your **$PATH**, for example `sudo rm -f /usr/local/bin/tuxi`.\n\n### Make\n```sh\n$ git clone https://github.com/Bugswriter/tuxi.git \u0026\u0026 cd tuxi/\n$ sudo make install\n```\n\u003e To update, just `git pull` on your local tuxi repository and reinstall with `sudo make install`.  \n\u003e To uninstall, simply run `sudo make uninstall`.\n\n### Arch Linux AUR\nTuxi is available as the [`tuxi-git`](https://aur.archlinux.org/packages/tuxi-git/) package in the **AUR**.\n```sh\n$ yay -S tuxi-git\n```\n\n## Usage\n\n```sh\n$ tuxi \"Is Linux better than Windows?\"\n---\nLinux has a reputation for being fast and smooth while\nWindows 10 is known to become slow and slow over\ntime. Linux runs faster than Windows 8.1 and Windows 10\nalong with a modern desktop environment and qualities of the\noperating system while windows are slow on older hardware.\n---\n```\n* Quotations are optional, but should be used if you want to search with special characters (?=!|\u0026\u003c\u003e%$#/\\\\).\n* You can also write your query as a statement, e.g: `tuxi linus torvalds birthday`.\n* The -r option will make the output not have formatting, which can be convenient for use in scripts.\n* The -q option silences \"Did you mean?\" and Tuxi's greeting on calling `tuxi`.\n\nUse `-h` to display the help message.\n\n```sh\nUsage: tuxi [options] query\nOR: query source | tuxi [options]\n\nOptions:\n  -h                    Show this help message and exit.\n  -v                    Print tuxi version info and exit.\n\n  -r                    Raw search results.\n                        (no pretty output, no colors)\n\n  -q                    Only output search results.\n                        (silences \"Did you mean?\", greeting, usage)\n\n  -a                    Prints all valid answers.\n\n  -u                    Prints out the top handful of URLs for your search query\n                        (this is automatically printed out if tuxi can't find you an answer)\n\n  -b                    Tries to select the best answer based on keywords at the start and end of your query.\n                        (experimental - eg: define WORD, SONG lyrics, PERSON quotes, weather CITY, FILM cast)\n\n  -t                    Pick answers to test.\n                        (you can specify multiple answers using tuxi_NAME in your query)\n\n  -l                    use LANG_[lang] in your query to override the language used\n                        (eg: tuxi -l LANG_en_US my search query)\n\ntuxi supports the following environment variables:\n  TUXI_LANG=[lang]      sets default search language (eg: TUXI_LANG='en_US')\n\n  TUXI_DELAY=[int]      if you find more than one answer is being printed (and you're not using -a)\n                        increase this number by a little (you want it to be as low as possible)\n                        default value is 250 (eg: TUXI_DELAY=270)\n\ndeveloper flags:\n  -d                    prints debug info along with results\n  -s                    saves HTML for this query to /home/dave/.cache/tuxi/[date]-[query].html\n\n  -c                    use most recent cached result and query\n                        this can be combined with -t flag to more quickly test for different answers\n\n  -p                    disable pipe support (it can break some scripts including our own test script)\n\nReport bugs at https://github.com/Bugswriter/tuxi/issues\n```\n\n## Features\n\n**Easily change query language**  \nLine [8](./tuxi#L8) in `tuxi` contains the language variable which can be changed according the user's preference. However, tuxi will use the system default langauge if none is set.\n\n**Gives corrections**\n```sh\n$ tuxi linux torvalds birthday\n\u003e Did you mean linus?\n---\n28 December 1969\n---\n```\n\n**When you know it's actually linux torvalds** \u003ckbd\u003e-q option\u003c/kbd\u003e\n```sh\n$ tuxi -q linux torvalds birthday\n---\n28 December 1969\n---\n```\n\n**Raw formatting for output (no colors)** \u003ckbd\u003e-r option\u003c/kbd\u003e\n\u003e Useful for e.g scripting `notify-send`.\n```sh\n$ tuxi -r linux torvalds birthday\n\u003e Did you mean linus?\n28 December 1969\n```\n\n**Math operations**\n```sh\n$ tuxi \"log(30)\"\n---\n1.4771212547196624\n---\n```\n\n**Translate**\n```sh\n$ tuxi \"I love you in japanese\"\n---\nわたしは、あなたを愛しています\n---\n$ tuxi \"わたしは、あなたを愛しています in english\"\n---\nI love you\n---\n```\n\n**And much more (lyrics, weather, conversions...)**\n\n## License\n\nThis project is licensed under [GPL-3.0](./LICENSE).\n\n## Contributing\n\nIf you want to contribute, please see [CONTRIBUTING](./.github/ISSUE_TEMPLATE/CONTRIBUTING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBugswriter%2Ftuxi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBugswriter%2Ftuxi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBugswriter%2Ftuxi/lists"}