{"id":14008576,"url":"https://github.com/11ways/janeway","last_synced_at":"2025-04-13T11:47:57.605Z","repository":{"id":20744439,"uuid":"24028841","full_name":"11ways/janeway","owner":"11ways","description":"🌌 A Node.js console REPL with object inspection and many other features","archived":false,"fork":false,"pushed_at":"2024-08-12T13:38:17.000Z","size":2059,"stargazers_count":441,"open_issues_count":5,"forks_count":21,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-06T06:56:38.012Z","etag":null,"topics":["javascript","nodejs","repl","terminal"],"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/11ways.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2014-09-14T17:53:41.000Z","updated_at":"2025-03-28T21:47:07.000Z","dependencies_parsed_at":"2024-05-01T23:54:43.971Z","dependency_job_id":null,"html_url":"https://github.com/11ways/janeway","commit_stats":{"total_commits":172,"total_committers":7,"mean_commits":"24.571428571428573","dds":0.313953488372093,"last_synced_commit":"854ed5e198b4d1061dd154a5f52f30e972bc168f"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/11ways%2Fjaneway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/11ways%2Fjaneway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/11ways%2Fjaneway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/11ways%2Fjaneway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/11ways","download_url":"https://codeload.github.com/11ways/janeway/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248710409,"owners_count":21149186,"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":["javascript","nodejs","repl","terminal"],"created_at":"2024-08-10T11:01:51.207Z","updated_at":"2025-04-13T11:47:57.580Z","avatar_url":"https://github.com/11ways.png","language":"JavaScript","readme":"\u003ch1 align=\"center\"\u003e\n  \u003cb\u003ejaneway\u003c/b\u003e\n\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003c!-- Version - npm --\u003e\n  \u003ca href=\"https://www.npmjs.com/package/janeway\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/janeway.svg\" alt=\"Latest version on npm\" /\u003e\n  \u003c/a\u003e\n\n  \u003c!-- License - MIT --\u003e\n  \u003ca href=\"https://github.com/skerit/janeway#license\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/skerit/janeway.svg\" alt=\"Project license\" /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\u003cdiv align=\"center\"\u003e\n  🌌 A Node.js console REPL with object inspection\n\u003c/div\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003csub\u003e\n    Coded with ❤️ by \u003ca href=\"#authors\"\u003eEleven Ways\u003c/a\u003e.\n  \u003c/sub\u003e\n  \u003cbr\u003e\n  \u0026nbsp;\n\u003c/div\u003e\n\n![Janeway showcase](https://raw.githubusercontent.com/skerit/janeway/master/img/console-03.gif \"Janeway showcase\")\n\n## Hex viewer\n\nVersion 0.3.0 facilitates Buffer inspecting with a built-in hex viewer:\n\n![Buffer hex viewer](https://raw.githubusercontent.com/skerit/janeway/master/img/console-04-hex.gif \"Buffer hex viewer\")\n\n## Install\n\nInstall it for use in your own application:\n\n`npm install janeway`\n\nOr use it globally:\n\n`npm install -g janeway`\n\n## Features\n\n* Interactive command line, that always has focus\n* Autocomplete\n* Output is clickable. Variables can be inspected, just like in the browser\n* Selected variables can be copied to clipboard\n\n## Use it globally\n\nStart your applications like so:\n\n`janeway my_js_file.js`\n\n## Use as standalone\n\nIf you just want to give it a go, try out the `start.js` file in Janeway's main folder:\n\n`node start.js`\n\n## Use in your application\n\nYou can load Janeway like this:\n\n```javascript\nvar Janeway = require('janeway');\n\n// Janeway will take over the screen only when you call start\nJaneway.start(function started() {\n\n});\n```\n\nThe screen automatically scrolls down when a new line is pushed (unless you've scrolled the screen manually).\nYou can disable this like so:\n\n```javascript\nJaneway.scroll_down = false;\n```\n\n## uncaughtExceptions\n\nBy default Janeway will add an `uncaughtException` handler.\n\nIt simple re-throws the error to circumvent `blessed`'s one,\nwhich would hide the error message and stacktrace.\n\nAs soon as you add another listener, Janeway will ignore uncaught\nexceptions and let you handle them.\n\nYou can also let Janeway simply print out errors, instead of closing:\n\n```javascript\nJaneway.shutdown_on_exception = false;\n```\n\nThis is not recomended, but can be useful during development.\n\n# Set terminal title\n\nYou can set the terminal's title with this Janeway method:\n\n```javascript\nJaneway.setTitle('My beautiful title');\n```\n\nWhen the application exits the title will be restored. You can also manually unset the title with an explicit false as parameter:\n\n```javascript\nJaneway.setTitle(false);\n```\n\n# Set statusbar\n\nSince version 0.2.0 Janeway also has a statusbar at the bottom of the screen. This can be used for shorter, text-only messages of medium importance.\n\n```javascript\nJaneway.setStatus('This is the statusbar!');\n```\n\nBy default Janeway will add `{right}` blessed tags, which causes the text to be rendered on the right side of the screen. You can also use other blessed tags in your text.\n\nJaneway will also return a `Status` object. In case you plan on creating some kind of spinner there, it is best to update it like this:\n\n```javascript\nvar spinner;\n\n// Some crappy code just to show how status setText works\nvar id = setInterval(function spinnerInterval() {\n\n    var spintext;\n\n    if (!spinner) {\n        spinner = Janeway.setStatus();\n    }\n\n    i += 10;\n\n    spintext = Janeway.Blast.Bound.String.multiply('*', Math.ceil(i/10));\n    spintext += Janeway.Blast.Bound.String.multiply(' ', Math.ceil((100-i)/10));\n\n    spinner.setText(spintext);\n\n    if (i == 100) {\n        clearInterval(id);\n    }\n}, 500);\n```\n\nThis is done because (in a later version) status messages are stored in an array so you can see a history of them.\n\n# Indicators\n\nSince version 0.2.1 an indicator area has been added to the topright corner, you can add one like this:\n\n```javascript\nvar indicator = Janeway.addIndicator({icon: '{red-fg}◉{/red-fg}'});\n\n// Change the icon\nindicator.setIcon('○');\n\n// Set a hover text\nindicator.setHover('This is some hovertext');\n\n// Remove the indicator again\nindicator.remove();\n```\n\nSince version 0.3.4 indicators can also act like menus:\n\n```javascript\nvar file_menu = Janeway.addIndicator('File');\n\n// Add an item and a callback\nfile_menu.addItem('Quit', function onClick(e, config) {\n    process.exit();\n});\n```\n\n# Copy to clipboard\n\nAt the top of the screen there is a menubar, currently it only contains 1 button: \"Copy\".\n\nWhen you click this, the currently selected element will be copied into the clipboard. Objects will be JSON-ified using JSON-Dry.\n\nBecause the dependency that handled clipboard support is abandoned, clipboard support is currently not available.\nInstead, the data will be stored in a file in `~/.janeway/clipboard.json`\n\n# Stored configuration\n\nYou can store your configuration in `~/.janeway/janeway.js` or `~/.janeway/janeway.json`.\n\nThese are currently the default values:\n\n```javascript\n{\n    \"autocomplete\" : {\n\n        // Set to false to turn autocomplete off\n        \"enabled\" : true,\n\n        // The height of the autocomplete popup\n        \"height\"  : 6\n    },\n    \"scroll\": {\n        // How much should be scrolled when using the mousewheel\n        \"step\": 5,\n    },\n    // When using janeway to start a script\n    \"execbin\": {\n        // Evaluate the files? (If false, then they are executed using `require`)\n        \"evaluate_files\": false\n    },\n\n    // Keyboard shortcuts\n    \"shortcuts\": {\n        // Exit on \"Control+c\"\n        \"exit\": ['C-c']\n    },\n\n    // Settings for the caller info (time \u0026 file info at the start of a line)\n    caller_info: {\n\n        // Maximum stack size to get\n        stack_size: 6,\n\n        // How long the filename can be before it's truncated\n        max_filename_length: 10,\n\n        // The minimum length of the info item, after which it is padded with spaces\n        min_length: 25\n    },\n\n    // output is the main output screen in the middle\n    \"output\" : {\n\n        // Main scrollbar style\n        \"scrollbar\": {\n            \"bg\" : \"blue\"\n        },\n\n        // General output style\n        \"style\" : {\n            \"bg\" : \"transparent\",\n            \"fg\" : \"white\"\n        }\n    },\n\n    // when inspecting properties\n    properties: {\n        // See if 2 objects are alike, in order to deduplicate log line\n        alike_objects  : false,\n\n        // The format to use when showing a date\n        date_format    : 'D Y-m-d H:i:s',\n\n        // Print out getter values by default? (Or show \"...\")\n        show_get_value : false,\n\n        // Sort the properties alphabetically by key\n        sort           : true\n    },\n\n    // String placeholders\n    strings: {\n        ellipsis : '…',\n\n        // The gutters (icons used at the start of each line)\n        // Using newer emojis is not recommended: the terminal library\n        // used by janeway doesn't properly support them\n        gutters: {\n            // Fancy \u003e\n            input   : '\\u276f ',\n\n            // Fancy \u003c\n            output  : '\\u276e ',\n\n            // Skull\n            error   : '\\u2620 Error:',\n\n            // Warning sign\n            warning : '\\u26a0 ',\n\n            // Circled small letter i\n            info    : '\\u24D8 '\n        }\n    },\n\n    // cli is the inputbox on the bottom\n    \"cli\" : {\n        \"style\" : {\n            \"bg\" : \"white\",\n            \"fg\" : \"blue\"\n        },\n\n        // Unselect open items on return\n        \"unselect_on_return\": true\n    },\n\n    // the statusbar on the bottom\n    status : {\n        enabled : true,\n        style   : {\n            bg: \"grey\",\n            fg: \"white\"\n        },\n        time    : {\n            enabled: true,\n            fg     : 'yellow',\n            bg     : null,\n        }\n    },\n\n    // The behaviour of the \"Copy JSON\" button\n    copy_json: {\n        enabled : true,\n        title   : 'Copy JSON',\n\n        // Try to copy to clipboard?\n        try_clipboard: true,\n\n        // If true, will dump into your `.janeway/clipboard.json` file.\n        // If it's a string, will dump to that path\n        dump_to_file : true,\n    },\n\n    // popups, also used by autocomplete\n    \"popup\" : {\n        \"scrollbar\": {\n            \"bg\" : \"green\"\n        },\n        \"border\": {\n            \"type\" : \"line\"\n        },\n        \"style\": {\n            \"bg\": \"blue\",\n            \"fg\": \"white\"\n        },\n        \"shadow\": true,\n    },\n\n    // menubar\n    \"menu\" : {\n        // This style only applies to unused parts and indicators\n        \"style\": {\n            \"bg\": \"white\"\n        },\n        \"button\": {\n            \"bg\"    : \"white\",\n            \"fg\"    : 235,\n            \"focus\" : {\n                \"bg\" : \"red\",\n                \"fg\" : 249\n            },\n            \"hover\" : {\n                \"bg\": \"red\",\n                \"fg\": 249\n            }\n        }\n    },\n\n    // indicators\n    \"indicator\": {\n        \"style\": {\n            \"bg\": 240,\n            \"fg\": 231,\n\n        }\n    },\n\n    \"cli_history\": {\n\n        // Amount of lines to save\n        \"save\"      : 100,\n\n        // Use title in filename?\n        \"per_title\" : true\n    }\n}\n```\n\n## Author\n\nJaneway is developed at [Eleven Ways](https://www.elevenways.be/), a team of [IAAP Certified Accessibility Specialists](https://www.accessibilityassociation.org/).\n\n\n## License\n\nMIT\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F11ways%2Fjaneway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F11ways%2Fjaneway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F11ways%2Fjaneway/lists"}