Skip to content

Conversation

@ceritium
Copy link
Contributor

@ceritium ceritium commented Jan 2, 2026

No description provided.

ceritium and others added 4 commits January 3, 2026 00:35
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]>
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]>
@ceritium ceritium merged commit 86f898e into master Jan 2, 2026
2 checks passed
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.

2 participants