repo stringlengths 5 53 | pr_number int32 1 321k | task_type stringclasses 2
values | issue_text stringlengths 0 81.2k | pr_title stringlengths 1 319 | pr_body stringlengths 0 105k | base_sha stringlengths 40 40 | head_sha stringlengths 40 40 | gold_diff stringlengths 0 202M | changed_files listlengths 0 100 | review_threads listlengths 0 100 | test_patch stringlengths 0 23.4M | merged bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
upstash/context7 | 2,739 | issue_to_patch | ci: update GitHub Actions to current major versions | Combines the two open GitHub Actions update PRs into one. CI-only change; no application code touched.
- \`actions/setup-node\` v4 → v6 — test, release, canary-release, mcp-registry
- \`actions/github-script\` v7 → v8 — changeset-check
- \`aws-actions/configure-aws-credentials\` v5 → v6 — ecr-deploy
Each major bump's... | dbc4c78cca7771cdae4e31e614d0adb0f05c7b8b | dc09ec05c3e67a0eed160d49c9b759453b496e52 | diff --git a/.github/workflows/canary-release.yml b/.github/workflows/canary-release.yml
index 48b9d5964..daa173a27 100644
--- a/.github/workflows/canary-release.yml
+++ b/.github/workflows/canary-release.yml
@@ -21,7 +21,7 @@ jobs:
ref: ${{ inputs.branch || github.ref }}
- name: Setup Node
- ... | [
".github/workflows/canary-release.yml",
".github/workflows/changeset-check.yml",
".github/workflows/ecr-deploy.yml",
".github/workflows/mcp-registry.yml",
".github/workflows/release.yml",
".github/workflows/test.yml"
] | [] | true | ||
upstash/context7 | 2,737 | issue_to_patch | chore(deps): combined dependabot dependency updates | Combines the safe dependabot dependency bumps into one PR. Verified with build, typecheck, lint, and tests all passing.
- `@modelcontextprotocol/sdk` 1.25.2 → 1.29.0 (mcp) — #2709
- `undici` 6.26.0 → 8.3.0 (mcp) — #2705
- `zod` 4.3.5 → 4.4.3 (mcp, tools-ai-sdk) — #2706
- `commander` 13.1.0 → 15.0.0 (cli) — #2704
- `or... | f327589a9a1105cddbe4ca98dbd1fd3688ece247 | d8519a9a754123fe270942ca3773dfeb3e3ca27f | diff --git a/.changeset/bump-cli-runtime-deps.md b/.changeset/bump-cli-runtime-deps.md
new file mode 100644
index 000000000..9414c9f1b
--- /dev/null
+++ b/.changeset/bump-cli-runtime-deps.md
@@ -0,0 +1,5 @@
+---
+"ctx7": patch
+---
+
+Bump runtime dependencies: `commander` 13 -> 15 and `ora` 9.0 -> 9.4.
diff --git a/.c... | [
".changeset/bump-cli-runtime-deps.md",
".changeset/bump-mcp-runtime-deps.md",
"packages/cli/package.json",
"packages/mcp/package.json",
"packages/pi/package.json",
"packages/sdk/package.json",
"packages/tools-ai-sdk/package.json",
"pnpm-lock.yaml"
] | [] | true | ||
upstash/context7 | 2,736 | issue_to_patch | fix: update references from Windsurf to Devin Desktop in documentation and templates | 428af3e06753d92d8ec5879de097868232d8bef3 | db6605fcd26cca2de6848a86c5bc3248f528ed58 | diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index ae73672e7..c265cc33e 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -17,7 +17,7 @@ body:
- Cursor
- Claude Desktop
- Claude Code
- - Winds... | [
".github/ISSUE_TEMPLATE/bug_report.yml",
"docs/howto/api-keys.mdx",
"docs/openapi.json",
"docs/resources/all-clients.mdx",
"i18n/README.ar.md",
"i18n/README.de.md",
"i18n/README.es.md",
"i18n/README.fr.md",
"i18n/README.id-ID.md",
"i18n/README.it.md",
"i18n/README.ja.md",
"i18n/README.pt-BR.md... | [] | true | |||
upstash/context7 | 2,732 | issue_to_patch | Bug: SDK HttpClient throws raw SyntaxError instead of Context7Error on non-JSON error responses
## Bug Description
The SDK's `HttpClient.request()` method calls `res.json()` without a try/catch in the error-response path. When the server returns a non-JSON error body (HTML 502 gateway page, plain-text 429, Cloudflare... | fix(sdk): avoid raw SyntaxError on non-JSON error responses | Wraps the error-path `res.json()` in `HttpClient.request()` so non-JSON error bodies always surface as a typed `Context7Error`.
- `res.json()` in the `!res.ok` branch now uses `.catch(() => ({}))`, falling back to `res.statusText` when the body isn't JSON.
- Non-JSON infra errors (HTML 502s, plain-text 429s, Cloudflar... | c03bc9c95b48bf672c5c8b7c29cfcc14f38fe6f6 | 01e04fcbacf38d7928618b552243cac9536104a3 | diff --git a/.changeset/sdk-non-json-error-response.md b/.changeset/sdk-non-json-error-response.md
new file mode 100644
index 000000000..96cd84f56
--- /dev/null
+++ b/.changeset/sdk-non-json-error-response.md
@@ -0,0 +1,5 @@
+---
+"@upstash/context7-sdk": patch
+---
+
+Avoid throwing a raw `SyntaxError` when the server... | [
".changeset/sdk-non-json-error-response.md",
"packages/cli/src/__tests__/auth-utils.test.ts",
"packages/cli/src/__tests__/storage-paths.test.ts",
"packages/sdk/src/http/index.test.ts",
"packages/sdk/src/http/index.ts"
] | [] | diff --git a/packages/cli/src/__tests__/auth-utils.test.ts b/packages/cli/src/__tests__/auth-utils.test.ts
index f1986a714..651408472 100644
--- a/packages/cli/src/__tests__/auth-utils.test.ts
+++ b/packages/cli/src/__tests__/auth-utils.test.ts
@@ -1,7 +1,5 @@
import { describe, test, expect, vi, beforeEach, afterEach... | true |
upstash/context7 | 2,733 | issue_to_patch | Git Bash on Windows interprets /owner/repo as file path instead of library ID
## Bug Report
When using `ctx7 docs /facebook/react "useEffect examples"` in Git Bash (used by Claude Code), the CLI incorrectly rejects the command with:
```
✖ Invalid library ID: "C:/Program Files/Git/facebook/react"
Expected format: /ow... | fix(cli): recover library ID mangled by Git Bash on Windows | Fixes #2277.
Git Bash on Windows POSIX-converts a leading-slash argument like `/facebook/react` into a Windows path under the Git install dir (`C:/Program Files/Git/facebook/react`) before the CLI runs, so `ctx7 docs` rejected it as an invalid library ID. This mainly hit users running ctx7 through Claude Code.
- Add ... | 88c5b29e99743c2ca9f466b4b84694cf0bf693af | 3c07f012b82bcc09c3fbcffd498a4a6a774898f4 | diff --git a/.changeset/git-bash-library-id.md b/.changeset/git-bash-library-id.md
new file mode 100644
index 00000000..0a185cd0
--- /dev/null
+++ b/.changeset/git-bash-library-id.md
@@ -0,0 +1,5 @@
+---
+"ctx7": patch
+---
+
+Recover Context7 library IDs that Git Bash mangles on Windows. Git Bash rewrites a leading-sl... | [
".changeset/git-bash-library-id.md",
"packages/cli/src/__tests__/library-id.test.ts",
"packages/cli/src/commands/docs.ts",
"packages/cli/src/utils/library-id.ts"
] | [] | diff --git a/packages/cli/src/__tests__/library-id.test.ts b/packages/cli/src/__tests__/library-id.test.ts
new file mode 100644
index 00000000..13f75d2e
--- /dev/null
+++ b/packages/cli/src/__tests__/library-id.test.ts
@@ -0,0 +1,44 @@
+import { describe, expect, test } from "vitest";
+
+import { recoverLibraryId } fro... | true |
upstash/context7 | 2,314 | issue_to_patch | feat(cli): add -v short flag for version command | Hi Context7 team! 👋
This is a small UX improvement that adds `-v` as a short alias for the `--version` flag.
## What's Changed
- Added "-v, --version" option to the CLI using Commander.js
- Follows common CLI conventions (npm, node, yarn, etc. all support -v)
## Before
```bash
$ ctx7 --version # ✓ works
$ ctx7 -v ... | c03bc9c95b48bf672c5c8b7c29cfcc14f38fe6f6 | fc4bb521ad20c0b789b12093179485b480292493 | diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts
index 409929d4..2544b9ff 100644
--- a/packages/cli/src/index.ts
+++ b/packages/cli/src/index.ts
@@ -20,7 +20,7 @@ const program = new Command();
program
.name("ctx7")
.description("Context7 CLI - Fetch documentation context and configure Context7... | [
"packages/cli/src/index.ts"
] | [] | true | ||
upstash/context7 | 2,678 | issue_to_patch | Use XDG-compliant directories for storing Context7 files
## Description
Context7 currently stores CLI state and credentials in `~/.context7/`. This doesn't follow the XDG Base Directory Specification, which many Linux/Unix tools adhere to.
## Proposed Solution
Update the CLI to use XDG-compliant directories:
- **C... | fix(cli): use XDG dirs for context files | Fixes #2638.
Summary:
- Moves CLI credentials from `~/.context7/credentials.json` to `$XDG_CONFIG_HOME/context7/credentials.json`, defaulting to `~/.config/context7/credentials.json`.
- Moves updater state from `~/.context7/cli-state.json` to `$XDG_STATE_HOME/context7/cli-state.json`, defaulting to `~/.local/state/con... | fcdc36e2459ab0e4512f3dd108a2bbb0b5165720 | 4220476b4447e78cee8c6674f9feff21d8270f12 | diff --git a/.changeset/xdg-context7-dirs.md b/.changeset/xdg-context7-dirs.md
new file mode 100644
index 00000000..da9bf821
--- /dev/null
+++ b/.changeset/xdg-context7-dirs.md
@@ -0,0 +1,5 @@
+---
+"ctx7": patch
+---
+
+Store CLI files in XDG Base Directory locations instead of `~/.context7`. Credentials move to `$XDG... | [
".changeset/xdg-context7-dirs.md",
"packages/cli/src/__tests__/auth-utils.test.ts",
"packages/cli/src/__tests__/storage-paths.test.ts",
"packages/cli/src/__tests__/update-check.test.ts",
"packages/cli/src/commands/generate.ts",
"packages/cli/src/utils/auth.ts",
"packages/cli/src/utils/storage-paths.ts",... | [] | diff --git a/packages/cli/src/__tests__/auth-utils.test.ts b/packages/cli/src/__tests__/auth-utils.test.ts
index 6b7080c1..f1986a71 100644
--- a/packages/cli/src/__tests__/auth-utils.test.ts
+++ b/packages/cli/src/__tests__/auth-utils.test.ts
@@ -9,6 +9,8 @@ vi.mock("fs", () => {
writeFileSync: vi.fn(),
readF... | true |
upstash/context7 | 2,534 | issue_to_patch | fix(mcp): add no-op prompts/list and resources/list handlers | ## Summary
Closes [CTX7-1604] / #2527.
Some MCP clients (e.g. opencode) call `prompts/list` and `resources/list` unconditionally and treat `-32601 Method not found` as fatal. Declare empty `prompts` / `resources` capabilities and register no-op handlers so those clients can load the server.
## Test plan
- [x] `pnpm... | 7dde3382b0223ed3022cf89542b23b95b4ea532e | 62ad958fd9adf8d7f3129df2e11b76d569d89402 | diff --git a/.changeset/ctx7-1604-prompts-resources-handlers.md b/.changeset/ctx7-1604-prompts-resources-handlers.md
new file mode 100644
index 000000000..b15752fef
--- /dev/null
+++ b/.changeset/ctx7-1604-prompts-resources-handlers.md
@@ -0,0 +1,5 @@
+---
+"@upstash/context7-mcp": patch
+---
+
+Advertise empty `prompt... | [
".changeset/ctx7-1604-prompts-resources-handlers.md",
"packages/mcp/src/index.ts"
] | [] | true | ||
upstash/context7 | 2,724 | issue_to_patch | docs: add Policies and Rules How To pages | ## Summary
Adds the two How To page files that the nav (`docs/docs.json`) already references but that were missing from the repo:
- **`howto/policies.mdx`** — documents the dashboard **Policies** tab: Source Type Access (public/connected source toggles) and Library Filters (Filter by Quality vs Select Manually, plus ... | 0a6ecdcaf2bf802bdf22db9268f068a334b4086d | 4bffd9dc9b66d278b200ce0759462d9ea179cc23 | diff --git a/docs/howto/policies.mdx b/docs/howto/policies.mdx
new file mode 100644
index 00000000..6cf7deea
--- /dev/null
+++ b/docs/howto/policies.mdx
@@ -0,0 +1,62 @@
+---
+title: Policies
+description: Control which sources and libraries your teamspace can access
+---
+
+Policies let you control exactly which docum... | [
"docs/howto/policies.mdx",
"docs/howto/rules.mdx"
] | [] | true | ||
upstash/context7 | 2,658 | issue_to_patch | [Feature]: Add --json flag to ctx7 skills list for machine-parseable output
## Problem Description
The `ctx7 skills list` command only outputs human-readable formatted text. When integrating ctx7 into scripts or CI pipelines, there is no way to programmatically parse the list of installed skills.
## Proposed Solutio... | Add JSON output for skills list | Fixes #2657.
Adds a --json option to ctx7 skills list so installed skills can be read by scripts.
Checks:
- pnpm --filter ctx7 exec vitest run src/__tests__/skill-list.test.ts
- pnpm --filter ctx7 run typecheck
- pnpm --filter ctx7 exec prettier --check src/commands/skill.ts src/types.ts src/__tests__/skill-list.test... | 34fda7d9b834cb0362799012bb75155220fb3267 | 44a603fcdfd7fd93298258716fedb3a477ff1268 | diff --git a/.changeset/skills-list-json.md b/.changeset/skills-list-json.md
new file mode 100644
index 000000000..ba78f904a
--- /dev/null
+++ b/.changeset/skills-list-json.md
@@ -0,0 +1,5 @@
+---
+"ctx7": patch
+---
+
+Add `--json` flag to `ctx7 skills list` for machine-parseable output. Emits `{ skills: [{ name, path... | [
".changeset/skills-list-json.md",
"packages/cli/src/__tests__/skill-list.test.ts",
"packages/cli/src/commands/skill.ts",
"packages/cli/src/types.ts"
] | [] | diff --git a/packages/cli/src/__tests__/skill-list.test.ts b/packages/cli/src/__tests__/skill-list.test.ts
new file mode 100644
index 000000000..c622141a7
--- /dev/null
+++ b/packages/cli/src/__tests__/skill-list.test.ts
@@ -0,0 +1,75 @@
+import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";
+impo... | true |
upstash/context7 | 2,699 | issue_to_patch | docs(azure-apim): post-deploy updates (Settings tab, smoke test, etc.) | Brings the Azure APIM guide in line with what shipped to prod.
- Dashboard path moved from Overview tab to a conditional Settings tab — updated Part 4 and troubleshooting.
- New note: Remove on the Microsoft Entra ID card cascade-deletes provisioned users.
- New note: each MCP API audience can only be claimed by one t... | 801e112a134c47769ce5e77045b1f263d15810ab | b58648826bbb7c2e0c14187cffab8e75be0d9f00 | diff --git a/docs/enterprise/azure-apim.mdx b/docs/enterprise/azure-apim.mdx
index d91288bcc..786904600 100644
--- a/docs/enterprise/azure-apim.mdx
+++ b/docs/enterprise/azure-apim.mdx
@@ -337,10 +337,10 @@ An owner or admin of the teamspace configures both from the dashboard.
### Step 1: Configure the tenant
1. Si... | [
"docs/enterprise/azure-apim.mdx"
] | [] | true | ||
upstash/context7 | 2,721 | issue_to_patch | chore(release): version packages | This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR wil... | ea91d7dc75d76ad4ba2e40162caeaf9776fdbd1d | c21df71bd1c6ace10d0c5bd8d330573b2222a630 | diff --git a/.changeset/cli-device-flow-default.md b/.changeset/cli-device-flow-default.md
deleted file mode 100644
index cbe15f782..000000000
--- a/.changeset/cli-device-flow-default.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"ctx7": patch
----
-
-`ctx7 login` now always uses the device-code flow. The localhost-callback p... | [
".changeset/cli-device-flow-default.md",
"packages/cli/CHANGELOG.md",
"packages/cli/package.json"
] | [] | true | ||
upstash/context7 | 2,720 | issue_to_patch | feat(cli): device-code flow is now the default for ctx7 login | ## Summary
After shipping 0.5.0 we realized the auto-detection heuristic (\`SSH_CONNECTION\` / \`\$DISPLAY\`) was the wrong call — local users on macOS / Linux still saw the broken localhost-callback flow because the heuristic didn't fire for them. The right answer is to make device flow the only flow.
- \`performLog... | 22a6089546c3521754fc39451537f39a9e5a364b | e7f08d6a0cff5209cb89c4d49e1eba08ebd633a4 | diff --git a/.changeset/cli-device-flow-default.md b/.changeset/cli-device-flow-default.md
new file mode 100644
index 000000000..cbe15f782
--- /dev/null
+++ b/.changeset/cli-device-flow-default.md
@@ -0,0 +1,5 @@
+---
+"ctx7": patch
+---
+
+`ctx7 login` now always uses the device-code flow. The localhost-callback path ... | [
".changeset/cli-device-flow-default.md",
"packages/cli/src/__tests__/auth-commands.test.ts",
"packages/cli/src/__tests__/auth-utils.test.ts",
"packages/cli/src/commands/auth.ts",
"packages/cli/src/utils/auth.ts"
] | [] | diff --git a/packages/cli/src/__tests__/auth-commands.test.ts b/packages/cli/src/__tests__/auth-commands.test.ts
index e124e4a08..9c7e81b34 100644
--- a/packages/cli/src/__tests__/auth-commands.test.ts
+++ b/packages/cli/src/__tests__/auth-commands.test.ts
@@ -4,12 +4,6 @@ import { Command } from "commander";
const mo... | true | |
upstash/context7 | 2,719 | issue_to_patch | chore(release): version packages | This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR wil... | 5a180d5b80c153d7295c8aed6f9ad4ae926a2072 | 7ad064759bcfa85c5d7ce826cb539bb2de93b3e1 | diff --git a/.changeset/cli-device-oauth.md b/.changeset/cli-device-oauth.md
deleted file mode 100644
index 141ee9a7c..000000000
--- a/.changeset/cli-device-oauth.md
+++ /dev/null
@@ -1,7 +0,0 @@
----
-"ctx7": minor
----
-
-Add OAuth 2.0 device authorization flow (RFC 8628) for `ctx7 login` and `ctx7 setup`. Required f... | [
".changeset/cli-device-oauth.md",
"packages/cli/CHANGELOG.md",
"packages/cli/package.json"
] | [] | true | ||
upstash/context7 | 2,714 | issue_to_patch | feat(cli): OAuth 2.0 device authorization flow | ## Summary
Fixes the remote-host / headless half of #2693. Adds RFC 8628 device-code login: CLI prints a code + URL and polls a server endpoint, no localhost callback.
- Auto-selected when `SSH_CONNECTION` / `SSH_CLIENT` / `SSH_TTY` is set, or on Linux with no `\$DISPLAY` / `\$WAYLAND_DISPLAY`. Force with `ctx7 login... | c436700959bf0c277aa02c57195b5a24778cf8aa | fba9b66cfcc34b26fd0c9e7647e0658787f12660 | diff --git a/.changeset/cli-device-oauth.md b/.changeset/cli-device-oauth.md
new file mode 100644
index 000000000..141ee9a7c
--- /dev/null
+++ b/.changeset/cli-device-oauth.md
@@ -0,0 +1,7 @@
+---
+"ctx7": minor
+---
+
+Add OAuth 2.0 device authorization flow (RFC 8628) for `ctx7 login` and `ctx7 setup`. Required for h... | [
".changeset/cli-device-oauth.md",
"packages/cli/package.json",
"packages/cli/src/__tests__/auth-commands.test.ts",
"packages/cli/src/__tests__/auth-utils.test.ts",
"packages/cli/src/commands/auth.ts",
"packages/cli/src/utils/auth.ts",
"pnpm-lock.yaml"
] | [] | diff --git a/packages/cli/src/__tests__/auth-commands.test.ts b/packages/cli/src/__tests__/auth-commands.test.ts
index 0358eca75..e124e4a08 100644
--- a/packages/cli/src/__tests__/auth-commands.test.ts
+++ b/packages/cli/src/__tests__/auth-commands.test.ts
@@ -9,6 +9,9 @@ const mockGenerateState = vi.fn();
const mockC... | true | |
upstash/context7 | 2,640 | issue_to_patch | docs: mention Node requirement for ctx7 setup | ## Summary
- mention the Node.js 18+ prerequisite before the npx ctx7 setup command
## Notes
- packages/cli/package.json declares engines.node as >=18, so this makes the quickstart prerequisite visible before install.
## Testing
- Not run, documentation-only change.
| 438b1df235218c6dd66086e9b0d6a5b410f1635e | 60bf2f6db227019659fffa0fb2ecbb366b25fdf9 | diff --git a/README.md b/README.md
index 442058d20..8bd1b5f63 100644
--- a/README.md
+++ b/README.md
@@ -46,7 +46,7 @@ Works in two modes:
> [!NOTE]
> **API Key Recommended**: Get a free API key at [context7.com/dashboard](https://context7.com/dashboard) for higher rate limits.
-Set up Context7 for your coding agen... | [
"README.md"
] | [] | true | ||
upstash/context7 | 2,712 | issue_to_patch | chore(release): version packages | This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR wil... | 268f52f813b0678cf359370dc89952377aac53f4 | ddcc0aac076c80e5b49dfe9c1ec289b82b34d3de | diff --git a/.changeset/cli-antigravity-setup.md b/.changeset/cli-antigravity-setup.md
deleted file mode 100644
index 8ca71b4b6..000000000
--- a/.changeset/cli-antigravity-setup.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"ctx7": patch
----
-
-`ctx7 setup` now properly supports `--antigravity`, installing skills to `.agent/... | [
".changeset/cli-antigravity-setup.md",
".changeset/cli-api-key-mode-prompt.md",
".changeset/great-apples-like.md",
"packages/cli/CHANGELOG.md",
"packages/cli/package.json"
] | [] | true | ||
upstash/context7 | 2,713 | issue_to_patch | fix(cli): --api-key alone no longer forces MCP mode in setup | ## Summary
Fixes part of #2693. `ctx7 setup --api-key <KEY>` (without `--cli`, `--mcp`, or `-y`) was short-circuiting straight to MCP mode, even though `--api-key` is equally valid for CLI + Skills mode (which authenticates the skill download via [resolveCliAuth](packages/cli/src/commands/setup.ts#L171-L187)). Users w... | 2affada9f92dbf09b439d5ec9137129fa5ae3de8 | 53dc18425ce69d3adfa4ebe6418979d36e57084e | diff --git a/.changeset/cli-api-key-mode-prompt.md b/.changeset/cli-api-key-mode-prompt.md
new file mode 100644
index 00000000..f72ee85a
--- /dev/null
+++ b/.changeset/cli-api-key-mode-prompt.md
@@ -0,0 +1,5 @@
+---
+"ctx7": patch
+---
+
+`ctx7 setup --api-key <KEY>` (without `--cli`, `--mcp`, or `-y`) now prompts to c... | [
".changeset/cli-api-key-mode-prompt.md",
"packages/cli/src/commands/setup.ts"
] | [] | true | ||
upstash/context7 | 2,700 | issue_to_patch | [Bug]: setup --cli --universal --project` silently ignores `--universal` and installs to auto-detected agent dir
### MCP Client
Other (specify in description)
### Context7 MCP Version
0.4.4
### Bug Description
When `ctx7 setup` is run with `--cli --universal --project`, the `--universal` target flag is silently o... | fix(cli): wire --antigravity and remove broken --universal in setup | ## Summary
`ctx7 setup` advertised `--universal` and `--antigravity` but neither was wired through `getSelectedAgents`. Passing them silently fell back to auto-detection and wrote to the wrong directory (#2695).
- Removes `--universal` from `setup` entirely.
- Wires `--antigravity` through and adds an Antigravity `Se... | 29edf154d82d503532575a73836135eca225b6f4 | da5fa852ae65dd6f61c16e45a857993b0efbd81f | diff --git a/.changeset/cli-antigravity-setup.md b/.changeset/cli-antigravity-setup.md
new file mode 100644
index 000000000..8ca71b4b6
--- /dev/null
+++ b/.changeset/cli-antigravity-setup.md
@@ -0,0 +1,5 @@
+---
+"ctx7": patch
+---
+
+`ctx7 setup` now properly supports `--antigravity`, installing skills to `.agent/skil... | [
".changeset/cli-antigravity-setup.md",
"packages/cli/src/__tests__/setup.test.ts",
"packages/cli/src/commands/remove.ts",
"packages/cli/src/commands/setup.ts",
"packages/cli/src/setup/agents.ts"
] | [] | diff --git a/packages/cli/src/__tests__/setup.test.ts b/packages/cli/src/__tests__/setup.test.ts
index 6b5c4bd95..dd77ea119 100644
--- a/packages/cli/src/__tests__/setup.test.ts
+++ b/packages/cli/src/__tests__/setup.test.ts
@@ -47,7 +47,7 @@ describe("getRuleContent", () => {
expect(cursor).toContain("---\nalways... | true |
upstash/context7 | 2,711 | issue_to_patch | refactor(cli): update CLI documentation and add deprecation warning to skill commands | eb579860bf7c31427690fdac2d2e1949507e9296 | 48f7ff7abe9c406a145213c01611db01e7995b01 | diff --git a/.changeset/great-apples-like.md b/.changeset/great-apples-like.md
new file mode 100644
index 000000000..12526eb2e
--- /dev/null
+++ b/.changeset/great-apples-like.md
@@ -0,0 +1,5 @@
+---
+"ctx7": patch
+---
+
+Add deprecation warning to skill commands
diff --git a/docs/clients/cli.mdx b/docs/clients/cli.md... | [
".changeset/great-apples-like.md",
"docs/clients/cli.mdx",
"docs/docs.json",
"docs/howto/verification.mdx",
"docs/security/data-safety.mdx",
"packages/cli/README.md",
"packages/cli/package.json",
"packages/cli/src/commands/generate.ts",
"packages/cli/src/commands/skill.ts",
"packages/cli/src/index... | [] | true | |||
upstash/context7 | 2,697 | issue_to_patch | docs: fix verification docs typo | Summary:
- Fixes clear spelling or wording mistakes in documentation.
- Keeps the change text-only with no behavior impact.
Testing:
- `git diff --check`
- `uvx codespell` on the changed files | 7e956e594584db4b1b66a3a4a07781e92b4d7e45 | 8fcb60251ead1bf7540a8c6152fbff88348abde7 | diff --git a/docs/howto/verification.mdx b/docs/howto/verification.mdx
index be2b5b725..7c4f51834 100644
--- a/docs/howto/verification.mdx
+++ b/docs/howto/verification.mdx
@@ -151,7 +151,7 @@ Automatic verification is recalculated daily. If your library no longer meets th
### My library is popular but not verified.... | [
"docs/howto/verification.mdx"
] | [] | true | ||
upstash/context7 | 2,698 | issue_to_patch | chore(release): version packages | This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR wil... | 1fb2d421276f5ee588007a3620f0f397fc6ee816 | f73b1c4cdf7e168e8eb8172a85a8049516fe8647 | diff --git a/.changeset/mcp-multi-tenant-entra.md b/.changeset/mcp-multi-tenant-entra.md
deleted file mode 100644
index 3b984c12d..000000000
--- a/.changeset/mcp-multi-tenant-entra.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"@upstash/context7-mcp": minor
----
-
-Add multi-tenant Microsoft Entra ID validation for MCP tokens... | [
".changeset/mcp-multi-tenant-entra.md",
"packages/mcp/CHANGELOG.md",
"packages/mcp/package.json"
] | [] | true | ||
upstash/context7 | 2,629 | issue_to_patch | feat(mcp): multi-tenant Entra ID validation | ## Summary
- Detect inbound Entra v2 tokens by issuer pattern, fetch per-teamspace configuration from the Context7 app, and verify against the matching tenant's JWKS.
- MCP server only validates — user resolution happens in the app middleware against `entra_user_mappings`.
- Per-tenant JWKS cache + 5-minute in-memory c... | 61de754d48e57d5c22dadd4540a74203fd55ecf1 | 5ca27e7d1a16318570d3dbf663dd48a6c5d57210 | diff --git a/.changeset/mcp-multi-tenant-entra.md b/.changeset/mcp-multi-tenant-entra.md
new file mode 100644
index 000000000..3b984c12d
--- /dev/null
+++ b/.changeset/mcp-multi-tenant-entra.md
@@ -0,0 +1,5 @@
+---
+"@upstash/context7-mcp": minor
+---
+
+Add multi-tenant Microsoft Entra ID validation for MCP tokens. Th... | [
".changeset/mcp-multi-tenant-entra.md",
"packages/mcp/src/lib/jwt.ts",
"packages/mcp/test/jwt.test.ts"
] | [
{
"comment": "Caching null results under the same 5-minute TTL means one transient failure (5xx, network blip, JSON parse error) locks every Entra token for that audience out of the server for 5 minutes with a misleading Unknown audience error.\nSuggest only negative-caching on an explicit 404 - anything else s... | diff --git a/packages/mcp/test/jwt.test.ts b/packages/mcp/test/jwt.test.ts
new file mode 100644
index 000000000..4abd8cc06
--- /dev/null
+++ b/packages/mcp/test/jwt.test.ts
@@ -0,0 +1,193 @@
+import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";
+import * as jose from "jose";
+
+vi.mock("jose", as... | true | |
upstash/context7 | 2,675 | issue_to_patch | chore(release): version packages | This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR wil... | f91b40c45c8c22c40b08e553ef8ef43b75763cf5 | 2db812c51d28d0a62858aa66d6c30025a1196930 | diff --git a/.changeset/wicked-bags-ring.md b/.changeset/wicked-bags-ring.md
deleted file mode 100644
index 988b331b6..000000000
--- a/.changeset/wicked-bags-ring.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"@upstash/context7-pi": minor
----
-
-Initial release. Adds an official Context7 extension for the [pi coding agent](h... | [
".changeset/wicked-bags-ring.md",
"packages/pi/CHANGELOG.md",
"packages/pi/package.json"
] | [] | true | ||
upstash/context7 | 2,666 | issue_to_patch | feat: pi context7 extension | ee0bb7a65ef465053607fff8fc0aae72062a4446 | 741f3cf7e4fe5dba66f4f45f2936ee5cad2fd2cf | diff --git a/.changeset/wicked-bags-ring.md b/.changeset/wicked-bags-ring.md
new file mode 100644
index 000000000..988b331b6
--- /dev/null
+++ b/.changeset/wicked-bags-ring.md
@@ -0,0 +1,5 @@
+---
+"@upstash/context7-pi": minor
+---
+
+Initial release. Adds an official Context7 extension for the [pi coding agent](https... | [
".changeset/wicked-bags-ring.md",
"README.md",
"packages/pi/.prettierignore",
"packages/pi/LICENSE",
"packages/pi/README.md",
"packages/pi/__tests__/extension.test.ts",
"packages/pi/eslint.config.js",
"packages/pi/extensions/context7.ts",
"packages/pi/lib/api.ts",
"packages/pi/lib/format.ts",
"p... | [
{
"comment": "I think it might be possible to get the skill from the root `skills` folder, so that we only have single file to maintain. I guess it would be possible with build configs",
"path": "packages/pi/skills/context7-docs/SKILL.md",
"hunk": "",
"resolving_sha": "741f3cf7e4fe5dba66f4f45f2936ee... | diff --git a/packages/pi/__tests__/extension.test.ts b/packages/pi/__tests__/extension.test.ts
new file mode 100644
index 000000000..bd0b54d56
--- /dev/null
+++ b/packages/pi/__tests__/extension.test.ts
@@ -0,0 +1,56 @@
+import { describe, it, expect } from "vitest";
+import type { ExtensionAPI, ToolDefinition } from "... | true | ||
upstash/context7 | 2,666 | comment_to_fix | feat: pi context7 extension | I think it might be possible to get the skill from the root `skills` folder, so that we only have single file to maintain. I guess it would be possible with build configs | ee0bb7a65ef465053607fff8fc0aae72062a4446 | 741f3cf7e4fe5dba66f4f45f2936ee5cad2fd2cf | diff --git a/packages/pi/skills/context7-docs/SKILL.md b/packages/pi/skills/context7-docs/SKILL.md
new file mode 100644
index 000000000..bacbd905b
--- /dev/null
+++ b/packages/pi/skills/context7-docs/SKILL.md
@@ -0,0 +1,45 @@
+---
+name: context7-docs
+description: >-
+ Fetch up-to-date documentation and code examples... | [
"packages/pi/skills/context7-docs/SKILL.md"
] | [
{
"comment": "I think it might be possible to get the skill from the root `skills` folder, so that we only have single file to maintain. I guess it would be possible with build configs",
"path": "packages/pi/skills/context7-docs/SKILL.md",
"hunk": "",
"resolving_sha": "741f3cf7e4fe5dba66f4f45f2936ee... | true | ||
upstash/context7 | 2,666 | comment_to_fix | feat: pi context7 extension | as per spec, it should be like this
https://github.com/earendil-works/pi/blob/main/packages/coding-agent/docs/prompt-templates.md#argument-hints
```suggestion
argument-hint: <library> <question>
``` | ee0bb7a65ef465053607fff8fc0aae72062a4446 | 741f3cf7e4fe5dba66f4f45f2936ee5cad2fd2cf | diff --git a/packages/pi/prompts/c7-docs.md b/packages/pi/prompts/c7-docs.md
new file mode 100644
index 000000000..ba96e08b0
--- /dev/null
+++ b/packages/pi/prompts/c7-docs.md
@@ -0,0 +1,12 @@
+---
+description: Fetch Context7 documentation for a library
+argument-hint: <library> <question>
+---
+
+Look up documentatio... | [
"packages/pi/prompts/c7-docs.md"
] | [
{
"comment": "as per spec, it should be like this\nhttps://github.com/earendil-works/pi/blob/main/packages/coding-agent/docs/prompt-templates.md#argument-hints\n```suggestion\nargument-hint: <library> <question>\n```",
"path": "packages/pi/prompts/c7-docs.md",
"hunk": "@@ -0,0 +1,12 @@\n+---\n+descripti... | true | ||
upstash/context7 | 2,666 | comment_to_fix | feat: pi context7 extension | do we need try/catch for these? or does pi handle it | ee0bb7a65ef465053607fff8fc0aae72062a4446 | 741f3cf7e4fe5dba66f4f45f2936ee5cad2fd2cf | diff --git a/packages/pi/lib/api.ts b/packages/pi/lib/api.ts
new file mode 100644
index 000000000..3dd351fca
--- /dev/null
+++ b/packages/pi/lib/api.ts
@@ -0,0 +1,65 @@
+// Adapted from @upstash/context7-mcp (packages/mcp/src/lib/api.ts) — kept
+// minimal for pi: no proxy/CA-cert handling (pi controls the HTTP runtime... | [
"packages/pi/lib/api.ts"
] | [
{
"comment": "do we need try/catch for these? or does pi handle it",
"path": "packages/pi/lib/api.ts",
"hunk": "@@ -0,0 +1,65 @@\n+// Adapted from @upstash/context7-mcp (packages/mcp/src/lib/api.ts) — kept\n+// minimal for pi: no proxy/CA-cert handling (pi controls the HTTP runtime),\n+// no per-request... | true | ||
upstash/context7 | 2,558 | issue_to_patch | docs(i18n): sync zh-CN README with current main | ## Summary
The `i18n/README.zh-CN.md` was significantly out of date with the current `README.md`. This PR syncs it with the following changes:
- **Title**: updated from "Context7 MCP" → "Context7 平台 (Platform)"
- **Installation**: replaced the old per-client JSON config blocks (Cursor / Claude Code / Opencode / OAuth... | 795d5da720e16c417ae30a548a475672ae35e92f | 68e32a3362dc9d9951f5dde5dc5d845aeae893c1 | diff --git a/i18n/README.zh-CN.md b/i18n/README.zh-CN.md
index ed2e14a65..369441082 100644
--- a/i18n/README.zh-CN.md
+++ b/i18n/README.zh-CN.md
@@ -2,9 +2,9 @@
[](https://cursor.com/en/install-mcp?name=context7&config=eyJ1cmwiOiJodHRwczovL21jcC5jb250ZXh... | [
"i18n/README.zh-CN.md"
] | [] | true | ||
upstash/context7 | 2,660 | issue_to_patch | chore(release): version packages | This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR wil... | 3d73145f439faa2c104e69aeb9e0984f03d513be | 33822cdb651b52d137796cb006e9c631427306be | diff --git a/.changeset/skills-list-json.md b/.changeset/skills-list-json.md
deleted file mode 100644
index ba78f904a..000000000
--- a/.changeset/skills-list-json.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"ctx7": patch
----
-
-Add `--json` flag to `ctx7 skills list` for machine-parseable output. Emits `{ skills: [{ name, ... | [
".changeset/skills-list-json.md",
".changeset/strict-feet-end.md",
".changeset/tasty-shrimps-retire.md",
"packages/cli/CHANGELOG.md",
"packages/cli/package.json",
"packages/mcp/CHANGELOG.md",
"packages/mcp/package.json"
] | [] | true | ||
upstash/context7 | 2,667 | issue_to_patch | feat(session): enhance session refresh logic to extend TTL conditionally | af6a7b5af1011246940fbcef75b81ec2b5fcd329 | 3357e5021b0e2f8c1f6224f8e8da1ca50a92b07d | diff --git a/.changeset/tasty-shrimps-retire.md b/.changeset/tasty-shrimps-retire.md
new file mode 100644
index 000000000..66c4d9508
--- /dev/null
+++ b/.changeset/tasty-shrimps-retire.md
@@ -0,0 +1,5 @@
+---
+"@upstash/context7-mcp": patch
+---
+
+Reduce Redis writes on `refresh` by checking the remaining TTL first an... | [
".changeset/tasty-shrimps-retire.md",
"packages/mcp/src/lib/sessionStore.ts"
] | [] | true | |||
upstash/context7 | 2,655 | issue_to_patch | feat: add sessions to MCP server | 34fda7d9b834cb0362799012bb75155220fb3267 | a85e558bd2e8685ea41d833931ed6d598184df7f | diff --git a/.changeset/strict-feet-end.md b/.changeset/strict-feet-end.md
new file mode 100644
index 000000000..6a3c7ab70
--- /dev/null
+++ b/.changeset/strict-feet-end.md
@@ -0,0 +1,5 @@
+---
+"@upstash/context7-mcp": major
+---
+
+Convert the stateless MCP implementation to a stateful one using Redis for session man... | [
".changeset/strict-feet-end.md",
".env.example",
"packages/mcp/package.json",
"packages/mcp/src/index.ts",
"packages/mcp/src/lib/encryption.ts",
"packages/mcp/src/lib/redis.ts",
"packages/mcp/src/lib/sessionStore.ts",
"packages/mcp/src/lib/types.ts",
"pnpm-lock.yaml"
] | [
{
"comment": "Why did you remove this? We should be returning 405 on this case, but I can't see such response in new code.",
"path": "packages/mcp/src/index.ts",
"hunk": "@@ -387,22 +399,17 @@ async function main() {\n );\n };\n \n+ // Session-keyed transport map. One StreamableHTTPServerTr... | true | |||
upstash/context7 | 2,655 | comment_to_fix | feat: add sessions to MCP server | Why did you remove this? We should be returning 405 on this case, but I can't see such response in new code. | 34fda7d9b834cb0362799012bb75155220fb3267 | a85e558bd2e8685ea41d833931ed6d598184df7f | diff --git a/packages/mcp/src/index.ts b/packages/mcp/src/index.ts
index 77392b368..cd541eb71 100644
--- a/packages/mcp/src/index.ts
+++ b/packages/mcp/src/index.ts
@@ -10,8 +10,11 @@ import { formatSearchResults, extractClientInfoFromUserAgent } from "./lib/utils
import { isJWT, validateJWT } from "./lib/jwt.js";
im... | [
"packages/mcp/src/index.ts"
] | [
{
"comment": "Why did you remove this? We should be returning 405 on this case, but I can't see such response in new code.",
"path": "packages/mcp/src/index.ts",
"hunk": "@@ -387,22 +399,17 @@ async function main() {\n );\n };\n \n+ // Session-keyed transport map. One StreamableHTTPServerTr... | true | ||
upstash/context7 | 2,655 | comment_to_fix | feat: add sessions to MCP server | we need to handle the SIGTERM event too | 34fda7d9b834cb0362799012bb75155220fb3267 | a85e558bd2e8685ea41d833931ed6d598184df7f | diff --git a/packages/mcp/src/index.ts b/packages/mcp/src/index.ts
index 77392b368..cd541eb71 100644
--- a/packages/mcp/src/index.ts
+++ b/packages/mcp/src/index.ts
@@ -10,8 +10,11 @@ import { formatSearchResults, extractClientInfoFromUserAgent } from "./lib/utils
import { isJWT, validateJWT } from "./lib/jwt.js";
im... | [
"packages/mcp/src/index.ts"
] | [
{
"comment": "we need to handle the SIGTERM event too",
"path": "packages/mcp/src/index.ts",
"hunk": "@@ -577,6 +604,19 @@ async function main() {\n });\n };\n \n+ process.on(\"SIGINT\", async () => {",
"resolving_sha": "a85e558bd2e8685ea41d833931ed6d598184df7f",
"resolving_diff": "... | true | ||
upstash/context7 | 2,655 | comment_to_fix | feat: add sessions to MCP server | Currently we have a memory leak. This holds a plain object map and only deletes on transport.onclose. In practice MCP clients frequently drop without sending DELETE, laptop closes lid, network blip, process killed, etc. Those sessions sit in transports[] forever, and InMemoryEventStore.events grows unbounded with every... | 34fda7d9b834cb0362799012bb75155220fb3267 | a85e558bd2e8685ea41d833931ed6d598184df7f | diff --git a/packages/mcp/src/index.ts b/packages/mcp/src/index.ts
index 77392b368..cd541eb71 100644
--- a/packages/mcp/src/index.ts
+++ b/packages/mcp/src/index.ts
@@ -10,8 +10,11 @@ import { formatSearchResults, extractClientInfoFromUserAgent } from "./lib/utils
import { isJWT, validateJWT } from "./lib/jwt.js";
im... | [
"packages/mcp/src/index.ts"
] | [
{
"comment": "Currently we have a memory leak. This holds a plain object map and only deletes on transport.onclose. In practice MCP clients frequently drop without sending DELETE, laptop closes lid, network blip, process killed, etc. Those sessions sit in transports[] forever, and InMemoryEventStore.events grow... | true | ||
upstash/context7 | 2,655 | comment_to_fix | feat: add sessions to MCP server | This is wrong and would break things. Since sessions are kept in memory, if a request lands on a new pod(where this transport is not registered), they'd basically get 400 response.
We need to:
* keep transports in redis
* make sure there's sticky sessions on on the ingress level. | 34fda7d9b834cb0362799012bb75155220fb3267 | a85e558bd2e8685ea41d833931ed6d598184df7f | diff --git a/packages/mcp/src/index.ts b/packages/mcp/src/index.ts
index 77392b368..cd541eb71 100644
--- a/packages/mcp/src/index.ts
+++ b/packages/mcp/src/index.ts
@@ -10,8 +10,11 @@ import { formatSearchResults, extractClientInfoFromUserAgent } from "./lib/utils
import { isJWT, validateJWT } from "./lib/jwt.js";
im... | [
"packages/mcp/src/index.ts"
] | [
{
"comment": "This is wrong and would break things. Since sessions are kept in memory, if a request lands on a new pod(where this transport is not registered), they'd basically get 400 response. \n\nWe need to:\n* keep transports in redis\n* make sure there's sticky sessions on on the ingress level.",
"path... | true | ||
upstash/context7 | 2,655 | comment_to_fix | feat: add sessions to MCP server | the comments of this basically say that persistent store would be better instead of this "example" event store. i think persistence would be nice. | 34fda7d9b834cb0362799012bb75155220fb3267 | a85e558bd2e8685ea41d833931ed6d598184df7f | diff --git a/packages/mcp/src/index.ts b/packages/mcp/src/index.ts
index 77392b368..cd541eb71 100644
--- a/packages/mcp/src/index.ts
+++ b/packages/mcp/src/index.ts
@@ -10,8 +10,11 @@ import { formatSearchResults, extractClientInfoFromUserAgent } from "./lib/utils
import { isJWT, validateJWT } from "./lib/jwt.js";
im... | [
"packages/mcp/src/index.ts"
] | [
{
"comment": "the comments of this basically say that persistent store would be better instead of this \"example\" event store. i think persistence would be nice.",
"path": "packages/mcp/src/index.ts",
"hunk": "@@ -10,8 +10,11 @@ import { formatSearchResults, extractClientInfoFromUserAgent } from \"./li... | true | ||
upstash/context7 | 2,655 | comment_to_fix | feat: add sessions to MCP server | is this truncated | 34fda7d9b834cb0362799012bb75155220fb3267 | a85e558bd2e8685ea41d833931ed6d598184df7f | diff --git a/.changeset/strict-feet-end.md b/.changeset/strict-feet-end.md
new file mode 100644
index 000000000..6a3c7ab70
--- /dev/null
+++ b/.changeset/strict-feet-end.md
@@ -0,0 +1,5 @@
+---
+"@upstash/context7-mcp": major
+---
+
+Convert the stateless MCP implementation to a stateful one using Redis for session man... | [
".changeset/strict-feet-end.md"
] | [
{
"comment": "is this truncated",
"path": ".changeset/strict-feet-end.md",
"hunk": "@@ -0,0 +1,8 @@\n+---\n+\"@upstash/context7-mcp\": minor\n+---\n+\n+Add stateful sessions to the HTTP transport.\n+\n+The `--transport http` server now follows the MCP Streamable HTTP session model\n+instead of construct... | true | ||
upstash/context7 | 2,605 | issue_to_patch | chore(release): version packages | This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR wil... | 34fda7d9b834cb0362799012bb75155220fb3267 | a9c744447d04222cfebbff1b5aa2e946a71a7a22 | diff --git a/.changeset/cli-inquirer-core-dep.md b/.changeset/cli-inquirer-core-dep.md
deleted file mode 100644
index e2de36a9c..000000000
--- a/.changeset/cli-inquirer-core-dep.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"ctx7": patch
----
-
-Declare `@inquirer/core` as a direct dependency of the CLI. It was previously imp... | [
".changeset/cli-inquirer-core-dep.md",
".changeset/funky-sides-behave.md",
".changeset/mcp-auth-prompt.md",
".changeset/validate-skill-names.md",
"packages/cli/CHANGELOG.md",
"packages/cli/package.json",
"packages/mcp/CHANGELOG.md",
"packages/mcp/package.json"
] | [] | true | ||
upstash/context7 | 2,604 | issue_to_patch | feat(mcp): prompt anonymous users to sign in | After 5 anonymous tool calls per session, surface a one-time sign-in prompt.
**stdio**: native MCP `elicitation/create` (URL-mode when supported, form-mode fallback). On accept, the server opens the browser, completes OAuth via a `localhost:52417` callback, and writes tokens to `~/.context7/credentials.json` (mode `... | c918e80e84d903640f0538dda77cfbbe5e8b9761 | 11778ef640b240a4fa6358fd72e9cf5d1ec8c6ba | diff --git a/.changeset/funky-sides-behave.md b/.changeset/funky-sides-behave.md
new file mode 100644
index 000000000..49cf4d340
--- /dev/null
+++ b/.changeset/funky-sides-behave.md
@@ -0,0 +1,5 @@
+---
+"ctx7": patch
+---
+
+Add `--stdio` flag to `ctx7 setup` to configure Context7 as a local stdio MCP server.
diff --g... | [
".changeset/funky-sides-behave.md",
".changeset/mcp-auth-prompt.md",
"packages/cli/src/__tests__/setup.test.ts",
"packages/cli/src/commands/setup.ts",
"packages/cli/src/setup/agents.ts",
"packages/cli/src/setup/mcp-writer.ts",
"packages/mcp/src/index.ts",
"packages/mcp/src/lib/api.ts",
"packages/mcp... | [] | diff --git a/packages/cli/src/__tests__/setup.test.ts b/packages/cli/src/__tests__/setup.test.ts
index 77c6e972b..6b5c4bd95 100644
--- a/packages/cli/src/__tests__/setup.test.ts
+++ b/packages/cli/src/__tests__/setup.test.ts
@@ -26,10 +26,13 @@ import {
readJsonConfig,
writeJsonConfig,
readTomlServerExists,
+ ... | true | |
upstash/context7 | 2,653 | issue_to_patch | [Bug]: ctx7@0.4.2 fails to run with pnpm because @inquirer/core is missing
## MCP Client
Other (specify in description)
## Context7 MCP Version
ctx7 0.4.2
## Bug Description
The published `ctx7@0.4.2` CLI package imports `@inquirer/core` directly, but `packages/cli/package.json` does not declare `@inquirer/core` ... | fix(cli): declare @inquirer/core as direct dependency | Closes https://github.com/upstash/context7/issues/2651
## Summary
- [packages/cli/src/utils/selectOrInput.ts](packages/cli/src/utils/selectOrInput.ts) imports from `@inquirer/core`, but the package was only present transitively via `@inquirer/prompts`. Under pnpm's isolated node linker the resolution is rejected and `... | 438b1df235218c6dd66086e9b0d6a5b410f1635e | fa936cd99c17fe3ce68287a3efd0594ad27f5cd6 | diff --git a/.changeset/cli-inquirer-core-dep.md b/.changeset/cli-inquirer-core-dep.md
new file mode 100644
index 000000000..e2de36a9c
--- /dev/null
+++ b/.changeset/cli-inquirer-core-dep.md
@@ -0,0 +1,5 @@
+---
+"ctx7": patch
+---
+
+Declare `@inquirer/core` as a direct dependency of the CLI. It was previously importe... | [
".changeset/cli-inquirer-core-dep.md",
"packages/cli/package.json",
"pnpm-lock.yaml"
] | [] | true | |
upstash/context7 | 2,574 | issue_to_patch | fix(cli): handle malformed MCP config files in remove detection | ## Summary
`ctx7 remove` crashed with an unhandled `SyntaxError` whenever any of the agents' well-known JSON config paths contained unparseable content (e.g. a hand-edited `~/.claude.json` with a stray comma). `readJsonConfig` only caught file-read errors, not `JSON.parse` errors, and the detection path didn't wrap ... | 30df4a1cff33155e9402aa850c9c0875e5e1d56e | d2ce42dc44b0e0c5e5eca48a8586807dfce3a68e | diff --git a/.changeset/handle-mcp-config-detection-errors.md b/.changeset/handle-mcp-config-detection-errors.md
new file mode 100644
index 000000000..a906dce09
--- /dev/null
+++ b/.changeset/handle-mcp-config-detection-errors.md
@@ -0,0 +1,5 @@
+---
+"ctx7": patch
+---
+
+Handle malformed MCP config files gracefully d... | [
".changeset/handle-mcp-config-detection-errors.md",
"packages/cli/src/commands/remove.ts"
] | [] | true | ||
upstash/context7 | 2,637 | issue_to_patch | update open api docs | 6f0f8b7b6323467d299a246aadc3d6378991565c | 896130b210211bf60a5f9f7e73060486918d8efa | diff --git a/docs/openapi.json b/docs/openapi.json
index fc9e899f0..22eb595a9 100644
--- a/docs/openapi.json
+++ b/docs/openapi.json
@@ -888,14 +888,6 @@
"type": "boolean",
"description": "Whether the repository is private"
},
- "skipBenchmar... | [
"docs/openapi.json"
] | [] | true | |||
upstash/context7 | 2,636 | issue_to_patch | docs(enterprise): Azure APIM deployment guide | ## Summary
- Step-by-step guide for deploying Context7 behind Azure API Management with Microsoft Entra ID per-user auth (On-Behalf-Of token exchange).
- Covers APIM provisioning, Entra app registrations, policy wiring (with named-value resolution + XML escape gotchas documented), OAuth discovery surfaces (PRM + AS met... | 61de754d48e57d5c22dadd4540a74203fd55ecf1 | 8e5a71adc55ab0dd71b190989d6b8d90ef0e22cd | diff --git a/docs/docs.json b/docs/docs.json
index 3b6bf2233..348ce24e5 100644
--- a/docs/docs.json
+++ b/docs/docs.json
@@ -54,6 +54,7 @@
"group": "Enterprise",
"pages": [
"enterprise",
+ "enterprise/azure-apim",
{
"group": "On-Premise",
"pages... | [
"docs/docs.json",
"docs/enterprise/azure-apim.mdx"
] | [] | true | ||
upstash/context7 | 2,597 | issue_to_patch | fix(cli): harden skill name handling during install | Tightens how skill names from remote `SKILL.md` files are handled during `ctx7 skills install`.
- Restricts skill names to a safe character set at parse time.
- Asserts the install directory is a direct child of the skills root before writing files or creating symlinks.
- Applies the same check in `ctx7 skills remove`... | 78b98266954d35da8aa93ad40c67df33a3ff4443 | d5a5b3760d2f16d1cb9321ea5108b7faaba2bc36 | diff --git a/.changeset/validate-skill-names.md b/.changeset/validate-skill-names.md
new file mode 100644
index 000000000..330780281
--- /dev/null
+++ b/.changeset/validate-skill-names.md
@@ -0,0 +1,5 @@
+---
+"ctx7": patch
+---
+
+Harden skill name handling during `ctx7 skills install` and `ctx7 skills remove`. Skill ... | [
".changeset/validate-skill-names.md",
"packages/cli/src/__tests__/installer.test.ts",
"packages/cli/src/commands/skill.ts",
"packages/cli/src/utils/github.ts",
"packages/cli/src/utils/installer.ts",
"packages/cli/src/utils/skill-name.ts"
] | [] | diff --git a/packages/cli/src/__tests__/installer.test.ts b/packages/cli/src/__tests__/installer.test.ts
new file mode 100644
index 000000000..daf79d675
--- /dev/null
+++ b/packages/cli/src/__tests__/installer.test.ts
@@ -0,0 +1,159 @@
+import { afterEach, beforeEach, describe, expect, test } from "vitest";
+import { m... | true | |
urfave/cli | 2,363 | issue_to_patch | Imbalance between Before and After calls at printing help
## My urfave/cli version is
_**3.6.2**_
## Checklist
- [x] Are you running the latest v3 release? The list of releases is [here](https://github.com/urfave/cli/releases).
- [x] Did you check the manual for your release? The v3 manual is [here](https://cli.urf... | fix: skip After hook when help is displayed on subcommand | ## Summary
Fixes #2250 — when `--help` is passed to a subcommand, the parent command's `After` hook was firing even though the parent's `Before` hook was never called. This violates the expected invariant that `After` should only be called when `Before` was also called.
## Root Cause
In `command_run.go`, the `After`... | 2c38e7b6c7e3b25df239997b37111e639cb26b0f | 2f7149e0b9a543f1e6e989661e5efc137836c73b | diff --git a/command_run.go b/command_run.go
index b5bc005a3c..8d5907151e 100644
--- a/command_run.go
+++ b/command_run.go
@@ -9,6 +9,8 @@ import (
"unicode"
)
+type helpShownKey struct{}
+
func (cmd *Command) parseArgsFromStdin() ([]string, error) {
type state int
const (
@@ -176,6 +178,7 @@ func (cmd *Comma... | [
"command_run.go",
"command_test.go"
] | [] | diff --git a/command_test.go b/command_test.go
index acc2405614..6b8d93390a 100644
--- a/command_test.go
+++ b/command_test.go
@@ -1810,6 +1810,50 @@ func TestCommand_AfterFunc(t *testing.T) {
assert.Equal(t, 0, counts.SubCommand, "Subcommand not executed when expected")
}
+func TestCommand_AfterNotCalledOnSubcomm... | true |
urfave/cli | 2,360 | issue_to_patch | fix: let --help flag take precedence over parse errors | ## What type of PR is this?
- bug
## What this PR does / why we need it:
Fixes two help invocation inconsistencies related to issue #2126.
1. **`--help` flag now takes precedence over parse errors**: When `--help` is given alongside a bad flag (e.g. `app --help --undefined`), the help output is now shown instead of ... | 213b98c817bf5531f8c1eec4d7d1f7bf3c423a97 | 3a5e3e1f0a8ce70ef3872892a6044612dd8c5553 | diff --git a/command_run.go b/command_run.go
index 5549e25270..b5bc005a3c 100644
--- a/command_run.go
+++ b/command_run.go
@@ -175,6 +175,14 @@ func (cmd *Command) run(ctx context.Context, osArgs []string) (_ context.Context
deferErr = err
cmd.isInError = true
+ if cmd.checkHelp() {
+ if cmd.parent == nil {
... | [
"command_run.go",
"command_test.go",
"help.go"
] | [
{
"comment": "Accidental addition?",
"path": "opencode.json",
"hunk": "",
"resolving_sha": "3a5e3e1f0a8ce70ef3872892a6044612dd8c5553",
"resolving_diff": ""
}
] | diff --git a/command_test.go b/command_test.go
index 2a71504535..acc2405614 100644
--- a/command_test.go
+++ b/command_test.go
@@ -2363,6 +2363,104 @@ func TestCommand_OrderOfOperations(t *testing.T) {
})
}
+func TestCommand_HelpFlagTakesPrecedenceOverParseErrors(t *testing.T) {
+ t.Run("root command with --help a... | true | |
urfave/cli | 2,361 | issue_to_patch | fix: resolve remaining help invocation inconsistencies | ## What type of PR is this?
- bug
- cleanup
## What this PR does / why we need it:
Fixes four remaining help invocation inconsistencies:
1. **Built-in help command identity** — Added `builtInHelp` field to distinguish the built-in help command from user-defined commands named "help" or "h", preventing `helpCommandAc... | 024fc6f75352d12483eda69e40ee565b822e281c | 94009b65c8421f778c756a22c7d53b804c6a94c2 | diff --git a/command.go b/command.go
index 01740d5e13..4cd907a558 100644
--- a/command.go
+++ b/command.go
@@ -165,6 +165,8 @@ type Command struct {
versionFlag Flag
// whether this is a completion command
isCompletionCommand bool
+ // whether this is the built-in help command
+ builtInHelp bool
}
func (cmd *... | [
"command.go",
"command_run.go",
"command_test.go",
"help.go"
] | [] | diff --git a/command_test.go b/command_test.go
index d12aab0095..2a71504535 100644
--- a/command_test.go
+++ b/command_test.go
@@ -1966,6 +1966,183 @@ func TestRequiredFlagCommandRunBehavior(t *testing.T) {
}
}
+func TestCommand_IncorrectUsageOnRequiredFlagsViaRun(t *testing.T) {
+ t.Run("root command missing requ... | true | |
urfave/cli | 2,368 | issue_to_patch | Expose Flag.SchemaType() for typed flag introspection
## Summary
Expose typed-schema introspection on `cli.Flag`:
```go
// SchemaType returns the JSON Schema type name for the value this flag
// accepts: "boolean", "integer", "number", "string", "array".
// Returns "" if the flag does not map cleanly to a JSON Schem... | feat: Add SchemaType and SchemaItemsType for Flag | Closes #2326 | 84d0da5c2dea82f19c9bce4bdf255ee1091231fa | 4c9035753374883467f5f828f107bed6185d7eb3 | diff --git a/flag.go b/flag.go
index 1b849f1228..3cb9ab9608 100644
--- a/flag.go
+++ b/flag.go
@@ -151,6 +151,23 @@ type DocGenerationMultiValueFlag interface {
IsMultiValueFlag() bool
}
+// SchemaTyper is an optional interface for flags that can report their
+// JSON Schema type for programmatic introspection.
+t... | [
"flag.go",
"flag_bool_with_inverse.go",
"flag_ext.go",
"flag_impl.go",
"flag_schema_type_test.go",
"flag_test.go",
"godoc-current.txt",
"testdata/godoc-v3.x.txt"
] | [] | diff --git a/flag_schema_type_test.go b/flag_schema_type_test.go
new file mode 100644
index 0000000000..6870730f99
--- /dev/null
+++ b/flag_schema_type_test.go
@@ -0,0 +1,235 @@
+package cli
+
+import (
+ "flag"
+ "testing"
+ "time"
+
+ "github.com/stretchr/testify/assert"
+)
+
+func TestFlag_SchemaType_Bool(t *testing... | true |
urfave/cli | 2,366 | issue_to_patch | Document v3 binary size checks | ## Summary
- add a v3 docs page for measuring and reducing Go binary size
- document that v3 currently does not define `urfave_cli_no_*` build tags
- add practical commands for `go build`, `go version -m`, and `go tool nm`
- link the page from the v3 MkDocs nav
## Why
Addresses #2365 with a concise starting point for ... | 8f903a308b4e9213daf31f8af1aed7b30c930ac2 | 301fb0c41cbc9b9eff8bfa335adbe5404dcda72b | diff --git a/docs/v3/binary-size.md b/docs/v3/binary-size.md
new file mode 100644
index 0000000000..2a8e22a064
--- /dev/null
+++ b/docs/v3/binary-size.md
@@ -0,0 +1,53 @@
+# Binary Size
+
+Go removes unreachable code during compilation, so the first step is to
+measure the binary you ship instead of assuming a specific... | [
"docs/v3/binary-size.md",
"mkdocs.yml"
] | [] | true | ||
urfave/cli | 2,353 | issue_to_patch | Add Command.Walk(fn) and Command.Path() convenience methods
## Summary
Add two small convenience methods to `*cli.Command` that several third-party extensions reimplement today:
```go
// Walk visits cmd and every descendant in pre-order. Returning a non-nil
// error from fn short-circuits the walk and is returned to... | feat: add Command.Walk() and Command.Path() convenience methods | <!--
This template provides some ideas of things to include in your PR description.
To start, try providing a short summary of your changes in the Title above.
If a section of the PR template does not apply to this PR, then delete that section.
-->
## What type of PR is this?
_(REQUIRED)_
<!--
De... | c66ca03b1c2a66068c9c5a9fd63df0757ff5feb0 | 0b9c2aebaf77dd8466449abc31c0d768db8130c1 | diff --git a/command.go b/command.go
index 927ecc9829..01740d5e13 100644
--- a/command.go
+++ b/command.go
@@ -167,19 +167,6 @@ type Command struct {
isCompletionCommand bool
}
-// FullName returns the full name of the command.
-// For commands with parents this ensures that the parent commands
-// are part of the... | [
"command.go",
"command_setup.go",
"command_test.go",
"docs/v3/path-and-walk.md",
"godoc-current.txt",
"mkdocs.yml",
"testdata/godoc-v3.x.txt"
] | [
{
"comment": "`FullName()`?",
"path": "testdata/godoc-v3.x.txt",
"hunk": "@@ -689,6 +689,11 @@ func (cmd *Command) Names() []string\n func (cmd *Command) NumFlags() int\n NumFlags returns the number of flags set\n \n+func (cmd *Command) Path() []string\n+ Path returns the path of command names fr... | diff --git a/command_test.go b/command_test.go
index 1204e8d3d2..d12aab0095 100644
--- a/command_test.go
+++ b/command_test.go
@@ -5895,3 +5895,86 @@ func TestCommand_NoDefaultCmdArgMatchingFlag(t *testing.T) {
require.NoError(t, err)
require.Equal(t, &expectedArgs, actualArgs)
}
+
+func TestCommand_Path(t *testin... | true |
urfave/cli | 2,353 | comment_to_fix | feat: add Command.Walk() and Command.Path() convenience methods | `FullName()`? | c66ca03b1c2a66068c9c5a9fd63df0757ff5feb0 | 0b9c2aebaf77dd8466449abc31c0d768db8130c1 | diff --git a/testdata/godoc-v3.x.txt b/testdata/godoc-v3.x.txt
index 5626b3b3d2..f84d0475e5 100644
--- a/testdata/godoc-v3.x.txt
+++ b/testdata/godoc-v3.x.txt
@@ -608,8 +608,8 @@ func (cmd *Command) FloatSlice(name string) []float64
found
func (cmd *Command) FullName() string
- FullName returns the full name... | [
"testdata/godoc-v3.x.txt"
] | [
{
"comment": "`FullName()`?",
"path": "testdata/godoc-v3.x.txt",
"hunk": "@@ -689,6 +689,11 @@ func (cmd *Command) Names() []string\n func (cmd *Command) NumFlags() int\n NumFlags returns the number of flags set\n \n+func (cmd *Command) Path() []string\n+ Path returns the path of command names fr... | true | ||
urfave/cli | 2,353 | comment_to_fix | feat: add Command.Walk() and Command.Path() convenience methods | ```suggestion
Walk visits cmd and every descendant in pre-order. If an error is
encountered, the walk terminates with the error returned to the caller.
``` | c66ca03b1c2a66068c9c5a9fd63df0757ff5feb0 | 0b9c2aebaf77dd8466449abc31c0d768db8130c1 | diff --git a/testdata/godoc-v3.x.txt b/testdata/godoc-v3.x.txt
index 5626b3b3d2..f84d0475e5 100644
--- a/testdata/godoc-v3.x.txt
+++ b/testdata/godoc-v3.x.txt
@@ -608,8 +608,8 @@ func (cmd *Command) FloatSlice(name string) []float64
found
func (cmd *Command) FullName() string
- FullName returns the full name... | [
"testdata/godoc-v3.x.txt"
] | [
{
"comment": "```suggestion\n Walk visits cmd and every descendant in pre-order. If an error is\n encountered, the walk terminates with the error returned to the caller.\n```",
"path": "testdata/godoc-v3.x.txt",
"hunk": "@@ -801,6 +806,10 @@ func (cmd *Command) VisiblePersistentFlags() []Flag\n ... | true | ||
urfave/cli | 2,353 | comment_to_fix | feat: add Command.Walk() and Command.Path() convenience methods | ```suggestion
// Includes parent commands separated by space.
``` | c66ca03b1c2a66068c9c5a9fd63df0757ff5feb0 | 0b9c2aebaf77dd8466449abc31c0d768db8130c1 | diff --git a/command.go b/command.go
index 927ecc9829..01740d5e13 100644
--- a/command.go
+++ b/command.go
@@ -167,19 +167,6 @@ type Command struct {
isCompletionCommand bool
}
-// FullName returns the full name of the command.
-// For commands with parents this ensures that the parent commands
-// are part of the... | [
"command.go"
] | [
{
"comment": "```suggestion\n// Includes parent commands separated by space.\n```",
"path": "command.go",
"hunk": "@@ -169,13 +169,34 @@ type Command struct {\n // For commands with parents this ensures that the parent commands\n // are part of the command path.",
"resolving_sha": "0b9c2aebaf77dd846... | true | ||
urfave/cli | 2,353 | comment_to_fix | feat: add Command.Walk() and Command.Path() convenience methods | I think this is similar to @abitrolly feedback, but I think I'd like to see `*Command.Path` and `*Command.Walk` located closer to `*Command.Lineage`, and for the documentation for each of them to include cross-references, and for the higher-level documentation under the `./docs/` tree to describe the relationship betwe... | c66ca03b1c2a66068c9c5a9fd63df0757ff5feb0 | 0b9c2aebaf77dd8466449abc31c0d768db8130c1 | diff --git a/command.go b/command.go
index 927ecc9829..01740d5e13 100644
--- a/command.go
+++ b/command.go
@@ -167,19 +167,6 @@ type Command struct {
isCompletionCommand bool
}
-// FullName returns the full name of the command.
-// For commands with parents this ensures that the parent commands
-// are part of the... | [
"command.go"
] | [
{
"comment": "I think this is similar to @abitrolly feedback, but I think I'd like to see `*Command.Path` and `*Command.Walk` located closer to `*Command.Lineage`, and for the documentation for each of them to include cross-references, and for the higher-level documentation under the `./docs/` tree to describe ... | true | ||
urfave/cli | 2,349 | issue_to_patch | Custom shell completion doesn't work, root.Before() not being called
## My urfave/cli version is
`v3.9.1-0.20260524212652-be8b79d0c8de`
## Checklist
- [X] Are you running the latest v3 release? The list of releases is [here](https://github.com/urfave/cli/releases).
- [X] Did you check the manual for your release? T... | Run Before hooks before shell completion | ## What type of PR is this?
- bug
## What this PR does / why we need it:
- runs the resolved command chain's `Before` hooks before invoking shell completion
- keeps completion before flag/action validation, so malformed input can still reach custom completion
- adds a nested custom completion regression test for set... | 57943ed4620868d3f58583a1fd3ae5b0367b25ae | b2435cecf79743a2d410607a0348be2fca290c53 | diff --git a/command_run.go b/command_run.go
index 87fa7e7fa5..c509b0172b 100644
--- a/command_run.go
+++ b/command_run.go
@@ -158,7 +158,12 @@ func (cmd *Command) run(ctx context.Context, osArgs []string) (_ context.Context
tracef("using post-parse arguments %[1]q (cmd=%[2]q)", args, cmd.Name)
- if checkCompleti... | [
"command_run.go",
"command_test.go",
"completion_test.go",
"help.go"
] | [] | diff --git a/command_test.go b/command_test.go
index 24ce5e4739..338565e7f6 100644
--- a/command_test.go
+++ b/command_test.go
@@ -2098,8 +2098,9 @@ func TestCommand_OrderOfOperations(t *testing.T) {
r := require.New(t)
_ = cmd.Run(buildTestContext(t), []string{"command", completionFlag})
- r.Equal(1, counts.S... | true |
urfave/cli | 2,340 | issue_to_patch | The boolean flag is not behaving as intended.
## My urfave/cli version is
_**cli/v3**_
## Checklist
- [X] Are you running the latest v3 release? The list of releases is [here](https://github.com/urfave/cli/releases).
- [X] Did you check the manual for your release? The v3 manual is [here](https://cli.urfave.org/v3/... | docs: clarify boolean flag value syntax | ## What type of PR is this?
- documentation
## What this PR does / why we need it:
- Clarifies that boolean flags are an exception to the space-separated value syntax.
- Documents that `--flag=false` should be used when passing an explicit boolean value.
## Which issue(s) this PR fixes:
Fixes #2206
## Testing
- ... | be8b79d0c8de1a03812914c9c511c961e5ed6ecc | 0021634991f7355ea09536566153232d28835c8d | diff --git a/docs/v3/examples/flags/basics.md b/docs/v3/examples/flags/basics.md
index de2734f5a6..1995028bc0 100644
--- a/docs/v3/examples/flags/basics.md
+++ b/docs/v3/examples/flags/basics.md
@@ -78,6 +78,9 @@ $ greet --lang=spanish my-friend
Hola my-friend
```
+Boolean flags are the exception: passing a boolean... | [
"docs/v3/examples/flags/basics.md"
] | [] | true | |
urfave/cli | 2,350 | issue_to_patch | --verbose flag gets interpreted as "print version and exit"
## My urfave/cli version is
_**3.6.1**_
## Checklist
- [x] Are you running the latest v3 release? The list of releases is [here](https://github.com/urfave/cli/releases).
- [x] Did you check the manual for your release? The v3 manual is [here](https://cli.u... | Let custom flags use version aliases | Fixes #2229.
When a root command defines its own flag using the default version names, setup now leaves the custom flag in control instead of appending the built-in version flag and treating that value as a version request.
Tested with:
- go test . -run TestCommand_Run_(Version|CustomFlagCanUseVersionAlias)$ -count=1... | 57943ed4620868d3f58583a1fd3ae5b0367b25ae | 6021fc8a8afc8f51b8304099f9a2c5ffecb26a3f | diff --git a/command.go b/command.go
index d1fc008e78..2021b03456 100644
--- a/command.go
+++ b/command.go
@@ -161,6 +161,8 @@ type Command struct {
globaHelpFlagAdded bool
// whether global version flag was added
globaVersionFlagAdded bool
+ // generated root version flag
+ versionFlag Flag
// whether this is ... | [
"command.go",
"command_setup.go",
"command_test.go",
"help.go"
] | [] | diff --git a/command_test.go b/command_test.go
index 24ce5e4739..0ce36baddc 100644
--- a/command_test.go
+++ b/command_test.go
@@ -2392,6 +2392,31 @@ func TestCommand_Run_Version(t *testing.T) {
}
}
+func TestCommand_Run_CustomFlagCanUseVersionAlias(t *testing.T) {
+ buf := new(bytes.Buffer)
+ called := false
+
+ ... | true |
urfave/cli | 2,352 | issue_to_patch | Cover repeated local slice flags | Adds a regression test for #2253. | 57943ed4620868d3f58583a1fd3ae5b0367b25ae | cf26286cc9f18c1ac0c0d75112964866de3d265f | [
"flag_test.go"
] | [] | diff --git a/flag_test.go b/flag_test.go
index 7d7a80b359..bc01a5a205 100644
--- a/flag_test.go
+++ b/flag_test.go
@@ -2375,6 +2375,22 @@ func TestParseMultiBoolT(t *testing.T) {
}).Run(buildTestContext(t), []string{"run", "--implode=false"})
}
+func TestStringSliceFlagApply_LocalPreservesRepeatedValues(t *testing... | true | ||
urfave/cli | 2,359 | issue_to_patch | Subcommands do not display help for GLOBAL OPTIONS
Version: 706f78e
My initial look for a the cause is that the default `SubcommandHelpTemplate` does not contain:
```
{{if .VisiblePersistentFlags}}
GLOBAL OPTIONS:{{template "visiblePersistentFlagTemplate" .}}{{end}}
```
See `CommandHelpTemplate` where this is imple... | fix: show GLOBAL OPTIONS in SubcommandHelpTemplate | ## What type of PR is this?
- bug
## What this PR does / why we need it:
Adds the `VisiblePersistentFlags` / `GLOBAL OPTIONS` section to `SubcommandHelpTemplate`, matching what `CommandHelpTemplate` already has.
When a subcommand has its own subcommands, `DefaultShowSubcommandHelp` uses `SubcommandHelpTemplate` to ... | 700c663540569deea3a7760411f7ed136360b5bf | 541d0c8d934b59f52ea5c95bc132fcd6d054ac29 | diff --git a/godoc-current.txt b/godoc-current.txt
index 681df19d63..5626b3b3d2 100644
--- a/godoc-current.txt
+++ b/godoc-current.txt
@@ -170,7 +170,9 @@ COMMANDS:{{template "visibleCommandTemplate" .}}{{end}}{{if .VisibleFlagCategori
OPTIONS:{{template "visibleFlagCategoryTemplate" .}}{{else if .VisibleFlags}}
-... | [
"godoc-current.txt",
"template.go",
"testdata/godoc-v3.x.txt"
] | [] | true | |
urfave/cli | 2,357 | issue_to_patch | The document includes broken links
I checked links in the document using https://github.com/lycheeverse/lychee .
```console
$ git ls-files | grep -E "\.md$" | xargs lychee --max-concurrency 10 -a 429
247/247 ━━━━━━━━━━━━━━━━━━━━ Finished extracting links ... | docs: fix broken links in CHANGELOG.md | ## What type of PR is this?
- documentation
## What this PR does / why we need it:
Fixes the remaining broken links in `docs/CHANGELOG.md` identified in #1939:
- Remove links to `@lynncyrin` and `@masonj188` GitHub profiles (both return 404 — accounts likely deleted)
- Fix `urfave/891` → `urfave/cli/pull/891` (typo... | 57943ed4620868d3f58583a1fd3ae5b0367b25ae | 88d75994c495994b1e63c0fcd273681800088d21 | diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index d096f57e41..1d8461c518 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -25,7 +25,7 @@ These release notes were written for the git hash [d648edd48d89ef3a841b1ec75c2eb
### Changed
-* Improved auto-completion instructions and added example gifs in [u... | [
"docs/CHANGELOG.md"
] | [] | true | |
urfave/cli | 2,362 | issue_to_patch | chore(deps): bump codecov/codecov-action from 6 to 7 | Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 6 to 7.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/codecov/codecov-action/releases">codecov/codecov-action's releases</a>.</em></p>
<blockquote>
<h2>v7.0.0</h2>
<p>⚠️ Due to migration issues wi... | 0ad38592ac44f2245175f1324bdb4288b5937797 | d9e737849fd17cc1670d41db2790e7455e6067fc | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 11de4a757f..ec3e57b4dc 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -53,7 +53,7 @@ jobs:
run: make v3diff
- if: success() && matrix.go == 'stable' && matrix.os == 'ubuntu-24.04'
- uses: cod... | [
".github/workflows/test.yml"
] | [] | true | ||
urfave/cli | 2,358 | issue_to_patch | Documentation on build flags is gone
## Checklist
* [x] Are you running the latest v3 release? The list of releases is [here](https://github.com/urfave/cli/releases).
* [x] Did you check the manual for your release? The v3 manual is [here](https://github.com/urfave/cli/blob/main/docs/v3/index.md).
* [x] Did you perfo... | docs: document what happened to build tags in v3 | ## What type of PR is this?
- documentation
## What this PR does / why we need it:
Adds a "Build Tags" section to the v2→v3 migration guide explaining that the `urfave_cli_no_docs` and `urfave_cli_no_suggest` build tags from v2 are not available in v3 because they are no longer necessary:
- Doc generation moved to ... | 57943ed4620868d3f58583a1fd3ae5b0367b25ae | d6eb556435974aa94a46b4701ae7b55ce8cadce6 | diff --git a/docs/migrate-v2-to-v3.md b/docs/migrate-v2-to-v3.md
index 43ad4c63e0..afa11e8b49 100644
--- a/docs/migrate-v2-to-v3.md
+++ b/docs/migrate-v2-to-v3.md
@@ -222,6 +222,24 @@ Shell command to find them all: `fgrep -rl github.com/urfave/cli/v2 *`
}
```
+## Build Tags
+
+v2 provided build tags to red... | [
"docs/migrate-v2-to-v3.md"
] | [] | true | |
urfave/cli | 2,336 | issue_to_patch | Bash completion breaks on descriptions containing colons
## My urfave/cli version is
`v3` (main branch)
## Checklist
- [X] Are you running the latest v3 release? The list of releases is [here](https://github.com/urfave/cli/releases).
- [X] Did you check the manual for your release? The v3 manual is [here](https://c... | fix(completion): use greedy %% for colon parsing in bash completion template | ## What type of PR is this?
- bug fix
## What this PR does / why we need it
The bash autocomplete template in `autocomplete/bash_autocomplete` uses `fmt.Sprintf` for rendering. The line that extracts the token from `token:description` format had:
```bash
token="${line%%:*}"
```
Because `fmt.Sprintf` interprets `%%... | be8b79d0c8de1a03812914c9c511c961e5ed6ecc | 22cb796b40ba3d69c6e858e7a13b61020a884cb6 | diff --git a/autocomplete/bash_autocomplete b/autocomplete/bash_autocomplete
index b7442e10aa..42eb17b8b2 100755
--- a/autocomplete/bash_autocomplete
+++ b/autocomplete/bash_autocomplete
@@ -66,7 +66,7 @@ __%[1]s_bash_autocomplete() {
local description=""
if [[ "${line}" == *:* ]]; then
- t... | [
"autocomplete/bash_autocomplete",
"completion_test.go"
] | [] | diff --git a/completion_test.go b/completion_test.go
index 2da7f622e2..a608e53021 100644
--- a/completion_test.go
+++ b/completion_test.go
@@ -158,6 +158,33 @@ func TestCompletionBashAppendsSpace(t *testing.T) {
r.Contains(output, "complete -o bashdefault -o default -F __myapp_bash_autocomplete myapp")
}
+func Tes... | true |
urfave/cli | 2,355 | issue_to_patch | Environment variables not read when flag is defined on both root and subcommand
### My urfave/cli version is
v3.5.0 (latest as of 2025-10-30)
### Checklist
- Are you running the latest v3 release? The list of releases is https://github.com/urfave/cli/releases. ✅
- Did you check the manual for your release? The... | Honor env sources on duplicated flags | ## What type of PR is this?
- bug
## What this PR does / why we need it:
- Preserves env-source values when the same persistent flag instance is registered on an ancestor command and a subcommand.
- Skips re-preparing a shared persistent flag instance on descendant commands so the value loaded during the parent pars... | 57943ed4620868d3f58583a1fd3ae5b0367b25ae | 83e07cd00212b2bef31d7042fe56e6dec93e6d81 | diff --git a/command.go b/command.go
index d1fc008e78..1729b8b29f 100644
--- a/command.go
+++ b/command.go
@@ -373,6 +373,22 @@ func (cmd *Command) lFlag(name string) Flag {
return nil
}
+func (cmd *Command) hasPersistentFlagOnAncestor(fl Flag) bool {
+ for pCmd := cmd.parent; pCmd != nil; pCmd = pCmd.parent {
+ ... | [
"command.go",
"command_run.go",
"command_test.go"
] | [] | diff --git a/command_test.go b/command_test.go
index 24ce5e4739..46f4340bce 100644
--- a/command_test.go
+++ b/command_test.go
@@ -3387,6 +3387,48 @@ func TestPersistentFlagIsSet(t *testing.T) {
require.True(t, resultIsSet)
}
+func TestDuplicatePersistentFlagUsesEnvSource(t *testing.T) {
+ t.Setenv("APP_RESULT", "... | true |
urfave/cli | 2,347 | issue_to_patch | chore(deps): bump mkdocs-git-revision-date-localized-plugin from 1.5.2 to 1.5.3 in the python-packages group | Bumps the python-packages group with 1 update: [mkdocs-git-revision-date-localized-plugin](https://github.com/timvink/mkdocs-git-revision-date-localized-plugin).
Updates `mkdocs-git-revision-date-localized-plugin` from 1.5.2 to 1.5.3
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://githu... | be8b79d0c8de1a03812914c9c511c961e5ed6ecc | bc9b56b37d1ef4cfc7931a8811540cabec8bef13 | diff --git a/mkdocs-requirements.txt b/mkdocs-requirements.txt
index 4e68d7d375..701403ae56 100644
--- a/mkdocs-requirements.txt
+++ b/mkdocs-requirements.txt
@@ -1,4 +1,4 @@
-mkdocs-git-revision-date-localized-plugin==1.5.2
+mkdocs-git-revision-date-localized-plugin==1.5.3
mkdocs-material==9.7.6
mkdocs==1.6.1
mkdoc... | [
"mkdocs-requirements.txt"
] | [] | true | ||
urfave/cli | 2,339 | issue_to_patch | Fix typos | <!--
This template provides some ideas of things to include in your PR description.
To start, try providing a short summary of your changes in the Title above.
If a section of the PR template does not apply to this PR, then delete that section.
-->
## What type of PR is this?
<!--
Delete any of the ... | eb79f0545a47972c87c7c41b99d36fc5012423c9 | b57bbcce5ad46b774cb9cb25c8b39ddd3a4d02ce | diff --git a/docs/v1/examples/flags.md b/docs/v1/examples/flags.md
index 39965addb4..29c745dc20 100644
--- a/docs/v1/examples/flags.md
+++ b/docs/v1/examples/flags.md
@@ -438,7 +438,7 @@ func main() {
}
app.Action = func(c *cli.Context) error {
- fmt.Println("yaml ist rad")
+ fmt.Println("yaml is rad")
... | [
"cli_test.go",
"command_test.go",
"completion_test.go",
"docs/v1/examples/flags.md",
"docs/v3/examples/arguments/advanced.md",
"docs/v3/examples/full-api-example.md",
"flag_bool_with_inverse.go",
"flag_impl.go",
"godoc-current.txt",
"testdata/godoc-v3.x.txt"
] | [] | diff --git a/cli_test.go b/cli_test.go
index 4c2c4b26dc..fcfe491551 100644
--- a/cli_test.go
+++ b/cli_test.go
@@ -40,9 +40,9 @@ func TestTracing(t *testing.T) {
assert.NoError(t, err)
os.Stderr = file
- // Note we cant really set the env since the isTracingOn
+ // Note we can't really set the env since the isTra... | true | |
urfave/cli | 2,338 | issue_to_patch | Custom shell completion doesn't work
## My urfave/cli version is
`v3.9.0`
## Checklist
- [X] Are you running the latest v3 release? The list of releases is [here](https://github.com/urfave/cli/releases).
- [X] Did you check the manual for your release? The v3 manual is [here](https://cli.urfave.org/v3/getting-start... | Fix fish custom completion arguments | ## What type of PR is this?
- bug
## What this PR does / why we need it:
- Updates the generated fish completion script so it only forwards the current token when that token starts with `-`.
- Makes fish match the bash and zsh behavior for dynamic completions by omitting partial positional tokens from the command in... | eb79f0545a47972c87c7c41b99d36fc5012423c9 | 1549407f1f21d495b66b873e8388a0f755848e5c | diff --git a/autocomplete/fish_autocomplete b/autocomplete/fish_autocomplete
index 6714f75e0b..5f2fcd7f6b 100644
--- a/autocomplete/fish_autocomplete
+++ b/autocomplete/fish_autocomplete
@@ -6,7 +6,11 @@ function __%[1]s_perform_completion
# Extract the last arg (partial input)
set -l lastArg (commandline -ct... | [
"autocomplete/fish_autocomplete",
"completion_test.go"
] | [] | diff --git a/completion_test.go b/completion_test.go
index 3349701f53..4205b6eb28 100644
--- a/completion_test.go
+++ b/completion_test.go
@@ -167,6 +167,44 @@ func TestCompletionFishFormat(t *testing.T) {
r.Contains(output, "(__myapp_perform_completion)", "completion function should be registered")
}
+func TestCo... | true |
urfave/cli | 2,337 | issue_to_patch | Bash completion not working correctly
## My urfave/cli version is
`v3.9.0`
## Checklist
- [X] Are you running the latest v3 release? The list of releases is [here](https://github.com/urfave/cli/releases).
- [X] Did you check the manual for your release? The v3 manual is [here](https://cli.urfave.org/v3/getting-star... | Fix bash completion spacing | ## What type of PR is this?
- bug
## What this PR does / why we need it:
- Removes `-o nospace` from the generated bash completion registration.
- This lets Bash append its normal trailing space after a command or subcommand completion, so users can continue completing the next word without typing a space manually.
... | eb79f0545a47972c87c7c41b99d36fc5012423c9 | 9732d7b03a9ee8787841c38acbdabcd8c1d4f580 | diff --git a/autocomplete/bash_autocomplete b/autocomplete/bash_autocomplete
index fd08201e47..b7442e10aa 100755
--- a/autocomplete/bash_autocomplete
+++ b/autocomplete/bash_autocomplete
@@ -104,4 +104,4 @@ __%[1]s_bash_autocomplete() {
fi
}
-complete -o bashdefault -o default -o nospace -F __%[1]s_bash_autocompl... | [
"autocomplete/bash_autocomplete",
"completion_test.go"
] | [] | diff --git a/completion_test.go b/completion_test.go
index 3349701f53..1b4b710545 100644
--- a/completion_test.go
+++ b/completion_test.go
@@ -137,6 +137,27 @@ func TestCompletionBashNoShebang(t *testing.T) {
r.False(strings.HasPrefix(output, "#!"), "bash completion should not start with a shebang")
}
+func TestCo... | true |
urfave/cli | 2,286 | issue_to_patch | Dynamic fish completions breaks fish completions
Kinda seems like this broke fish completion for me:
```
❯ ./result/bin/hei completion fish|source
- (line 3): Unsupported use of '='. In fish, please use 'set string hei'.
function __%!_(string=hei)perform_completion
^~~~~~~~~^
from sourcing file -
sour... | Fix:(issue_2285): correct function and variable naming in fish completion script | This pull request updates the Fish shell autocomplete script to fix formatting and variable substitution issues, ensuring correct function naming and output formatting for command completions.
Improvements to autocomplete script:
* Renamed function and completion commands to use `%[1]s` instead of `%[1]`, ensurin... | d525e78922331468649ed06f88834cc21a4296dd | 5c68aeca9404acae9016dd039ae0a0aa2a89cc5a | diff --git a/autocomplete/fish_autocomplete b/autocomplete/fish_autocomplete
index 7aa7d0a8ba..6714f75e0b 100644
--- a/autocomplete/fish_autocomplete
+++ b/autocomplete/fish_autocomplete
@@ -1,6 +1,6 @@
# This is a shell completion script auto-generated by https://github.com/urfave/cli for fish.
-function __%[1]_per... | [
"autocomplete/fish_autocomplete",
"completion_test.go"
] | [
{
"comment": "The PR description mentions a new regression test `TestCompletionFishFormat`, but there’s no corresponding test in the repository (no references found in `completion_test.go` / other *_test.go files). Please add a test that renders the fish completion template via `shellCompletions[\"fish\"]` (or ... | diff --git a/completion_test.go b/completion_test.go
index 4f921c3f75..b53e4b90f8 100644
--- a/completion_test.go
+++ b/completion_test.go
@@ -63,6 +63,36 @@ func TestCompletionShell(t *testing.T) {
}
}
+func TestCompletionFishFormat(t *testing.T) {
+ // Regression test for https://github.com/urfave/cli/issues/228... | true |
urfave/cli | 2,286 | comment_to_fix | Fix:(issue_2285): correct function and variable naming in fish completion script | The PR description mentions a new regression test `TestCompletionFishFormat`, but there’s no corresponding test in the repository (no references found in `completion_test.go` / other *_test.go files). Please add a test that renders the fish completion template via `shellCompletions["fish"]` (or similar) and asserts the... | d525e78922331468649ed06f88834cc21a4296dd | 5c68aeca9404acae9016dd039ae0a0aa2a89cc5a | diff --git a/autocomplete/fish_autocomplete b/autocomplete/fish_autocomplete
index 7aa7d0a8ba..6714f75e0b 100644
--- a/autocomplete/fish_autocomplete
+++ b/autocomplete/fish_autocomplete
@@ -1,6 +1,6 @@
# This is a shell completion script auto-generated by https://github.com/urfave/cli for fish.
-function __%[1]_per... | [
"autocomplete/fish_autocomplete"
] | [
{
"comment": "The PR description mentions a new regression test `TestCompletionFishFormat`, but there’s no corresponding test in the repository (no references found in `completion_test.go` / other *_test.go files). Please add a test that renders the fish completion template via `shellCompletions[\"fish\"]` (or ... | true | ||
urfave/cli | 2,334 | issue_to_patch | chore(deps): bump mkdocs-git-revision-date-localized-plugin from 1.5.1 to 1.5.2 in the python-packages group | Bumps the python-packages group with 1 update: [mkdocs-git-revision-date-localized-plugin](https://github.com/timvink/mkdocs-git-revision-date-localized-plugin).
Updates `mkdocs-git-revision-date-localized-plugin` from 1.5.1 to 1.5.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://githu... | 9229c617cb4ed5983b42fd8cd689895c332a3e3e | ee92732fad2ccec35d219f9b11a6e2205f02eeca | diff --git a/mkdocs-requirements.txt b/mkdocs-requirements.txt
index d7f1b2c694..4e68d7d375 100644
--- a/mkdocs-requirements.txt
+++ b/mkdocs-requirements.txt
@@ -1,4 +1,4 @@
-mkdocs-git-revision-date-localized-plugin==1.5.1
+mkdocs-git-revision-date-localized-plugin==1.5.2
mkdocs-material==9.7.6
mkdocs==1.6.1
mkdoc... | [
"mkdocs-requirements.txt"
] | [] | true | ||
urfave/cli | 2,280 | issue_to_patch | Problem with next argument matching flag name with no default command.
https://github.com/urfave/cli/blob/fd14621cbcd644aa35483480d40f7cdf7b69f4c0/command_run.go#L276
In the case where a command has no DefaultCommand and has a flag with the name of the next argument, the line above inserts a spurious empty string ahe... | Fix 2257 - Remove incorrect flag check |
<!--
This template provides some ideas of things to include in your PR description.
To start, try providing a short summary of your changes in the Title above.
If a section of the PR template does not apply to this PR, then delete that section.
-->
## What type of PR is this?
_(REQUIRED)_
<!--
... | b5aa7101bd66f4340bfd737fe4bf12496d625632 | 466b5d3b50e62dc5ed89611fb20bad9b3f289076 | diff --git a/command_run.go b/command_run.go
index 269dd85f2e..86335a7e83 100644
--- a/command_run.go
+++ b/command_run.go
@@ -268,13 +268,12 @@ func (cmd *Command) run(ctx context.Context, osArgs []string) (_ context.Context
subCmd = cmd.Command(name)
if subCmd == nil {
hasDefault := cmd.DefaultCommand != ""... | [
"command_run.go",
"command_test.go"
] | [] | diff --git a/command_test.go b/command_test.go
index 72fa6a6628..56c351cf0b 100644
--- a/command_test.go
+++ b/command_test.go
@@ -5724,3 +5724,33 @@ func TestFlagEqualsEmptyValue(t *testing.T) {
assert.Equal(t, []string{"positional"}, args)
})
}
+
+// TestCommand_NoDefaultCmdArgMatchingFlag tests the argument se... | true |
urfave/cli | 2,279 | issue_to_patch | Improve the completion command to handle flags and arguments properly
This issue proposes improvements to the behavior of the `completion` command.
## Current Issues
1. The `completion` command does not parse flags, so it does not support the `--help` flag and returns an error.
```
completion --help
unknown shell -... | Improve the completion command to handle flags and arguments properly | <!--
This template provides some ideas of things to include in your PR description.
To start, try providing a short summary of your changes in the Title above.
If a section of the PR template does not apply to this PR, then delete that section.
-->
## What type of PR is this?
_(REQUIRED)_
<!--
De... | b5aa7101bd66f4340bfd737fe4bf12496d625632 | 21294e58e742b266e158aa071e18c9b687d16cf7 | diff --git a/command.go b/command.go
index d1a9d0575d..d1fc008e78 100644
--- a/command.go
+++ b/command.go
@@ -303,6 +303,9 @@ func (cmd *Command) appendFlag(fl Flag) {
// VisiblePersistentFlags returns a slice of [LocalFlag] with Persistent=true and Hidden=false.
func (cmd *Command) VisiblePersistentFlags() []Flag... | [
"command.go",
"command_run.go",
"completion.go",
"completion_test.go"
] | [
{
"comment": "Hmm. In this case the original error message is more appropriate.\nCan we accept this change?\nThe error message is built-in, so I guess it's a bit hard to fix this.\n\n```console\n$ pinact completion foo\nNo help topic for 'foo'\n```",
"path": "completion_test.go",
"hunk": "@@ -187,25 +24... | diff --git a/completion_test.go b/completion_test.go
index 889bfdcf59..3349701f53 100644
--- a/completion_test.go
+++ b/completion_test.go
@@ -11,6 +11,53 @@ import (
"github.com/stretchr/testify/require"
)
+func TestCompletionHelp(t *testing.T) {
+ tests := []struct {
+ name string
+ args []string
+ }{
+ {
+ ... | true |
urfave/cli | 2,279 | comment_to_fix | Improve the completion command to handle flags and arguments properly | Hmm. In this case the original error message is more appropriate.
Can we accept this change?
The error message is built-in, so I guess it's a bit hard to fix this.
```console
$ pinact completion foo
No help topic for 'foo'
``` | b5aa7101bd66f4340bfd737fe4bf12496d625632 | 21294e58e742b266e158aa071e18c9b687d16cf7 | diff --git a/completion_test.go b/completion_test.go
index 889bfdcf59..3349701f53 100644
--- a/completion_test.go
+++ b/completion_test.go
@@ -11,6 +11,53 @@ import (
"github.com/stretchr/testify/require"
)
+func TestCompletionHelp(t *testing.T) {
+ tests := []struct {
+ name string
+ args []string
+ }{
+ {
+ ... | [
"completion_test.go"
] | [
{
"comment": "Hmm. In this case the original error message is more appropriate.\nCan we accept this change?\nThe error message is built-in, so I guess it's a bit hard to fix this.\n\n```console\n$ pinact completion foo\nNo help topic for 'foo'\n```",
"path": "completion_test.go",
"hunk": "@@ -187,25 +24... | true | ||
urfave/cli | 2,321 | issue_to_patch | BoolWithInverseFlag alias not shown in help
## My urfave/cli version is
_**3.5.0**_
## Dependency Management
- My project is using go modules.
## Describe the bug
Aliases defined for BoolWithInverseFlag are processed, but not shown in usage text.
## To reproduce
&cli.BoolWithInverseFlag{
Name: "... | fix: show BoolWithInverseFlag aliases in help text | Aliases defined on `BoolWithInverseFlag` are functional but were not displayed in usage/help output. The `String()` method only rendered `--[no-]<name>` without including any aliases.
### Before
```
--[no-]color (default: false)
```
### After
```
--[no-]color, -c (default: false)
--[no-]color, --colour (default: fals... | f2cd020bd861a905691710c34d8cd6694906c32f | 2f662c8796e29c20aa8c27e092d895334df8ff91 | diff --git a/flag_bool_with_inverse.go b/flag_bool_with_inverse.go
index 680fe2c64e..8666e2d3d5 100644
--- a/flag_bool_with_inverse.go
+++ b/flag_bool_with_inverse.go
@@ -167,6 +167,9 @@ func (bif *BoolWithInverseFlag) IsVisible() bool {
//
// Example for BoolFlag{Name: "env"}
// --[no-]env (default: false)
+//
+// ... | [
"flag_bool_with_inverse.go",
"flag_bool_with_inverse_test.go",
"godoc-current.txt",
"testdata/godoc-v3.x.txt"
] | [] | diff --git a/flag_bool_with_inverse_test.go b/flag_bool_with_inverse_test.go
index fbb7e43ff8..083a072e27 100644
--- a/flag_bool_with_inverse_test.go
+++ b/flag_bool_with_inverse_test.go
@@ -345,6 +345,7 @@ func TestBoolWithInverseString(t *testing.T) {
required bool
usage string
inversePrefix str... | true |
urfave/cli | 2,319 | issue_to_patch | v3.6.2 regression: flag parsing skipped for help subcommands
*Filed by Claude on behalf of @silverwind*
## Description
PR #2245 introduced a regression in v3.6.2 where flag pre-parsing is skipped for any command named "help". This breaks applications that use flags with help subcommands, as the flags are never parse... | fix: parse flags for help subcommand (#2271) | ## What type of PR is this?
- bug
## What this PR does / why we need it:
PR #2245 introduced a regression in v3.6.2 by short-circuiting flag pre-parsing for any command named \`help\`:
```go
if cmd.isCompletionCommand || cmd.Name == helpName {
cmd.parsedArgs = args
return ctx, cmd.Action(ctx, cmd)
}
```
Th... | b79d76894ba609be305dbb458a95f1bad6ef7f2f | 5af95006c1cb31cdeb4d9c90ef3303af10950eb6 | diff --git a/command.go b/command.go
index 2a46b2eab1..d1a9d0575d 100644
--- a/command.go
+++ b/command.go
@@ -408,6 +408,12 @@ func (cmd *Command) checkRequiredFlag(f Flag) (bool, string) {
}
func (cmd *Command) checkAllRequiredFlags() requiredFlagsErr {
+ // The help and completion commands are allowed to run wit... | [
"command.go",
"command_run.go",
"help_test.go"
] | [] | diff --git a/help_test.go b/help_test.go
index 97f657508e..d3c831371d 100644
--- a/help_test.go
+++ b/help_test.go
@@ -164,6 +164,35 @@ GLOBAL OPTIONS:
"expected output to include usage text")
}
+// Test_HelpCommand_ParsesFlags is a regression test for #2271: flags
+// declared on a user-supplied command named "h... | true |
urfave/cli | 2,316 | issue_to_patch | Shell completion fails for `--` and `--prefix` flag patterns
## My urfave/cli version is
v3 (a9261cf1832b278c1c195c91f9ee961f5fc9554e)
## Checklist
- [x] Are you running the latest v3 release? The list of releases is [here](https://github.com/urfave/cli/releases).
- [x] Did you check the manual for your release? Th... | fix: show flag completions when completing a double-dash prefix | ## What type of PR is this?
- bug
## What this PR does / why we need it:
When the user types `cmd subcommand --<TAB>` or `cmd subcommand --prefix<TAB>`, the CLI should show available flags. Previously, this produced no completions or malformed output because of four bugs:
1. `checkShellCompleteFlag()` disab... | a9261cf1832b278c1c195c91f9ee961f5fc9554e | 5a83f1e9b2ba8b3baae0120aa5f54192c093feff | diff --git a/command_parse.go b/command_parse.go
index 92c58eeaac..2b9a481df2 100644
--- a/command_parse.go
+++ b/command_parse.go
@@ -86,6 +86,11 @@ func (cmd *Command) parseFlags(args Args) (Args, error) {
// stop parsing once we see a "--"
if firstArg == "--" {
+ // In shell completion mode, preserve "--" ... | [
"command_parse.go",
"command_test.go",
"completion_test.go",
"help.go",
"help_test.go"
] | [] | diff --git a/command_test.go b/command_test.go
index dafee0bee6..89a618a38d 100644
--- a/command_test.go
+++ b/command_test.go
@@ -599,8 +599,8 @@ func TestCommand_Run_CustomShellCompleteAcceptsMalformedFlags(t *testing.T) {
testArgs *stringSliceArgs
expectedOut string
}{
- {testArgs: &stringSliceArgs{v: []... | true |
urfave/cli | 2,317 | issue_to_patch | completion should not have shebang
## My urfave/cli version is
v3 (latest)
## Checklist
- [x] Are you running the latest v3 release?
- [x] Did you check the manual for your release?
- [x] Did you perform a search about this problem?
## Dependency Management
- My project is using go modules.
## Describe the bug
... | fix: drop shebang from bash completion template | ## What type of PR is this?
- bug
## What this PR does / why we need it:
Bash completion scripts are sourced (not executed), so they shouldn't start with a `#!/bin/bash` shebang. Debian's lintian flags the generated completion with [`bash-completion-with-hashbang`](https://lintian.debian.org/tags/bash-completion-wit... | bc00bd4d77dae229ec7d0cb46b67760e168b28c9 | eb4cfc3a0476cd488ebd22ebfb48c01a67c53735 | diff --git a/autocomplete/bash_autocomplete b/autocomplete/bash_autocomplete
index 987314422a..cf9c20f31b 100755
--- a/autocomplete/bash_autocomplete
+++ b/autocomplete/bash_autocomplete
@@ -1,5 +1,3 @@
-#!/bin/bash
-
# This is a shell completion script auto-generated by https://github.com/urfave/cli for bash.
# Ma... | [
"autocomplete/bash_autocomplete",
"completion_test.go"
] | [] | diff --git a/completion_test.go b/completion_test.go
index b53e4b90f8..d0c5e684c9 100644
--- a/completion_test.go
+++ b/completion_test.go
@@ -4,6 +4,7 @@ import (
"bytes"
"context"
"fmt"
+ "strings"
"testing"
"github.com/stretchr/testify/assert"
@@ -63,6 +64,27 @@ func TestCompletionShell(t *testing.T) {
... | true |
urfave/cli | 2,308 | issue_to_patch | refactor: bash completion script | <!--
This template provides some ideas of things to include in your PR description.
To start, try providing a short summary of your changes in the Title above.
If a section of the PR template does not apply to this PR, then delete that section.
-->
## What type of PR is this?
<!--
Delete any of the following... | a9261cf1832b278c1c195c91f9ee961f5fc9554e | f07adff7bd55a53d15566e79bae54be4f7114e93 | diff --git a/autocomplete/bash_autocomplete b/autocomplete/bash_autocomplete
index 987314422a..cecd90063d 100755
--- a/autocomplete/bash_autocomplete
+++ b/autocomplete/bash_autocomplete
@@ -2,63 +2,105 @@
# This is a shell completion script auto-generated by https://github.com/urfave/cli for bash.
-# Macs have ba... | [
"autocomplete/bash_autocomplete"
] | [] | true | ||
urfave/cli | 2,311 | issue_to_patch | BoolWithInverseFlag.String() panics when FlagStringer returns string without tab
## Summary
`BoolWithInverseFlag.String()` panics with `slice bounds out of range [-1:]` when the `FlagStringer` function returns a string that does not contain a tab character. Since `FlagStringer` is a public variable that users are enc... | flag: prevent BoolWithInverseFlag.String from panicking without a tab | ## Summary
`BoolWithInverseFlag.String()` panics with `slice bounds out of range [-1:]` when `FlagStringer` returns a string without a tab character.
The code uses `strings.Index(out, "\t")` and then slices `out[i:]`. When no tab is present, `i` is `-1` and `out[-1:]` panics.
### Before
```go
// FlagStringer return... | a9261cf1832b278c1c195c91f9ee961f5fc9554e | 760eb190baf688d40d128b7c0a4b2d11139ebed0 | diff --git a/flag_bool_with_inverse.go b/flag_bool_with_inverse.go
index 272dd98fec..680fe2c64e 100644
--- a/flag_bool_with_inverse.go
+++ b/flag_bool_with_inverse.go
@@ -179,6 +179,14 @@ func (bif *BoolWithInverseFlag) String() string {
prefix = "-"
}
+ // Guard against a FlagStringer that returns a string with... | [
"flag_bool_with_inverse.go",
"flag_bool_with_inverse_test.go"
] | [] | diff --git a/flag_bool_with_inverse_test.go b/flag_bool_with_inverse_test.go
index 981494586b..fbb7e43ff8 100644
--- a/flag_bool_with_inverse_test.go
+++ b/flag_bool_with_inverse_test.go
@@ -520,3 +520,26 @@ func TestBoolWithInverseFlag_SatisfiesVisibleFlagInterface(t *testing.T) {
_ = f.IsVisible()
}
+
+// TestBo... | true |
urfave/cli | 2,310 | issue_to_patch | v3.6.2 adds empty line to stderr when cli.Exit is called with empty message
## My urfave/cli version is
v3.3.3
## Checklist
- [ ] Are you running the latest v3 release? The list of releases is [here](https://github.com/urfave/cli/releases).
- [x] Did you check the manual for your release? The v3 manual is [here](ht... | fix: don't print empty line to stderr when Exit message is empty | Fixes #2263
## Problem
`HandleExitCoder` unconditionally prints the error to `ErrWriter`, causing an empty line on stderr when `Exit("", code)` is used:
```go
cli.Exit("", exitError.ExitCode()) // prints "\n" to stderr
```
This was introduced in #2237.
## Fix
Check if the error message is non-empty before printin... | a9261cf1832b278c1c195c91f9ee961f5fc9554e | 6ce476e539dd29b69d4c57ae83f9af1ddaffc611 | diff --git a/errors.go b/errors.go
index f365a57990..ffd6471f23 100644
--- a/errors.go
+++ b/errors.go
@@ -150,10 +150,12 @@ func HandleExitCoder(err error) {
}
if exitErr, ok := err.(ExitCoder); ok {
- if _, ok := exitErr.(ErrorFormatter); ok {
- _, _ = fmt.Fprintf(ErrWriter, "%+v\n", err)
- } else {
- _, ... | [
"errors.go",
"errors_test.go"
] | [] | diff --git a/errors_test.go b/errors_test.go
index 35aaab54d4..e995b6f250 100644
--- a/errors_test.go
+++ b/errors_test.go
@@ -232,3 +232,29 @@ func TestErrRequiredFlags_Error(t *testing.T) {
expectedMsg = "Required flag \"flag1\" not set"
assert.Equal(t, expectedMsg, err.Error())
}
+
+func TestHandleExitCoder_Exi... | true |
urfave/cli | 2,309 | issue_to_patch | Split separator in StringSliceFlag ignored when using environment variable as source
## My urfave/cli version is
3.6.x (works in 3.5.0)
## Checklist
- [x] Are you running the latest v3 release? 3.6.2 is impacted
- [x] Did you check the manual for your release? yes
- [x] Did you perform a search about this problem?
... | fix: apply SliceFlagSeparator to env var sources | ## What type of PR is this?
- bug fix
## What this PR does / why we need it:
`SliceFlagSeparator` is ignored when a flag's value comes from an environment variable. The custom separator only works for CLI arguments.
**Root cause:** `setMultiValueParsingConfig` is called during CLI argument parsing (via `cmd.set`), ... | a9261cf1832b278c1c195c91f9ee961f5fc9554e | 8d51bb94330dfed0eac0e73d35afa2c8385f636d | diff --git a/command_run.go b/command_run.go
index 676a14c676..8a135a7732 100644
--- a/command_run.go
+++ b/command_run.go
@@ -213,6 +213,7 @@ func (cmd *Command) run(ctx context.Context, osArgs []string) (_ context.Context
}
for _, flag := range cmd.allFlags() {
+ cmd.setMultiValueParsingConfig(flag)
isSet :... | [
"command_run.go",
"command_test.go"
] | [] | diff --git a/command_test.go b/command_test.go
index dafee0bee6..3a3a8b0593 100644
--- a/command_test.go
+++ b/command_test.go
@@ -4590,6 +4590,24 @@ func TestCommandSliceFlagSeparator(t *testing.T) {
r.Equal([]string{"ff", "dd", "gg", "t,u"}, cmd.Value("foo"))
}
+func TestCommandSliceFlagSeparatorFromEnvVar(t *te... | true |
urfave/cli | 2,307 | issue_to_patch | fix(ci): update docs after bash completion update | <!--
This template provides some ideas of things to include in your PR description.
To start, try providing a short summary of your changes in the Title above.
If a section of the PR template does not apply to this PR, then delete that section.
-->
## What type of PR is this?
fix
<!--
Delete any of the foll... | a9261cf1832b278c1c195c91f9ee961f5fc9554e | 32da055fcffc5059dddf6cd82b289960927bc4ec | diff --git a/docs/v3/examples/completions/customizations.md b/docs/v3/examples/completions/customizations.md
index 183f3d8250..96f3565359 100644
--- a/docs/v3/examples/completions/customizations.md
+++ b/docs/v3/examples/completions/customizations.md
@@ -112,7 +112,7 @@ The default shell completion flag (`--generate-sh... | [
"docs/v3/examples/completions/customizations.md"
] | [] | true | ||
urfave/cli | 2,287 | issue_to_patch | Made command help more consistent | ## What type of PR is this?
- bug
## What this PR does / why we need it:
I was trying to customize the help in my app by setting the following to custom functions:
* `cli.ShowRootCommandHelp`
* `cli.ShowCommandHelp`
* `cli.ShowSubcommandHelp`
However I noticed that in the particular case of `app comman... | 4dc6aa66962b42149d6a95c722577c7cadc28bcd | e7c80cea88b2540d921c96347fd103a8279299ca | diff --git a/help.go b/help.go
index 0f7f629caf..30d017d3a1 100644
--- a/help.go
+++ b/help.go
@@ -126,16 +126,8 @@ func helpCommandAction(ctx context.Context, cmd *Command) error {
// Case 3, 5
if len(cmd.VisibleCommands()) == 0 {
-
- tmpl := cmd.CustomHelpTemplate
- if tmpl == "" {
- tmpl = CommandHelpTempl... | [
"examples_test.go",
"help.go",
"help_test.go"
] | [] | diff --git a/examples_test.go b/examples_test.go
index afda009ceb..2167fc9f3c 100644
--- a/examples_test.go
+++ b/examples_test.go
@@ -182,13 +182,16 @@ func ExampleCommand_Run_commandHelp() {
// greet describeit - use it to see a description
//
// USAGE:
- // greet describeit [arguments...]
+ // greet d... | true | |
urfave/cli | 2,298 | issue_to_patch | Shell completions are broken when login shell is different than currently active shell
## My urfave/cli version is
2.27.1
## Checklist
- [x] Are you running the latest v2 release? The list of releases is [here](https://github.com/urfave/cli/releases).
- [x] Did you check the manual for your release? The v2 m... | feat: add descriptions for bash and powershell autocompletion | <!--
This template provides some ideas of things to include in your PR description.
To start, try providing a short summary of your changes in the Title above.
If a section of the PR template does not apply to this PR, then delete that section.
-->
## What type of PR is this?
<!--
Delete any of the ... | 894ce19dd4a6dc1aa174f55cc8f149dac1aaae85 | 113075e7b4004987b68b07dba502ed3e2a96e2b0 | diff --git a/autocomplete/bash_autocomplete b/autocomplete/bash_autocomplete
index d63937d971..987314422a 100755
--- a/autocomplete/bash_autocomplete
+++ b/autocomplete/bash_autocomplete
@@ -26,7 +26,40 @@ __%[1]s_bash_autocomplete() {
requestComp="${words[*]} --generate-shell-completion"
fi
opts=$(eva... | [
"autocomplete/bash_autocomplete",
"autocomplete/powershell_autocomplete.ps1",
"examples_test.go",
"help.go"
] | [] | diff --git a/examples_test.go b/examples_test.go
index afda009ceb..d5aa1ef2c6 100644
--- a/examples_test.go
+++ b/examples_test.go
@@ -258,14 +258,13 @@ func ExampleCommand_Run_shellComplete_bash_withShortFlag() {
}
// Simulate a bash environment and command line arguments
- os.Setenv("SHELL", "bash")
os.Args =... | true |
urfave/cli | 2,299 | issue_to_patch | docs: fix typo | <!--
This template provides some ideas of things to include in your PR description.
To start, try providing a short summary of your changes in the Title above.
If a section of the PR template does not apply to this PR, then delete that section.
-->
## What type of PR is this?
- documentation
## What... | ef08e2ed42d996da3e0c981e149b5d4943e1d693 | efe1899d4174f15079b8af4a8e2446e86e68439d | diff --git a/docs/v3/examples/completions/shell-completions.md b/docs/v3/examples/completions/shell-completions.md
index b355a6320f..8c4137e598 100644
--- a/docs/v3/examples/completions/shell-completions.md
+++ b/docs/v3/examples/completions/shell-completions.md
@@ -6,7 +6,7 @@ search:
---
The urfave/cli v3 library... | [
"docs/v3/examples/completions/shell-completions.md"
] | [] | true | ||
urfave/cli | 2,301 | issue_to_patch | chore(deps): bump the python-packages group across 1 directory with 3 updates | Bumps the python-packages group with 3 updates in the / directory: [mkdocs-material](https://github.com/squidfunk/mkdocs-material), [mkdocs-redirects](https://github.com/ProperDocs/properdocs-redirects) and [pygments](https://github.com/pygments/pygments).
Updates `mkdocs-material` from 9.7.5 to 9.7.6
<details>
<summa... | b7d05674ff6e22e1c43ec2fb77e738531bf61115 | b5636a9e65f90a78ca14252334842f097509f387 | diff --git a/mkdocs-requirements.txt b/mkdocs-requirements.txt
index e5848c726a..d7f1b2c694 100644
--- a/mkdocs-requirements.txt
+++ b/mkdocs-requirements.txt
@@ -1,5 +1,5 @@
mkdocs-git-revision-date-localized-plugin==1.5.1
-mkdocs-material==9.7.5
+mkdocs-material==9.7.6
mkdocs==1.6.1
-mkdocs-redirects==1.2.2
-pygmen... | [
"mkdocs-requirements.txt"
] | [] | true | ||
urfave/cli | 2,300 | issue_to_patch | chore(deps): bump codecov/codecov-action from 5 to 6 | Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5 to 6.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/codecov/codecov-action/releases">codecov/codecov-action's releases</a>.</em></p>
<blockquote>
<h2>v6.0.0</h2>
<h2>⚠️ This version introduces s... | 78e356c8ef99e4c360ad82118ed5089f2309975b | 21cc191c9624c1010058ee6eacca12125ace5909 | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index f45a1a19aa..11de4a757f 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -53,7 +53,7 @@ jobs:
run: make v3diff
- if: success() && matrix.go == 'stable' && matrix.os == 'ubuntu-24.04'
- uses: cod... | [
".github/workflows/test.yml"
] | [] | true | ||
urfave/cli | 2,296 | issue_to_patch | Empty positional arguments terminate parse loop, dropping remaining args
## My urfave/cli version is
v3.7.0 (also reproduced on latest `main` at commit `4dc6aa6`)
## Checklist
- [x] Are you running the latest v3 release? The list of releases is [here](https://github.com/urfave/cli/releases).
- [x] Did you check the... | Fix:(issue_2292) Empty positional args no longer break parse loop | ## What type of PR is this?
* bug
## What this PR does / why we need it:
Empty or whitespace-only positional arguments cause `parseFlags()` to `break` out of the parse loop, silently dropping them and all subsequent arguments.
`break` → `append` + `continue` so empty args are collected as positional argumen... | 41c4f5ff8d7c6944fd97d0bcf1f5a1d47de75092 | 4d20bae5ad72a793030f9c6e5d01551a32dc286d | diff --git a/command_parse.go b/command_parse.go
index 1913c82fef..92c58eeaac 100644
--- a/command_parse.go
+++ b/command_parse.go
@@ -80,7 +80,8 @@ func (cmd *Command) parseFlags(args Args) (Args, error) {
firstArg := strings.TrimSpace(rargs[0])
if len(firstArg) == 0 {
- break
+ posArgs = append(posArgs, r... | [
"command_parse.go",
"command_test.go"
] | [
{
"comment": "@idelchi Can you combine these into a single loop ? Something like \n\n`testCases := []struct{\n Name string\n Args []string\n}{\n {\n Name: \"empty arg between value\",\n Args: []string{\"app\", \"hello\", \"\", \"world\"}\n }\n....\n}\n`\nand then do a range over test c... | diff --git a/command_test.go b/command_test.go
index 2007155f4b..dafee0bee6 100644
--- a/command_test.go
+++ b/command_test.go
@@ -823,7 +823,7 @@ var defaultCommandTests = []struct {
{"f", "", nil, true},
{"", "foobar", nil, true},
{"", "", nil, true},
- {" ", "", nil, true},
+ {" ", "", nil, false},
{"bat", "... | true |
urfave/cli | 2,296 | comment_to_fix | Fix:(issue_2292) Empty positional args no longer break parse loop | @idelchi Can you combine these into a single loop ? Something like
`testCases := []struct{
Name string
Args []string
}{
{
Name: "empty arg between value",
Args: []string{"app", "hello", "", "world"}
}
....
}
`
and then do a range over test cases loop
| 41c4f5ff8d7c6944fd97d0bcf1f5a1d47de75092 | 4d20bae5ad72a793030f9c6e5d01551a32dc286d | diff --git a/command_test.go b/command_test.go
index 2007155f4b..dafee0bee6 100644
--- a/command_test.go
+++ b/command_test.go
@@ -823,7 +823,7 @@ var defaultCommandTests = []struct {
{"f", "", nil, true},
{"", "foobar", nil, true},
{"", "", nil, true},
- {" ", "", nil, true},
+ {" ", "", nil, false},
{"bat", "... | [
"command_test.go"
] | [
{
"comment": "@idelchi Can you combine these into a single loop ? Something like \n\n`testCases := []struct{\n Name string\n Args []string\n}{\n {\n Name: \"empty arg between value\",\n Args: []string{\"app\", \"hello\", \"\", \"world\"}\n }\n....\n}\n`\nand then do a range over test c... | true | ||
urfave/cli | 2,297 | issue_to_patch | --flag="" rejected as missing argument instead of setting empty string
## My urfave/cli version is
v3.7.0 (also reproduced on latest `main` at commit `4dc6aa6`)
## Checklist
- [x] Are you running the latest v3 release? The list of releases is [here](https://github.com/urfave/cli/releases).
- [x] Did you check the m... | Fix:(issue_2293) --flag="" no longer rejected as missing argument | ## What type of PR is this?
* bug
## What this PR does / why we need it:
`--flag=` (explicit empty value via `=`) is rejected with "flag needs an argument" instead of setting the flag to an empty string. This is a side effect of #2223 where the `valFromEqual` guard was made slightly too broad.
Tightened the... | a2d0cf1d520d827910502403d0f0e232bf2c94da | 195aaffb96197ce82a65b6ef579b873eff9c5292 | diff --git a/command_parse.go b/command_parse.go
index f8103d12f2..1913c82fef 100644
--- a/command_parse.go
+++ b/command_parse.go
@@ -163,8 +163,8 @@ func (cmd *Command) parseFlags(args Args) (Args, error) {
tracef("processing non bool flag (fName=%[1]q)", flagName)
// not a bool flag so need to get the next... | [
"command_parse.go",
"command_test.go"
] | [
{
"comment": "Flag Action is not needed to set \"val\" since Destination is already pointing to that",
"path": "command_test.go",
"hunk": "@@ -5575,3 +5542,50 @@ func TestCommand_ExclusiveFlagsPersistent(t *testing.T) {\n \t\t})\n \t}\n }\n+\n+func TestFlagEqualsEmptyValue(t *testing.T) {\n+\tt.Run(\"--... | diff --git a/command_test.go b/command_test.go
index 47528ac7e7..7636ff545b 100644
--- a/command_test.go
+++ b/command_test.go
@@ -2801,12 +2801,12 @@ func TestFlagAction(t *testing.T) {
{
name: "flag_string_error",
args: []string{"app", "--f_string="},
- err: "flag needs an argument: --f_string=",
+ er... | true |
urfave/cli | 2,297 | comment_to_fix | Fix:(issue_2293) --flag="" no longer rejected as missing argument | Flag Action is not needed to set "val" since Destination is already pointing to that | a2d0cf1d520d827910502403d0f0e232bf2c94da | 195aaffb96197ce82a65b6ef579b873eff9c5292 | diff --git a/command_test.go b/command_test.go
index 47528ac7e7..7636ff545b 100644
--- a/command_test.go
+++ b/command_test.go
@@ -2801,12 +2801,12 @@ func TestFlagAction(t *testing.T) {
{
name: "flag_string_error",
args: []string{"app", "--f_string="},
- err: "flag needs an argument: --f_string=",
+ er... | [
"command_test.go"
] | [
{
"comment": "Flag Action is not needed to set \"val\" since Destination is already pointing to that",
"path": "command_test.go",
"hunk": "@@ -5575,3 +5542,50 @@ func TestCommand_ExclusiveFlagsPersistent(t *testing.T) {\n \t\t})\n \t}\n }\n+\n+func TestFlagEqualsEmptyValue(t *testing.T) {\n+\tt.Run(\"--... | true | ||
urfave/cli | 2,295 | issue_to_patch | flag actioning order is not consistent
## My urfave/cli version is
_**v3.7.0**_
## Checklist
- [x] Are you running the latest v3 release? The list of releases is [here](https://github.com/urfave/cli/releases).
- [x] Did you check the manual for your release? The v3 manual is [here](https://cli.urfave.org/v3/getting... | Fix:(issue_2275) Make flag action execution consistent | <!--
This template provides some ideas of things to include in your PR description.
To start, try providing a short summary of your changes in the Title above.
If a section of the PR template does not apply to this PR, then delete that section.
-->
## What type of PR is this?
_(REQUIRED)_
<!--
De... | a2d0cf1d520d827910502403d0f0e232bf2c94da | 94d2512c76accdd3fac7eb530573cf4f7ae8490e | diff --git a/command.go b/command.go
index cfdc5601dd..2a46b2eab1 100644
--- a/command.go
+++ b/command.go
@@ -582,19 +582,14 @@ func (cmd *Command) NArg() int {
func (cmd *Command) runFlagActions(ctx context.Context) error {
tracef("runFlagActions")
- for fl := range cmd.setFlags {
- /*tracef("checking %v:%v", f... | [
"command.go",
"command_test.go"
] | [] | diff --git a/command_test.go b/command_test.go
index 47528ac7e7..059061e92c 100644
--- a/command_test.go
+++ b/command_test.go
@@ -2185,6 +2185,54 @@ func TestCommand_OrderOfOperations(t *testing.T) {
})
}
+func TestFlagActionOrder(t *testing.T) {
+ tests := []struct {
+ Name string
+ Args []string
+ }{
+ {
+ ... | true |
urfave/cli | 2,290 | issue_to_patch | Local: true breaks multi-value flags (slice/map) — PreParse resets on every Set call
## My urfave/cli version is
v3.7.0 (also reproduced on latest `main` at commit `a107ee4`)
## Checklist
- [x] Are you running the latest v3 release? The list of releases is [here](https://github.com/urfave/cli/releases).
- [x] Did y... | Fix:(issue_2281) Remove incorrect check for local flag for set | <!--
This template provides some ideas of things to include in your PR description.
To start, try providing a short summary of your changes in the Title above.
If a section of the PR template does not apply to this PR, then delete that section.
-->
## What type of PR is this?
_(REQUIRED)_
<!--
De... | 4dc6aa66962b42149d6a95c722577c7cadc28bcd | 1f0c18892598bdc5f17561d6ad13803dba24a81a | diff --git a/flag_impl.go b/flag_impl.go
index c7cc8dffc5..1ca295aaf2 100644
--- a/flag_impl.go
+++ b/flag_impl.go
@@ -185,7 +185,7 @@ func (f *FlagBase[T, C, V]) Set(_ string, val string) error {
// lots of units tests prior to persistent flags assumed that the
// flag can be applied to different flag sets multipl... | [
"command_test.go",
"flag_impl.go"
] | [] | diff --git a/command_test.go b/command_test.go
index 88369cc0fa..47528ac7e7 100644
--- a/command_test.go
+++ b/command_test.go
@@ -3105,6 +3105,39 @@ func TestFlagAction(t *testing.T) {
}
}
+func TestLocalSliceFlagAccumulation(t *testing.T) {
+ var got []string
+
+ app := &Command{
+ Name: "app",
+ Commands: []*... | true |
urfave/cli | 2,288 | issue_to_patch | flag: replace regexp use |
## What type of PR is this?
- cleanup
## What this PR does / why we need it:
Commit ec05a8d3 introduces the only (non-test) user of regexp package.
It is pretty easy to not use regexp here, so let's get rid of it.
References:
- https://github.com/opencontainers/runc/pull/5184#issuecomment-4100226858
... | 6a8503dc6e59e427ab108ee20361b9845949e0ec | cb07aa408018eeedc5d3cf29e7b8f19d37421921 | diff --git a/flag.go b/flag.go
index 1a65948ec4..1b849f1228 100644
--- a/flag.go
+++ b/flag.go
@@ -3,7 +3,6 @@ package cli
import (
"context"
"fmt"
- "regexp"
"slices"
"strings"
"time"
@@ -17,11 +16,7 @@ const (
disableSliceFlagSeparator = false
)
-var (
- slPfx = fmt.Sprintf("sl:::%d:::", time.No... | [
"flag.go"
] | [] | true | ||
urfave/cli | 2,284 | issue_to_patch | chore(deps): bump mkdocs-material from 9.7.4 to 9.7.5 in the python-packages group | Bumps the python-packages group with 1 update: [mkdocs-material](https://github.com/squidfunk/mkdocs-material).
Updates `mkdocs-material` from 9.7.4 to 9.7.5
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/squidfunk/mkdocs-material/releases">mkdocs-material's releases</a>.</e... | 58e99ee221418ecf872deb0f966f9ffe4a0feba9 | eacaee5c560f933c84b53a4eb3ca7dcc7d65cdb1 | diff --git a/mkdocs-requirements.txt b/mkdocs-requirements.txt
index 843fb18ffa..e5848c726a 100644
--- a/mkdocs-requirements.txt
+++ b/mkdocs-requirements.txt
@@ -1,5 +1,5 @@
mkdocs-git-revision-date-localized-plugin==1.5.1
-mkdocs-material==9.7.4
+mkdocs-material==9.7.5
mkdocs==1.6.1
mkdocs-redirects==1.2.2
pygmen... | [
"mkdocs-requirements.txt"
] | [] | true | ||
urfave/cli | 2,289 | issue_to_patch | Modernize source code | ## What type of PR is this?
- cleanup
## What this PR does / why we need it:
Modernize the code (mostly using Go modernize suggestions).
## Which issue(s) this PR fixes:
None
## Special notes for your reviewer:
Please review commit by commit; see individual commits for more details.
## Testing... | a107ee4e9d5ada60a8f10292a045e9a4cbae1450 | 0250ac6fa0ebc1fdd5f2f48d4f0af1eb422b46fe | diff --git a/command.go b/command.go
index 8f73fd28d7..cfdc5601dd 100644
--- a/command.go
+++ b/command.go
@@ -90,7 +90,7 @@ type Command struct {
// default behavior.
ExitErrHandler ExitErrHandlerFunc `json:"-"`
// Other custom info
- Metadata map[string]interface{} `json:"metadata"`
+ Metadata map[string]any `j... | [
"command.go",
"command_test.go",
"completion_test.go",
"docs.go",
"flag.go",
"flag_bool.go",
"flag_map_impl.go",
"flag_slice_base.go",
"flag_test.go",
"godoc-current.txt",
"help.go",
"help_test.go",
"suggestions.go",
"testdata/godoc-v3.x.txt"
] | [] | diff --git a/command_test.go b/command_test.go
index b3cfbc4788..88369cc0fa 100644
--- a/command_test.go
+++ b/command_test.go
@@ -1973,7 +1973,7 @@ func TestCommandHelpPrinter(t *testing.T) {
}()
wasCalled := false
- HelpPrinter = func(io.Writer, string, interface{}) {
+ HelpPrinter = func(io.Writer, string, any... | true | |
urfave/cli | 2,270 | issue_to_patch | feat: support dynamic fish completion | ## What type of PR is this?
_(REQUIRED)_
- feature
## What this PR does / why we need it:
_(REQUIRED)_
The previous fish shell completion implementation generated completions statically at install time by embedding all subcommands and flags directly into the completion script. The primary motivation for ... | 7f5c79799fafb227624d47c460ff9f2e0ced904e | 08fd570ac11da9f4b5a844f1870d630d3b3df0e1 | diff --git a/autocomplete/fish_autocomplete b/autocomplete/fish_autocomplete
new file mode 100644
index 0000000000..7aa7d0a8ba
--- /dev/null
+++ b/autocomplete/fish_autocomplete
@@ -0,0 +1,35 @@
+# This is a shell completion script auto-generated by https://github.com/urfave/cli for fish.
+
+function __%[1]_perform_com... | [
"autocomplete/fish_autocomplete",
"completion.go",
"examples_test.go",
"help.go"
] | [] | diff --git a/examples_test.go b/examples_test.go
index 727b58359d..afda009ceb 100644
--- a/examples_test.go
+++ b/examples_test.go
@@ -409,6 +409,43 @@ func ExampleCommand_Run_shellComplete_zsh() {
// help:Shows a list of commands or help for one command
}
+func ExampleCommand_Run_shellComplete_fish() {
+ cmd := &... | true | |
urfave/cli | 2,274 | issue_to_patch | MutuallyExclusiveFlags not validated on subcommands for persistent flags
## My urfave/cli version is
v3.7.0
## Checklist
- [x] Are you running the latest v3 release? The list of releases is [here](https://github.com/urfave/cli/releases).
- [x] Did you check the manual for your release? The v3 manual is [here](https... | Fix: check MutuallyExclusiveFlags across parent command chain | ## What type of PR is this?
- bug
## What this PR does / why we need it:
Follow-up to PR #2266. That PR fixed persistent flag propagation for `MutuallyExclusiveFlags`, but the exclusivity validation itself was not updated. The check only looked at the current command's groups, so parent group violations were s... | be9a4ba05ccf8e92f34274a5e0c555f2ad09e2b3 | 4d68d26c53e2431f53ce106c149871e3c8aa0b1a | diff --git a/command_run.go b/command_run.go
index e5cfff8a57..676a14c676 100644
--- a/command_run.go
+++ b/command_run.go
@@ -237,14 +237,18 @@ func (cmd *Command) run(ctx context.Context, osArgs []string) (_ context.Context
}()
}
- for _, grp := range cmd.MutuallyExclusiveFlags {
- if err := grp.check(cmd); e... | [
"command_run.go",
"command_test.go"
] | [] | diff --git a/command_test.go b/command_test.go
index 08a410a6fe..b3cfbc4788 100644
--- a/command_test.go
+++ b/command_test.go
@@ -5445,39 +5445,100 @@ func TestCommand_ParallelRun(t *testing.T) {
}
}
-func TestCommand_ExclusiveFlagsPersistentPropagation(t *testing.T) {
- var subCmdAlphaValue string
+func TestComm... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.