Skip to content

Conversation

@lakshitaa-chellaramani
Copy link

Description

Automates the HIVE_CREDENTIAL_KEY setup in the quickstart script to eliminate the manual post-installation step. The script now detects existing keys, generates new ones if needed, and guides users through persisting the key in their environment or .env file.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)

Related Issues

Fixes #2825

Changes Made

  • Added new Step 4 to quickstart.sh for credential encryption key setup
  • Implemented detection of existing HIVE_CREDENTIAL_KEY in environment variables and .env file
  • Added automatic Fernet encryption key generation using Python's cryptography library
  • Implemented shell detection (bash/zsh/fish) to suggest appropriate RC file for persistence
  • Added interactive prompt to offer adding the key to .env file
  • Included graceful fallback with warning if cryptography package is not installed
  • Updated step numbering (old Step 4 is now Step 5)

Testing

Describe the tests you ran to verify your changes:

  • Unit tests pass (cd core && pytest tests/)
  • Lint passes (cd core && ruff check .)
  • Manual testing performed
    • Verified Fernet key generation works correctly
    • Tested existing key detection from environment variables
    • Tested existing key detection from .env file
    • Verified shell detection logic for different shells
    • Tested .env file parsing logic

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Screenshots (if applicable)

Example user experience during quickstart:

⬢ Step 4: Configuring credential encryption...

Generating encryption key for secure credential storage...

⬢ Generated credential encryption key

To persist credentials across sessions, add this to your shell:

export HIVE_CREDENTIAL_KEY="qGCISQY8g-8WjKs8JWsChp03f_Q2kWS2E2wSfbh9j-Y="

Add the above line to ~/.bashrc to make it permanent

Add to .env file in this directory? [Y/n]

Implements comprehensive GitHub REST API v3 integration with 15 MCP tools
for managing repositories, issues, pull requests, code search, and branches.

Features:
- Repository management (list, get, search repos)
- Issue operations (create, update, close, list issues)
- Pull request management (create, list, get PRs)
- Code search across GitHub
- Branch operations (list, get branch info)

Technical details:
- 15 MCP tools organized in 5 categories
- 38 comprehensive tests with mocking (all passing)
- Full credential store support (env var + CredentialStoreAdapter)
- Proper error handling (timeout, network, API errors)
- Follows HubSpot/Slack tool patterns exactly

Files:
- tools/src/aden_tools/tools/github_tool/github_tool.py (757 lines)
- tools/src/aden_tools/tools/github_tool/tests/test_github_tool.py (628 lines)
- tools/src/aden_tools/tools/github_tool/README.md (646 lines)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Implements Jira Cloud REST API v3 integration with 9 core functions
for project management automation.

Features:
- Issue operations: search, get, create, update, comment, transition
- Project management: list projects, get transitions
- JQL query support for advanced searching
- API token authentication with credential store support
- Comprehensive error handling (401, 403, 404, 429, 500+)

Tests: 47 comprehensive tests (100% pass rate)
- Client method tests (26)
- Credential management tests (4)
- MCP tool function tests (17)

Documentation: 509-line README with setup guide, API reference,
JQL examples, and real-world use cases.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Complete Google Sheets API v4 integration with comprehensive test coverage.

Features:
- Spreadsheet CRUD operations (create, get metadata)
- Data operations (read, write, append, clear ranges)
- Batch operations (multi-range updates and clears)
- Sheet management (add/delete tabs)
- OAuth2 and credential store support
- A1 notation with multiple render/input options

Tests: 45 comprehensive tests covering all operations and error cases
Follows existing HubSpot/Slack tool patterns with httpx

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Implements automatic credential encryption key setup in quickstart.sh:
- Detects existing HIVE_CREDENTIAL_KEY in environment or .env file
- Generates new Fernet encryption key if none exists
- Displays export command with shell-specific instructions
- Offers to add key to .env file for persistence
- Handles graceful fallback if cryptography is not installed

This eliminates the manual post-installation step for credential key
setup, streamlining the onboarding experience.

Fixes adenhq#2825

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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.

[Feature]: Automate HIVE_CREDENTIAL_KEY Setup in Quickstart

1 participant