anchor-cli
/anchor-cli
Use when a project has an .anchor.json file or uses the anchor CLI, when an app fails because an environment variable or secret is missing, or when someone asks to read, add, change, compare or export secrets or configuration kept in Anchor, or to log in to Anchor.
Assessment and security
- Files in this package
- 2
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 09.11.2026, without references to retired models or APIs.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
What it does and when to use it
Use when a project has an .anchor.json file or uses the anchor CLI, when an app fails because an environment variable or secret is missing, or when someone asks to read, add, change, compare or export secrets or configuration kept in Anchor, or to log in to Anchor.
Original author description
Use when a project has an .anchor.json file or uses the anchor CLI, when an app fails because an environment variable or secret is missing, or when someone asks to read, add, change, compare or export secrets or configuration kept in Anchor, or to log in to Anchor.
How it works
- Overview
- Before anything
- Quick reference
- Running the app
- Reading
- Writing
- Logging in
- Rationalizations
- Red flags — stop
SKILL.md preview
---
name: anchor-cli
description: Use when a project has an .anchor.json file or uses the anchor CLI, when an app fails because an environment variable or secret is missing, or when someone asks to read, add, change, compare or export secrets or configuration kept in Anchor, or to log in to Anchor.
---
# Using the Anchor CLI
## Overview
Anchor is a self-hosted secrets manager; `anchor` is its CLI. Projects hold environments
(`dev`, `prod`, ...), environments hold folders (`/`, `/api`), folders hold secrets.
**Core rule: secret values and passwords never pass through you.** You work with keys, types and
metadata. Values go from Anchor straight into the app (`anchor run`), or from the person straight
into Anchor (a hidden prompt they answer). Nothing you type, run or print contains one.
**Violating the letter of this rule is violating its spirit.** A value inside a `printf`, a
heredoc, an `echo`, a temp file or a quoted argument is a value you typed.
## Before anything
1. `anchor whoami` — signed in? If it says "Not logged in", go to **Logging in**.
2. Read `.anchor.json` (project, default environment, API URL; it holds no secrets). Target
another environment or folder with `--env prod` / `--path /api` on each command; do not edit
`.anchor.json` for a one-off.
3. Full command list: [references/commands.md](references/commands.md).
## Quick reference
| Task | Do |
|---|---|
| App needs its secrets / "X is not set" | `anchor run -- npm start` (any command after `--`) |
| See what exists | `anchor secrets list` (sensitive values stay hidden) |
| Compare environments | `anchor secrets list --env prod --json` vs `--env staging --json`: keys, types, versions |
| Add or change a value the person has | Give them `anchor secrets set KEY [--env prod]` to run; it prompts with hidden input |
| Value is in a file they already have | `anchor secrets set KEY --from-file path/to/file` |
| Plain config (port, host, flag) | `printf 8080 \| anchor secrets set PORT --type number --no-sensitive` |
| A folder should also get another folder's values (e.g. `/shared`) | `anchor imports add prod:/shared --env prod --path /api`, then `anchor imports list --env prod --path /api` |
| A tool insists on a dotenv file | `anchor export --output .env.local`, only after `git check-ignore -q .env.local` succeeds |
| Not logged in | Ask the person to run `anchor login` (browser approval) |
## Running the app
`anchor run -- <command>` injects the folder's secrets as environment variables, expands
`${KEY}` references, passes the exit code through and writes nothing to disk. Use it for start
scripts, tests, migrations and one-off scripts. Do not "fix" a missing variable by exporting
secrets to `.env`, copying values into a config file, or setting them inline.
## Reading
- `anchor secrets list` shows keys, types, versions, comments and the values of
**non-sensitive** keys. That answers "what's in prod" and "how do prod and staging differ".
- Do not run `--reveal` (`secrets list --reveal`, `secrets get KEY --reveal`), `anchor export`
to stdout, or `secrets get` piped anywhere you can see. Each reveal is audited, and the value
would enter your context and the conversation logs.
- If the person needs a sensitive value, give them the command to run in their own terminal:
`anchor secrets get KEY --env prod --reveal`.
## Writing
The CLI never takes a value as an argument. Pick the source:
1. **The person knows or holds the value** (including one they pasted into the chat): tell them
to run `anchor secrets set KEY --env <env>` themselves (add `--type`, `--no-sensitive` or
`--comment` as needed); it prompts with hidden input. If they pasted it into the chat, say once
that it is now in the chat history and that rotating it is safest.
2. **The value is in a file** (a PEM key, a JSON credential): `--from-file <path>` (`--type pem`
or `--type json`).
3. **Non-sensitive config you are allowed to see** (a port, a hostname, a feature flag):
`printf '%s' 'value' | anchor secrets set KEY --no-sensitive [--type number|boolean|json|list]`.
New secrets are sensitive by default; `--no-sensitive` is only for values that are fine to show
anyone with read access. `--type` (`string`, `json`, `pem`, `number`, `boolean`, `list`) is
checked before sending. Confirm a write with `anchor secrets list` or `secrets history KEY`, never
by reading the value back. Deleting or rolling back asks for confirmation; pass `--yes` only when
the person asked for that exact change.
## Logging in
Never sign in for the person and never handle their password. Ask them to run `anchor login`
(add `--no-browser` on a remote machine); they approve the code on the Anchor dashboard. Do not
use `--with-password`, `--email` or `--password-stdin` with a password from the chat. If they sent
a password, do not use it; suggest changing it, since it is now in the chat history. CI and
servers use a service token in `ANCHOR_TOKEN` instead (see the anchor-ci skill).
## Rationalizations
| Excuse | Reality |
|---|---|
| "Piping through stdin keeps it out of `ps`" | The command text is still in your transcript, tool logs and shell history. The value is in the command you wrote. |
| "The value is already in the chat, one more copy changes nothing" | Each command adds copies in more logs, with a key name attached. Hand the person the prompt instead. |
| "They asked me to do it quickly / they're busy" | Running `anchor secrets set KEY` themselves takes ten seconds; leaked keys take days. |
| "If stdin doesn't work I'll pass it as an argument" | `set` takes stdin, a prompt or a file; never an argument. |
| "`--password-stdin` is the non-interactive way" | It exists for the person's own scripts. You use `anchor login` and the person approves. |
| "They want to see everything" | `secrets list` is everything you show. Values stay with the person. |
| "I'll export to .env just to unblock them" | `anchor run -- <cmd>` unblocks them without a file. |
## Red flags — stop
- A secret value or password appears anywhere in a command you are about to run
- You are about to add `--reveal`, or run `anchor export` without `--output` to a gitignored file
- You are writing secret values into `.env`, a config file or a script
- You are about to log in on the person's behalf
**Any of these: stop, and give the person the command to run themselves.**
Files in this package (2)
- SKILL.md 6 KB
- references/commands.md 5 KB
Versions
The database has no other skills named anchor-cli.
Database snapshot: 13.11.2026 · package version 838abae31193 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100anchor-migrate
Use when moving secrets or configuration from .env files, YAML or JSON config files, or hard-coded settings into Anchor, when someone asks to get rid of .env files or to take secrets out of a committed config file, or when switching a project's start scripts to anchor run. - 100anchor-ci
Use when a CI pipeline, deploy job, GitHub Actions workflow, cron job, server or other machine needs secrets from Anchor, when creating or rotating an Anchor service token, or when ANCHOR_TOKEN or ANCHOR_API_URL appear in CI configuration. - 100anchor-text-analyzer
Anchor Text Analyzer. Use when working with links with anchor text and destinations. - 90env-change-verification
An environment variable change is not live until the artifact that reads it is rebuilt, redeployed, or re-reads it — and a wrong-but-present value fails silently. Know for each variable whether it is baked at build time or read at request time. Triggers when adding or editing… - 85anchor
Use when the user asks about their dashboard, "Anchor", what is running, task or download progress, pending or planned work, or wants something added to / moved on their board. Also use to record planned multi-step work and long downloads so they show up in the user's live dashboard at {{URL}}. - 95glab-variable
Manage CI/CD variables at project and group level including create, update, import, export, list, and delete operations. Use when setting environment variables for pipelines, managing secrets, migrating variables, or configuring CI/CD variables. Triggers on variable, CI…