{"id":20054959,"url":"https://github.com/devbeno/bcli","last_synced_at":"2026-03-12T10:03:29.880Z","repository":{"id":41604284,"uuid":"510315393","full_name":"devbeno/bcli","owner":"devbeno","description":null,"archived":false,"fork":false,"pushed_at":"2022-07-04T11:54:57.000Z","size":2078,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-12T21:32:27.405Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devbeno.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":"2022-07-04T10:35:29.000Z","updated_at":"2023-03-08T21:18:57.000Z","dependencies_parsed_at":"2022-07-06T23:02:40.677Z","dependency_job_id":null,"html_url":"https://github.com/devbeno/bcli","commit_stats":null,"previous_names":["devbeno/bcli","devbens/bcli"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devbeno%2Fbcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devbeno%2Fbcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devbeno%2Fbcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devbeno%2Fbcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devbeno","download_url":"https://codeload.github.com/devbeno/bcli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241483513,"owners_count":19970091,"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-11-13T12:44:58.882Z","updated_at":"2025-12-15T01:36:05.430Z","avatar_url":"https://github.com/devbeno.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DevContainer CLI managment tool\n\nDo not want to mess your minimal, clean and fine tuned OS installation with a bunch of compilers, linters, debuggers, interpreters, minifiers, unminifiers, beautifiers, etc...? Visual Studio Code nailed it with DevContainers. But do not want to use VSCode neither? That's where bcli comes in, it a simple CLI that wrap docker/docker-compose and run the (almost) same commands that VSCode runs behind the scenes.\n\n## What is a \"DevContainer\"?\n\nThe devcontainer concept have been developped by the authors of Visual Studio Code and its \"[Remote - Containers](https://code.visualstudio.com/docs/remote/containers)\" extension.\n\n\u003e Work with a sandboxed toolchain or container-based application inside (or mounted into) a container.\n– \u003chttps://code.visualstudio.com/docs/remote/remote-overview\u003e\n\nThis way you don't mess your computer with all the dependencies of all the projects and their programming languages on which you work on.\nIt can also make it easier for others to start working on your projects, without having to guess what are the required tools to develop, lint, test, build, etc.\n\n## Install\n\nThere are different methods to install `bcli`, ordered by preference.\n\nOn ArchLinux, from [AUR](https://aur.archlinux.org/packages/bcli-bin/):\n\n```\n$ yay -Syu bcli-bin\n```\n\nTo install from the bcli devcontainer (requires: docker, docker-compose, go, make):\n\n```\n$ git clone https://github.com/devbens/bcli\n$ cd bcli\n$ docker-composer -p bcli_devcontainer -f .devcontainer/docker-compose.yml up -d\n$ docker-composer -p bcli_devcontainer -f .devcontainer/docker-compose.yml exec app make\n$ sudo make install\n```\n\nTo install from sources into `/usr/local/bin/` (requires: go, make):\n\n```\n$ git clone https://github.com/devbens/bcli\n$ cd bcli\n$ make\n$ sudo make install\n```\n\nTo install `bcli` in your `GOPATH` (requires: golang):\n\n```\n$ go install github.com/devbens/bcli@v1.0.0-alpha.3\n```\n\nTo install `bcli` with brew:\n\n```\n$ brew install devbens/tap/bcli\n```\n\n## Usage\n\n```\n$ bcli --help\nA CLI tool to manage your devcontainers using Docker-Compose\n\nUsage:\n  bcli [command]\n\nAvailable Commands:\n  build       Build or rebuild devcontainer services\n  completion  Generate completion script\n  help        Help about any command\n  init        Create an initial devcontainer configuration\n  ps          List containers\n  shell       Execute a shell inside the running devcontainer\n  start       Start devcontainer services\n  stop        Stop devcontainer services\n\nFlags:\n  -h, --help      help for bcli\n  -v, --verbose   show commands used\n\nUse \"bcli [command] --help\" for more information about a command.\n```\n\n## Demo\n\n[![asciicast](https://asciinema.org/a/kkM3UIF6YDg8tWjjx1MJgLl6z.svg)](https://asciinema.org/a/kkM3UIF6YDg8tWjjx1MJgLl6z)\n\n## Configure (Neo)Vim\n\nWith this configuration you can make (Neo)Vim install plugins inside your container (and only inside, not on your host).\n\n\n`~/.config/nvim/init.vim` with vim-plug as plugin manager:\n\n```vimscript\nif \u0026compatible\n  set nocompatible\nendif\n\ncall plug#begin('~/.local/share/nvim/site/plugged')\n\nPlug 'scrooloose/nerdtree'\n[...]\n\n\" detect wether we are in a docker container or not\nfunction! s:IsDocker()\n  if filereadable('/.dockerenv')\n    return 1\n  endif\n  if filereadable('/proc/self/cgroup')\n    let l:cgroup = join(readfile('/proc/self/cgroup'), ' ')\n    let l:docker = matchstr(l:cgroup, 'docker')\n    if l:docker != \"\"\n      return 1\n    endif\n  endif\nendfunction\n\n\" if there is a devcontainer and we are in a container\nif filereadable('.devcontainer/devcontainer.json') \u0026\u0026 s:IsDocker()\n  let devcontainer = json_decode(readfile('.devcontainer/devcontainer.json'))\n    \" install vim plugins\n    for plugin in get(devcontainer, 'vim-extensions', [])\n      Plug plugin\n    endfor\n\t\" apply vim settings\n    for setting in get(devcontainer, 'vim-settings', [])\n      execute setting\n    endfor\nendif\n\ncall plug#end()\n\n[...]\n```\n\n`.devcontainer/devcontainer.json`:\n\n```json\n{\n  [...]\n  \"vimExtensions\": [\n    \"fatih/vim-go\"\n  ],\n\t\"vimSettings\": [\n\t  \"let g:go_fmt_command = 'goimports'\"\n\t],\n  [...]\n}\n```\n\nAnd take a look at my [docker-compose.yml](/.devcontainer/docker-compose.yml) and [Dockerfile](/.devcontainer/Dockerfile) (based on \u003chttps://hub.docker.com/r/devbens/debian-dev\u003e) to see how to configure your containers.\n\n## [devcontainer.json](https://code.visualstudio.com/docs/remote/devcontainerjson-reference) properties support\n\n- [x] docker - image\n- [x] docker - build.dockerfile\n- [x] docker - build.context\n- [x] docker - build.args\n- [x] docker - build.target\n- [x] docker - appPort\n- [x] docker - containerEnv\n- [x] docker - remoteEnv\n- [x] docker - containerUser\n- [x] docker - remoteUser\n- [ ] docker - updateRemoteUserUID (do not know how to implement this one)\n- [x] docker - mounts\n- [x] docker - workspaceMount\n- [x] docker - workspaceFolder\n- [x] docker - runArgs\n- [x] docker - overrideCommand\n- [x] ~docker - shutdownAction~ (not applicable)\n- [x] docker-compose - dockerComposeFile\n- [x] docker-compose - service\n- [x] docker-compose - runServices\n- [x] docker-compose - workspaceFolder\n- [x] docker-compose - remoteEnv\n- [x] docker-compose - remoteUser\n- [x] ~docker-compose - shutdownAction~ (not applicable)\n- [x] general - name\n- [x] ~general - extensions~ (not applicable)\n- [x] ~general - settings~ (not applicable)\n- [x] general - forwardPorts (for docker only, for docker-compose use `docker-compose.yml`)\n- [ ] general - postCreateCommand\n- [ ] general - postStartCommand\n- [ ] general - postAttachCommand\n- [ ] general - initializeCommand\n- [x] ~general - userEnvProbe~ (not applicable)\n- [x] ~general - devPort~ (not applicable)\n- [ ] variables\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevbeno%2Fbcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevbeno%2Fbcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevbeno%2Fbcli/lists"}