feat(scale): implement scale dns + scale down (DNS management + strategy-based teardown)#232
Open
wjgong001 wants to merge 2 commits into
Open
feat(scale): implement scale dns + scale down (DNS management + strategy-based teardown)#232wjgong001 wants to merge 2 commits into
wjgong001 wants to merge 2 commits into
Conversation
added 2 commits
May 17, 2026 00:06
…ldest/random) Replaces the [stub] with a real implementation: - --instances to control how many to destroy (default 1) - --provider to filter by cloud provider - --all to destroy every running instance - --strategy: cheapest | oldest | random (default: cheapest) - --dry-run to preview without changes - Reports hourly savings and remaining fleet state - Closes existing issue if applicable
Author
|
Updated with scale down implementation: feat(scale): implement scale down with strategy selection
This was the last remaining stub in the Still stubs: |
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
Implements the
sh1pt scale dnscommand group with three sub-commands for managing DNS records on deployed fleets.Changes
packages/cli/src/commands/scale-dns.ts— Full DNS command implementationpackages/cli/src/commands/scale.ts— Replaced the old stub withscaleCmd.addCommand(dnsCmd)+ updated hint in scale up commandFeatures
sh1pt scale dns list— Shows current DNS records from the configured providersh1pt scale dns set <hostname>— Point a domain/subdomain to a fleet IP (auto-resolves from state or via--ip)sh1pt scale dns remove <hostname>— Remove a DNS record by hostnameSupported DNS Providers
dns.cloudflare.apiToken+dns.cloudflare.zoneIdin credentials)dns.vercel.apiTokenin credentials)dns.namecheap.apiKey+dns.namecheap.emailin credentials)Flags
--dry-run— Preview changes without execution--json— Machine-readable JSON output--provider <name>— Select provider (default: cloudflare)--ttl <seconds>— DNS TTL (default: 60)--proxied— Cloudflare-only: route through CF edge--ip <address>— Explicit IP forsetcommand (default: first fleet IP from state)Credentials Format
DNS provider config is read from
~/.sh1pt/credentials.jsonunder thednskey:{ "dns": { "cloudflare": { "apiToken": "...", "zoneId": "..." }, "vercel": { "apiToken": "..." }, "namecheap": { "apiKey": "...", "email": "..." } } }TypeScript
Passes
tsc --noEmitcleanly. Follows existing code patterns (Commander.js, kleur, same import style, same error handling).