feat: Revamp CLI with environment variables support and improved DX#190
Merged
feat: Revamp CLI with environment variables support and improved DX#190
Conversation
This commit introduces several improvements to the metacall-deploy CLI: ## Bug Fixes - Fix #189: Plan selection now correctly respects user's --plan flag instead of always defaulting to the first available plan ## New Features - Environment variables: - `-E, --env KEY=VALUE` - Set env vars directly (repeatable) - `--envFile <path>` - Load env vars from file (repeatable) - Priority: CLI --env > --envFile > project .env file - File filtering: - `-I, --ignore <pattern>` - Ignore files matching glob patterns - Output modes: - `-q, --quiet` - Suppress non-essential output - `-V, --verbose` - Show detailed debug output - `--json` - JSON output for scripting/CI - Dry-run mode: - `--dryRun` - Preview deployment without deploying ## Improvements - Enhanced logging system with debug(), success(), jsonOutput() - Reorganized help documentation with examples - Better error messages and user feedback - Non-interactive mode improvements Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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
This PR introduces several improvements to the metacall-deploy CLI to enhance developer experience and fix known issues:
--planflag instead of always defaulting to the first available plan-E/--envand--envFileflags for flexible env var configuration-I/--ignoreflag to exclude files from deployment using glob patterns--quiet,--verbose, and--jsonflags for different output needs--dryRunflag to preview deployments without executing themNew CLI Flags
-E, --env KEY=VALUE--envFile <path>-I, --ignore <pattern>-q, --quiet-V, --verbose--json--dryRunTest plan
npm run unit)npm run build)metacall-deploy -h)metacall-deploy --version --json)Examples