Skip to content

Create supergraph.go#178

Closed
drQedwards wants to merge 1 commit into
supermodeltools:mainfrom
drQedwards:patch-1
Closed

Create supergraph.go#178
drQedwards wants to merge 1 commit into
supermodeltools:mainfrom
drQedwards:patch-1

Conversation

@drQedwards

@drQedwards drQedwards commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

What

beginning work on implementing contextplus into golang

Why

because go just works, and this repo deserves transliteration work commit

Test plan

  • make test passes
  • make lint passes
  • Manually tested:

Summary by CodeRabbit

  • New Features
    • Added a graph command for analyzing a directory and displaying its dependency graph.
    • Supports human-readable, JSON, and DOT output formats.
    • Added options to force re-analysis and filter graph nodes by label.
    • The directory to analyze can be provided as an argument, defaulting to the current directory.

@drQedwards

Copy link
Copy Markdown
Contributor Author

hold on , I have a PR relating to embedding

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: beccbe6f-38a4-47ec-8f4a-1623e31e8b5f

📥 Commits

Reviewing files that changed from the base of the PR and between 1df9c44 and 6d0fd2d.

📒 Files selected for processing (1)
  • cmd/supergraph.go

Walkthrough

Adds a graph [path] Cobra command with configuration loading, API-key validation, directory selection, output-format controls, label filtering, cache override support, and execution through graph.Run.

Changes

Graph command

Layer / File(s) Summary
Graph command registration and execution
cmd/supergraph.go
Registers graph [path], loads configuration, requires an API key, selects the target directory, wires --force, --output/-o, and --label, and calls graph.Run.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: jonathanpopham, greynewell

Poem

A graph command joins the CLI line,
With paths and flags in neat design.
JSON, DOT, or human view,
Cache-busting powers added too.
Config checks guard the start—
Then graph.Run does its part.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6d0fd2de2f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread cmd/supergraph.go
c.Flags().StringVarP(&opts.Output, "output", "o", "human", "output format: human|json|dot")
c.Flags().StringVar(&opts.Filter, "label", "", "filter nodes by label (File, Function, Class, …)")

rootCmd.AddCommand(c)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove duplicate graph command registration

cmd/graph.go:10-43 already registers the same Use: "graph [path]" command, so this second init adds a duplicate child to rootCmd. I checked Cobra v1.10.2: AddCommand appends each child to c.commands, and the default help iterates .Commands, so users will see duplicate graph entries in help/completions/docs rather than getting a distinct supergraph command. Remove this duplicate or give it a distinct command name.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant