Sequel
A Terminal User Interface (TUI) for browsing and inspecting Google Cloud resources.
Version
Current version: 1.6.1
Features
Sequel provides a keyboard-focused, responsive interface for exploring Google Cloud resources:
- Hierarchical tree view with expandable sub-nodes showing real resource data:
- Cloud DNS Zones → DNS records (A, CNAME, MX, TXT, etc.)
- Cloud Storage Buckets → Objects (with file sizes and content types)
- Service Accounts → IAM role bindings (with actual role names)
- GKE Clusters → Individual nodes (with actual node pool names)
- Instance Groups → VM instances (with actual instance names and status)
- Sub-resources display in JSON details pane when selected
- Automatic empty category removal
- Virtual scrolling with smart limits (50-100 items per node) and "... and N more" indicators
- JSON details pane with tree-sitter syntax highlighting, pretty-printed API responses, and mouse text selection
- Performance optimized:
- Parallel API operations for simultaneous resource loading
- Concurrency limiting (max 5 concurrent region queries) to prevent system overload
- Intelligent caching with LRU eviction and 100MB size limit
- Cache statistics tracking (hits, misses, evictions, expirations)
- Connection pooling for API clients
- Background cache cleanup every 5 minutes
- Lazy loading for efficient API usage
- ADC authentication using Google Cloud Application Default Credentials
- Comprehensive testing with high code coverage (96%+)
Supported Resources (MVP)
- Projects
- Cloud DNS managed zones and DNS records
- CloudSQL instances
- Cloud Storage buckets and objects
- Pub/Sub topics and subscriptions
- VPC Networks and subnets
- Compute Engine Instance Groups
- Firewall Policies (VPC firewall rules)
- Google Kubernetes Engine (GKE) clusters and nodes
- Secret Manager secrets (metadata only)
- IAM Service Accounts
- Cloud Monitoring Alert Policies
Prerequisites
- Python 3.11 or higher
- Google Cloud SDK with configured Application Default Credentials (ADC)
Installation
From PyPI
pip install sequel-ag
From Source
# Clone the repository
git clone https://github.com/dan-elliott-appneta/sequel.git
cd sequel
# Install in editable mode
pip install -e .
# Or install with development dependencies
pip install -r requirements-dev.txt
pip install -e .
Configuration
Configuration File
Sequel stores user preferences in ~/.config/sequel/config.json. This file is automatically created on first run with default values.
Example configuration:
{
"ui": {
"theme": "textual-dark"
},
"filters": {
"project_regex": "^my-project-prefix.*$"
},
"logging": {
"log_file": "~/.config/sequel/sequel.log",
"log_level": "INFO"
}
}
You can edit this file manually or use the command palette (Ctrl+P) to change themes. Theme changes are automatically persisted to the config file.
Configuration precedence:
- Environment variables (highest priority)
- Config file (
~/.config/sequel/config.json) - Default values
Google Cloud Authentication
Sequel uses Application Default Credentials (ADC). Set up authentication using one of these methods:
# Option 1: Using gcloud CLI (recommended)
gcloud auth application-default login
# Option 2: Using a service account key
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account-key.json"
Environment Variables
Sequel can be configured using environment variables with the SEQUEL_ prefix. These override config file values:
# Project Filtering - Filter projects by regex (default: empty, show all)
export SEQUEL_PROJECT_FILTER_REGEX="^my-project-prefix.*$"
# Disable project filtering (show all projects)
export SEQUEL_PROJECT_FILTER_REGEX=""
# Caching
export SEQUEL_CACHE_ENABLED="true" # Enable/disable caching (default: true)
export SEQUEL_CACHE_TTL_PROJECTS="600" # Project cache TTL in seconds (default: 600)
export SEQUEL_CACHE_TTL_RESOURCES="300" # Resource cache TTL in seconds (default: 300)
# API Settings
export SEQUEL_API_TIMEOUT="30" # API timeout in seconds (default: 30)
export SEQUEL_API_MAX_RETRIES="3" # Max retry attempts (default: 3)
# Logging (defaults to ~/.config/sequel/sequel.log)
export SEQUEL_LOG_LEVEL="INFO" # Log level: DEBUG, INFO, WARNING, ERROR
export SEQUEL_LOG_FILE="/path/to/sequel.log" # Log file path (default: ~/.config/sequel/sequel.log)
# UI Settings
export SEQUEL_THEME="textual-dark" # Textual theme name
Usage
# Start the application
sequel
# With debug logging
sequel --debug
# With custom log file
sequel --log-file sequel.log
# Disable caching
sequel --no-cache
Keyboard Shortcuts
q- Quitr- Refresh current viewCtrl+P- Open command palette (theme selection, etc.)?- Show help↑/↓- Navigate treeEnter- Expand/collapse nodeEsc- Dismiss modal
Documentation
User Guides
- Installation Guide - Prerequisites and installation instructions
- Configuration Guide - All configuration options and examples
- Authentication Guide - Setting up Google Cloud credentials
- Usage Guide - Interface layout, navigation, and features
- Troubleshooting Guide - Common errors and solutions
Examples
- Basic Usage Examples - Step-by-step walkthroughs for common tasks
- Advanced Examples - Custom configurations, performance tuning, debugging
Architecture
- Architecture Overview - High-level architecture and component descriptions
- Service Layer - API wrappers, caching, error handling
- Widget Layer - UI components and event handling
Contributing
- Development Guide - Setup, testing, code quality checks
- Architecture Guide - Adding new features and extending the codebase
Development
Setup Development Environment
# Install development dependencies
pip install -r requirements-dev.txt
pip install -e .
Running Tests
# Run all tests
pytest
# Run with coverage
pytest --cov
# Run specific test categories
pytest -m unit
pytest -m integration
pytest -m ui
# Run performance benchmarks
pytest -m benchmark --no-cov -s
Performance Benchmarks
Sequel includes performance benchmarks to track optimization improvements:
# Run benchmarks
pytest -m benchmark --no-cov -s
Benchmark Results (as of Phase 9):
- Project Loading:
- 1 project: 0.11ms
- 10 projects: 0.14ms
- 100 projects: 1.48ms
- Cache Performance:
- Hit rate: 90.9% on repeated reads
- SET operation: 0.014ms avg
- GET operation: 0.001ms avg
- 1000 concurrent writes: 15.68ms
- 1000 concurrent reads: 2.25ms
- Cache speedup: 215.9x faster than API calls
- Model Creation: 0.002ms per model (1000 models in 2.30ms)
Code Quality
# Lint code
ruff check src tests
# Type check
mypy src
# Run all quality checks (as in CI)
ruff check src tests && mypy src && pytest --cov --cov-fail-under=80
Architecture
Sequel follows a layered architecture:
- Models: Pydantic data models for type-safe resource representation
- Services: Async wrappers around Google Cloud APIs
- Widgets: Textual UI components (tree, detail pane, status bar)
- Cache: TTL-based in-memory caching for API responses
See docs/architecture/overview.md for detailed architecture documentation.
Project Status
Version 1.0.0 has been released! This version includes comprehensive functionality for browsing Google Cloud resources.
Completed Phases:
- ✅ Phase 7: Performance Optimization - Parallel API calls, cache optimization, LRU eviction
- ✅ Phase 8: Error Handling & UX Polish - VIM bindings, enhanced status bar, error recovery
- ✅ Phase 9: Testing & Documentation - Comprehensive documentation, integration tests (35), performance benchmarks (8)
- ✅ Phase 10: Packaging & Release - PyPI publishing, release automation
See CLAUDE.md for development guidelines.
Contributing
Contributions are welcome! Please see:
- Development Guide for development setup and guidelines
- Architecture Guide for extending the codebase
License
MIT License - See LICENSE file for details.
Security
- Credentials are never logged (enforced by credential scrubbing filter)
- Secret values are never retrieved (only metadata is accessed)
- All user data stays local (no telemetry or external reporting)
- Regex patterns are validated to prevent ReDoS (Regular Expression Denial of Service) attacks
- User-provided regex patterns from config files or environment variables are validated at startup
- Patterns with nested quantifiers or catastrophic backtracking potential are rejected
- Invalid patterns are logged and disabled gracefully (app continues with filtering disabled)
For security issues and detailed security practices, please see SECURITY.md.
Support
Release files for sequel-ag 1.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sequel_ag-1.6.1.tar.gz | 74.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sequel_ag-1.6.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 170.5 kB
Release files / sequel_ag-1.6.1.tar.gz
| Download URL | sequel_ag-1.6.1.tar.gz |
|---|---|
| Size | 74.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c438d1fd69f47b50dfaba8e1ea152250197a8eb4d0561fdd81f2696e61dd252c
|
|
BLAKE2b-256 checksum How to use checksums |
6120247adaf7f4219a86b45b85b9660db6e4fc6b41eddb2952fe4b99921f2a7f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / sequel_ag-1.6.1-py3-none-any.whl
| Download URL | sequel_ag-1.6.1-py3-none-any.whl |
|---|---|
| Size | 96.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
34ae6146a07cdde121cc6b1814c057a5e70ab724b41820a901a8e2a2ed4754f7
|
|
BLAKE2b-256 checksum How to use checksums |
b4956d0de39d016283d89998e86caf16f1b254392d2d272bb1e70c8fead3a804
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|