Skip to content

feat(cmd): add info command to list supported agents and runtimes#121

Open
bmahabirbu wants to merge 1 commit intokortex-hub:mainfrom
bmahabirbu:feat/info-command
Open

feat(cmd): add info command to list supported agents and runtimes#121
bmahabirbu wants to merge 1 commit intokortex-hub:mainfrom
bmahabirbu:feat/info-command

Conversation

@bmahabirbu
Copy link
Copy Markdown
Contributor

Summary

  • Add kortex-cli info command that displays CLI version, available agents, and available runtimes
  • Agents are dynamically discovered from config files on disk (*.json in the podman config directory, excluding image.json)
  • Supports --output json for machine-readable output
  • Adds ListAgents() method to the podman Config interface

Text output:

$ kortex-cli info
Version: 0.1.0-next
Agents: claude
Runtimes: fake, podman

JSON output:

$ kortex-cli info -o json
{
  "version": "0.1.0-next",
  "agents": ["claude"],
  "runtimes": ["fake", "podman"]
}

Closes #35

Test plan

  • All existing tests pass (make test)
  • kortex-cli info shows text output
  • kortex-cli info -o json shows JSON output
  • kortex-cli info --help shows help with examples

🤖 Generated with Claude Code

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 27, 2026

Warning

Rate limit exceeded

@bmahabirbu has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 3 minutes and 27 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 3 minutes and 27 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d8a5f758-45a4-4db9-afbc-9bb32d71bfde

📥 Commits

Reviewing files that changed from the base of the PR and between da77bab and 4e3404a.

📒 Files selected for processing (6)
  • pkg/cmd/info.go
  • pkg/cmd/info_test.go
  • pkg/cmd/root.go
  • pkg/runtime/podman/config/config.go
  • pkg/runtime/podman/config/config_test.go
  • pkg/runtime/podman/steplogger_test.go

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 and usage tips.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 79.72973% with 15 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pkg/cmd/info.go 81.81% 5 Missing and 5 partials ⚠️
pkg/runtime/podman/config/config.go 72.22% 3 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

Add `kortex-cli info` command that shows CLI version, available agents,
and available runtimes. Agents are dynamically discovered from config
files on disk (*.json in the podman config directory, excluding
image.json). Supports `--output json` for machine-readable output.

Also adds `ListAgents()` method to the podman config interface to
enable agent discovery by scanning the config directory.

Closes kortex-hub#35

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Brian <bmahabir@bu.edu>
Comment on lines +76 to +80
configDir := filepath.Join(absStorageDir, "runtimes", "podman", "config")
cfg, err := config.NewConfig(configDir)
if err != nil {
return outputErrorIfJSON(cmd, i.output, fmt.Errorf("failed to create config: %w", err))
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This must be generic, the command cannot know about specific runtimes, only the instance.Manager knows about them, in a generic way (though interface/implementation). You'll have to add a ListAgents method to the Runtime interfaec, and the manager can collect all the agents from all runtimes. Finally, the Manager will expose a ListAgents() method so the command can get them.

I suppose that we will differentiate agents per runtime, as one agent can be configured for a specific runtime, but not others

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.

have a command to list the supported agents

3 participants