Commit Graph

202 Commits

Author SHA1 Message Date
rob b1d1a3692d Update README Docker section with new containers
- Document Dockerfile.ready (pre-installed container)
- Document Dockerfile.test-install (fresh install testing)
- Document install.sh interactive installer
- Keep legacy docker-compose as fallback option

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 22:19:31 -04:00
rob 63149aec07 Add database migration for schema updates
When the registry server starts, it now automatically adds any missing
columns to existing tables. This prevents 500 errors when publishing
to a database created before newer columns were added.

Columns added by migration:
- scrutiny_status, scrutiny_report (tool scrutiny)
- source, source_url, source_json (tool attribution)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 21:48:38 -04:00
rob 0462750b88 Allow pasting registry token directly in TUI
When publishing without a configured token, the TUI now:
1. Shows instructions for getting a token
2. Opens an input dialog to paste the token
3. Saves the token and continues with publishing

This eliminates the need to exit the TUI or use another terminal.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 21:40:09 -04:00
rob 4d09c3f912 Add pre-installed Docker container
Dockerfile.ready provides CmdForge pre-installed and ready to use,
for regular usage after testing the installer with Dockerfile.test-install.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 21:32:09 -04:00
rob a70267cf53 Fix token modal and session token issues
- Fix create token modal z-index so it's not covered by backdrop
- Rename session tokens from "login" to "Web Session" for clarity
- Delete old session tokens when logging in (prevents accumulation)
- Filter out session tokens from dashboard display (users only see
  their manually created API tokens)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 21:27:01 -04:00
rob e18a575f76 Add TUI publish feature and fix web UI dropdown
- Add Publish button to TUI for publishing tools directly from the
  graphical interface without using the command line
- Fix user dropdown menu in web UI header that stayed open after
  clicking (replaced Alpine.js directives with vanilla JS)
- Update test to use correct registry URL (cmdforge.brrd.tech)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 21:12:42 -04:00
rob 79739369f0 Fix registry registration URL in CLI
Update publish command to show correct registration URL
(cmdforge.brrd.tech instead of gitea.brrd.tech)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 20:42:37 -04:00
rob 86d82fcd72 Fix TUI registry browser and harden search API
- TUI: Use list_tools for browsing (no query), search_tools only when
  user enters a search term. Fixes 500 error on initial registry load.

- API: Sanitize FTS5 queries by escaping special characters (* " ( ) etc)
  Prevents SQL errors from malformed search queries like "*"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 20:36:21 -04:00
rob 19e5be7e5a Fix category display and tool counts in web UI
- Categories API now includes dynamic categories from database
  (categories used by tools but not in predefined list)
- Add total_tools to categories API meta for accurate All Tools count
- Fix web routes to use total_tools instead of summing category counts
- Dynamic categories get auto-generated descriptions

This fixes:
- "All Tools" showing 2 instead of 4
- Categories like "code-analysis" and "education" not appearing
- Incorrect category counts in sidebar

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 19:53:40 -04:00
rob c89bd44be8 Fix registry URL and add registry browser to TUI
- Fix default registry URL: gitea.brrd.tech -> cmdforge.brrd.tech
  (gitea.brrd.tech was Gitea's API, not CmdForge registry)

- Add "Registry" button to TUI main menu
- Add registry browser overlay with:
  - Search input with live search
  - Tool list with owner/name display
  - Info panel showing name, publisher, version, description,
    downloads, and tags
  - Install button with confirmation dialog
  - Proper error handling for network issues

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 19:43:20 -04:00
rob b40f26622f Add installer script and test installation Docker image
- install.sh: Interactive installer that:
  - Checks Python version and prerequisites
  - Creates virtual environment at ~/.cmdforge-venv
  - Installs CmdForge with all dependencies
  - Sets up PATH in .bashrc/.zshrc
  - Creates tool wrappers
  - Optionally installs 27 example tools
  - Supports --yes for non-interactive mode

- Dockerfile.test-install: Fresh Ubuntu image for testing
  - Simulates a new computer (CmdForge source present but not installed)
  - Non-root user (testuser) for realistic permissions
  - Run interactively to test the full installation experience

Usage:
  docker build -f Dockerfile.test-install -t cmdforge-test-install .
  docker run -it --rm cmdforge-test-install
  # Inside: ./install.sh

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 07:17:54 -04:00
rob 14448408af Add enhanced search and filtering (M2 feature)
- Add /api/v1/tags endpoint for listing available tags
- Enhance search API with tag filtering (AND logic), multi-category
  filtering (OR logic), owner filter, download range, and date range
- Add faceted response support (category/tag/owner counts)
- Update registry client with new search parameters and get_tags method
- Add CLI search options: -t/--tag, -o/--owner, --min-downloads,
  --popular, --new, --since, --before, --json, --show-facets
- Add new 'registry tags' CLI subcommand
- Add web UI filter sidebar with checkboxes, dropdowns, and active
  filter chips with URL-based state management
- Display clickable tags on tool cards

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 06:13:37 -04:00
rob 614b145f5f Improve error messages for debugging
Code step errors:
- Show line numbers with context (line before/after)
- Display available variables for debugging
- Include step number in error message

YAML loading errors:
- Show line and column number for syntax errors
- Display the problematic line with arrow pointer
- Show the specific YAML problem description

Nested tool errors:
- Track call stack through tool chain
- Display full call path when nested tool fails
- Show step numbers at each level

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 04:50:19 -04:00
rob f86db9e0d9 Test auto-deploy webhook 2026-01-13 03:09:50 -04:00
rob 9141a3eedf Add deploy webhook for CI/CD
- New /api/v1/webhook/deploy endpoint
- Verifies Gitea HMAC-SHA256 signature
- Only deploys on push to main/master branch
- Runs git pull and service restart in background

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 03:03:11 -04:00
rob 62f06813a4 Add full ToolSource support to registry
- Add source_json column to store complete source attribution
- Update publish API to accept source object or legacy string
- Update get_tool API to return parsed source object
- Update web UI to display type, author, license, url, original_tool
- Add gunicorn config and dependency for production server

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 02:43:09 -04:00
rob b324d67a31 Update before docs deploy 2026-01-12 10:38:08 -04:00
rob 9fbe45244d Move docs to project-docs symlink structure
- Docs now point to project-docs/docs/projects/cmdforge
- Old docs preserved in olddocs/
- Updated .gitignore to ignore docs symlink

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-06 22:26:39 -04:00
rob 1caa3454f0 Add source field support and Fabric import script
- Add ToolSource dataclass for attribution metadata (type, license, url, author, original_tool)
- Add source and version fields to Tool dataclass
- Update Tool.from_dict() and to_dict() to handle source field
- Display source attribution in TUI info panel
- Show [imported]/[forked] markers in cmdforge list
- Add import_fabric.py script to import Fabric patterns as CmdForge tools

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 23:52:29 -04:00
rob 2c139b3982 Add meta-tools, collections, and attribution features
Meta-tools:
- Add ToolStep dataclass for tools calling other tools
- Implement execute_tool_step() with recursion depth limiting
- Add check_dependencies() for validating tool dependencies
- Add 'cmdforge check' command for dependency verification

Collections:
- Add collections API endpoints and database schema
- Create collections web UI (list and detail pages)
- Add collections to navigation header and homepage
- Document collections in REGISTRY.md

Attribution:
- Add source attribution fields to tool detail page
- Document source types (original, adapted, imported)
- Add license field documentation

Documentation updates across README, DESIGN.md, REGISTRY.md,
and new META_TOOLS.md design document.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 03:05:23 -04:00
rob 497fe87fc5 Rename project from SmartTools to CmdForge
Major rename operation:
- Rename Python package: smarttools -> cmdforge
- Update CLI entry point: smarttools -> cmdforge
- Update all imports and module references
- Update pyproject.toml with new name, URLs, entry point
- Update all HTML templates with new branding
- Update documentation (CLAUDE.md, README.md, docs/*, wiki/*)
- Update environment variables:
  - SMARTTOOLS_ENV -> CMDFORGE_ENV
  - SMARTTOOLS_REGISTRY_DB -> CMDFORGE_REGISTRY_DB
  - SMARTTOOLS_TOKEN -> CMDFORGE_TOKEN
  - SMARTTOOLS_REGISTRY_* -> CMDFORGE_REGISTRY_*
- Update Dockerfile and docker-compose.yml
- Update tests to use new package name
- Update scripts and examples
- Update package.json and tailwind.config.js

All 158 unit tests pass. The CLI is working correctly with the
new cmdforge command.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 22:15:55 -04:00
rob 2939dd806b Document forum feature across site
- Add prominent forum CTA to community page
- Add Get Help section to getting-started docs
- Add forum link to footer Resources section
- Update CLAUDE.md with web UI and forum architecture

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 01:17:25 -04:00
rob 3efed0bf33 Add both Forum and Community links to navigation
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 00:52:00 -04:00
rob a80adcedfd Add community forum feature
- New forum blueprint with categories, topics, and replies
- Markdown rendering for posts with safe HTML escaping
- Honeypot spam protection for forms
- Categories: General, Help, Showcase, Ideas, Tutorials
- View counts and reply tracking
- Updated navigation to link to forum

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 00:45:15 -04:00
rob e2d1002d2e Fix 'All Tools' count showing filtered category count
total_count was using the API response meta.total which reflects
the current filter. Now sums all category counts for consistent display.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 07:04:12 -04:00
rob 9699717443 Fix SQL parameter count in category filter query
The query uses base_where twice (for latest_any and latest_stable CTEs)
but params were only passed once, causing sqlite3.ProgrammingError when
filtering by category.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 06:58:30 -04:00
rob 0a1c03ce09 Replace placeholder content on Community and Support pages
Community page:
- Replaced "Coming soon" sections with working links
- Links to Gitea repository and issues
- Added "Ways to Contribute" section with actionable items
- Added quick links to Installation, Tools, and Tutorials

Support page (formerly Donate):
- Removed placeholder donation links
- Focus on non-monetary contributions (tools, feedback, word-of-mouth)
- Links to repository and publishing guide
- More appropriate for a personal/open-source project

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 06:49:13 -04:00
rob 01995392da Add Visual Builder tutorial for the TUI
- New comprehensive tutorial covering smarttools ui
- ASCII art mockups of menu interface
- Documents all keyboard shortcuts
- Explains UI backends (urwid, snack, dialog)
- Comparison table: CLI vs Visual Builder use cases
- Updated getting-started to mention both UI and CLI options
- Added visual-builder to documentation TOC

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 06:36:34 -04:00
rob 62e0ddeabd Add prose styling for documentation content
The prose classes from @tailwindcss/typography weren't working because
the plugin wasn't installed. Added custom prose styling for:
- Proper paragraph spacing (mb-4)
- Header margins (mt-10 for h2, mt-8 for h3)
- Lead paragraphs styling
- List styling with proper indentation
- Code block styling (dark theme)
- Inline code styling
- Table styling
- Blockquote and details styling

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 06:13:02 -04:00
rob d85eb36a72 Fix SQLite WAL mode error on FUSE filesystems
WAL mode can fail on filesystems like mergerfs that don't fully support
memory-mapped files. Add graceful fallback to DELETE journal mode.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 05:50:03 -04:00
rob 55d46d1f61 Rewrite tutorials in engaging O'Reilly book style
- Transform multi-step into "Chaining AI Like a Pro" with visual
  waterfall diagram, three patterns grid, and exercises
- Transform code-steps into "Python Superpowers" with cookbook
  recipes, error handling patterns, and CSV analyzer exercise
- Transform advanced-workflows into "The Advanced Playbook" with
  model selection guide, self-improving loops, and research
  assistant exercise

All tutorials now feature:
- "What You'll Learn" callout boxes
- Visual cards and grids for concepts
- Pro tips and warning callouts
- Hands-on exercises with collapsible solutions
- Conversational, engaging tone

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 05:46:09 -04:00
rob 6acbafc061 Fix tutorial page template format to match docs pattern 2026-01-01 05:25:37 -04:00
rob 427dfcb669 Fix tutorials route to pass correct template variables 2026-01-01 05:23:24 -04:00
rob d072d7ccad Add comprehensive tutorial content
- yaml-config: Complete YAML structure reference
- arguments: Custom CLI flags and patterns
- multi-step: Chaining prompts and code steps
- code-steps: Python processing between AI calls
- advanced-workflows: Multi-provider, conditionals, pipelines

Update tutorials route to use docs content system
Expand table of contents with new sections

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 05:20:33 -04:00
rob c1eb425457 Replace pip install command with link to Gitea install guide
The package isn't on PyPI yet, so link to the Gitea README which
has multiple installation options (pip from git, Docker, 60-second setup).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 04:41:49 -04:00
rob 02842e4287 Include all dependencies and tests in Docker image
- Add tests/ to Docker image for in-container testing
- Install [all,dev] dependencies (includes Flask, registry, TUI)
- Make integration tests configurable via REGISTRY_URL env var
- Add error handling to publish test fixture for rate limiting

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 03:51:46 -04:00
rob 940f91d445 Add parallel orchestration documentation to web UI
New docs page at /docs/parallel-orchestration showing:
- Why parallel execution (3x speedup example)
- Basic ThreadPoolExecutor pattern
- Complete multi-perspective analysis example
- Progress feedback implementation
- Error handling best practices
- Reference to orchestrated-discussions project

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 03:21:33 -04:00
rob cdb17db43a Add comprehensive test suite for core modules
New test files:
- test_tool.py: 35 tests for Tool, ToolArgument, steps, persistence
- test_runner.py: 31 tests for variable substitution, step execution
- test_providers.py: 35 tests for provider management, mocked calls
- test_cli.py: 20 tests for CLI commands
- tests/README.md: Test suite documentation

Removed placeholder test.py (triangle calculator).

Total: 158 unit tests passing, 12 integration tests (require server)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 03:07:16 -04:00
rob 97f9de52e6 Refactor CLI and UI into modular packages, add registry scrutiny
Major refactoring:
- Split cli.py (1465 lines) into cli/ package with 6 modules
- Split ui_urwid.py (2313 lines) into ui_urwid/ package with 4 modules
- Maintain backwards compatibility via thin wrapper modules

New features:
- Add tool scrutiny system for registry publishing (honesty, transparency, scope, efficiency checks)
- Add optimization suggestions for AI calls that could be pure code

Bug fixes:
- Fix variable substitution escaping ({{literal}} now works)
- Fix provider command parsing with shlex for quoted paths
- Add error logging even without --verbose flag

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 02:44:39 -04:00
rob 4fb229858f Fix select element accessibility labels on tools page
Add proper label associations with for/id attributes to all select
elements on the tools page for screen reader compatibility.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 23:25:16 -04:00
rob e7937361f3 Fix additional accessibility issues on tools and search pages
- Add submit button to search forms for keyboard accessibility
- Fix category count text contrast (text-gray-400 → text-gray-600)
- Add aria-label to search inputs
- Add visible Search button on mobile filters

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 23:23:04 -04:00
rob 26ae319815 Add Sentry error monitoring and fix accessibility issues
Sentry integration:
- Add sentry-sdk[flask] to registry dependencies
- Initialize Sentry with Flask integration (if SENTRY_DSN is set)
- Configure trace/profile sampling rates via environment variables
- Privacy-first: send_default_pii=False

Accessibility fixes (WCAG 2.0 AA compliance):
- Add aria-label to search input
- Add label and aria-label to essential cookies checkbox
- Fix color contrast issues:
  - $ prompt: text-gray-400 → text-gray-600
  - Version numbers: text-gray-400 → text-gray-600
  - Tutorial button: text-cyan-600 → text-cyan-700
  - Step labels: text-indigo-500 → text-indigo-700
  - Footer text: text-gray-500 → text-gray-300 (on dark bg)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 23:20:11 -04:00
rob 357997dc7d Fix docs heading format for template compatibility
Convert (id, title) tuples to SimpleNamespace objects with id, text,
and level attributes to match template expectations.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 23:10:34 -04:00
rob 8c7c22b958 Fix duplicate SEO route registration
Remove sitemap.xml and robots.txt route registrations from app.py
since they're already defined in routes.py. This was causing an
AssertionError on startup.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 23:09:01 -04:00
rob 4318b6cec5 Add SEO files and real documentation content
- Add permissive robots.txt welcoming all crawlers including AI
- Add dynamic sitemap.xml with all pages and tools
- Add real documentation content (Getting Started, Installation, First Tool, Publishing, Providers)
- Update docs route to use content from docs_content.py

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 23:05:57 -04:00
rob 1ac3054aaa Add Phase 8 features: analytics, reporting, health check
- Add pageviews table and /api/v1/analytics/pageview endpoint
- Abuse reporting API already existed at /api/v1/reports
- Add health_check.py script for monitoring
- ChatGPT additions: report modal UI, analytics tracking JS

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 22:49:58 -04:00
rob 096c0739d8 Merge pull request 'Add SmartTools Registry with Web UI (Phase 1-7)' (#18) from feature/registry into main 2026-01-01 01:21:37 +00:00
rob 9a33d57de1 Add JavaScript interactivity and consent API
- Complete main.js with all interactive functions:
  - Mobile menu toggle with icon switching
  - Search modal with live search
  - Dashboard modals (tokens, deprecate, settings)
  - Tool detail page (copy install, report modal)
  - Toast notifications
- Add /api/v1/consent endpoint for cookie preferences
- Session-based consent storage

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 21:06:40 -04:00
rob e029166ba6 Change web blueprint static URL path to avoid conflict
The main Flask app and web blueprint both used /static, causing
conflicts. Changed web blueprint to use /web-static instead.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 20:08:20 -04:00
rob 9070029d31 Fix static folder path resolution for blueprints
Use absolute paths for templates and static folders to ensure
they resolve correctly regardless of the working directory.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 20:06:34 -04:00