-
Notifications
You must be signed in to change notification settings - Fork 0
Improve setup workflow #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Conversation
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
Products from stacktodate
Added a tech stack badge to the README.
The check command was resolving config paths incorrectly when no -c flag
was provided. With an empty checkConfigFile, ResolveAbsPath("") would
resolve to the current directory as an absolute path, and GetConfigDir()
would then extract its parent directory instead of the config directory.
This caused version detection to happen in a different directory than
when -c stacktodate.yml was explicitly specified, resulting in different
outcomes for the same check.
Fix: Set checkConfigFile to the default "stacktodate.yml" before any
path resolution, ensuring consistent behavior regardless of whether the
-c flag is provided.
🤖 Generated with Claude Code
Co-Authored-By: Claude Haiku 4.5 <[email protected]>
Add a new workflow that runs on push to main/master branches to: - Build the stacktodate CLI - Verify the stacktodate.yml configuration matches detected versions - Push the configuration to the remote API for tracking This ensures the tech stack configuration stays synchronized and valid as part of the CI/CD pipeline. 🤖 Generated with Claude Code Co-Authored-By: Claude Haiku 4.5 <[email protected]>
Add a new workflow that runs on push to main/master branches to: - Download the latest stacktodate CLI binary from releases - Verify the stacktodate.yml configuration matches detected versions - Push the configuration to the remote API for tracking By using a pre-built binary instead of building from source, this workflow is reusable for other repositories without requiring the stacktodate-cli source code. 🤖 Generated with Claude Code Co-Authored-By: Claude Haiku 4.5 <[email protected]>
Add automatic and manual version checking capability to stacktodate CLI: New packages: - cmd/lib/versioncheck: GitHub API integration, version comparison, 24h caching - cmd/lib/installer: Installation method detection (Homebrew vs binary) Features: - Manual check: stacktodate version --check-updates (fetches from GitHub) - Automatic checks: Cache-only checks on init/update/check/push/autodetect commands - Install detection: Shows Homebrew or GitHub releases download instructions - 24-hour cache TTL with graceful fallback to stale cache on network errors No new external dependencies used. Comprehensive test coverage (95+ tests). Environment variable support: STD_DISABLE_VERSION_CHECK=1 to disable checks 🤖 Generated with Claude Code Co-Authored-By: Claude Haiku 4.5 <[email protected]>
Implement version update checking feature
Add a new global-config command that allows users to securely set up their API token once and reuse it across all commands. Implements a three-tier credential resolution system with proper priority: 1. Environment variable (STD_TOKEN) - highest priority for CI/CD 2. OS Keychain (macOS Keychain, Linux Secret Service, Windows Credential Manager) 3. Fallback to ~/.stacktodate/credentials.yaml file storage Key changes: - Add helpers/credentials.go with centralized credential management functions (GetToken, SetToken, DeleteToken, GetTokenSource) - Implement global-config command with three subcommands: * set: Interactive token setup with secure hidden input * status: Show current token configuration and storage location * delete: Remove stored credentials with confirmation - Update push command to use new credential system instead of requiring env var - Update init command to prompt for token setup if not configured - Add zalando/go-keyring dependency for cross-platform OS keychain support - Add golang.org/x/term dependency for secure password input (no echo) Benefits: - Users no longer need to set STD_TOKEN env var for local development - Token is stored securely in OS keychain by default - Seamless CI/CD integration via environment variables - Better error messages guide users to set up credentials 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 <[email protected]>
Add the ability for users to create new projects or link to existing ones during
initialization via API calls to stacktodate.club. This improves the user experience
by immediately registering projects and validating UUIDs.
Key changes:
- Add cmd/helpers/api.go with API integration functions:
* CreateTechStack() - POST /api/tech_stacks to create new project
* GetTechStack() - GET /api/tech_stacks/{id} to fetch and validate projects
* ConvertStackToComponents() - Convert detected techs to API format
* Common error handling for API responses (401, 404, 422, 5xx)
- Enhanced cmd/init.go with interactive menu:
* promptProjectChoice() - Menu: "Create new" or "Link existing"
* createNewProject() - Create project via API with autodetected components
* linkExistingProject() - Validate and link to existing project by UUID
* New flow branches based on user choice
- Updated cmd/push.go:
* Use helpers.Component instead of local type
* Use helpers.ConvertStackToComponents() from shared API module
UX improvements:
- Interactive menu for choosing new vs existing project
- Progress messages during API calls
- Clear error messages for authentication, validation, and network issues
- Support for empty tech stacks with helpful warnings
- Backward compatible with --uuid and --name flags for automation
API endpoints used:
- POST /api/tech_stacks - Create new project (returns UUID)
- GET /api/tech_stacks/{id} - Validate and fetch project details
Error handling:
- 401: Invalid token with hint to update credentials
- 404: Project not found with helpful message
- 422: Validation errors from API
- 5xx: API issues with retry suggestion
- Network errors: Connection issues with helpful context
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Haiku 4.5 <[email protected]>
Add a new 'stacktodate open' command that opens the project's tech stack page on StackToDate in the user's default web browser. Features: - Reads project UUID from stacktodate.yml - Opens https://stacktodate.club/tech_stacks/{uuid} in default browser - Cross-platform support: macOS (open), Windows (start), Linux (xdg-open) - Respects STD_API_URL environment variable for custom API endpoints - Works with --config flag to specify custom config file path Usage: stacktodate open stacktodate open --config /path/to/stacktodate.yml This provides a quick way to view project details on the StackToDate website without needing to copy-paste the UUID or remember the URL format. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 <[email protected]>
3a7a1db to
72368e8
Compare
The stacktodate-cli binary should not be committed to git as it: - Creates unnecessary repository bloat (12MB+) - Is platform-specific and won't work across different OS/architectures - Should be built from source instead - Makes it harder to track meaningful code changes Users should build the binary from source using: go build -o stacktodate-cli 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 <[email protected]>
72368e8 to
da87fcc
Compare
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.
No description provided.