Skip to content

[Docs] CLI Documentation#533

Open
JeffersGlass wants to merge 22 commits into
spylang:mainfrom
JeffersGlass:cli-docs
Open

[Docs] CLI Documentation#533
JeffersGlass wants to merge 22 commits into
spylang:mainfrom
JeffersGlass:cli-docs

Conversation

@JeffersGlass
Copy link
Copy Markdown
Contributor

@JeffersGlass JeffersGlass commented May 23, 2026

Add a page which documents the SPy CLI. Documentation is generated by the mkdocs-typer2 extension.

I think the formatting of this page is fine but not amazing. I like the optional "native+pretty" formatting option that the plugin provides, but there's currently a bug that omits the possible options for Choices. The current formatting ("legacy") I think is less clear than the tables, but actually has all the information.

I think it's still worth dropping in a CLI docs page for now. Once that bug is fixed, a follow-up PR can update the formatting.

Also, propose changing the category API Reference to just Reference.

IMHO the Native and Pretty formats are better, but they hide the possible choice values and default values for click.Choice options. The legacy/no tables option is the only one that doesn't lose info.

Bug reports are filed with mkdocs-typer2; when they are fixed this can probably change.
@JeffersGlass JeffersGlass added the documentation Improvements or additions to documentation label May 23, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 23, 2026

Documentation Preview
Preview documentation for PR #533.
Last Updated: 2026-05-27 14:10 UTC

@JeffersGlass
Copy link
Copy Markdown
Contributor Author

JeffersGlass commented May 23, 2026

Just a note for anyone who hits the same issue: the pixi checks were in this PR because the pixi.lock file is out of date... because I used uv to add a dependency instead of using pixi, which I'm unfamiliar with. To update that lockfile, I had to install pixi and then run pixi install. @paugier

edit: Pixi checks are still failing… any recomendations?

@JeffersGlass JeffersGlass marked this pull request as draft May 23, 2026 22:44
@JeffersGlass
Copy link
Copy Markdown
Contributor Author

JeffersGlass commented May 23, 2026

… and somehow the build for the new page itself failed in CI, probably something to do with the new dependency being in the wrong spot in ‘pyproject.toml`. Converting this to draft until that’s solved.

@paugier
Copy link
Copy Markdown
Contributor

paugier commented May 25, 2026

Just a note for anyone who hits the same issue: the pixi checks were in this PR because the pixi.lock file is out of date... because I used uv to add a dependency instead of using pixi, which I'm unfamiliar with. To update that lockfile, I had to install pixi and then run pixi install. @paugier

edit: Pixi checks are still failing… any recomendations?

I see that the Pixi lock file changes have not been committed, which explains why it still fails.

Note also that in that case, you just need to run pixi lock (and not pixi install) so that pixi does not create the local environment and download the packages.

@JeffersGlass
Copy link
Copy Markdown
Contributor Author

Thank you @paugier! I committed the lockfile, and also bumped pixi from 0.67.1 -> 0.69.0, since apparently the lockfile changed formats in 0.68.0

Still have build issues in CI, but not locally... the mkdocs-typer2 extension does seem to be installing properly in CI... will continue to debug.

@JeffersGlass JeffersGlass marked this pull request as ready for review May 27, 2026 13:58
@JeffersGlass
Copy link
Copy Markdown
Contributor Author

This is fixed up and ready for review! The relevant page on the preview docs is reference/cli.

Of note - added a mechanism to declare that we're in a docs build (spy.platform.IS_DOCS_BULD, set by an environment variable) so we don't have to load libspy/llmod just to build the docs.

@JeffersGlass JeffersGlass requested a review from antocuni May 27, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants