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
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Verify CLI

on:
push:
branches: [main]
pull_request:

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.18.0, 20, 22]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- run: npm ci
- run: npm test
- run: npm run build
- run: npm pack --dry-run
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Publish CLI release

on:
push:
tags:
- "v*"

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
- run: npm test
- run: npm run build
- name: Build release assets
env:
DOMSCAN_CLI_VERSION: ${{ github.ref_name }}
run: |
set -euo pipefail
DOMSCAN_CLI_VERSION="${DOMSCAN_CLI_VERSION#v}"
mkdir release
npm pack --pack-destination release
cp "release/domscan-cli-${DOMSCAN_CLI_VERSION}.tgz" release/domscan-cli.tgz
(
cd release
sha256sum * > SHA256SUMS
)
- name: Create GitHub release
env:
GH_TOKEN: ${{ github.token }}
run: >-
gh release create "$GITHUB_REF_NAME" release/*
--title "DomScan CLI $GITHUB_REF_NAME"
--notes-file RELEASE_NOTES.md
31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,27 @@

Official command-line client for the [DomScan API](https://domscan.net).

Requires Node.js 18.18 or newer.

## Install

```bash
npm install -g https://github.com/estevecastells/domscan-cli/releases/latest/download/domscan-cli.tgz
```

Run the same command to upgrade, then confirm the installed version:

```bash
domscan --version
```

## Quick Start

```bash
# Show all API operations from the live OpenAPI spec
domscan list

# Target a local DomScan Worker
# Target a local DomScan server
domscan --local get-open-api-spec

# Call an authenticated API operation
Expand Down Expand Up @@ -57,3 +65,24 @@ domscan docs get-domain-health
domscan get-tld-detail --tld io
domscan call /v1/prices/bulk --method POST --body '{"tlds":["com","io"]}'
```

## Output

JSON responses are formatted for the terminal by default. Use `--compact` for one-line JSON or `--raw` to print the response body unchanged.

Save successful responses, including CSV batch downloads, directly to a file:

```bash
domscan get-api-batch-results \
--job-id job_123 \
--format csv \
--output results.csv
```

Existing files are protected. Add `--force` only when you intend to replace the output file.

## Resources

- [API documentation](https://domscan.net/docs)
- [CLI releases](https://github.com/estevecastells/domscan-cli/releases)
- [Issues](https://github.com/estevecastells/domscan-cli/issues)
17 changes: 17 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
DomScan CLI v0.2.0 refreshes the command-line client for the current DomScan API.

Install or upgrade:

```bash
npm install -g https://github.com/estevecastells/domscan-cli/releases/latest/download/domscan-cli.tgz
```

Changes:

- Save successful responses, including CSV batch downloads, with `--output <file>`.
- Protect existing output files by default, with an explicit `--force` override.
- Check output paths before making API requests so an existing file cannot waste a paid request.
- Updated package metadata and documentation for v0.2.0.
- Replaced outdated Worker references with current local server guidance.
- Retained OpenAPI-driven commands plus `list`, `docs`, and generic `call` modes.
- Added automated tests across Node.js 18.18, 20, and 22.
3 changes: 3 additions & 0 deletions dist/args.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/args.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions dist/format.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading