@stackone/cli
Version:
StackOne Connect CLI tool
111 lines (72 loc) • 1.66 kB
Markdown
# StackOne CLI
A command-line interface for StackOne Connect operations.
## Installation
Install globally via npm:
```bash
npm install -g @stackone/cli
```
## Usage
After installation, you can use the `stackone` command from anywhere:
```bash
stackone --help
stackone -h
```
## Commands
### `validate`
Validate a StackOne connector file:
```bash
stackone validate path/to/connector.s1.yaml
```
Validate multiple connector files at once in a directory (recursive):
```bash
stackone validate path/to/connectors/
```
Options:
- `-w or --watch`: Watch for changes in the specified directory of file and validate connectors as they change.
Note: The file extension of a connector file needs to be `.s1.yaml`. The file extension can be omitted.
### `version`
Show CLI version information. If a new version is available, it will prompt you to update:
```bash
stackone version
```
### `--version`
Show the current version of the CLI:
```bash
stackone --version
stackone -V
```
### Local Development
```bash
# Install dependencies
npm install
# Build the package
npm run build
# Link for global testing
npm link
# Run tests
npm test
# Lint and format
npm run lint:fix
```
### Building
```bash
npm run build
```
### Testing
```bash
npm test
```
## Publishing
The package is configured to be published to NPM with public access:
```bash
npm run publish-release
```
## Architecture
The CLI is built with:
- **Commander.js** - Command line parsing
- **Chalk** - Terminal colors and styling
- **Inquirer** - Interactive prompts
- **Ora** - Loading spinners
- **TypeScript** - Type safety
- **Tsdown** - Bundling
- **Vitest** - Testing