Skip to content

feat(cli): add registries create command#2874

Open
manawenuz wants to merge 6 commits into
getarcaneapp:mainfrom
manawenuz:feat/registries-create
Open

feat(cli): add registries create command#2874
manawenuz wants to merge 6 commits into
getarcaneapp:mainfrom
manawenuz:feat/registries-create

Conversation

@manawenuz

@manawenuz manawenuz commented Jun 8, 2026

Copy link
Copy Markdown

Summary

  • Adds arcane-cli registries create — the only CRUD operation missing from the registries subcommand
  • Fixes a silent bug in registries update: --password was sending {"password": ...} but the API expects {"token": ...}, so token updates via CLI were being silently ignored
  • Updates skills/arcane-cli/SKILL.md with the new command, full flag table, and examples for ghcr.io, Docker Hub, self-hosted HTTP registries, and AWS ECR

New command

arcane-cli registries create --url <registry-host> [flags]
Flag Default Description
--url (required) Registry host, e.g. ghcr.io, docker.io
--username Login username
--token Password or personal access token
--registry-type generic generic or ecr
--insecure false Allow plain HTTP
--disabled false Create in disabled state
--description Human-readable label
--aws-access-key-id ECR only
--aws-secret-access-key ECR only
--aws-region ECR only

Bug fix

registries update --password was serialising to {"password": "..."} but UpdateContainerRegistryRequest expects {"token": "..."}. Fixed to send the correct key; the flag name --password is preserved for backwards compatibility.

Test plan

  • arcane-cli registries create --url ghcr.io --username user --token ghp_xxx creates a registry and prints details
  • arcane-cli registries create --url ghcr.io --username user --token ghp_xxx --json returns JSON
  • arcane-cli registries create (no --url) returns a usage error
  • arcane-cli registries update <id> --password newtoken correctly updates the token
  • arcane-cli registries create --registry-type ecr --aws-access-key-id ... --aws-secret-access-key ... --aws-region us-east-1 --url <ecr-url> creates an ECR registry

🤖 Generated with Claude Code

Disclaimer Greptiles Reviews use AI, make sure to check over its work.

To better help train Greptile on our codebase, if the comment is useful and valid Like the comment, if its not helpful or invalid Dislike

To have Greptile Re-Review the changes, mention greptileai.

Greptile Summary

This PR adds the missing registries create subcommand and fixes a silent bug where registries update --password was sending {"password": ...} instead of the {"token": ...} key the API expects, meaning token updates were silently dropped.

  • registries create is added with full flag support (--url, --token, --username, --registry-type, --insecure, --disabled, --description, and AWS ECR fields); --url is marked required.
  • registries update --password now correctly maps to {"token": ...} in the request body, matching UpdateContainerRegistryRequest.
  • skills/arcane-cli/SKILL.md is added to document the full CLI command surface, including examples for ghcr.io, Docker Hub, self-hosted, and AWS ECR.

Confidence Score: 3/5

Safe to merge after fixing the --disabled flag inversion in createCmd.

The createCmd has a flag-handling inversion: it tests cmd.Flags().Changed("disabled") instead of reading registryCreateDisabled directly. A user who explicitly passes --disabled=false will get a registry created in the disabled state — the opposite of their intent. While unusual input, the new command path actively produces wrong data for it.

cli/pkg/registries/cmd.go — specifically the enabled field construction in createCmd.

Fix All in Codex Fix All in Claude Code

Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
cli/pkg/registries/cmd.go:248-252
The `enabled` logic uses `cmd.Flags().Changed("disabled")` rather than the flag's actual value. `Changed` returns `true` whenever the flag is explicitly provided, regardless of its value — so `--disabled=false` would also match this branch and create the registry in a *disabled* state, the opposite of what the user requested. Using the flag value directly avoids this inversion.

```suggestion
		req["enabled"] = !registryCreateDisabled
```

Reviews (1): Last reviewed commit: "fix(cli): always send required fields in..." | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

Siavash Sameni and others added 2 commits June 8, 2026 11:08
Adds a Claude Code / AI agent skill for the arcane-cli under
skills/arcane-cli/SKILL.md. Installable via:

  npx skills add getarcaneapp/arcane@arcane-cli

Covers: all CLI commands, JSON response shapes (wrapped vs flat),
environment discovery, project env file security rules, global flags,
common patterns, and known pitfalls (API key permissions, env ID usage).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds `arcane-cli registries create` with flags for url, username,
token, registry-type (generic/ecr), insecure, disabled, description,
and AWS ECR credentials.

Also fixes a bug in `registries update` where --password was sending
the wrong JSON key ("password" instead of "token"), causing token
updates to be silently ignored.

Updates skills/arcane-cli/SKILL.md with the new command, flag table,
and examples for ghcr.io, Docker Hub, self-hosted, and ECR.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@manawenuz manawenuz requested a review from a team June 8, 2026 07:26
The Huma validation requires insecure, awsAccessKeyId, awsSecretAccessKey,
and awsRegion to be present in the request body even for generic registries.
Send them unconditionally (empty string / false as defaults).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comment thread cli/pkg/registries/cmd.go
…abled

The update command used cmd.Flags().Changed() with hardcoded true/false,
so '--enabled=false' would still enable and '--disabled=false' would still
disable — the opposite of what was requested. Use the flag values directly
(registryUpdateEnabled / !registryUpdateDisabled); the mutual-exclusion
guard already prevents both flags being set together.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@manawenuz

Copy link
Copy Markdown
Author

@kmendell ready for review when you get a chance — adds the registries create command to the CLI with full flag support (generic, ECR, insecure registries).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can remove this file since i made the updates skills repo for it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants