{"id":17910499,"url":"https://github.com/matthieulemoine/immersive","last_synced_at":"2025-03-23T21:35:30.671Z","repository":{"id":41113822,"uuid":"151855009","full_name":"MatthieuLemoine/immersive","owner":"MatthieuLemoine","description":"A framework to build immersive CLIs \u0026 great developer tools.","archived":false,"fork":false,"pushed_at":"2022-12-09T09:50:13.000Z","size":1405,"stargazers_count":4,"open_issues_count":17,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-18T23:44:08.894Z","etag":null,"topics":["cli","immersive"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/MatthieuLemoine.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}},"created_at":"2018-10-06T15:43:44.000Z","updated_at":"2021-12-28T14:32:04.000Z","dependencies_parsed_at":"2023-01-25T21:15:22.760Z","dependency_job_id":null,"html_url":"https://github.com/MatthieuLemoine/immersive","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatthieuLemoine%2Fimmersive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatthieuLemoine%2Fimmersive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatthieuLemoine%2Fimmersive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatthieuLemoine%2Fimmersive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MatthieuLemoine","download_url":"https://codeload.github.com/MatthieuLemoine/immersive/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245174849,"owners_count":20572774,"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":["cli","immersive"],"created_at":"2024-10-28T19:31:58.805Z","updated_at":"2025-03-23T21:35:30.375Z","avatar_url":"https://github.com/MatthieuLemoine.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Immersive [![CircleCI](https://circleci.com/gh/MatthieuLemoine/immersive/tree/master.svg?style=svg)](https://circleci.com/gh/MatthieuLemoine/immersive/tree/master)\n\nA framework to build immersive CLIs \u0026 great developer tools.\n\n## Features\n\n- [Customization](https://github.com/MatthieuLemoine/immersive/wiki/Configuration#customization)\n- [Configuration persistence](https://github.com/MatthieuLemoine/immersive/wiki/Configuration)\n- [Auto loading of commands](https://github.com/MatthieuLemoine/immersive/wiki/Commands#commands-directory)\n- [Autocomplete](https://github.com/MatthieuLemoine/immersive/wiki/Commands#autocomplete)\n- [Command history](https://github.com/MatthieuLemoine/immersive/wiki/Commands#history)\n- [Async commands support](https://github.com/MatthieuLemoine/immersive/wiki/Commands#example)\n- [Enhanced context for commands](https://github.com/MatthieuLemoine/immersive/wiki/Commands#enhanced-context)\n- [Environments management](https://github.com/MatthieuLemoine/immersive/wiki/Environments)\n- [Enhanced REPL](https://github.com/MatthieuLemoine/immersive/wiki/REPL)\n- [Make your own REPL](https://github.com/MatthieuLemoine/immersive/wiki/REPL#make-your-own-repl)\n- [Display tabular data](https://github.com/MatthieuLemoine/immersive/wiki/Logger#table)\n- [Help command](https://github.com/MatthieuLemoine/immersive/wiki/Commands#built-in-commands)\n\n## Install\n\n```\nyarn add immersive\nor\nnpm install immersive\n```\n\n## Usage\n\n```javascript\nconst immersive = require('immersive');\n\nconst config = {\n  // Application name used for config persistence (required)\n  projectName: 'Immersive',\n  // Will be displayed on CLI start (optional - default to displayName)\n  displayName: 'Immersive',\n  // Loaded commands (required if commandsDirectory not provided) - Should be valid map of ImmersiveCommand\n  commands: {\n    'import-orgs': {\n      command: 'importOrgs',\n      description: 'Import organizations',\n      action: () =\u003e {},\n    },\n  },\n  // Path to the directory where commands are defined (required if commands not provided)\n  commandsDirectory: path.join(__dirname, 'commands'),\n  // Will be accessible from commands as argument (optional)\n  helpers: {\n    db,\n  },\n  // Configuration will be passed to helpers based on the current environment (optional)\n  environments: {\n    development: { database: 'devdb' },\n    staging: { database: 'stagingdb' },\n    production: { database: 'proddb' },\n  },\n  // Define the current environment on CLI start\n  // The current environment can be changed using the `env \u003cenvName\u003e` command (optional)\n  defaultEnvironment: 'development',\n  // Default cli config (optional)\n  defaultConfig: {\n    // Displayed in prompt\n    user: 'john',\n    // Displayed in prompt\n    symbol: '\u003e',\n    colors: {\n      prompt: 'green',\n    },\n  },\n};\n\nimmersive(config);\n```\n\n## Inspiration\n\nInspired by the awesome [vorpal](https://github.com/dthree/vorpal) framework.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatthieulemoine%2Fimmersive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatthieulemoine%2Fimmersive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatthieulemoine%2Fimmersive/lists"}