Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/devcontainer
/devcontainerx
/dist
8 changes: 4 additions & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
builds:
- env:
- CGO_ENABLED=0
binary: devcontainer
binary: devcontainerx
goos:
- linux
- darwin
- windows
goarch:
- 386
- amd64
main: ./cmd/devcontainer/
main: ./cmd/devcontainerx/
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.Date}} -X "main.goversion={{.Env.GOVERSION}}"

Expand All @@ -29,9 +29,9 @@ brews:
homepage: https://github.com/stuartleeks/devcontainer-cli
description: CLI for working with Visual Studio Code devcontainers
install: |
bin.install "devcontainer"
bin.install "devcontainerx"
test: |
system "#{bin}/devcontainer --version"
system "#{bin}/devcontainerx --version"

changelog:
sort: asc
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ help: ## show this help


build: fmt ## Build devcontainer cli
go build ./cmd/devcontainer
go build ./cmd/devcontainerx

lint: build ## Build and lint
golangci-lint run
Expand Down
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ devcontainer-cli is the start of a CLI to improve the experience of working with

**Status: this is a pet project that I've been experimenting with. It is not supported and you should expect bugs :-)**

**NOTE: To avoid conflicts with the [official CLI](https://github.com/devcontainers/cli) the binary for this project has been renamed to `devcontainerx`**

## Installation

Head to the [latest release page](https://github.com/stuartleeks/devcontainer-cli/releases/latest) and download the archive for your platform.

Extract `devcontainer` from the archive and place in a folder in your `PATH`.
Extract `devcontainerx` from the archive and place in a folder in your `PATH`.

You can also install using `homebrew` with `brew install stuartleeks/tap/devcontainer`

Expand All @@ -27,16 +29,16 @@ sudo -E ./install.sh
To enable bash completion, add the following to you `~/.bashrc` file:

```bash
source <(devcontainer completion bash)
source <(devcontainerx completion bash)
```

Or to alias `devcontainer` (to `dc` in this example):
Or to alias `devcontainerx` (to `dcx` in this example):

```bash
alias dc=devcontainer
complete -F __start_devcontainer dc
alias dcx=devcontainerx
complete -F __start_devcontainerx dcx
```

## Docs

See [the documentation](https://stuartleeks.github.io/devcontainer-cli) on how to work with `devcontainer`.
See [the documentation](https://stuartleeks.github.io/devcontainer-cli) on how to work with `devcontainerx`.
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ func createCompleteCommand(rootCmd *cobra.Command) *cobra.Command {
Short: "Generates bash completion scripts",
Long: `To load completion run

. <(devcontainer completion SHELL)
. <(devcontainerx completion SHELL)

Valid values for SHELL are : bash, fish, powershell, zsh

For example, to configure your bash shell to load completions for each session add to your bashrc

# ~/.bashrc or ~/.profile
source <(devcontainer completion)
source <(devcontainerx completion)

# if you want to alias the CLI:
alias dc=devcontainer
source <(devcontainer completion bash | sed s/devcontainer/dc/g)
alias dcx=devcontainerx
source <(devcontainerx completion bash | sed s/devcontainerx/dcx/g)

`,
PersistentPreRun: func(cmd *cobra.Command, args []string) {
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion cmd/devcontainer/main.go → cmd/devcontainerx/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var (
func main() {

rootCmd := &cobra.Command{
Use: "devcontainer",
Use: "devcontainerx",
PersistentPreRun: func(cmd *cobra.Command, args []string) {
update.PeriodicCheckForUpdate(version)
},
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ LATEST_VERSION=$(curl --silent "https://api.github.com/repos/stuartleeks/devcont
echo $LATEST_VERSION
mkdir -p ~/bin
wget https://github.com/stuartleeks/devcontainer-cli/releases/download/${LATEST_VERSION}/devcontainer-cli_${OS}_${ARCH}.tar.gz
tar -C ~/bin -zxvf devcontainer-cli_${OS}_${ARCH}.tar.gz devcontainer
chmod +x ~/bin/devcontainer
tar -C ~/bin -zxvf devcontainer-cli_${OS}_${ARCH}.tar.gz devcontainerx
chmod +x ~/bin/devcontainerx