{"id":13816937,"url":"https://github.com/chinanf-boy/howdoi","last_synced_at":"2025-03-17T23:31:50.017Z","repository":{"id":90548398,"uuid":"155370644","full_name":"chinanf-boy/howdoi","owner":"chinanf-boy","description":"code: \u003chowdoi\u003e instant coding answers via the command line  by Golang :heart: is Work ✅","archived":false,"fork":false,"pushed_at":"2018-11-20T02:20:34.000Z","size":340,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T05:53:25.150Z","etag":null,"topics":["ask","command","howdoi"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chinanf-boy.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-10-30T11:02:50.000Z","updated_at":"2023-06-27T09:04:18.000Z","dependencies_parsed_at":"2023-07-08T11:15:29.036Z","dependency_job_id":null,"html_url":"https://github.com/chinanf-boy/howdoi","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chinanf-boy%2Fhowdoi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chinanf-boy%2Fhowdoi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chinanf-boy%2Fhowdoi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chinanf-boy%2Fhowdoi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chinanf-boy","download_url":"https://codeload.github.com/chinanf-boy/howdoi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243891974,"owners_count":20364616,"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":["ask","command","howdoi"],"created_at":"2024-08-04T06:00:27.650Z","updated_at":"2025-03-17T23:31:49.753Z","avatar_url":"https://github.com/chinanf-boy.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"## howdoi [![Build Status](https://travis-ci.org/chinanf-boy/howdoi.svg)](https://travis-ci.org/chinanf-boy/howdoi)\n\nCopy from [howdoi:py](https://github.com/gleitz/howdoi), But Faster\n\n### Install\n\n```\ngo get -v -u github.com/chinanf-boy/howdoi\n```\n\n\u003e of cos, [releases](https://github.com/chinanf-boy/howdoi/releases)\n\n### Uasge\n\nsame as py:howdoi , but lit diff\n\n```bash\n$ howdoi -q \"format date bash\" -c -C\n```\n\n![demo](./demo.png)\n\n### TODO\n\n- [x] base Feature, Get the data\n- [x] Proxy can with [Socks5](./src/client.go#L44)\n- [x] how many answers you want `-n`\n- [x] **go** func with questions\n- [x] colorful Code text with shell env `-c`/`-T`, [chroma](https://godoc.org/github.com/alecthomas/chroma)\n- [x] cache Result `-C` [useful refs](https://github.com/chinanf-boy/howdoi/issues/3)\n- [x] ReCache Result `-R`, just use GET, you still use `-C` if want to Cache Result\n- [x] **go** func with ALL engines\n- [x] add **ChanHowdoi**: got one result, show it, rather than all results\n- [x] test file\n- [ ] [Issue me anything](https://github.com/chinanf-boy/howdoi/issues/new)\n\n\u003e **Notes:** , cli-name Over the Python version cli\n\n#### Tips\n\nAbout the `ENV`\n\n| ENV                      | Desc                               | Default               |\n| ------------------------ | ---------------------------------- | --------------------- |\n| **HOWDOI_DISABLE_SSL**   | change `https://` =\u003e `http://`     | `nil`                 |\n| **HOWDOI_URL**           | search engine with the ask website | `stackoverflow.com`   |\n| **HOWDOI_URL_REGEX**     | match the regex with URL           | `questions/\\d+/`      |\n| **HOWDOI_SEARCH_ENGINE** | search engine{`bing`\\|`google`}    | `ALL`                 |\n| **HOWDOI_CACHE_DIR**     | http Response - Cached dir         | `$HOME/.howdoi-cache` |\n| **-T**                   | [chroma theme](#chroma-theme)      | `pygments`            |\n\n\u003e HOWDOI_SEARCH_ENGINE, default `ALL`, mean GET ALL engines, but got the winner about speed.\n\n\u003e **NOTE**, careful about **Cache dir**, you will miss the ever Data after you changed diff HOWDOI_CACHE_DIR。\n\n### Ref\n\n#### chroma theme\n\n\u003cdetails\u003e\n\n\u003csummary\u003e themes \u003e\u003e \u003c/summary\u003e\n\n```go\n[\n  abap, algol, algol_nu, arduino, autumn, borland, bw, colorful, dracula, emacs, friendly, fruity, github, igor, lovelace, manni, monokai, monokailight, murphy, native, paraiso-dark, paraiso-light, pastie, perldoc, pygments, rainbow_dash, rrt, solarized-dark, solarized-dark256, solarized-light, swapoff, tango, trac, vim, vsxcode\n]\n```\n\n\u003c/details\u003e\n\n### Cli\n\n```js\nusage: howdoi [-h|--help] [-c|--color] [-v|--version] [-n|--num \u003cinteger\u003e]\n              -q|--query \"\u003cvalue\u003e\" [-q|--query \"\u003cvalue\u003e\" ...] [-D|--debug]\n              [-T|--theme \"\u003cvalue\u003e\"] [-C|--cache] [-R|--recache]\n\n              cli to Ask the question\n\nArguments:\n\n  -h  --help     Print help information\n  -c  --color    colorful Output. Default: false\n  -v  --version  version\n  -n  --num      how many answer. Default: 1\n  -q  --query    query what\n  -D  --debug    debug *\n  -T  --theme    chrome styles. Default: pygments\n  -C  --cache    cache response?. Default: false\n  -R  --recache  reGET response, Cache thing have to with -C ?. Default: false\n```\n\n### Why rewrite\n\n1. proxy,[some issue](https://github.com/chinanf-boy/howdoi/issues/1) with `socks`\n2. fast\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchinanf-boy%2Fhowdoi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchinanf-boy%2Fhowdoi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchinanf-boy%2Fhowdoi/lists"}