Skip to content

Commit 71604c6

Browse files
update defaults
1 parent 8a426fd commit 71604c6

16 files changed

Lines changed: 129 additions & 90 deletions

File tree

docs/explanation/tools.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -325,15 +325,14 @@ Find relevant information:
325325

326326
HoloViz MCP also provides a command-line interface for direct terminal use. The CLI mirrors the MCP tools above, so you can query Panel components, HoloViews elements, hvPlot plot types, and documentation from your shell.
327327

328-
!!! tip "Short alias: `hv`"
329-
Add this to your shell profile (`.bashrc`, `.zshrc`, etc.) for shorter commands:
328+
!!! tip "Short command: `hv`"
329+
The package installs both `holoviz-mcp` and `hv` as commands. Use `hv` for shorter invocations:
330330

331331
```bash
332-
alias hv='uvx holoviz-mcp'
332+
hv search Panel Tabulator
333+
hv pn get Button
333334
```
334335

335-
Then use `hv search ...` instead of `uvx holoviz-mcp search ...`.
336-
337336
### Command Overview
338337

339338
```
@@ -382,16 +381,16 @@ All tool commands support three output formats via `-o`/`--output`:
382381

383382
| Format | Flag | Use Case |
384383
|--------|------|----------|
385-
| `markdown` | `-o markdown` (default) | LLM-friendly, pipe to AI tools |
384+
| `pretty` | `-o pretty` (default) | Rich terminal rendering |
385+
| `markdown` | `-o markdown` | LLM-friendly, pipe to AI tools |
386386
| `json` | `-o json` | Scripting and automation |
387-
| `pretty` | `-o pretty` | Rich terminal rendering |
388387

389388
**Examples:**
390389

391390
```bash
392-
holoviz-mcp pn get Button -o pretty # Rich terminal output
391+
holoviz-mcp pn get Button # Default pretty terminal output
393392
holoviz-mcp pn list -o json | jq '.[]' # Pipe JSON to jq
394-
holoviz-mcp hv get Curve # Default markdown
393+
holoviz-mcp hv get Curve -o markdown # LLM-friendly markdown
395394
```
396395

397396
## Related Documentation

docs/how-to/configure-claude-code.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@ If Claude provides detailed, accurate responses with specific Panel component in
6363

6464
HoloViz MCP provides specialized agents for Claude Code that can help with planning and implementation:
6565

66-
**User-level installation (default)** (installs to `~/.claude/agents/`):
66+
**Project-level installation (default)** (installs to `.claude/agents/`):
6767

6868
```bash
69-
holoviz-mcp install claude --scope user
69+
holoviz-mcp install claude
7070
```
7171

72-
**Project-level installation** (installs to `.claude/agents/`):
72+
**User-level installation** (installs to `~/.claude/agents/`):
7373

7474
```bash
7575
holoviz-mcp install claude --scope project

docs/tutorials/getting-started-claude-code.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,26 +65,26 @@ This will update your `~/.claude.json` file with the HoloViz MCP server configur
6565

6666
HoloViz MCP includes specialized agents for Claude Code that help with planning and implementing HoloViz applications.
6767

68-
Install the agents for your user:
68+
Install the agents for your project:
6969

7070
```bash
71-
holoviz-mcp install claude --scope user
71+
holoviz-mcp install claude
7272
```
7373

74-
This creates a `~/.claude/agents/` directory with:
74+
This creates a `.claude/agents/` directory with:
7575

7676
- `holoviz-data-explorer.md` - Agent for quick data exploration and data visualization
7777
- `holoviz-app-architect.md` - Agent for architecting production Panel data applications
7878

79-
!!! tip "Install Project-Level Agents"
79+
!!! tip "Install User-Level Agents"
8080

81-
To make agents available in your current project only:
81+
To make agents available across all projects:
8282

8383
```bash
84-
holoviz-mcp install claude --scope project
84+
holoviz-mcp install claude --scope user
8585
```
8686

87-
This installs agents to `.claude/agents/`.
87+
This installs agents to `~/.claude/agents/`.
8888

8989
## Step 6: Install Panel and Dependencies (Optional)
9090

docs/tutorials/getting-started-copilot-vscode.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,16 @@ You should see output confirming that agents were installed to `.github/agents/`
6868
!!! note "What's happening"
6969
This command installs custom Copilot agents specifically designed for HoloViz development. These agents understand the `holoviz-mcp` server and can use it to understand the architecture patterns and best practices for Panel, hvPlot, and other HoloViz libraries.
7070

71+
!!! tip "Install User-Level Agents"
72+
73+
To make agents available across all projects:
74+
75+
```bash
76+
holoviz-mcp install copilot --scope user
77+
```
78+
79+
This installs agents to `~/.copilot/agents/`.
80+
7181
!!! tip
7282
Run `holoviz-mcp install copilot --skills` to populate the `.github/skills` folder too. See [Use Agent Skills in VS Code](https://code.visualstudio.com/docs/copilot/customization/agent-skills) for more info.
7383

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,4 +195,5 @@ raw-options = { version_scheme = "no-guess-dev" }
195195

196196
[project.scripts]
197197
"holoviz-mcp" = "holoviz_mcp.cli:cli_main"
198+
"hv" = "holoviz_mcp.cli:cli_main"
198199
"display-server" = "holoviz_mcp.display_mcp.cli:main"

src/holoviz_mcp/cli.py

Lines changed: 52 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
33
This module provides a unified CLI using Typer for all HoloViz MCP commands.
44
5-
Tool commands output Markdown by default (LLM-first). Use -o json for machine-readable
6-
output or -o pretty for rich terminal rendering.
5+
Tool commands output pretty (Rich) by default for terminal users. Use -o markdown for
6+
LLM-friendly output or -o json for machine-readable/scripting output.
77
Infrastructure commands (serve, install, update) output human-readable text.
88
"""
99

@@ -73,7 +73,7 @@ class OutputFormat(str, Enum):
7373
pretty = "pretty"
7474

7575

76-
OutputFlag = Annotated[OutputFormat, typer.Option("--output", "-o", help="Output format: markdown (default, for LLMs), json (for scripts), pretty (rich terminal).")]
76+
OutputFlag = Annotated[OutputFormat, typer.Option("--output", "-o", help="Output format: pretty (default, rich terminal), markdown (for LLMs), json (for scripts).")]
7777

7878

7979
def _output_json(data: object) -> None:
@@ -161,7 +161,7 @@ def search(
161161
] = "truncated",
162162
max_results: Annotated[int, typer.Option("--max-results", "-n", help="Maximum results.")] = 5,
163163
max_chars: Annotated[int, typer.Option("--max-chars", help="Max content chars per result.")] = 10000,
164-
output: OutputFlag = OutputFormat.markdown,
164+
output: OutputFlag = OutputFormat.pretty,
165165
) -> None:
166166
"""Search indexed documentation using semantic similarity."""
167167
from holoviz_mcp.core.docs import search as _search
@@ -201,7 +201,7 @@ def inspect(
201201
no_screenshot: Annotated[bool, typer.Option("--no-screenshot", help="Skip screenshot.")] = False,
202202
no_console_logs: Annotated[bool, typer.Option("--no-console-logs", help="Skip console logs.")] = False,
203203
log_level: Annotated[Optional[str], typer.Option("--log-level", help="Filter console logs by level.")] = None,
204-
output: OutputFlag = OutputFormat.markdown,
204+
output: OutputFlag = OutputFormat.pretty,
205205
) -> None:
206206
"""Inspect a web app by capturing screenshot and/or console logs."""
207207
from holoviz_mcp.core.inspect import inspect_app
@@ -272,7 +272,7 @@ def pn_list_cmd(
272272
name: Annotated[Optional[str], typer.Option("--name", "-n", help="Filter by component name.")] = None,
273273
module: Annotated[Optional[str], typer.Option("--module", "-m", help="Filter by module path prefix.")] = None,
274274
package: Annotated[Optional[str], typer.Option("--package", "-P", help="Filter by package.")] = None,
275-
output: OutputFlag = OutputFormat.markdown,
275+
output: OutputFlag = OutputFormat.pretty,
276276
) -> None:
277277
"""List Panel components (summary without parameter details)."""
278278
from holoviz_mcp.core.pn import list_components
@@ -297,7 +297,7 @@ def pn_get_cmd(
297297
name: Annotated[str, typer.Argument(help="Component name (e.g., 'Button').")],
298298
package: Annotated[Optional[str], typer.Option("--package", "-P", help="Package name.")] = None,
299299
module: Annotated[Optional[str], typer.Option("--module", "-m", help="Module path.")] = None,
300-
output: OutputFlag = OutputFormat.markdown,
300+
output: OutputFlag = OutputFormat.pretty,
301301
) -> None:
302302
"""Get full details for a single Panel component."""
303303
from holoviz_mcp.core.pn import get_component
@@ -325,7 +325,7 @@ def pn_params_cmd(
325325
name: Annotated[str, typer.Argument(help="Component name (e.g., 'Button').")],
326326
package: Annotated[Optional[str], typer.Option("--package", "-P", help="Package name.")] = None,
327327
module: Annotated[Optional[str], typer.Option("--module", "-m", help="Module path.")] = None,
328-
output: OutputFlag = OutputFormat.markdown,
328+
output: OutputFlag = OutputFormat.pretty,
329329
) -> None:
330330
"""Get parameter details for a single Panel component."""
331331
from holoviz_mcp.core.pn import get_component_parameters
@@ -355,7 +355,7 @@ def pn_search_cmd(
355355
query: Annotated[list[str], typer.Argument(help="Search terms (space-separated, no quotes needed).")],
356356
package: Annotated[Optional[str], typer.Option("--package", "-P", help="Filter by package.")] = None,
357357
limit: Annotated[int, typer.Option("--limit", "-l", help="Maximum results.")] = 10,
358-
output: OutputFlag = OutputFormat.markdown,
358+
output: OutputFlag = OutputFormat.pretty,
359359
) -> None:
360360
"""Search Panel components by keyword."""
361361
from holoviz_mcp.core.pn import search_components
@@ -413,7 +413,7 @@ def hv_list_cmd(output: OutputFlag = OutputFormat.markdown) -> None:
413413
def hv_get_cmd(
414414
element: Annotated[str, typer.Argument(help="Element name (e.g., 'Curve', 'Scatter').")],
415415
backend: Annotated[str, typer.Option("--backend", "-b", help="Plotting backend.")] = "bokeh",
416-
output: OutputFlag = OutputFormat.markdown,
416+
output: OutputFlag = OutputFormat.pretty,
417417
) -> None:
418418
"""Get element docstring, parameters, style and plot options."""
419419
from holoviz_mcp.core.hv import get_element
@@ -456,7 +456,7 @@ def hvplot_get_cmd(
456456
signature: Annotated[bool, typer.Option("--signature", "-s", help="Show signature instead of docstring.")] = False,
457457
generic: Annotated[bool, typer.Option("--generic/--no-generic", help="Include generic options shared by all plot types.")] = False,
458458
style: Annotated[Optional[str], typer.Option("--style", help="Backend for style options (matplotlib, bokeh, plotly).")] = None,
459-
output: OutputFlag = OutputFormat.markdown,
459+
output: OutputFlag = OutputFormat.pretty,
460460
) -> None:
461461
"""Get docstring or signature for an hvPlot plot type."""
462462
from holoviz_mcp.core.hvplot import get_plot_type
@@ -498,7 +498,7 @@ def skill_list_cmd(output: OutputFlag = OutputFormat.markdown) -> None:
498498
@skill_app.command("get")
499499
def skill_get_cmd(
500500
name: Annotated[str, typer.Argument(help="Skill name (e.g., 'panel', 'hvplot').")],
501-
output: OutputFlag = OutputFormat.markdown,
501+
output: OutputFlag = OutputFormat.pretty,
502502
) -> None:
503503
"""Get skill content (always Markdown)."""
504504
from holoviz_mcp.core.skills import get_skill
@@ -520,7 +520,7 @@ def skill_get_cmd(
520520
def doc_get_cmd(
521521
path: Annotated[str, typer.Argument(help="Document path (e.g., 'index.md').")],
522522
project: Annotated[str, typer.Argument(help="Project name (e.g., 'panel').")],
523-
output: OutputFlag = OutputFormat.markdown,
523+
output: OutputFlag = OutputFormat.pretty,
524524
) -> None:
525525
"""Retrieve a specific document by path and project."""
526526
from holoviz_mcp.core.docs import get_document
@@ -574,7 +574,7 @@ def ref_get_cmd(
574574
component: Annotated[str, typer.Argument(help="Component name (e.g., 'Button', 'scatter').")],
575575
project: Annotated[Optional[str], typer.Option("--project", "-p", help="Project name.")] = None,
576576
no_content: Annotated[bool, typer.Option("--no-content", help="Metadata only.")] = False,
577-
output: OutputFlag = OutputFormat.markdown,
577+
output: OutputFlag = OutputFormat.pretty,
578578
) -> None:
579579
"""Find reference guides for a specific component."""
580580
from holoviz_mcp.core.docs import get_reference_guide
@@ -626,8 +626,12 @@ def update_index(
626626

627627

628628
@install_app.command(name="copilot")
629-
def install_copilot(agents: bool = True, skills: bool = False) -> None:
630-
"""Copy HoloViz MCP resources to .github/ folders.
629+
def install_copilot(
630+
agents: bool = True,
631+
skills: bool = False,
632+
scope: Annotated[str, typer.Option("--scope", help="Installation scope: 'project' for .github/, 'user' for ~/.copilot/")] = "project",
633+
) -> None:
634+
"""Install HoloViz MCP resources for GitHub Copilot.
631635
632636
\f
633637
@@ -637,6 +641,8 @@ def install_copilot(agents: bool = True, skills: bool = False) -> None:
637641
Install agent files.
638642
skills : bool, default=False
639643
Install skill files.
644+
scope : str, default="project"
645+
Installation scope: 'project' for .github/, 'user' for ~/.copilot/.
640646
""" # noqa: D301
641647
from pathlib import Path
642648

@@ -650,30 +656,51 @@ def install_copilot(agents: bool = True, skills: bool = False) -> None:
650656

651657
if agents:
652658
source = config.agents_dir("default", tool="copilot")
653-
target = Path.cwd() / ".github" / "agents"
659+
660+
if scope == "user":
661+
target = Path.home() / ".copilot" / "agents"
662+
else:
663+
target = Path.cwd() / ".github" / "agents"
664+
654665
target.mkdir(parents=True, exist_ok=True)
655666

656667
for file in source.glob("*.agent.md"):
657-
relative_path = (target / file.name).relative_to(Path.cwd())
658-
typer.echo(f"Updated: {relative_path}")
668+
if scope == "user":
669+
display_path = Path("~") / ".copilot" / "agents" / file.name
670+
else:
671+
display_path = (target / file.name).relative_to(Path.cwd())
672+
673+
typer.echo(f"Installed: {display_path}")
659674
shutil.copy(file, target / file.name)
660675

661676
if skills:
662677
source = config.skills_dir("default")
663-
target = Path.cwd() / ".github" / "skills"
678+
679+
if scope == "user":
680+
target = Path.home() / ".copilot" / "skills"
681+
else:
682+
target = Path.cwd() / ".github" / "skills"
683+
664684
target.mkdir(parents=True, exist_ok=True)
665685

666686
for file in source.glob("*.md"):
667-
relative_path = (target / file.name / "SKILL.md").relative_to(Path.cwd())
668-
typer.echo(f"Updated: {relative_path}")
669-
shutil.copy(file, target / file.name)
687+
skill_dir = target / file.stem
688+
skill_dir.mkdir(exist_ok=True)
689+
690+
if scope == "user":
691+
display_path = Path("~") / ".copilot" / "skills" / file.stem / "SKILL.md"
692+
else:
693+
display_path = (skill_dir / "SKILL.md").relative_to(Path.cwd())
694+
695+
typer.echo(f"Installed: {display_path}")
696+
shutil.copy(file, skill_dir / "SKILL.md")
670697

671698

672699
@install_app.command(name="claude")
673700
def install_claude(
674701
agents: bool = True,
675702
skills: bool = False,
676-
scope: Annotated[str, typer.Option("--scope", help="Installation scope: 'project' for .claude/agents/, 'user' for ~/.claude/agents/")] = "user",
703+
scope: Annotated[str, typer.Option("--scope", help="Installation scope: 'project' for .claude/agents/, 'user' for ~/.claude/agents/")] = "project",
677704
) -> None:
678705
"""Install HoloViz MCP resources for Claude Code.
679706
@@ -685,7 +712,7 @@ def install_claude(
685712
Install agent files.
686713
skills : bool, default=False
687714
Install skill files.
688-
scope : str, default="user"
715+
scope : str, default="project"
689716
Installation scope: 'project' for .claude/agents/, 'user' for ~/.claude/agents/.
690717
""" # noqa: D301
691718
from pathlib import Path

src/holoviz_mcp/config/resources/skills/holoviews.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ Area - Area plots for stacked or filled visualizations
528528
### Lookup additional information
529529

530530
- If the HoloViz MCP server tools are available, DO use them: `search` (documentation), `hv_list` (available elements), `hv_get` (docstrings and options), `skill_get` (best-practice skills).
531-
- If MCP tools are not available but the `holoviz-mcp` CLI is installed (often aliased as `hv`), use the equivalent CLI commands: `holoviz-mcp search`, `holoviz-mcp hv list`, `holoviz-mcp hv get`.
531+
- If MCP tools are not available but the `holoviz-mcp` CLI is installed (also available as `hv`), use the equivalent CLI commands: `holoviz-mcp search`, `holoviz-mcp hv list`, `holoviz-mcp hv get`.
532532
- If neither is available, DO search the web. For example searching the HoloViews website for relevant information via https://holoviews.org url.
533533

534534
### Test the app with pytest

src/holoviz_mcp/config/resources/skills/holoviz-mcp-cli.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,21 @@ The recommended way to install is as a **uv tool**:
1818

1919
uv tool install holoviz-mcp
2020

21-
This installs `holoviz-mcp` into an isolated environment. Since `uv tool` manages its own bin directory, users often make the CLI available under a shorter name via a shell alias or symlink:
22-
23-
alias hv='holoviz-mcp' # in .bashrc / .zshrc
24-
25-
If `hv` is on your PATH, you can substitute it in all examples below (e.g., `hv search Panel Tabulator`, `hv pn get Button`).
21+
This installs both `holoviz-mcp` and `hv` commands into an isolated environment. Use `hv` as a shorter alternative in all examples below (e.g., `hv search Panel Tabulator`, `hv pn get Button`).
2622

2723
## When to Use CLI vs MCP
2824

2925
- **Prefer MCP tools** when the HoloViz MCP server is loaded — they return structured, typed data (including images) and integrate natively with LLM tool calling
30-
- **Use CLI** when MCP tools are not available but `holoviz-mcp` (or the `hv` alias) is installed and you have Bash/shell access
26+
- **Use CLI** when MCP tools are not available but `holoviz-mcp` (or `hv`) is installed and you have Bash/shell access
3127
- **Search the web** as a last resort when neither MCP tools nor CLI are available
3228

3329
## Output Formats
3430

3531
All tool commands support three output formats via `--output` / `-o`:
3632

37-
- `markdown` (default) — Markdown-formatted text, optimized for LLMs
33+
- `pretty` (default) — Rich terminal output with colors and tables, for humans
34+
- `markdown` — Markdown-formatted text, optimized for LLMs
3835
- `json` — Structured JSON, for scripts and programmatic use
39-
- `pretty` — Rich terminal output with colors and tables, for humans
4036

4137
Setup commands (`serve`, `install`, `update`) output human-readable text by default.
4238

src/holoviz_mcp/config/resources/skills/hvplot.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ area - Area plots for stacked or filled visualizations
218218
### Lookup additional information
219219

220220
- If the HoloViz MCP server tools are available, DO use them: `search` (documentation), `hvplot_list` (available plot types), `hvplot_get` (docstrings and signatures), `skill_get` (best-practice skills).
221-
- If MCP tools are not available but the `holoviz-mcp` CLI is installed (often aliased as `hv`), use the equivalent CLI commands: `holoviz-mcp search`, `holoviz-mcp hvplot list`, `holoviz-mcp hvplot get`.
221+
- If MCP tools are not available but the `holoviz-mcp` CLI is installed (also available as `hv`), use the equivalent CLI commands: `holoviz-mcp search`, `holoviz-mcp hvplot list`, `holoviz-mcp hvplot get`.
222222
- If neither is available, DO search the web. For example searching the hvplot website for `streaming` related information via https://hvplot.holoviz.org/en/docs/latest/search.html?q=streaming url.
223223

224224
### Test the app with pytest

src/holoviz_mcp/config/resources/skills/panel.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ If you experience memory issues, make sure to:
419419
### Lookup additional information
420420

421421
- If the HoloViz MCP server tools are available, DO use them to look up documentation and component details. Useful tools: `search` (documentation), `pn_search` (find components), `pn_get` (component details), `pn_params` (parameter info), `ref_get` (reference guides), `skill_get` (best-practice skills).
422-
- If MCP tools are not available but the `holoviz-mcp` CLI is installed (often aliased as `hv`), use the equivalent CLI commands: `holoviz-mcp search`, `holoviz-mcp pn search`, `holoviz-mcp pn get`, `holoviz-mcp pn params`, `holoviz-mcp ref get`, `holoviz-mcp skill get`.
422+
- If MCP tools are not available but the `holoviz-mcp` CLI is installed (also available as `hv`), use the equivalent CLI commands: `holoviz-mcp search`, `holoviz-mcp pn search`, `holoviz-mcp pn get`, `holoviz-mcp pn params`, `holoviz-mcp ref get`, `holoviz-mcp skill get`.
423423
- If neither is available, DO search the web. For example searching the Panel website for `Tabulator` related information via [https://panel.holoviz.org/search.html?q=Tabulator](https://panel.holoviz.org/search.html?q=Tabulator) url.
424424

425425
### Test the app with pytest

0 commit comments

Comments
 (0)