{"id":22105527,"url":"https://github.com/upvalue/love-repl","last_synced_at":"2025-07-25T02:32:07.091Z","repository":{"id":6229009,"uuid":"7460565","full_name":"upvalue/love-repl","owner":"upvalue","description":"Magic-free in-game REPL for the Love game engine ","archived":false,"fork":false,"pushed_at":"2014-05-01T22:16:50.000Z","size":484,"stargazers_count":37,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2023-03-12T08:27:35.495Z","etag":null,"topics":["love","love-game-engine","lua"],"latest_commit_sha":null,"homepage":null,"language":"Lua","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/upvalue.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":"2013-01-05T22:06:24.000Z","updated_at":"2022-05-04T14:29:01.000Z","dependencies_parsed_at":"2022-09-13T10:20:51.175Z","dependency_job_id":null,"html_url":"https://github.com/upvalue/love-repl","commit_stats":null,"previous_names":[],"tags_count":1,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upvalue%2Flove-repl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upvalue%2Flove-repl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upvalue%2Flove-repl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upvalue%2Flove-repl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/upvalue","download_url":"https://codeload.github.com/upvalue/love-repl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227504082,"owners_count":17781819,"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":["love","love-game-engine","lua"],"created_at":"2024-12-01T06:47:20.315Z","updated_at":"2024-12-01T06:47:20.971Z","avatar_url":"https://github.com/upvalue.png","language":"Lua","readme":"Magic-free in-game REPL for the Love game engine. Released under the Boost 1.0 license. (Credit is not required but\nwould be appreciated)\n\nI say magic free because it does not override any Love functions, but it does require you to add hooks into your code\nin order to work.\n\nSee main.lua for an example. The background used in the demo is from [David Brown on\nflickr](http://www.flickr.com/photos/shadowsofthesun/), used under the Creative Commons license.\n\n![console closed](http://i.imgur.com/y189M.png) ![console open](http://i.imgur.com/FUvf6.png)\n\n### Use\n\n- Enter: Evaluate line\n- Left/Right: Move cursor in line\n- Backspace: Delete letter behind cursor\n- Delete: Delete letter at cursor\n- Ctrl-A: Beginning of line\n- Ctrl-E: End of line\n- Escape: Clear current line\n- Up/Down: Navigate through history for a line to edit\n- Mouse wheel: Scroll through history\n- Home: Scroll to top\n- End: Scroll to bottom\n- Page up: Scroll up a page\n- Page down: Scroll down a page\n- F8: Default toggle key\n\n### Functions\n\n##### repl.initialize()\n\nShould be called during love.load() to initialize the module, but after specifying any settings (such as max lines),\nand after setting Love's graphical mode.\n\n##### repl.toggle()\n\nToggle the REPL.\n\n##### repl.toggled() : boolean\n\nReturns true if the REPL has been toggled.\n\n##### repl.eval(text : string, add_to_history : boolean) : boolean\n\nEnter and evaluate TEXT at the REPL. Normally triggered by a user entering text, but can be called directly from code\nif desired. If ADD_TO_HISTORY is true, the line will be added to the user-navigable history if it is successfully\nevaluated. Returns true if evaluation was successful, false if not.  \n\n##### repl.print(value)\n\nPrint value to the REPL. Great for debug messages. REPL does not need to be open for this to work.\n\n##### repl.keypressed(k, isrepeat)\n##### repl.mousepressed(x, y, button)\n##### repl.textinput(t)\n\nUse these functions to pass input through to the REPL.\n\n##### repl.draw()\n\nRender the REPL.\n\n### Variables\n\n##### repl.font : Font\n\nThe font to use when rendering. Vera Sans 12pt by default. Requires a monospace font, or multi-line rendering might get\nmessed up.\n\n##### repl.screenshot = true\n\nIf true, take a screenshot when toggled and set repl.background to a darkened version of it.\n\n##### repl.dark_factor = 0.6\n\nThe amount by which the background will be darkened, lower is darker. Should be between 0 and 1.\n\n##### repl.background : Drawable\n\nImage to use as REPL background. If neither this or screenshot is set, love-repl will clear to black.\n\n##### repl.max_lines = 1000\n\nThe maximum number of lines to keep. Must be set before initialize() is called. Includes both user-entered and program\ngenerated lines.\n\n##### repl.max_history = 1000\n\nThe maximum number of history lines to keep. Must be set before initialize() is called.\n\n##### repl.toggle_key = \"f8\" \n\nThe Love KeyConstant that will cause the REPL to close itself. \n\n##### repl.clear_key = \"escape\"\n\nThe Love KeyConstant that will clear the current line.\n\n##### repl.on_close : function\n\nA hook that will be called when the REPL is closed. \n\n##### repl.wrapping = false\n\nEnable word wrapping via love.graphics.printf. Note that it is necessary to use a monospaced font with word wrapping.\n\n### Issues\n\n- No word wrapping\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fupvalue%2Flove-repl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fupvalue%2Flove-repl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fupvalue%2Flove-repl/lists"}