{"id":16931658,"url":"https://github.com/jesseduffield/codeslap","last_synced_at":"2026-03-09T02:32:02.177Z","repository":{"id":37186906,"uuid":"278985696","full_name":"jesseduffield/CodeSlap","owner":"jesseduffield","description":"Push commands to your terminal console from the comfort of a text editor","archived":false,"fork":false,"pushed_at":"2022-12-11T16:06:42.000Z","size":2205,"stargazers_count":11,"open_issues_count":16,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T17:11:54.006Z","etag":null,"topics":["console","lazy","ssh","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/jesseduffield.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":"2020-07-12T03:44:05.000Z","updated_at":"2025-03-13T14:36:14.000Z","dependencies_parsed_at":"2023-01-27T02:45:51.881Z","dependency_job_id":null,"html_url":"https://github.com/jesseduffield/CodeSlap","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jesseduffield/CodeSlap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesseduffield%2FCodeSlap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesseduffield%2FCodeSlap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesseduffield%2FCodeSlap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesseduffield%2FCodeSlap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jesseduffield","download_url":"https://codeload.github.com/jesseduffield/CodeSlap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesseduffield%2FCodeSlap/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266520994,"owners_count":23942369,"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-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["console","lazy","ssh","terminal"],"created_at":"2024-10-13T20:44:28.185Z","updated_at":"2026-03-09T02:32:02.146Z","avatar_url":"https://github.com/jesseduffield.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CodeSlap\n\nIf you're like me and you find yourself ssh'ing into a prod console on a daily basis to do some debugging or run once-off scripts, you probably hate your life.\nAnd if the high latency of ssh connections means that you never, EVER, manage to type `Organisationalunit` right the first time, you probably also hate _yourself_.\n\nIf you're not lazy you might push to get [mosh](https://github.com/mobile-shell/mosh) installed on your workplace's servers but if you're like me: you _are_ lazy.\n\nCodeSlap lets you push commands to your terminal session from the comfort of a text editor, as if you were directly typing into the terminal itself. The editor is powered by [CodeMirror](https://github.com/codemirror/CodeMirror) meaning familiar keybindings, multi-cursors, and easy navigation.\n\n## Usage\n\nPress `shift+tab` to toggle between CodeSlap and the application you want to push commands to. Type a command and press `enter` and it will be pushed to your terminal (or whichever application was last focused).\n\n![demo](./github_assets/demo4.gif)\n\n## Installation\n\nYou can grab the zip file from the [releases](https://github.com/jesseduffield/CodeSlap/releases) page. After unzipping, drag the application into your applications folder.\n\nYou will need to allow CodeSlap to 'control your computer' (so that it can switch focus and push your commands to the terminal) like so:\n\n![](https://i.imgur.com/sFbpCvi.png)\n\nIf CodeSlap does not appear in the list, you can add it manually via the `+` button.\n\n## Settings\n\n![](https://i.imgur.com/SVghlXA.png)\n\n### Strip whitespace before period when pasting\n\nDisabled by default.\n\nWhen this option is enabled, a command like the following:\n\n```\nAuthor\n  .find_by(id: 123)\n  .name\n```\n\nwill be converted to `Author.find_by(id: 123).name` when pushing to the terminal. This is useful in a language like Ruby where you would otherwise need to wrap your command in a `begin`/`end` block.\n\n### Single line mode\n\nEnabled by default.\n\nWhen this option is enabled, the up and down arrow keys will go back and forwards through your command history, and pressing `enter` will push the command.\n\nWhent the option is disabled, the up and down arrow keys will move your cursor and instead you can use `cmd+j` and `cmd+k` to traverse the command history. Pressing `enter` will create a newline, and `shift+enter` will push the command.\n\n### Syntax colouring\n\nColours your syntax.\n\n### Glob for hints and autocomplete\n\nIf you enter a glob into this input and press `sync`, all files matching that glob will be scanned for frequent words and those words will be extracted for use in hinting.\n\n## Really Unimpressed Netizen (RUN) Q\u0026A:\n\n\u003e RUN: I'm unimpressed. If the point of this app is to circumvent latency issues when ssh'ing into a remote console, doesn't this just move the latency from a per-character delay to a larger delay when you try to push the command?\n\u003e\n\u003e CodeSlap: The main idea behind my existence is to reduce typos caused by latency. Nobody has ever made a typo due to intermittent latency that occurs _after_ the command is typed. And I think you'll find the latency upon pushing the command is unnoticeable, unless your connection is really bad. And if youre connection is really bad, typing commands directly will be even _more_ of a pain.\n\u003e\n\u003e RUN: But Mosh already solves this problem with optimistic rendering of keystrokes.\n\u003e\n\u003e CodeSlap: Mosh indeed solves the latency problem, but it requires setup both client-side and server-side. It also lacks many of my cool features like multiline editing, multi-cursors and hints.\n\u003e\n\u003e RUN: Well many of those things could arrive soon enough inside terminals, for example the Ruby REPL will soon have multiline support\n\u003e\n\u003e CodeSlap: My creator is too impatient to wait for things like that.\n\u003e\n\u003e RUN: I'll get you one day CodeSlap. You haven't seen the last of me.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjesseduffield%2Fcodeslap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjesseduffield%2Fcodeslap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjesseduffield%2Fcodeslap/lists"}