Merged
Conversation
piekstra
approved these changes
Jan 13, 2026
Collaborator
piekstra
left a comment
There was a problem hiding this comment.
examples in the pr description show newrelic which is either an alias, or claude got confused and downloaded the "official" cli
Collaborator
Author
Rebase PlanPR #10 restructured the entire codebase, so this PR needs a careful rebase. Here's the plan: What We're Keeping
What We're Deferring (Follow-up PR)
Why?The original PR modified Rather than port all features to the new structure in this rebase, we'll:
Exit Codes Added
|
Add standardized exit codes (0-6) to enable programmatic error handling: - 0: Success - 1: General error - 2: Usage error - 3: Config error (missing API key/account ID) - 4: Auth error (401/403) - 5: API error (4xx) - 6: Server error (5xx) Shell scripts can now check exit codes: newrelic-cli apps list || handle_error $? Note: --limit and --force flags deferred to follow-up PR due to codebase restructuring in PR #10. Closes #5 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
cbbab30 to
11e6ffd
Compare
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add standardized exit codes for shell scripting composability.
Exit Codes
Usage
Shell scripts can now check exit codes for programmatic error handling:
Changes
internal/exitcode/package with exit code constantsexitcode.FromHTTPStatus()to map HTTP status codes to exit codesmain.goto use typed exit codes based on error typeDeferred to Follow-up PR
The following features from the original PR were deferred due to codebase restructuring in PR #10:
--limit/-lflag on list commands--force/-fflag on delete commandsCloses #5
🤖 Generated with Claude Code