Skip to content

feat: name-based IPNS keys, republish command, upgrade ipfs-sdk to v0.1.44#60

Merged
pcfreak30 merged 1 commit into
developfrom
feat/ipns-name-based-republish
May 20, 2026
Merged

feat: name-based IPNS keys, republish command, upgrade ipfs-sdk to v0.1.44#60
pcfreak30 merged 1 commit into
developfrom
feat/ipns-name-based-republish

Conversation

@pcfreak30
Copy link
Copy Markdown
Member

@pcfreak30 pcfreak30 commented May 20, 2026

  • Upgrade go.lumeweb.com/ipfs-sdk from v0.1.43 to v0.1.44
  • Rewrite IPNS key commands (get/delete/publish) to accept key names
    or numeric IDs, resolving names via ListKeys like websites pattern
  • Replace --key-id (int) flag with --key-name (string) on publish
  • Add 'pinner ipns republish ' command using SDK's
    per-key republish API (returns IPNSRepublishResponse with count/message)
  • Add resolveIPNSKeyID helper for name-to-ID resolution
  • Add initIPNSService DRY helper matching initWebsitesService pattern
  • Update IPNSService interface: Publish takes keyName string,
    Republish returns (*IPNSRepublishResponse, error)
  • Update all IPNS tests for new signatures and add republish test suite

This PR introduces name-based IPNS key references and adds a new republish command to the IPNS CLI.

Key changes:

  • Name-based key resolution: IPNS keys can now be referenced by their human-readable name (e.g., my-key) interchangeably with numeric IDs across all IPNS commands (get, delete, publish, republish). A new resolveIPNSKeyID function handles resolution by attempting numeric parsing first, then falling back to a name lookup against the key list.

  • New ipns republish command: Adds a pinner ipns republish <key-name-or-id> command that refreshes IPNS records on the network, extending their validity. Supports both JSON and text output formats.

  • --key-name replaces --key-id in publish: The ipns publish command flag changed from --key-id (integer) to --key-name (string), accepting either a key name or numeric ID string.

  • Service refactoring: Extracted a shared initIPNSService helper to eliminate duplicated service initialization across command handlers. The IPNSService.Publish signature now accepts keyName string instead of keyId int, with internal resolution to the numeric ID. A new Republish method was added to the IPNSService interface.

  • Documentation and test updates: All command descriptions, examples, and argument usage strings were updated to reflect name-based key usage. Tests were updated accordingly, and new tests were added for the republish command.

….1.44

- Upgrade go.lumeweb.com/ipfs-sdk from v0.1.43 to v0.1.44
- Rewrite IPNS key commands (get/delete/publish) to accept key names
  or numeric IDs, resolving names via ListKeys like websites pattern
- Replace --key-id (int) flag with --key-name (string) on publish
- Add 'pinner ipns republish <key-name-or-id>' command using SDK's
  per-key republish API (returns IPNSRepublishResponse with count/message)
- Add resolveIPNSKeyID helper for name-to-ID resolution
- Add initIPNSService DRY helper matching initWebsitesService pattern
- Update IPNSService interface: Publish takes keyName string,
  Republish returns (*IPNSRepublishResponse, error)
- Update all IPNS tests for new signatures and add republish test suite
@kody-ai
Copy link
Copy Markdown

kody-ai Bot commented May 20, 2026

Kody Review Complete

Great news! 🎉
No issues were found that match your current review configurations.

Keep up the excellent work! 🚀

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Validate Business Logic: Ask Kody to validate your code against business rules by adding a comment with the @kody -v business-logic command.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug
Performance
Security
Business Logic

Access your configuration settings here.

@github-actions
Copy link
Copy Markdown

Code Coverage Report

Total Coverage: 35.2%

Generated from commit: d48fb3d
Repository: LumeWeb/pinner-cli

@pcfreak30 pcfreak30 merged commit bb1d73d into develop May 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant