Repository navigation
feat(cli): lens ext lists, pulls, checks and pushes extension manifests - #563
Merged
Merged
Conversation
`lens ext pull` writes extensions' manifests into a folder, `push` saves the changed ones as new versions and the new ones as extensions, `check` checks them without saving, and `list` lists them (--json for agents). It works on this install's database, as the first admin or --as, or on any Lens server with --url and an API token. Pulled files carry `version: N`, so a push won't save over changes made in Lens since, and a pull won't overwrite a file's own changes, without --force. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FbmJ86QaV2YwusjgNowpf8
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FbmJ86QaV2YwusjgNowpf8
…-k05fsx # Conflicts: # CHANGELOG.md
…-k05fsx # Conflicts: # CHANGELOG.md
…#400 is released Main's requirements check fails since v0.15.0 released #400 while the README still listed it In progress. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FbmJ86QaV2YwusjgNowpf8
Owner
Author
|
Clicks failed on the phone only, in Generated by Claude Code |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FbmJ86QaV2YwusjgNowpf8
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FbmJ86QaV2YwusjgNowpf8
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FbmJ86QaV2YwusjgNowpf8
21 of 23 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Adeel · project thread
Description
Before: extensions' manifests went in and out one at a time, through the Extensions page or
POST /api/v1/extensions, so keeping them in a git repository meant copying each by hand.After:
lens extkeeps them as files in a folder.With no address it works on this install's database as the first admin (or
--as), like the otherlenscommands; with--urland--token(orLENS_URL,LENS_TOKEN) it works on any Lens server through the existing/api/v1/extensionsroutes.How:
app/cli_ext.pyhas two thin backends with the same six calls (list, get, check, create, save, share), one over the API withurllib, one callingextensions.pydirectly and auditing as the API does. A pulled file carriesversion: N(whichcheck_manifestalready ignores). A push refuses when the extension changed in Lens since that version, and a pull refuses to overwrite a file changed since it was pulled, each until--force. A push compares the file with Lens's manifest as read and, if they differ in form, as the check tidies both, so a hand-written file with defaults left out saves no empty versions. Two files with one name are both refused.visibilityandnamespacesin a file are applied on push; without them sharing is untouched.Motivation and Context
The last open item of the assistant extensions work (DEVLOG 2026-10-03: "
lens extCLI (push/pull manifests)").Types of changes
!in the title)Checklist:
make hookschecks it on commit).tests/api/test_cli_ext.py(this install's database, and a real HTTP server with editor and viewer tokens).docs/accordingly: docs/assistant.md "Manifests as files:lens ext", docs/get-started.md, README, docs/requirements.md.changelog.d/lens-ext.md.Done questions (AGENTS.md)
ci/local-ci.sh: pre-commit, title, backend) passed on the first commit.lens ext list --json, exit codes on every command, and everything it does is the existing API.docker compose exec backend lens ext …works with no token; a remote server needs only an API token.lenscommand has, audited withvia: cli. File names come from extension names ([a-z][a-z0-9_]), so a pull can't write outside its folder. No new attack surface for threat-model.md.--force; defaults unchanged.make openapi).••••.parse_manifest,check_manifest,to_manifest,save_versionand the existing routes; nothing reimplemented.🤖 Generated with Claude Code
https://claude.ai/code/session_01FbmJ86QaV2YwusjgNowpf8