#!/bin/bash

# Install GitHub Copilot CLI package on Debian/Ubuntu using NodeSource current Node.js.
set -e

sudo apt update && sudo apt upgrade -y
sudo apt install -y curl build-essential

curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash -
sudo apt install -y nodejs

sudo npm install -g @github/copilot

node -v
npm -v
copilot --version || true
