# GitLab CLI Development

GitLab Duo CLI (`@gitlab/duo-cli`) - GitLab Duo for your command line.

## Prerequisites

This CLI project is built using [bun](https://bun.sh/). Make sure you have the following installed:

1. Install mise and bun: `mise install`
1. Install dependencies using bun package manager: `npm run install:bun`

in order to continue working with the language server, install dependencies with npm package manager: `npm run install:npm`

## Compilation

To create standalone executables for distribution, use the compilation script:

```shell
npm run build:binary
```

This will create cross-platform executables in the `./bin` directory:

- `duo-linux-x64` - Linux 64-bit
- `duo-linux-arm64` - Linux ARM64
- `duo-darwin-x64` - macOS Intel
- `duo-darwin-arm64` - macOS Apple Silicon
- `duo-windows-x64.exe` - Windows 64-bit

### Development

You can run the application in watch mode using `npm run watch` command. It will be executed directly with bun.
You can also compile the application to node.js and run it with `npm run start` command.

## Troubleshooting

If you have issues with Bun not resolving installed node_modules in the packages, you may need to clear node_modules folders and reinstall:

```shell
npm run install:bun
```
