{"id":13777397,"url":"https://github.com/saks/lua-resty-repl","last_synced_at":"2025-07-30T11:13:17.931Z","repository":{"id":43883702,"uuid":"66814601","full_name":"saks/lua-resty-repl","owner":"saks","description":"Interactive console (REPL) for Openresty and luajit code","archived":false,"fork":false,"pushed_at":"2017-07-28T19:26:52.000Z","size":79,"stargazers_count":180,"open_issues_count":6,"forks_count":21,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-05-27T08:54:59.881Z","etag":null,"topics":["cli","debugger","lua","luajit","nginx","openresty","readline","repl","resty-repl"],"latest_commit_sha":null,"homepage":"","language":"Lua","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/saks.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":"2016-08-29T05:39:40.000Z","updated_at":"2025-05-13T07:52:37.000Z","dependencies_parsed_at":"2022-09-17T06:42:29.727Z","dependency_job_id":null,"html_url":"https://github.com/saks/lua-resty-repl","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/saks/lua-resty-repl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saks%2Flua-resty-repl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saks%2Flua-resty-repl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saks%2Flua-resty-repl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saks%2Flua-resty-repl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saks","download_url":"https://codeload.github.com/saks/lua-resty-repl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saks%2Flua-resty-repl/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267858397,"owners_count":24155919,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cli","debugger","lua","luajit","nginx","openresty","readline","repl","resty-repl"],"created_at":"2024-08-03T18:00:42.726Z","updated_at":"2025-07-30T11:13:17.903Z","avatar_url":"https://github.com/saks.png","language":"Lua","readme":"# Welcome to Resty Repl\n\n## Features\n\nResty Repl is a powerful alternative to the standard [luajit](http://luajit.org/) shell ispired by [pry](https://github.com/pry/pry). It is written from scratch to provide a number of advanced features, including:\n* Full read/write access to locals, upvalues and global variables\n* Pretty print for objects\n* A Powerful and flexible command system\n* Ability to view and replay history\n* Ability to see a context and source of the place in code from where repl was started\n* Runtime invocation (use Resty Repl as a developer console or debugger)\n* Tab completion\n* Simple and easy way to debug lua running in the nginx ([openresty](http://openresty.org/en/))\n\n## Runtime invocation\n\nFirst install luarock\n```bash\nluarocks install lua-resty-repl\n```\n\nThen just drop this snippet anywhere in your code:\n\n```lua\nrequire('resty.repl').start()\n```\n\nor run as cli:\n```bash\nresty-repl\n```\n\n## Openresty debugger\nBut what makes it really nice is that now you can debug your [openresty](http://openresty.org/en/) code right from running nginx!\n\n```nginx\nmaster_process off;\nerror_log stderr notice;\ndaemon off;\n\nevents {\n  worker_connections 1024;\n}\n\nhttp {\n  server {\n    listen 8080;\n    lua_code_cache off;\n\n    location / {\n      content_by_lua_block {\n        require('resty.repl').start()\n      }\n    }\n  }\n}\n```\n\nand start debugging:\n```bash\n$ curl -H X-Header:buz 172.17.0.2:8080?foo=bar\n\n```\n\n```\nnginx -c /tmp/ngx.conf\n2016/09/20 16:26:33 [alert] 2257#0: lua_code_cache is off; this will hurt performance in /tmp/ngx.conf:12\nnginx: [alert] lua_code_cache is off; this will hurt performance in /tmp/ngx.conf:12\n2016/09/20 16:26:33 [notice] 2257#0: using the \"epoll\" event method\n2016/09/20 16:26:33 [notice] 2257#0: openresty/1.11.2.1\n2016/09/20 16:26:33 [notice] 2257#0: built by gcc 4.9.2 (Debian 4.9.2-10)\n2016/09/20 16:26:33 [notice] 2257#0: OS: Linux 4.4.0-38-generic\n2016/09/20 16:26:33 [notice] 2257#0: getrlimit(RLIMIT_NOFILE): 65536:65536\n\nFrom: content_by_lua(ngx.conf:17) @ line 2\n\n[1] ngx(content)\u003e ngx.req.get_headers()\n=\u003e {\n  accept = \"*/*\",\n  host = \"172.17.0.2:8080\",\n  [\"user-agent\"] = \"curl/7.47.0\",\n  [\"x-header\"] = \"buz\",\n  \u003cmetatable\u003e = {\n    __index = \u003cfunction 1\u003e\n  }\n}\n[2] ngx(content)\u003e ngx.req.get_uri_args()\n=\u003e {\n  foo = \"bar\"\n}\n[3] ngx(content)\u003e ngx.say 'it works!'\n=\u003e 1\n[4] ngx(content)\u003e ngx.exit(ngx.OK)\n172.17.0.1 - - [20/Sep/2016:16:26:50 +0000] \"GET /?foo=bar HTTP/1.1\" 200 20 \"-\" \"curl/7.47.0\"\n```\n\n## Compatibility\nRight now it's only compatible with:\n- luajit\n- lua5.1 (no readline)\n\n## Os Support\n- GNU/Linux\n- Mac OS\n\n## Roadmap\n- colorized output\n- smarter completion\n- full readline support for lua (no ffi environments)\n- remote debugger\n- command for showing function source\n- test suite with [resty-cli](https://github.com/openresty/resty-cli), [luajit](http://luajit.org/) and different versions of lua\n- better inspect library\n\n## Code Status\n\n[![Build Status](https://travis-ci.org/saks/lua-resty-repl.svg?branch=master)](https://travis-ci.org/saks/lua-resty-repl)\n\n## License\n\nresty-repl is released under the [MIT License](http://www.opensource.org/licenses/MIT).\n","funding_links":[],"categories":["Lua","Libraries"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaks%2Flua-resty-repl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaks%2Flua-resty-repl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaks%2Flua-resty-repl/lists"}