cli: add --enabled/--disabled flag to hive set commands#296
Merged
Conversation
Hive records are created disabled by default, which surprises operators (and LLMs) who run e.g. `secret set` and expect the record to be live. Add an `--enabled/--disabled` flag to the create/update commands so a record can be created and enabled in one shot: limacharlie secret set --key foo --input-file foo.yaml --enabled limacharlie lookup set --key bar --input-file bar.yaml --enabled limacharlie hive set --hive-name lookup --key baz --input-file f --enabled limacharlie dr set --key my-rule --input-file rule.yaml --enabled When passed, the flag overrides any usr_mtd.enabled value in the input file. When omitted, behavior is unchanged: the input file's value (if any) is preserved, otherwise the server-side default applies. The change is scoped to the three entry points that create hive records: - `_hive_shortcut.py` — covers secret, lookup, playbook, ai-skill, cloud-adapter, external-adapter, fp, note, sop - `hive.py` — generic `hive set` - `dr.py` — `dr set` Help text on each updated to call out the disabled-by-default behavior and the new flag. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2 tasks
maximelb
added a commit
to refractionPOINT/lc-ai
that referenced
this pull request
May 21, 2026
Surfaces a common foot-gun where operators (and LLMs) call e.g. `secret set` or `lookup set` and expect the record to be live, then spend time debugging why nothing happens — the record was created disabled and silently does nothing. Adds a top-level "Hive Records Are Disabled By Default" section to both lc-essentials and lc-fundamentals AUTOINIT.md, listing the affected resources and the three create-and-enable paths in order of preference: 1. --enabled on the `set` command (one-shot, preferred) 2. usr_mtd.enabled: true in the input file 3. matching `enable` subcommand after the `set` The --enabled flag itself is being added to python-limacharlie in refractionPOINT/python-limacharlie#296. Until that lands, paths 2 and 3 still apply. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3 tasks
maximelb
added a commit
to refractionPOINT/documentation
that referenced
this pull request
May 21, 2026
Every new Hive record (D&R rules, FP rules, secrets, lookups, YARA sources, cloud sensors, AI skills, playbooks, …) is created disabled unless usr_mtd.enabled is explicitly set to true. Several create/update examples in the docs omit this and would silently produce a disabled record — most painful for secrets and lookups, where the record is stored normally but its consumers (outputs, D&R rules) skip it. - config-hive/index.md: new top-level admonition listing the three create-and-enable paths (CLI --enabled flag, usr_mtd.enabled in body, SDK enabled=True / Enabled: &enabled). - secrets.md and lookups.md: Create/Update examples now set enabled across REST, Python, Go, and CLI tabs. - dr-rules.md, false-positives.md, detection-response/index.md, writing-testing-rules.md tutorial: CLI examples updated to include --enabled. (The REST/Python/Go tabs in those docs already set it.) - yara.md: Python SDK example now passes enabled=True. - python-sdk.md: "Create or update a rule" snippet now sets enabled. - skills.md: CLI ai-skill set examples and Python SDK example now enable the skill at creation. The CLI --enabled / --disabled flag referenced here is being added to python-limacharlie in refractionPOINT/python-limacharlie#296. Until that lands, the SDK/REST patterns still apply, and the CLI path remains "set + enable" two-step. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Hive records are created disabled by default —
secret,lookup,playbook,ai_skill,cloud_sensor,external_adapter,fp,sop,dr-general, etc. Operators (and LLMs) routinely runsecret set(or similar) and expect the record to be live, then can't figure out why nothing happens. This adds an--enabled/--disabledflag to the three entry points that create hive records so the record can be created and enabled in one shot:When passed, the flag overrides any
usr_mtd.enabledvalue in the input file. When omitted, behavior is unchanged (input file value if any, else server-side default).Scope
Three entry points cover every shortcut:
limacharlie/commands/_hive_shortcut.py— the factory used bysecret,lookup,playbook,ai-skill,cloud-adapter,external-adapter,fp,note,soplimacharlie/commands/hive.py— generichive setlimacharlie/commands/dr.py—dr setHelp text on each updated to call out the disabled-by-default behavior and the new flag.
Test plan
set,hive set, anddr setcovering:--enabledcreates enabled,--disabledcreates disabled, flag overrides input-fileusr_mtd.enabled, omission leavesenabledunset, no-flag preserves input-file valuecli-v2(toon/search-checkpoint/click-compat) are unrelated and unchanged by this PR🤖 Generated with Claude Code