{"id":16296856,"url":"https://github.com/windomz/user-agent-string","last_synced_at":"2025-08-09T23:06:36.669Z","repository":{"id":57388639,"uuid":"85055610","full_name":"WindomZ/user-agent-string","owner":"WindomZ","description":"Easy way to get User Agent Strings in command line interface.","archived":false,"fork":false,"pushed_at":"2020-06-03T01:18:34.000Z","size":3401,"stargazers_count":3,"open_issues_count":7,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-14T23:41:08.130Z","etag":null,"topics":["cli","cli-app","command-line-tool","ua","user-agent","user-agent-string"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/WindomZ.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":"2017-03-15T09:48:42.000Z","updated_at":"2024-05-21T21:09:48.000Z","dependencies_parsed_at":"2022-09-19T02:12:47.977Z","dependency_job_id":null,"html_url":"https://github.com/WindomZ/user-agent-string","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/WindomZ/user-agent-string","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WindomZ%2Fuser-agent-string","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WindomZ%2Fuser-agent-string/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WindomZ%2Fuser-agent-string/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WindomZ%2Fuser-agent-string/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WindomZ","download_url":"https://codeload.github.com/WindomZ/user-agent-string/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WindomZ%2Fuser-agent-string/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269649848,"owners_count":24453541,"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","status":"online","status_checked_at":"2025-08-09T02:00:10.424Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cli","cli-app","command-line-tool","ua","user-agent","user-agent-string"],"created_at":"2024-10-10T20:24:11.962Z","updated_at":"2025-08-09T23:06:36.643Z","avatar_url":"https://github.com/WindomZ.png","language":"JavaScript","readme":"# user-agent-string\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/WindomZ/user-agent-string.svg)](https://greenkeeper.io/)\n[![Build Status](https://travis-ci.org/WindomZ/user-agent-string.svg?branch=master)](https://travis-ci.org/WindomZ/user-agent-string)\n[![Coverage Status](https://coveralls.io/repos/github/WindomZ/user-agent-string/badge.svg?branch=master)](https://coveralls.io/github/WindomZ/user-agent-string?branch=master)\n![License](https://img.shields.io/badge/license-MIT-green.svg)\n![Node](https://img.shields.io/badge/node-%3E=6-blue.svg?style=flat-square)\n[![Dependency](https://david-dm.org/WindomZ/user-agent-string.svg)](https://david-dm.org/WindomZ/user-agent-string)\n[![Standard - JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com/)\n\n\u003e Easy way to get User Agent Strings in command line interface.\n\n[![NPM](https://nodei.co/npm/user-agent-string.png)](https://nodei.co/npm/user-agent-string/)\n\n[![user-agent-string](https://img.shields.io/npm/v/user-agent-string.svg)](https://www.npmjs.com/package/user-agent-string)\n![status](https://img.shields.io/badge/status-stable-green.svg)\n\nThe User Agent Strings data comes from [useragentstring.com](http://www.useragentstring.com/pages/useragentstring.php)\n\n## Features\n\n- [x] Custom User Agent Strings format and separator\n- [x] Limit the number of User Agent Strings\n- [x] User Agent Strings wraps to increase readability\n- [x] Save the User Agent Strings to a file\n- [x] List the supported browsers to select\n\n## Installation\n\n```bash\nnpm install -g user-agent-string\n```\n\n## Usage\n\n**ua-string** is short for *User Agent Strings*\n\n```bash\n$ ua-string -h\n\n  Usage: ua-string [options] \u003cbrowser\u003e\n\n\n  Commands:\n\n    search|find [options] \u003ckeyword\u003e  search and select the browser to get list of User Agent Strings\n    list|ls [options] [keyword]      list and select the browser to get list of User Agent Strings\n\n  list of User Agent Strings\n\n  Options:\n\n    -h, --help                   output usage information\n    -V, --version                output the version number\n    -l, --limit \u003climit\u003e          limit count of the list\n    -f, --format \u003cformat\u003e        format of the strings\n    -s, --separator \u003cseparator\u003e  separators of the strings\n    --line                       each string has a newline\n    --save \u003cfile\u003e                save to file\n```\n\n### -l, --limit `\u003climit\u003e`\n\nLimit the number of User Agent Strings. \n\n`-l 1` limit is `1`, `-l 10` limit is `10`, etc.\nExamples can be found in the following.\n\n### -f, --format `\u003cformat\u003e`\n\nCustomize the string format, depending on your needs. \n\nThe rule is to use `*` to replace `%s`, \nyou can also use `%s`, e.g. `-f '\u003c%s\u003e'`, `-f '{(%s)}'`, very **simple**, \ndefault format is `\"*\"`, same as `-f '\"*\"'`, e.g.\n\n```bash\n$ ua-string Chrome -l 1 # default\n# \u003e\u003e\u003e \"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36\"\n\n$ ua-string Chrome -l 1 -f '\u003c*\u003e'\n# \u003e\u003e\u003e \u003cMozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36\u003e\n\n$ ua-string Chrome -l 1 -f '{(*)}'\n# \u003e\u003e\u003e {(Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36)}\n```\n\n### -s, --separator `\u003cseparator\u003e`\n\nCustomize the string separator, depending on your needs. \n\nThe rule also very **simple**, default separator is `, `, e.g.\n\n```bash\n$ ua-string Dillo -l 5 # default\n# \u003e\u003e\u003e \"Dillo/2.0\", \"Dillo/0.8.6-i18n-misc\", \"Dillo/0.8.6\", \"Dillo/0.8.5-i18n-misc\", \"Dillo/0.8.5\"\n\n$ ua-string Dillo -l 5 -s ' | '\n# \u003e\u003e\u003e \"Dillo/2.0\" | \"Dillo/0.8.6-i18n-misc\" | \"Dillo/0.8.6\" | \"Dillo/0.8.5-i18n-misc\" | \"Dillo/0.8.5\"\n\n$ ua-string Dillo -l 5 -s '\u0026'\n# \u003e\u003e\u003e \"Dillo/2.0\"\u0026\"Dillo/0.8.6-i18n-misc\"\u0026\"Dillo/0.8.6\"\u0026\"Dillo/0.8.5-i18n-misc\"\u0026\"Dillo/0.8.5\"\n```\n\n### --line\n\nUser Agent Strings wraps to increase readability.\n\n*Not* use `--line`: \n```bash\n$ ua-string Dillo -l 3\n# \u003e\u003e\u003e \"Dillo/2.0\", \"Dillo/0.8.6-i18n-misc\", \"Dillo/0.8.6\"\n```\n\nUse `--line`: \n```bash\n$ ua-string Dillo -l 3 --line\n# \u003e\u003e\u003e \"Dillo/2.0\", \n      \"Dillo/0.8.6-i18n-misc\", \n      \"Dillo/0.8.6\"\n```\n\n### --save `\u003cfile\u003e`\n\nSave the User Agent Strings to a file, e.g.\n\n```bash\n$ ua-string Chrome -l 5 --save user_agent\n.\n├── user_agent\n```\n\nAutomatically create the directory.\n```bash\n$ ua-string Chrome -l 5 --save ./ua/user_agent\n.\n├── ua\n│   ├── user_agent\n```\n\nWith `--line` can increase content readability.\n```bash\n$ ua-string Chrome -l 5 --line --save ~/user_agent\n```\n\n### search | find `[options]` `\u003csearch\u003e`\n\nSearch and select browser to get list of User Agent Strings. e.g.\n\n```bash\n$ ua-string search ch -l 1 --line\n\n$ ua-string search chrome -l 5 --save user_agent\n```\n\n### list | ls `[options]` `[keyword]`\n\nList and select browser to get list of User Agent Strings. e.g.\n\n```bash\n$ ua-string list -l 5\n\n$ ua-string list -l 5 --line\n```\n\nSimilar to `search|find`, e.g.\n\n```bash\n$ ua-string list ch -l 1 --line\n\n$ ua-string list chrome -l 5 --save user_agent\n```\n\n## License\n\nThe [MIT License](https://github.com/WindomZ/user-agent-string/blob/master/LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwindomz%2Fuser-agent-string","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwindomz%2Fuser-agent-string","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwindomz%2Fuser-agent-string/lists"}