Skip to content

Commit 5e86061

Browse files
committed
Add copilot and charm
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
1 parent 3db8251 commit 5e86061

File tree

4 files changed

+170
-4
lines changed

4 files changed

+170
-4
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,6 @@ There are 53 apps that you can install on your cluster.
761761
### Catalog of CLIs
762762

763763
<!-- start of tool list -->
764-
765764
| TOOL | DESCRIPTION |
766765
|------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
767766
| [actions-usage](https://github.com/self-actuated/actions-usage) | Get usage insights from GitHub Actions. |
@@ -791,11 +790,13 @@ There are 53 apps that you can install on your cluster.
791790
| [conftest](https://github.com/open-policy-agent/conftest) | Write tests against structured configuration data using the Open Policy Agent Rego query language |
792791
| [consul](https://github.com/hashicorp/consul) | A solution to connect and configure applications across dynamic, distributed infrastructure |
793792
| [copa](https://github.com/project-copacetic/copacetic) | CLI for patching container images |
793+
| [copilot](https://github.com/github/copilot-cli) | GitHub Copilot CLI - AI-powered command line assistant |
794794
| [cosign](https://github.com/sigstore/cosign) | Container Signing, Verification and Storage in an OCI registry. |
795795
| [cr](https://github.com/helm/chart-releaser) | Hosting Helm Charts via GitHub Pages and Releases |
796796
| [crane](https://github.com/google/go-containerregistry) | crane is a tool for interacting with remote images and registries |
797797
| [croc](https://github.com/schollz/croc) | Easily and securely send things from one computer to another |
798798
| [crossplane](https://github.com/crossplane/crossplane) | Simplify some development and administration aspects of Crossplane. |
799+
| [crush](https://github.com/charmbracelet/crush) | A delightful AI assistant for your terminal |
799800
| [dagger](https://github.com/dagger/dagger) | A portable devkit for CI/CD pipelines. |
800801
| [devpod](https://github.com/loft-sh/devpod) | Codespaces but open-source, client-only and unopinionated: Works with any IDE and lets you use any cloud, kubernetes or just localhost docker. |
801802
| [devspace](https://github.com/devspace-sh/devspace) | Automate your deployment workflow with DevSpace and develop software directly inside Kubernetes. |
@@ -953,9 +954,7 @@ There are 53 apps that you can install on your cluster.
953954
| [websocat](https://github.com/vi/websocat) | Command-line client for WebSockets, like netcat/socat but for WebSockets |
954955
| [yq](https://github.com/mikefarah/yq) | Portable command-line YAML processor. |
955956
| [yt-dlp](https://github.com/yt-dlp/yt-dlp) | Fork of youtube-dl with additional features and fixes |
956-
There are 189 tools, use `arkade get NAME` to download one.
957-
957+
There are 191 tools, use `arkade get NAME` to download one.
958958

959-
<!-- end of tool list -->
960959

961960
> Note to contributors, run `go run . get --format markdown` to generate this list

pkg/get/get.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"log"
1010
"net"
1111
"net/http"
12+
1213
"strings"
1314
"text/template"
1415
"time"

pkg/get/get_test.go

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9613,3 +9613,117 @@ func Test_DownloadAgeKeygen(t *testing.T) {
96139613
})
96149614
}
96159615
}
9616+
9617+
func Test_DownloadCopilot(t *testing.T) {
9618+
tools := MakeTools()
9619+
name := "copilot"
9620+
const version = "v0.0.396"
9621+
9622+
tool := getTool(name, tools)
9623+
9624+
tests := []test{
9625+
{
9626+
os: "ming",
9627+
arch: arch64bit,
9628+
version: version,
9629+
url: `https://github.com/github/copilot-cli/releases/download/v0.0.396/copilot-win32-x64.zip`,
9630+
},
9631+
{
9632+
os: "ming",
9633+
arch: archARM64,
9634+
version: version,
9635+
url: `https://github.com/github/copilot-cli/releases/download/v0.0.396/copilot-win32-arm64.zip`,
9636+
},
9637+
{
9638+
os: "linux",
9639+
arch: arch64bit,
9640+
version: version,
9641+
url: `https://github.com/github/copilot-cli/releases/download/v0.0.396/copilot-linux-x64.tar.gz`,
9642+
},
9643+
{
9644+
os: "linux",
9645+
arch: archARM64,
9646+
version: version,
9647+
url: `https://github.com/github/copilot-cli/releases/download/v0.0.396/copilot-linux-arm64.tar.gz`,
9648+
},
9649+
{
9650+
os: "darwin",
9651+
arch: arch64bit,
9652+
version: version,
9653+
url: `https://github.com/github/copilot-cli/releases/download/v0.0.396/copilot-darwin-x64.tar.gz`,
9654+
},
9655+
{
9656+
os: "darwin",
9657+
arch: archDarwinARM64,
9658+
version: version,
9659+
url: `https://github.com/github/copilot-cli/releases/download/v0.0.396/copilot-darwin-arm64.tar.gz`,
9660+
},
9661+
}
9662+
9663+
for _, tc := range tests {
9664+
t.Run(fmt.Sprintf("Download for: %s %s %s", tc.os, tc.arch, tc.version), func(r *testing.T) {
9665+
got, _, err := tool.GetURL(tc.os, tc.arch, tc.version, false)
9666+
if err != nil {
9667+
t.Fatal(err)
9668+
}
9669+
if got != tc.url {
9670+
t.Errorf("\nwant: %s\ngot: %s", tc.url, got)
9671+
}
9672+
})
9673+
}
9674+
}
9675+
9676+
func Test_DownloadCrush(t *testing.T) {
9677+
tools := MakeTools()
9678+
name := "crush"
9679+
const version = "v0.36.0"
9680+
9681+
tool := getTool(name, tools)
9682+
9683+
tests := []test{
9684+
{
9685+
os: "ming",
9686+
arch: arch64bit,
9687+
version: version,
9688+
url: `https://github.com/charmbracelet/crush/releases/download/v0.36.0/crush_0.36.0_Windows_x86_64.zip`,
9689+
},
9690+
{
9691+
os: "linux",
9692+
arch: arch64bit,
9693+
version: version,
9694+
url: `https://github.com/charmbracelet/crush/releases/download/v0.36.0/crush_0.36.0_Linux_x86_64.tar.gz`,
9695+
},
9696+
{
9697+
os: "linux",
9698+
arch: archARM64,
9699+
version: version,
9700+
url: `https://github.com/charmbracelet/crush/releases/download/v0.36.0/crush_0.36.0_Linux_arm64.tar.gz`,
9701+
},
9702+
{
9703+
os: "darwin",
9704+
arch: arch64bit,
9705+
version: version,
9706+
url: `https://github.com/charmbracelet/crush/releases/download/v0.36.0/crush_0.36.0_Darwin_x86_64.tar.gz`,
9707+
},
9708+
{
9709+
os: "darwin",
9710+
arch: archDarwinARM64,
9711+
version: version,
9712+
url: `https://github.com/charmbracelet/crush/releases/download/v0.36.0/crush_0.36.0_Darwin_arm64.tar.gz`,
9713+
},
9714+
}
9715+
9716+
for _, tc := range tests {
9717+
t.Run(fmt.Sprintf("Download for: %s %s %s", tc.os, tc.arch, tc.version), func(r *testing.T) {
9718+
got, _, err := tool.GetURL(tc.os, tc.arch, tc.version, false)
9719+
if err != nil {
9720+
t.Fatal(err)
9721+
}
9722+
if got != tc.url {
9723+
t.Errorf("\nwant: %s\ngot: %s", tc.url, got)
9724+
}
9725+
})
9726+
}
9727+
}
9728+
9729+

pkg/get/tools.go

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5281,5 +5281,57 @@ https://github.com/openai/codex/releases/download/{{.Version}}/codex-{{$arch}}-{
52815281
https://github.com/vi/websocat/releases/download/{{.Version}}/websocat.{{$target}}`,
52825282
})
52835283

5284+
tools = append(tools,
5285+
Tool{
5286+
Owner: "github",
5287+
Repo: "copilot-cli",
5288+
Name: "copilot",
5289+
Description: "GitHub Copilot CLI - AI-powered command line assistant",
5290+
BinaryTemplate: `
5291+
{{$os := ""}}
5292+
{{$arch := ""}}
5293+
{{$ext := "tar.gz"}}
5294+
{{- if eq .OS "darwin" -}}
5295+
{{$os = "darwin"}}
5296+
{{- else if eq .OS "linux" -}}
5297+
{{$os = "linux"}}
5298+
{{- else if HasPrefix .OS "ming" -}}
5299+
{{$os = "win32"}}
5300+
{{$ext = "zip"}}
5301+
{{- end -}}
5302+
{{- if or (eq .Arch "x86_64") (eq .Arch "amd64") -}}
5303+
{{$arch = "x64"}}
5304+
{{- else if or (eq .Arch "aarch64") (eq .Arch "arm64") -}}
5305+
{{$arch = "arm64"}}
5306+
{{- end -}}
5307+
{{.Name}}-{{$os}}-{{$arch}}.{{$ext}}`,
5308+
})
5309+
5310+
tools = append(tools,
5311+
Tool{
5312+
Owner: "charmbracelet",
5313+
Repo: "crush",
5314+
Name: "crush",
5315+
Description: "A delightful AI assistant for your terminal",
5316+
URLTemplate: `
5317+
{{$arch := .Arch}}
5318+
{{- if eq .Arch "x86_64" -}}
5319+
{{$arch = "x86_64"}}
5320+
{{- else if eq .Arch "aarch64" -}}
5321+
{{$arch = "arm64"}}
5322+
{{- end -}}
5323+
{{$osStr := ""}}
5324+
{{$extStr := "tar.gz"}}
5325+
{{- if eq .OS "darwin" -}}
5326+
{{$osStr = "Darwin"}}
5327+
{{- else if eq .OS "linux" -}}
5328+
{{$osStr = "Linux"}}
5329+
{{- else if HasPrefix .OS "ming" -}}
5330+
{{$osStr = "Windows"}}
5331+
{{$extStr = "zip"}}
5332+
{{- end -}}
5333+
https://github.com/{{.Owner}}/{{.Repo}}/releases/download/{{.Version}}/{{.Name}}_{{.VersionNumber}}_{{$osStr}}_{{$arch}}.{{$extStr}}`,
5334+
})
5335+
52845336
return tools
52855337
}

0 commit comments

Comments
 (0)