{"id":13902952,"url":"https://github.com/stsourlidakis/pame","last_synced_at":"2025-07-18T00:32:48.049Z","repository":{"id":57318428,"uuid":"352209325","full_name":"stsourlidakis/pame","owner":"stsourlidakis","description":"Construct and open links in your browser from the comfort of your terminal","archived":false,"fork":false,"pushed_at":"2023-06-11T09:52:25.000Z","size":1823,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-17T13:16:18.711Z","etag":null,"topics":["bookmarks","cli","hacktoberfest","links"],"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/stsourlidakis.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-03-28T00:37:16.000Z","updated_at":"2024-06-15T01:58:53.000Z","dependencies_parsed_at":"2022-08-25T22:41:52.301Z","dependency_job_id":null,"html_url":"https://github.com/stsourlidakis/pame","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stsourlidakis%2Fpame","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stsourlidakis%2Fpame/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stsourlidakis%2Fpame/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stsourlidakis%2Fpame/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stsourlidakis","download_url":"https://codeload.github.com/stsourlidakis/pame/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":214260330,"owners_count":15707080,"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":["bookmarks","cli","hacktoberfest","links"],"created_at":"2024-08-06T22:01:31.144Z","updated_at":"2024-08-06T22:04:26.815Z","avatar_url":"https://github.com/stsourlidakis.png","language":"JavaScript","funding_links":[],"categories":["cli"],"sub_categories":[],"readme":"# pame\n\n[![version](https://img.shields.io/npm/v/pame?style=flat)](https://www.npmjs.com/package/pame)\n[![license](https://img.shields.io/npm/l/pame)](https://github.com/stsourlidakis/pame/blob/master/LICENSE)\n[![codecov](https://codecov.io/gh/stsourlidakis/pame/branch/master/graph/badge.svg)](https://codecov.io/gh/stsourlidakis/pame)\n[![changelog](https://shields.io/badge/-Changelog-informational)](CHANGELOG.md)\n\n**Construct** and **open** links in your **browser** from the comfort of your terminal.\n\n\u003e Pronounced **_páme_** like the greek word **_πάμε_**, meaning **_Let's go!_**\n\n## Do I need this?\n\nIf you tick some of the boxes below, `pame` will probably save you some time\n\n- You spend time in your terminal\n- You often need to open the same or slightly different urls (aws/gcp pages, dashboards, documentation, repositories etc)\n- You don't like reaching for your mouse so you can search in bookmarks/open tabs\n- You like configuring shortcuts/aliases\n\n## Installation\n\n```sh\nnpm i pame -g\n```\n\n## Quick Overview\n\nYou can create a JSON config with pages you want to open with `pame`.\n\n![Overview config](./media/overview-config.png) ![Overview terminal](./media/overview-terminal.png)\n\n\u003cdetails\u003e\n  \u003csummary\u003eShow quick overview code\u003c/summary\u003e\n\n```json\n// ~/.pame.config.json\n{\n\t\"github\": {\n\t\t\"_path\": \"https://github.com\",\n\t\t\"pr\": \"/pulls\"\n\t},\n\t\"gh\": {\n\t\t\"_alias\": \"github\"\n\t},\n\t\"reddit\": \"https://reddit.com/r\",\n\t\"npm\": \"https://www.npmjs.com/search?q={*}\"\n}\n```\n\n```sh\npame github\n# Opens https://github.com\n\npame github pr\n# Opens https://github.com/pulls\n\npame gh\n# Opens https://github.com\n\npame gh pr\n# Opens https://github.com/pulls\n\npame reddit /news\n# Opens https://reddit.com/r/news\n\npame npm testing\n# Opens https://www.npmjs.com/search?q=testing\n```\n\n\u003c/details\u003e\n\n## Main features ✨\n\n- [Sub-pages](#url-nesting)\n- [Query params placeholders](#query-params-placeholders)\n- [Typo tolerance](#typo-tolerance)\n- [Dynamic sub-pages](#dynamic-sub-paths)\n- [Flexible query string](#query-string)\n- [Aliases](#aliases)\n- [Extension of existing pages](#extending-configurations)\n\n## Configuration\n\nMost of the functionality comes from your config's structure and not CLI options/flags.\n\nBy default, all the configuration is done in a file called `.pame.config.json` in your home directory (e.g. `/home/user/.pame.config.json` ).\n\nYou can override the default config path by setting the `PAME_CONFIG` environment variable.\n\ne.g.\n\n```sh\nPAME_CONFIG=\"/some/path/pame.json\"\n```\n\nYou can view the config's path and open\\* your config with `pame --config`\n\n\u003e \\*The `EDITOR` environment variable should be set in order to open the file.\n\n### Simple url\n\nYou can define simple urls as strings or objects\n\n```json\n{\n\t\"github\": \"https://github.com\"\n}\n```\n\nOr\n\n```json\n{\n\t\"github\": {\n\t\t\"_path\": \"https://github.com\"\n\t}\n}\n```\n\n```sh\npame github\n# Opens https://github.com in a new browser tab\n```\n\n### Url nesting\n\nYou can add sub-paths to your urls\n\n```json\n{\n\t\"github\": {\n\t\t\"_path\": \"https://github.com\",\n\t\t\"pulls\": \"/pulls\"\n\t}\n}\n```\n\n```sh\npame github pulls\n# Opens https://github.com/pulls\n```\n\nNesting doesn't have a depth limit\n\n```json\n{\n\t\"github\": {\n\t\t\"_path\": \"https://github.com\",\n\t\t\"pulls\": {\n\t\t\t\"_path\": \"/pulls\",\n\t\t\t\"m\": \"/mentioned\",\n\t\t\t\"a\": \"/assigned\"\n\t\t}\n\t}\n}\n```\n\n```sh\npame github pulls m\n# Opens https://github.com/pulls/mentioned\n\npame github pulls a\n# Opens https://github.com/pulls/assigned\n```\n\n### Query Params placeholders\n\nQuery params can have placeholder values which can be replaced when constructing the url by starting an argument with a `*` or by providing a string that doesn't match any sub-path.\n\n- simple placeholder: `?lang={*}`\n- with default value: `?lang={*en}`\n\nUnused placeholders with no default value will be removed from the final url.\n\n```json\n{\n\t\"npm\": \"https://www.npmjs.com/search?q={*}\",\n\t\"translate\": \"https://translate.google.com/?text={*}\u0026sl={*en}\u0026tl={*el}\"\n}\n```\n\nThe following examples will also work without starting the arguments with a `*` since they do not match any sub-paths.\n\n```sh\npame npm *testing\n# OR\npame npm testing\n# Opens https://www.npmjs.com/search?q=testing\n\npame translate *hello\n# Opens https://translate.google.com/?text=hello\u0026sl=en\u0026tl=el\n\npame translate *hola *es *en\n# Opens https://translate.google.com/?text=hola\u0026sl=es\u0026tl=en\n\npame translate *\"hello there\"\n# Opens https://translate.google.com/?text=hello%20there\u0026sl=en\u0026tl=el\n\npame translate\n# Opens https://translate.google.com/?sl=en\u0026tl=el\n```\n\n### Aliases\n\nYou can create **same level** aliases by using `_alias`, nested paths and other features will still work!\n\n```json\n{\n\t\"github\": {\n\t\t\"_path\": \"https://github.com\",\n\t\t\"pulls\": \"/pulls\"\n\t},\n\t\"gh\": {\n\t\t\"_alias\": \"github\"\n\t}\n}\n```\n\n```sh\npame gh\n# Opens https://github.com\n\npame gh pulls\n# Opens https://github.com/pulls\n```\n\nYou can have multiple and/or nested aliases.\n\n```json\n{\n\t\"github\": {\n\t\t\"_path\": \"https://github.com\",\n\t\t\"pulls\": \"/pulls\",\n\t\t\"pr\": {\n\t\t\t\"_alias\": \"pulls\"\n\t\t},\n\t\t\"p\": {\n\t\t\t\"_alias\": \"pulls\"\n\t\t}\n\t},\n\t\"gh\": {\n\t\t\"_alias\": \"github\"\n\t}\n}\n```\n\n```sh\npame github pr\n# Opens https://github.com/pulls\n\npame github p\n# Opens https://github.com/pulls\n\npame gh p\n# Opens https://github.com/pulls\n```\n\n### Extending configurations\n\nUrl configs can inherit sub-pages with `_extend`.\n\n```json\n{\n\t\"ddg\": {\n\t\t\"_path\": \"https://duckduckgo.com\",\n\t\t\"i\": \"/images\"\n\t},\n\t\"google\": {\n\t\t\"_path\": \"https://google.com\",\n\t\t\"_extend\": \"ddg\",\n\t\t\"m\": \"/maps\"\n\t}\n}\n```\n\n```sh\npame google\n# Opens https://google.com\n\npame google i\n# Opens https://google.com/images\n\npame google m\n# Opens https://google.com/maps\n```\n\n## Other features\n\n### Typo tolerance\n\nIf your input doesn't match your config 100% `pame` will try the following in order to find a match:\n\n- Trim your input\n- Ignore case\n- [Deburr](https://lodash.com/docs/4.17.15#deburr) strings\n- Find matches with a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) of 1 or 2 (depending on the input's length)\n\n```json\n{\n\t\"github\": \"https://github.com\"\n}\n```\n\n```sh\npame gthub\n# Opens https://github.com\n\npame gITHUB\n# Opens https://github.com\n```\n\nAll arguments except the first one will be ignored if they can't be matched and they can't be used as a [query param placeholde](#query-params-placeholders) value.\n\n```json\n{\n\t\"github\": {\n\t\t\"_path\": \"https://github.com\",\n\t\t\"pr\": \"/pulls\"\n\t}\n}\n```\n\n```sh\npame github foo pr\n# Opens https://github.com/pulls\n```\n\n### Dynamic sub-paths\n\nYou can append to the end of your url by starting an argument with a slash (`/`)\n\n```json\n{\n\t\"reddit\": \"https://reddit.com/r\"\n}\n```\n\n```sh\npame reddit /news\n# Opens https://reddit.com/r/news\n\npame reddit /gifs\n# Opens https://reddit.com/r/gifs\n```\n\n### Query string\n\nA query string found on any level will be moved to the end of the final url\n\n```json\n{\n\t\"foo\": {\n\t\t\"_path\": \"https://foo.com?lang=en\",\n\t\t\"bar\": \"/bar\"\n\t}\n}\n```\n\n```sh\npame foo\n# Opens https://foo.com?lang=en\n\npame foo bar\n# Opens https://foo.com/bar?lang=en\n```\n\n## Options\n\n`--config`\n\nPrints the config path and opens the file if the `EDITOR` environment variable is set\n\n`--config-show`\n\nPrints you config\n\n`--dry-run`\n\nPrints the constructed url instead of printing and then opening in the browser.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstsourlidakis%2Fpame","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstsourlidakis%2Fpame","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstsourlidakis%2Fpame/lists"}