{"id":51187006,"url":"https://github.com/etorth/libnvc","last_synced_at":"2026-06-27T11:03:48.206Z","repository":{"id":38362889,"uuid":"162965040","full_name":"etorth/libnvc","owner":"etorth","description":"Easy way to embed (neo)vim in your application","archived":false,"fork":false,"pushed_at":"2023-01-11T23:01:15.000Z","size":6647,"stargazers_count":33,"open_issues_count":0,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2023-03-05T01:37:52.218Z","etag":null,"topics":["embeded","game","gui-application","neovim","rpc","sdl2"],"latest_commit_sha":null,"homepage":"","language":"C++","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/etorth.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":"2018-12-24T07:48:37.000Z","updated_at":"2022-12-20T13:20:39.000Z","dependencies_parsed_at":"2023-02-09T08:46:00.778Z","dependency_job_id":null,"html_url":"https://github.com/etorth/libnvc","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/etorth/libnvc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etorth%2Flibnvc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etorth%2Flibnvc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etorth%2Flibnvc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etorth%2Flibnvc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/etorth","download_url":"https://codeload.github.com/etorth/libnvc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/etorth%2Flibnvc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34850585,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-27T02:00:06.362Z","response_time":126,"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":["embeded","game","gui-application","neovim","rpc","sdl2"],"created_at":"2026-06-27T11:03:47.483Z","updated_at":"2026-06-27T11:03:48.199Z","avatar_url":"https://github.com/etorth.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libnvc\n\nI realize nvim now provides ```libnvim.a```, this repo may not be needed anymore.\n\nanother c++-20 nvim msgpack-rpc client, nvim-0.5.0 tested.  \nnvim's rpc interface is convenient but not something you can finish in 10 minutes.  \nthis repo creates libnvc.a and you can use it to read/write a process running neovim easily.\n\n![image](https://github.com/etorth/libnvc/raw/master/readme/cap.gif)\n\nstart nvim and use ```asio_socket``` to talk to it:\n\n```cpp\n#include \"libnvc.hpp\"\n\nint main()\n{\n    // start nvim:\n    // $ nvim --listen \"127.0.0.1:6666\"\n    libnvc::asio_socket socket;\n    if(!socket.connect(\"localhost\", 6666)){\n        throw std::runtime_error(\"failed to connect to localhost:6666\");\n    }\n\n    libnvc::api_client client(\u0026socket);\n    client.nvim_input(\"$i123\u003cCR\u003e123\u003cESC\u003e\");\n    client.nvim_buf_set_name(1, \"1234\");\n```\nor use ```reproc_device``` to spawn a process running nvim in background:\n\n```cpp\n#include \"libnvc.hpp\"\n\nint main()\n{\n    // spawn nvim process with default parameters\n    libnvc::reproc_device reproc_dev;\n    reproc_dev.spawn();\n\n    libnvc::api_client client(\u0026reproc_dev);\n    client.nvim_ui_attach(100, 80, {{\"rgb\", true}, {\"ext_linegrid\", true}});\n    client.nvim_input(\"$i123\u003cCR\u003e123\u003cESC\u003e\");\n    client.nvim_buf_set_name(1, \"1234\");\n```\n\n### build  \nthere is zero dependenct for user's building environment.  \nlibnvc use asio, mpack and reproc internally but hiden by pimpl.  \n\n```bash\n# build the libnvc library, nvim should be in your PATH\n$ cd $HOME\n$ git clone https://github.com/etorth/libnvc.git\n$ mkdir b_libnvc \u0026\u0026 cd b_libnvc\n$ cmake ../libnvc -DCMAKE_INSTALL_PREFIX=install -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++\n$ make \u0026\u0026 make install\n\n# build the sample project, a simple nvim gui\n# this requires SDL2, SDL2-image and SDL2-ttf installed\n$ cd $HOME\n$ mkdir b_nvim_sdl2 \u0026\u0026 cd b_nvim_sdl2\n$ cmake ../libnvc/sample/nvim_sdl2 -DCMAKE_INSTALL_PREFIX=install -DLIBNVC_INCLUDE=$HOME/b_libnvc/install/include -DLIBNVC_LIB=$HOME/b_libnvc/install/lib\n$ make \u0026\u0026 make install\n\n# run the sample gui\n$ cd $HOME/b_nvim_sdl2/install/nvim_sdl2 \u0026\u0026 ./nvim_sdl2\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetorth%2Flibnvc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fetorth%2Flibnvc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetorth%2Flibnvc/lists"}