Skip to content
This repository was archived by the owner on Jan 13, 2026. It is now read-only.

Commit a08b1d2

Browse files
committed
feat: simplify CLI output for coding agents and release v0.0.2
1 parent 2597c94 commit a08b1d2

File tree

8 files changed

+12
-53
lines changed

8 files changed

+12
-53
lines changed

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ Built on top of [lsp-client](https://github.com/lsp-client/python-sdk) and [LSAP
1010

1111
## Key Features
1212

13+
- **🤖 Built for Agents**: The CLI output is optimized for Coding Agents. By avoiding fancy TUI/UI elements and rich terminal formatting, it significantly reduces token consumption while maintaining high readability for LLMs.
1314
- **🚀 Instant Analysis**: Quickly get definitions, references, hover info, and completions from the terminal.
1415
- **🏢 Managed Server Lifecycle**: A background manager automatically handles language server processes, reusing them across requests for maximum performance.
1516
- **🧩 LSAP Integration**: Leverages the Language Server Agent Protocol for structured, agent-friendly responses with built-in pagination and text-based location finding.
1617
- **⚡ Async-First**: Built with `anyio` and `asyncer` for high-performance concurrent operations.
17-
- **🎨 Rich Output**: Beautifully formatted terminal output using `rich`.
1818

1919
## Installation
2020

@@ -218,9 +218,6 @@ idle_timeout = 600
218218
# Log level: TRACE, DEBUG, INFO, WARNING, ERROR, CRITICAL
219219
log_level = "INFO"
220220

221-
# Show ASCII art banner on startup
222-
show_banner = true
223-
224221
# Default maximum items for paginated results (search, reference, etc.)
225222
# Set to null for no limit, or a number like 20
226223
default_max_items = 20
@@ -240,7 +237,6 @@ All settings can be overridden via environment variables:
240237
export LSP_DEBUG=true
241238
export LSP_LOG_LEVEL=DEBUG
242239
export LSP_DEFAULT_MAX_ITEMS=50
243-
export LSP_SHOW_BANNER=false
244240
```
245241

246242
## Contributing

main.py

Lines changed: 0 additions & 6 deletions
This file was deleted.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "lsp-cli"
3-
version = "0.0.1"
3+
version = "0.0.2"
44
description = "Add your description here"
55
readme = "README.md"
66
requires-python = ">=3.13"

src/lsp_cli/__main__.py

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from collections.abc import AsyncGenerator
33
from contextlib import asynccontextmanager
44
from pathlib import Path
5-
from textwrap import dedent
65
from typing import Annotated, Literal
76

87
import typer
@@ -37,7 +36,8 @@
3736

3837
app = typer.Typer(
3938
help="LSP CLI: A command-line tool for interacting with Language Server Protocol (LSP) features.",
40-
add_completion=True,
39+
add_completion=False,
40+
rich_markup_mode=None,
4141
context_settings={"help_option_names": ["-h", "--help"]},
4242
pretty_exceptions_enable=False,
4343
pretty_exceptions_show_locals=False,
@@ -121,24 +121,7 @@ def main(
121121
ctx.ensure_object(dict)
122122
ctx.obj["markdown"] = markdown
123123
if ctx.invoked_subcommand is None:
124-
if settings.show_banner:
125-
console.print(
126-
dedent(
127-
r"""
128-
[bold cyan]
129-
_ ____ ____ ____ _ ___
130-
| | / ___| | _ \ / ___| | | |_ _|
131-
| | \___ \ | |_) | | | | | | |
132-
| |___ ___) | | __/ | |___ | |___ | |
133-
|_____| |____/ |_| \____| |_____| |___|
134-
[/bold cyan]
135-
"""
136-
)
137-
)
138-
console.print(
139-
"\n[dim]LSP CLI tool - Type [bold]--help[/bold] for more info[/dim]\n"
140-
)
141-
console.print(ctx.get_help())
124+
print(ctx.get_help())
142125
raise typer.Exit()
143126

144127

src/lsp_cli/manager/models.py

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
from lsp_client.jsonrpc.types import RawNotification, RawRequest, RawResponsePackage
66
from pydantic import BaseModel
7-
from rich import box
8-
from rich.table import Table
97

108

119
class ManagedClientInfo(BaseModel):
@@ -14,21 +12,14 @@ class ManagedClientInfo(BaseModel):
1412
remaining_time: float
1513

1614
@classmethod
17-
def format(cls, data: list[ManagedClientInfo] | ManagedClientInfo) -> Table:
18-
table = Table(box=box.ROUNDED)
19-
table.add_column("Language", style="cyan")
20-
table.add_column("Project Path", style="green")
21-
table.add_column("Remaining Time", style="magenta", justify="right")
22-
15+
def format(cls, data: list[ManagedClientInfo] | ManagedClientInfo) -> str:
2316
infos = [data] if isinstance(data, ManagedClientInfo) else data
24-
17+
lines = []
2518
for info in infos:
26-
table.add_row(
27-
info.language,
28-
str(info.project_path),
29-
f"{info.remaining_time:.1f}s",
19+
lines.append(
20+
f"{info.language:<10} {info.project_path} ({info.remaining_time:.1f}s)"
3021
)
31-
return table
22+
return "\n".join(lines)
3223

3324

3425
class CreateClientRequest(BaseModel):

src/lsp_cli/options.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"--scope",
2626
"-s",
2727
help="Scope: 1-based line (e.g. '1'), line range (e.g. '1,10'), or symbol path (e.g. 'a.b.c')",
28-
rich_help_panel="Scope",
2928
),
3029
]
3130

@@ -35,7 +34,6 @@
3534
"--find",
3635
"-f",
3736
help="Text snippet to find",
38-
rich_help_panel="Search",
3937
),
4038
]
4139

@@ -44,7 +42,6 @@
4442
typer.Option(
4543
"--marker",
4644
help="Position marker in find pattern",
47-
rich_help_panel="Search",
4845
),
4946
]
5047

@@ -54,7 +51,6 @@
5451
"--max-items",
5552
"-n",
5653
help="Max items to return",
57-
rich_help_panel="Pagination",
5854
),
5955
]
6056

@@ -64,7 +60,6 @@
6460
"--start-index",
6561
"-i",
6662
help="Pagination offset",
67-
rich_help_panel="Pagination",
6863
),
6964
]
7065

@@ -74,7 +69,6 @@
7469
"--pagination-id",
7570
"-p",
7671
help="Pagination token",
77-
rich_help_panel="Pagination",
7872
),
7973
]
8074

src/lsp_cli/server.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
app = typer.Typer(
1010
name="server",
1111
help="Manage background LSP server processes.",
12+
add_completion=False,
13+
rich_markup_mode=None,
1214
context_settings={"help_option_names": ["-h", "--help"]},
1315
)
1416
console = Console()

src/lsp_cli/settings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ class Settings(BaseSettings):
2424
log_level: LogLevel = "INFO"
2525

2626
# UX improvements
27-
show_banner: bool = True
2827
default_max_items: int | None = 20
2928
default_context_lines: int = 2
3029
ignore_paths: list[str] = [

0 commit comments

Comments
 (0)