Skip to content

Add pixi tree --json #4130

Closed

Description

@ruben-arts

Problem description

To give better support for marimo's package manager view, we should support json output.

Image

They already support pixi but don't allow for the tree view yet.

Activity

  1. baszalmstra commented on Jul 15, 2025

    @baszalmstra
    Contributor

    Could you maybe briefly give a json schema or example that I could mimic?

  2. ruben-arts commented on Jul 16, 2025

    @ruben-arts
    ContributorAuthor

    To be honest, I can't find a reasonable example. Maybe @manzt has some input for what would make it easier for them.

    Side note, it could also be done by extending the pixi list --json to include the "depends" information in a package record. Then it would be simple enough to make the "tree" in code. Which might be enough for now.

  3. added and removed
    enhancement
    on Aug 1, 2025
  4. baszalmstra commented on Aug 1, 2025

    @baszalmstra
    Contributor

    It would be nice to get somewhat of a schema here. With a schema it would probably not be hard to implement.

  5. manzt commented on Aug 1, 2025

    @manzt
    Contributor

    Sorry for the radio silence. Currently in marimo, we parse the output of uv tree, which doesn't have a JSON schema... It seems like there are some pieces of this that avoid showing circular dependencies and other complexities, so it's hard to describe a schema.

    So it's a bit of a hack right now. We parse the text output into this structure (marimo/_utils/uv_tree.py):

    interface DependencyTreeNode {
      name: string;
      version: string | null;
      tags: Array<{kind: "extra" | "group" | "cycle", value: string}>;
      dependencies: DependencyTreeNode[];
    }

    The uv tree command has several behaviors that make parsing awkward. Packages already shown in the tree are marked with (*) and their dependencies aren't repeated. The depth can be limited with -d, --depth <DEPTH> (default: 255). The output uses Unicode box-drawing characters that we parse to determine nesting levels, and shows extras/groups inline with package names.

    There's some discussion about adding JSON output to uv tree:

  6. baszalmstra commented on Aug 1, 2025

    @baszalmstra
    Contributor

    That already sounds veeery similar to pixi tree! Have you tried that?

  7. added a commit that references this issue on Aug 2, 2025
    0abc5bd
  8. abkfenris commented on Aug 2, 2025

    @abkfenris
    Contributor

    I've drafted a JSON output for tree in #4261

  9. added 3 commits that reference this issue on Aug 2, 2025
    c391e7f
    40dbb1a
    330d63a
  10. added a commit that references this issue on Nov 11, 2026
    6213a55
  11. self-assigned this
    on Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions