Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
7eda924
Refactor golangci.yml configuration by removing unused linter setting…
dgtalbug Dec 20, 2025
44b8975
Add continue-on-error option for dependency review action in security…
dgtalbug Dec 20, 2025
ac5898b
Merge branch 'develop' of https://github.com/arc-framework/arc-cli in…
dgtalbug Dec 20, 2025
0c98ec6
Add documentation for branching convention and feature development wo…
dgtalbug Dec 20, 2025
96df1c5
Add initial implementation of state management system and CLI styling
dgtalbug Dec 20, 2025
e7ce246
Update build command in Makefile to include versioning and build date
dgtalbug Dec 20, 2025
b505153
014 state management (#14)
dgtalbug Dec 20, 2025
1a5c0c9
Merge branch 'main' into develop
dgtalbug Dec 20, 2025
3ed0c4c
feat: add automated PR description generator with enhanced analysis
dgtalbug Dec 20, 2025
17b34af
feat: configure gosec for lenient security checks and update Makefile…
dgtalbug Dec 20, 2025
2648693
Refactor golangci.yml configuration by removing unused linter setting…
dgtalbug Dec 20, 2025
f01888b
Update build command in Makefile to include versioning and build date
dgtalbug Dec 20, 2025
2bc27fb
014 state management (#14)
dgtalbug Dec 20, 2025
36c85c6
feat: add automated PR description generator with enhanced analysis
dgtalbug Dec 20, 2025
54a3251
feat: configure gosec for lenient security checks and update Makefile…
dgtalbug Dec 20, 2025
7598e20
Merge remote-tracking branch 'origin/develop' into develop
dgtalbug Dec 20, 2025
24e0dfa
chore(ci)(deps): bump the actions-updates group with 4 updates (#17)
dependabot[bot] Dec 20, 2025
d689697
018 interactive UI enhancements (#18)
dgtalbug Dec 21, 2025
5453922
Refactor golangci.yml configuration by removing unused linter setting…
dgtalbug Dec 20, 2025
fdb45a0
Update build command in Makefile to include versioning and build date
dgtalbug Dec 20, 2025
cbef6a8
014 state management (#14)
dgtalbug Dec 20, 2025
8756fa9
feat: add automated PR description generator with enhanced analysis
dgtalbug Dec 20, 2025
bb19624
Refactor golangci.yml configuration by removing unused linter setting…
dgtalbug Dec 20, 2025
8e5ee48
Add continue-on-error option for dependency review action in security…
dgtalbug Dec 20, 2025
a0027ef
Add initial implementation of state management system and CLI styling
dgtalbug Dec 20, 2025
240c587
Update build command in Makefile to include versioning and build date
dgtalbug Dec 20, 2025
9c0cae2
014 state management (#14)
dgtalbug Dec 20, 2025
c1770df
feat: add automated PR description generator with enhanced analysis
dgtalbug Dec 20, 2025
fc072f4
chore(ci)(deps): bump the actions-updates group with 4 updates (#17)
dependabot[bot] Dec 20, 2025
cefe7bd
018 interactive UI enhancements (#18)
dgtalbug Dec 21, 2025
cd7e3d8
Merge branch 'develop' of https://github.com/arc-framework/arc-cli in…
dgtalbug Dec 21, 2025
cf7d77c
fix: correct output format configuration in golangci.yml
dgtalbug Dec 21, 2025
1e78821
fix: update golangci.yml to correct output format and set version
dgtalbug Dec 21, 2025
b140ec8
fix: simplify output format configuration in golangci.yml
dgtalbug Dec 21, 2025
0992f4c
fix: update output format configuration in golangci.yml to include pa…
dgtalbug Dec 21, 2025
29b4b29
fix: update golangci.yml to correct output format and enhance configu…
dgtalbug Dec 21, 2025
b3b9aa1
fix: enhance golangci.yml configuration by adding skip-dirs and refin…
dgtalbug Dec 21, 2025
a4cbdbd
fix: downgrade golangci-lint-action version from v9 to v6 in ci.yml
dgtalbug Dec 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Set up Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: '1.24'

Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Set up Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: '1.24'
cache: false

- name: Go Lint
uses: golangci/golangci-lint-action@v6
with:
# Use 'latest' or a major version like 'v6' to avoid version string errors
version: latest
version: v1.64
args: --timeout=5m --config=.golangci.yml
only-new-issues: ${{ github.event_name == 'pull_request' }}

Expand All @@ -39,18 +38,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Set up Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: '1.24'

- name: Run Tests
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...

- name: Upload Coverage
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
files: ./coverage.txt
fail_ci_if_error: false
Expand All @@ -62,12 +61,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: '1.24'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ jobs:
attestations: write
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: ${{ inputs.go-version }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Set up Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: '1.24'

Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# golangci-lint configuration
# Reference: https://golangci-lint.run/usage/configuration/


run:
timeout: 5m
go: '1.24'
Expand Down Expand Up @@ -129,7 +130,6 @@ linters-settings:
nakedret:
max-func-lines: 30


errorlint:
errorf: true
asserts: true
Expand Down
237 changes: 237 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
# Changelog

All notable changes to the A.R.C. CLI project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added - Interactive UI Enhancements (Spec 018) 🎨✨

This major release transforms the CLI into a modern, interactive experience with smooth animations, comprehensive
logging, and intelligent terminal adaptation.

#### πŸ—οΈ Core Infrastructure

- **Terminal Detection System**: Auto-detect terminal capabilities
- Color profile detection (TrueColor, 256-color, 16-color, NoColor)
- TTY detection with proper fallbacks
- Terminal size detection with responsive layouts
- Environment variable support (NO_COLOR, CLICOLOR_FORCE, COLORTERM, TERM)

- **Structured Logging Framework**: Production-ready logging system
- Charm Log integration with beautiful output
- File rotation (10MB max, 5 backups) using lumberjack
- Secret redaction for sensitive data (tokens, passwords, keys)
- Context-based logging with key-value pairs
- Log levels: DEBUG, INFO, WARN, ERROR, FATAL
- Dual output: formatted console + JSON file logs

- **Animation System**: Smooth 60fps animations
- Spring physics using Harmonica library
- Configurable parameters (damping, stiffness, duration)
- Adaptive frame rate based on terminal performance
- Auto-skip for fast operations (<200ms)
- Graceful degradation in non-TTY environments

#### ✨ User-Facing Features

**US1: Interactive Info Command** βœ…

- `arc info` - Display system information with animated spinners
- Shows: CLI version, Go version, OS/Arch, state DB info, current theme
- `arc info --json` - Machine-readable output for scripting
- Responsive table layouts adapting to terminal width

**US2: Animated Branding** βœ…

- Smooth color transitions with spring-based physics
- Banner animation on theme switches
- Character-by-character rainbow animation
- <300ms animation target for responsiveness

**US3: Structured Logging** βœ…

- `--verbose` flag for debug output
- `--log-level` flag (debug/info/warn/error/fatal)
- Logs stored in `.arc/logs/arc.log` with automatic rotation
- Colored console output with emoji indicators
- Integrated throughout all commands

**US4: Progress Indicators** βœ…

- Animated spinners: dot, line, globe, moon, meter, hamburger
- Progress bars with percentage, rate, and ETA
- Multi-progress layout for parallel operations
- Auto-hide for operations completing in <200ms
- Integrated into state operations

**US5: Enhanced Theme System** βœ…

- `arc theme preview <name>` - Animated theme demonstrations
- `arc theme list` - Shows inline previews for all themes
- `arc theme set <name> --no-animation` - Instant theme switching
- Live style examples (success, error, info, warning)
- Smooth transition animations between themes

**US6: Enhanced Layout Components** βœ…

- Reusable Panel component with configurable borders and styling
- Enhanced Table component with auto-sizing columns
- Per-column alignment support
- Responsive width handling (minimum 80 columns)
- Consistent formatting across all commands

**US7: Shell Completion** βœ…

- `arc completion bash|zsh|fish|powershell` - Generate completions
- `arc completion --interactive` - Interactive setup wizard
- Auto-detection of current shell
- Installation instructions for each shell

#### πŸ§ͺ Test Coverage

- **22 comprehensive test files** covering all components
- Terminal detection tests
- Branding and system info tests
- Logging infrastructure tests (logger, writer, redactor)
- Animation framework tests
- UI component tests (panel, progress, spinner, table)
- Layout and markdown rendering tests
- Style system tests (emoji, output formatting)
- CLI command tests (all 7 user stories)
- **>80% code coverage** across the project

#### πŸ”§ Technical Improvements

- Zero variable shadowing issues
- Full golangci-lint compliance
- Consistent code formatting with gofumpt
- Comprehensive error handling
- Graceful degradation in limited environments
- NO_COLOR and ARC_NO_ANIMATION environment variable support
- `arc theme list --preview` - Inline color previews
- Smooth theme transition animations
- `--no-animation` flag for instant switching
- Animated style examples (success, error, info, warning)

**US6: Improved Layout Components** βœ…

- Panel component with titled content and borders
- Enhanced Table with auto-sizing columns
- Per-column alignment support
- Responsive width handling
- Refactored `arc state show` to use table component
- Refactored `arc history` to use panel component

**US7: Completion Command Enhancement** βœ…

- `arc completion` command for shell completion
- Support for bash, zsh, fish, PowerShell
- Interactive setup wizard with `--interactive` flag
- Auto-detection of current shell
- Platform-specific installation instructions

#### Components & Libraries

**New Packages:**

- `internal/terminal/detect.go` - Terminal capability detection
- `pkg/log/` - Structured logging system (logger, writer, redactor)
- `pkg/ui/components/animator.go` - Animation framework
- `pkg/ui/components/panel.go` - Panel component
- `pkg/ui/components/progress.go` - Progress indicators
- `pkg/ui/components/spinner.go` - Spinner animations
- `pkg/ui/components/table.go` - Enhanced tables
- `pkg/cli/completion.go` - Completion command

**Enhanced Packages:**

- `pkg/ui/layout/layout.go` - Added responsive width functions
- `pkg/ui/styles/colors.go` - Added CodeStyle for code snippets
- `pkg/cli/info.go` - Animated system information display
- `pkg/cli/theme.go` - Theme preview and animation
- `pkg/cli/state.go` - Table/panel-based display

#### Configuration & Environment

**New Environment Variables:**

- `ARC_NO_ANIMATION=1` - Disable all animations
- `ARC_ANIMATION_FPS=30` - Set target FPS (default: 60)
- `ARC_LOG_LEVEL` - Set log level (debug, info, warn, error, fatal)
- `ARC_LOG_FILE` - Custom log file path
- `ARC_STATE_DIR` - Custom state directory

**New Config Files:**

- `configs/animation.yaml` - Animation configuration
- `configs/logging.yaml` - Logging configuration

### Changed

- Refactored state display to use enhanced table component
- Refactored history display to use panel component
- Updated theme command with preview capabilities
- Enhanced info command with animations

### Technical Details

**Dependencies Added:**

- `github.com/charmbracelet/harmonica` - Spring physics animations
- `github.com/charmbracelet/log` - Structured logging
- `github.com/natefinch/lumberjack` - Log rotation

**Architecture:**

- Animation system supports 60 FPS with spring physics
- Adaptive performance based on terminal capabilities
- Auto-hide fast operations to avoid flicker
- Responsive layouts adapt to terminal width (80-120 columns)

### Documentation

- Updated README.md with new commands and environment variables
- Added environment variable documentation section
- Updated command examples with new features

---

## [0.1.0] - 2024-12-XX (Previous Release)

### Added

- Initial CLI foundation with Cobra
- ASCII art banner with gradient themes
- Theme management system (`arc theme list/set/show`)
- State management and persistence
- Basic styling and emoji system

### Features

- 6 built-in themes (cyan-purple, rainbow, fire, ocean, matrix, character-rainbow)
- NO_COLOR support for CI/CD
- Version and help commands
- Cross-platform support (macOS, Linux, Windows)

---

## Release Notes Format

Each release includes:

- **Added**: New features and capabilities
- **Changed**: Changes to existing functionality
- **Deprecated**: Features that will be removed
- **Removed**: Features that were removed
- **Fixed**: Bug fixes
- **Security**: Security improvements

---

[Unreleased]: https://github.com/arc-framework/arc-cli/compare/v0.1.0...HEAD

[0.1.0]: https://github.com/arc-framework/arc-cli/releases/tag/v0.1.0

6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@ help:
# Build the binary
build:
@echo "πŸ—οΈ Building arc..."
@go build -ldflags="-X 'github.com/arc-framework/arc-cli/internal/version.Version=0.0.1-dev' \
@BRANCH=$$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo 'unknown'); \
VERSION="dev-$$BRANCH"; \
go build -ldflags="-X 'github.com/arc-framework/arc-cli/internal/version.Version=$$VERSION' \
-X 'github.com/arc-framework/arc-cli/internal/version.BuildDate=$(shell date -u '+%Y-%m-%d')' \
-X 'github.com/arc-framework/arc-cli/internal/version.GitCommit=$(shell git rev-parse --short HEAD 2>/dev/null || echo 'dev')'" \
-X 'github.com/arc-framework/arc-cli/internal/version.GitCommit=$(shell git rev-parse --short HEAD 2>/dev/null || echo 'unknown')'" \
-o arc cmd/arc/main.go
@echo "βœ… Build complete: ./arc"
@ls -lh arc
Expand Down
Loading
Loading