{"id":16836367,"url":"https://github.com/mvertes/co-shell","last_synced_at":"2025-04-11T05:10:46.994Z","repository":{"id":29860832,"uuid":"33405831","full_name":"mvertes/co-shell","owner":"mvertes","description":"yield and promise enabled node REPL extension","archived":false,"fork":false,"pushed_at":"2016-06-23T07:47:25.000Z","size":7,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T18:57:24.333Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/mvertes.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":"2015-04-04T13:08:40.000Z","updated_at":"2025-02-20T16:29:40.000Z","dependencies_parsed_at":"2022-08-03T12:30:22.933Z","dependency_job_id":null,"html_url":"https://github.com/mvertes/co-shell","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvertes%2Fco-shell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvertes%2Fco-shell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvertes%2Fco-shell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvertes%2Fco-shell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mvertes","download_url":"https://codeload.github.com/mvertes/co-shell/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248345266,"owners_count":21088244,"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":[],"created_at":"2024-10-13T12:13:16.066Z","updated_at":"2025-04-11T05:10:46.972Z","avatar_url":"https://github.com/mvertes.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# co-shell\n\n[![Build Status](https://travis-ci.org/mvertes/co-shell.svg?branch=master)](https://travis-ci.org/mvertes/co-shell)\n\nExtend node.js core [REPL](https://nodejs.org/api/repl.html) module\nto support promises, [co](https://github.com/tj/co) and `yield` statements.\n\nBoth executable and module for use in programs are provided.\n\n## Install\n```\n$ npm install [-g] co-shell\n```\n\n## Usage\nInstall some promized stuff, for example [mz](https://github.com/normalize/mz):\n\n```\n$ npm install mz\n```\n\nThen run the provided `bin/co-shell` executable.\nAdjust first line `#!/usr/local/bin/node --harmony` if necessary.\n\n```js\n$ co-shell\nco-shell\u003e fs = require('mz/fs')\nco-shell\u003e a = yield fs.readFile('/etc/hosts', 'utf-8')\nco-shell\u003e console.log(a)\n```\n\n## API\n\nUsing `co-shell` in a program is quite simple. Lets build a shell\nas above, enabling access to `mz/fs`:\n\n```js\nvar coshell = require('co-shell');\nvar context = coshell({prompt: 'co-shell\u003e '}).context;\n\ncontext.fs = require('mz/fs');\n```\n\n`coshell(options)` has exactly the same syntax as `repl.start(options)`\nin core [REPL](https://nodejs.org/api/repl.html). Please refer\nto the original documentation for further details.\n\n## License\n\n[MIT license](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmvertes%2Fco-shell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmvertes%2Fco-shell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmvertes%2Fco-shell/lists"}