# CivicDataForge DEV Publication Evidence Client

This dependency-free Node.js client calls the official DEV API directly from your computer. It reports a short evidence summary by default. Your optional DEV API key is sent only to `https://dev.to`; it is never sent to CivicDataForge or Apify.

## Requirements

- Node.js 20 or newer
- The downloaded file `civicdataforge-devto-direct.mjs`

Open PowerShell in the folder containing the downloaded file.

## 1. Check a public article without a key

```powershell
node .\civicdataforge-devto-direct.mjs --path /api/articles/4471683 --public
```

Replace `4471683` with the DEV article ID you want to check. The example ID belongs to CivicDataForge's known public article and is supplied only as a working demonstration input; it is not embedded in the client.

## 2. Use your own DEV API key

Remove `--public`:

```powershell
node .\civicdataforge-devto-direct.mjs --path /api/articles/me/all
```

The client displays:

```text
DEV API key (hidden; sent directly to dev.to):
```

Paste the DEV API key and press Enter. Nothing appears while you paste because the prompt deliberately hides the credential.

To inspect one specific owner-authorized article:

```powershell
node .\civicdataforge-devto-direct.mjs --path /api/articles/YOUR_ARTICLE_ID
```

## 3. Understand the output

The default result is short. For a single article it includes:

- `article_id`
- `title`
- `url`
- `published_state`: `PUBLISHED`, `DRAFT`, or `UNKNOWN`
- `published`: `true`, `false`, or `null`
- `basis`
- `http_status`
- `credential_sent_to_civicdataforge`
- evidence and request receipt hashes

## 4. Request the complete DEV response only when needed

Add `--raw`:

```powershell
node .\civicdataforge-devto-direct.mjs --path /api/articles/YOUR_ARTICLE_ID --raw
```

`--raw` can produce a very large response containing complete article content and public profile or organization fields returned by DEV. It is intentionally opt-in.

## Credential rules

- Do not put the DEV key in `--json`.
- Do not put the DEV key in the command line.
- Do not edit the key into the downloaded file.
- `--json` is only a request body for DEV endpoints that accept JSON.
- Hosted CivicDataForge, Apify, and MCP interfaces remain keyless and public-only.

## Help

```powershell
node .\civicdataforge-devto-direct.mjs --help
```

Product page: <https://civicdataforge.pages.dev/data/devto-publication-evidence>

