{"id":13570433,"url":"https://github.com/sogaiu/janet-ref","last_synced_at":"2026-01-25T18:03:22.309Z","repository":{"id":153244902,"uuid":"621392230","full_name":"sogaiu/janet-ref","owner":"sogaiu","description":"Multi-purpose Janet Info Tool","archived":false,"fork":false,"pushed_at":"2025-10-29T06:15:40.000Z","size":515,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-29T08:25:33.274Z","etag":null,"topics":["command-line-tool","demo","doc","format","indent","janet","quiz","reference","repl","usages"],"latest_commit_sha":null,"homepage":"","language":"Janet","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/sogaiu.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-03-30T15:11:07.000Z","updated_at":"2025-08-27T12:33:48.000Z","dependencies_parsed_at":"2025-10-29T08:14:42.883Z","dependency_job_id":"b2c2728e-bc3a-4c2c-87c5-ff26646b5322","html_url":"https://github.com/sogaiu/janet-ref","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sogaiu/janet-ref","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sogaiu%2Fjanet-ref","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sogaiu%2Fjanet-ref/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sogaiu%2Fjanet-ref/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sogaiu%2Fjanet-ref/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sogaiu","download_url":"https://codeload.github.com/sogaiu/janet-ref/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sogaiu%2Fjanet-ref/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28756432,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T16:32:25.380Z","status":"ssl_error","status_checked_at":"2026-01-25T16:32:09.189Z","response_time":113,"last_error":"SSL_read: 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":["command-line-tool","demo","doc","format","indent","janet","quiz","reference","repl","usages"],"created_at":"2024-08-01T14:00:52.405Z","updated_at":"2026-01-25T18:03:22.303Z","avatar_url":"https://github.com/sogaiu.png","language":"Janet","funding_links":[],"categories":["Janet"],"sub_categories":[],"readme":"# janet-ref (jref)\n\nMulti-purpose [Janet](https://janet-lang.org) info tool for:\n\n* doc and source lookups\n* usages and quizzes\n* data pretty-printing, code indenting and formatting\n* quick evaluation and macro-expansion\n* creating readable repl session / usage content\n\n## Status\n\nAdding:\n\n* Usages and quizzes for more functions, macros, etc.\n\nPreliminary Support:\n\n* Functions, Macros, etc.\n  * Doc lookup (--doc, -d)\n  * Source lookup (--src, -s)\n  * Usage (--usage, -u)\n  * Quizzes (--quiz, -q)\n\n* Data\n  * Pretty-printing (--pprint, -p)\n\n* Code\n  * Formatting (--format, -f)\n  * Indenting (--indent, -i)\n  * Expression evaluation (--eval, -e)\n  * Macro-expansion (--macex1, -m)\n\n* Demo / Usage Creation\n  * Tweaked Repl (--repl, -r)\n\n## Invocation Examples\n\nTake a quiz.\n\n```\n$ jref -q label\n(label here\n  (for i 0 2\n    (when (pos? i)\n      (______ here i))))\n# =\u003e\n1\n\nWhat value could work in the blank?\n```\n\nShow some usages.\n\n```\n$ jref -u mapcat\n(mapcat string [1 2 3])\n# =\u003e\n@[\"1\" \"2\" \"3\"]\n\n(mapcat scan-number [\"2r111\" \"0x08\" \"8r11\" \"10\"])\n# =\u003e\n@[7 8 9 10]\n\n(mapcat identity [[\"alice\" 1] [\"bob\" 2] [\"carol\" 3]])\n# =\u003e\n@[\"alice\" 1 \"bob\" 2 \"carol\" 3]\n\n(-\u003e\u003e [[:a 1] [:b 2] [:c 3]]\n     (mapcat identity)\n     splice\n     table)\n# =\u003e\n@{:a 1 :b 2 :c 3}\n```\n\nLook up some docs.\n\n```\n$ jref -d var\nspecial form\n\n`(var name meta... value)`\n\n`var` binds a value to a symbol.\n\nThe symbol can be substituted for the value in subsequent\nexpressions for the same result.\n\nA binding made by `var` can be updated using `set`.\n\nFor further info, see:\n\n  https://janet-lang.org/docs/specials.html\n```\n\nPretty-print some data.\n\n```\n$ jref -p \"{:a 1 :b {:x 8 :y 9}}\"\n{:a 1\n :b {:x 8\n     :y 9}}\n```\n\nFormat some code.\n\n```\n$ jref -f \"(defn a [x] (+ x 1)) (print (a 2))\"\n(defn a\n  [x]\n  (+ x 1))\n\n(print (a 2))\n```\n\nExpand a macro call.\n\n```\n$ jref -m \"(each i [0 1 2] (when (pos? i) (break)))\"\n(do\n  (def _0000c3\n    [0 1 2])\n  (var _0000c2\n    (\u003cfunction next\u003e _0000c3 nil))\n  (while (\u003cfunction not=\u003e nil _0000c2)\n    (def i\n      (\u003cfunction in\u003e _0000c3 _0000c2))\n    (when (pos? i)\n      (break))\n    (set _0000c2\n         (\u003cfunction next\u003e _0000c3 _0000c2))))\n```\n\nEvaluate some code.\n\n```\n$ jref -e \"(\u003e (length (all-bindings)) 500)\"\ntrue\n```\n\nGet basic help.\n\n```\n$ jref -h\nusage: jref [THING] [OPTION]..\n       jref [OPTION]... [THING]\n\nView Janet information for things such as functions,\nmacros, special forms, etc.\n\nParameters:\n\n  thing    name of function, macro, special form, etc.\n\nOptions:\n\n  -h, --help               show this output\n\n  -d, --doc                show doc\n  -q, --quiz               show quiz question\n  -s, --src                show source [1]\n  -u, --usage              show usages\n\n  -p, --pprint             pretty-print data\n\n  -f, --format             format code\n  -i, --indent             indent code\n  -e, --eval               evaluate code\n  -m, --macex1             macroexpand code\n\n  -r, --repl               run a repl\n\n      --env-vars           show tweakable environment vars\n\n      --bash-completion    output bash-completion bits\n      --fish-completion    output fish-completion bits\n      --zsh-completion     output zsh-completion bits\n\n      --raw-all            show all things to help completion\n\n      --bindings           \n\n  -g, --grep               \n  -t, --todo               \n\n...\n```\n\nOutput truncated, see actual output for more details :)\n\n## Credits\n\nSignificant portions of the code and documentation come from Janet,\nspork, and the janet-lang.org website.  Thus the following license\napplies to at least those portions.\n\n```\nCopyright (c) 2019, 2020, 2021, 2022, 2023, 2024, 2025 Calvin Rose and\ncontributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n\n* pyrmont - discussion and code review\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsogaiu%2Fjanet-ref","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsogaiu%2Fjanet-ref","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsogaiu%2Fjanet-ref/lists"}