| name | api-key-cli |
|---|---|
| description | Use this skill when your application or CI/CD workflow needs an ArcGIS API key, or when you want to inquire about the properties of an existing API key. |
This repository is the source code fora Node.js ESM CLI for inspecting and managing ArcGIS API keys and related developer credential items. It provides a command-line interface for creating, updating, inspecting, and managing ArcGIS API keys and their associated properties. It also provides a JavaScript ESM module for programmatic access to the same functionality. It follows best practices for handling API keys as described in the documentation at How to use an API key.
Use this skill when you need to:
- implement ArcGIS API Key management creating, updating, inspecting, and managing API keys.
- work on API key inspection, reporting, expiration, privilege, referrer, or account properties.
Do not use this skill for:
- generic JavaScript or Node.js questions that do not depend on this repo.
- browser UI work.
- unrelated ArcGIS SDK usage outside this CLI.
Read these files before making changes:
README.mdfor supported actions, flags, examples, and YAML format.env.samplefor required environment variablesapi-key-attributes.yamlfor the options shape used bygenkeysandupdate
- The project uses ESM with
"type": "module". - Node 22+ should be assumed because the code relies on ESM and global
fetch. - Environment variables can intentionally override CLI args, especially
ARCGIS_TOKENandARCGIS_ITEM_ID.
- Treat
.envandaccount-*.envfiles as sensitive. - Do not print, quote, or copy credentials, passwords, tokens, or API keys into chat output.
- Avoid commands that would echo secrets to the terminal.
- If a task touches authentication or credential flow, describe behavior without exposing values.
All CLI actions are listed in README.md
- Install dependencies:
npm install - Run the CLI:
npm start - Pass action flags through npm:
npm start -- -a inspect -i <itemId> - Show help:
npm start -- --help
0: normal exit90: service error98: authentication error99: invalid parameter