diff --git a/.gitea/ISSUE_TEMPLATE/bug_report.md b/.gitea/ISSUE_TEMPLATE/bug_report.md index 9070ce0..1acad1e 100644 --- a/.gitea/ISSUE_TEMPLATE/bug_report.md +++ b/.gitea/ISSUE_TEMPLATE/bug_report.md @@ -21,7 +21,7 @@ What should have happened? ## Environment - OS: -- SmartTools version: +- CmdForge version: - Provider: - Docker or native install? diff --git a/.gitea/ISSUE_TEMPLATE/question.md b/.gitea/ISSUE_TEMPLATE/question.md index 1291b8f..7bc0563 100644 --- a/.gitea/ISSUE_TEMPLATE/question.md +++ b/.gitea/ISSUE_TEMPLATE/question.md @@ -1,6 +1,6 @@ --- name: Question -about: Ask a question about SmartTools +about: Ask a question about CmdForge labels: question --- diff --git a/AGENTS.md b/AGENTS.md index 7510abd..c915afd 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,7 +1,7 @@ # Repository Guidelines ## Project Structure & Module Organization -- `src/smarttools/` contains the core Python package (CLI entry point, tool model, runner, providers, UI backends). +- `src/cmdforge/` contains the core Python package (CLI entry point, tool model, runner, providers, UI backends). - `tests/` holds pytest suites. - `docs/` includes installation, provider setup, examples, and design notes. - `examples/` provides sample tools and an installer script. @@ -15,11 +15,11 @@ - `ui_urwid.py` and `ui_snack.py` provide the TUI implementations, selected by `ui.py`. ## Build, Test, and Development Commands -- `pip install -e ".[dev]"` installs SmartTools in editable mode with dev dependencies. +- `pip install -e ".[dev]"` installs CmdForge in editable mode with dev dependencies. - `pytest` runs the full test suite. - `pytest tests/test.py::test_name` runs a focused test. -- `python -m smarttools.cli` runs the CLI module directly. -- `smarttools ui` launches the TUI (requires `urwid` or `python-newt`). +- `python -m cmdforge.cli` runs the CLI module directly. +- `cmdforge ui` launches the TUI (requires `urwid` or `python-newt`). - `docker-compose build` builds the dev container image. - `docker-compose run --rm test` runs tests inside Docker. @@ -38,5 +38,5 @@ - PRs should include a clear summary, test results (or rationale if tests are skipped), and screenshots when UI behavior changes. ## Security & Configuration Tips -- Provider credentials live in `~/.smarttools/providers.yaml`; avoid committing secrets. -- User tool configs live in `~/.smarttools//config.yaml` and should not be added to the repo. +- Provider credentials live in `~/.cmdforge/providers.yaml`; avoid committing secrets. +- User tool configs live in `~/.cmdforge//config.yaml` and should not be added to the repo. diff --git a/CLAUDE.md b/CLAUDE.md index aaf0cc2..dbf6bfb 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co ## Project Overview -SmartTools is a lightweight personal tool builder for AI-powered CLI commands. It lets users create custom terminal commands that call AI providers, chain prompts with Python code steps, and use them like any Unix pipe command. +CmdForge is a lightweight personal tool builder for AI-powered CLI commands. It lets users create custom terminal commands that call AI providers, chain prompts with Python code steps, and use them like any Unix pipe command. ## Development Commands @@ -19,29 +19,29 @@ pytest pytest tests/test.py::test_name # Run the CLI -python -m smarttools.cli +python -m cmdforge.cli # Launch the UI -smarttools ui +cmdforge ui ``` ## Architecture -### Core Modules (`src/smarttools/`) +### Core Modules (`src/cmdforge/`) -- **cli.py**: Entry point (`smarttools` command). Routes subcommands: list, create, edit, delete, test, run, ui, refresh +- **cli.py**: Entry point (`cmdforge` command). Routes subcommands: list, create, edit, delete, test, run, ui, refresh - **tool.py**: Tool definition dataclasses (`Tool`, `ToolArgument`, `PromptStep`, `CodeStep`), YAML config loading/saving, wrapper script generation - **runner.py**: Execution engine. Runs tool steps sequentially, handles variable substitution (`{input}`, `{varname}`), executes Python code steps via `exec()` -- **providers.py**: Provider abstraction. Calls AI CLI tools via subprocess, reads provider configs from `~/.smarttools/providers.yaml` +- **providers.py**: Provider abstraction. Calls AI CLI tools via subprocess, reads provider configs from `~/.cmdforge/providers.yaml` - **ui.py**: UI dispatcher - selects between urwid and snack implementations - **ui_urwid.py**: Full TUI implementation using urwid library - **ui_snack.py**: Fallback TUI using python-newt/snack ### Key Paths -- **Tools storage**: `~/.smarttools//config.yaml` +- **Tools storage**: `~/.cmdforge//config.yaml` - **Wrapper scripts**: `~/.local/bin/` (auto-generated bash scripts) -- **Provider config**: `~/.smarttools/providers.yaml` +- **Provider config**: `~/.cmdforge/providers.yaml` ### Tool Structure @@ -67,7 +67,7 @@ Variable substitution is simple string replacement in `runner.py:substitute_vari ## Provider System -Providers are CLI tools that accept prompts via stdin and output to stdout. Defined in `~/.smarttools/providers.yaml`: +Providers are CLI tools that accept prompts via stdin and output to stdout. Defined in `~/.cmdforge/providers.yaml`: ```yaml providers: @@ -81,9 +81,9 @@ The `mock` provider is built-in for testing without API calls. ## Web UI & Registry -SmartTools includes a web interface and tool registry: +CmdForge includes a web interface and tool registry: -### Web Modules (`src/smarttools/web/`) +### Web Modules (`src/cmdforge/web/`) - **app.py**: Flask app factory, registers blueprints - **routes.py**: Main web routes (docs, tutorials, tools, etc.) @@ -93,7 +93,7 @@ SmartTools includes a web interface and tool registry: - **filters.py**: Jinja2 filters (timeago, markdown, etc.) - **docs_content.py**: Documentation and tutorial content -### Registry Modules (`src/smarttools/registry/`) +### Registry Modules (`src/cmdforge/registry/`) - **app.py**: Registry API (tool publishing, search, downloads) - **db.py**: SQLite schema and queries @@ -109,8 +109,8 @@ SmartTools includes a web interface and tool registry: ```bash # Development -python -m smarttools.web.app +python -m cmdforge.web.app # Production (example) -SMARTTOOLS_REGISTRY_DB=/path/to/db PORT=5050 python -m smarttools.web.app +CMDFORGE_REGISTRY_DB=/path/to/db PORT=5050 python -m cmdforge.web.app ``` diff --git a/Dockerfile b/Dockerfile index 63a5f03..542e948 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,11 @@ -# SmartTools - AI-powered CLI command builder -# Build: docker build -t smarttools . -# Run: docker run -it --rm -v ~/.smarttools:/root/.smarttools smarttools +# CmdForge - AI-powered CLI command builder +# Build: docker build -t cmdforge . +# Run: docker run -it --rm -v ~/.cmdforge:/root/.cmdforge cmdforge FROM python:3.12-slim LABEL maintainer="rob" -LABEL description="SmartTools - Personal AI-powered CLI command builder" +LABEL description="CmdForge - Personal AI-powered CLI command builder" # Install system dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ @@ -34,24 +34,24 @@ COPY examples/ ./examples/ COPY docs/ ./docs/ COPY tests/ ./tests/ -# Install SmartTools and all dependencies (CLI, TUI, registry) +# Install CmdForge and all dependencies (CLI, TUI, registry) RUN pip install --no-cache-dir -e ".[all,dev]" -# Create smarttools directory -RUN mkdir -p /root/.smarttools /root/.local/bin +# Create cmdforge directory +RUN mkdir -p /root/.cmdforge /root/.local/bin # Install example tools RUN python examples/install.py # Generate CLI wrappers -RUN smarttools refresh +RUN cmdforge refresh # Add local bin to PATH ENV PATH="/root/.local/bin:${PATH}" # Default command - show help -CMD ["smarttools", "--help"] +CMD ["cmdforge", "--help"] # For interactive use: -# docker run -it --rm smarttools smarttools ui -# docker run -it --rm smarttools bash +# docker run -it --rm cmdforge cmdforge ui +# docker run -it --rm cmdforge bash diff --git a/README.md b/README.md index 1c1f492..7cc2065 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# SmartTools +# CmdForge **A lightweight personal tool builder for AI-powered CLI commands.** @@ -20,7 +20,7 @@ echo "Price $49.99, SKU ABC-123" | json-extract --fields "price, sku" # Output: {"price": 49.99, "sku": "ABC-123"} ``` -## Why SmartTools? +## Why CmdForge? - **Unix Philosophy** - Tools that do one thing well, composable with pipes - **Provider Agnostic** - Works with Claude, GPT, Gemini, DeepSeek, local models @@ -30,17 +30,17 @@ echo "Price $49.99, SKU ABC-123" | json-extract --fields "price, sku" ## Try It Now (60 seconds) -See SmartTools in action without installing anything on your system: +See CmdForge in action without installing anything on your system: ```bash # Pull the container -docker pull gitea.brrd.tech/rob/smarttools:latest +docker pull gitea.brrd.tech/rob/cmdforge:latest # Run it -docker run -it --rm gitea.brrd.tech/rob/smarttools bash +docker run -it --rm gitea.brrd.tech/rob/cmdforge bash # Inside the container - install OpenCode (includes free AI models) -smarttools providers install # Select option 4, then 'y' +cmdforge providers install # Select option 4, then 'y' source ~/.bashrc # Try it! This explains the README using the free Big Pickle model @@ -55,21 +55,21 @@ For regular use, install natively: ```bash # Clone and install -git clone https://gitea.brrd.tech/rob/SmartTools.git -cd SmartTools +git clone https://gitea.brrd.tech/rob/CmdForge.git +cd CmdForge pip install -e . # Ensure ~/.local/bin is in PATH export PATH="$HOME/.local/bin:$PATH" # Install an AI provider (interactive guide) -smarttools providers install +cmdforge providers install # Launch the UI -smarttools ui +cmdforge ui # Or create your first tool -smarttools create summarize +cmdforge create summarize ``` ## Installation @@ -77,16 +77,16 @@ smarttools create summarize ### Native Install ```bash -git clone https://gitea.brrd.tech/rob/SmartTools.git -cd SmartTools +git clone https://gitea.brrd.tech/rob/CmdForge.git +cd CmdForge pip install -e . ``` ### With Development Dependencies ```bash -git clone https://gitea.brrd.tech/rob/SmartTools.git -cd SmartTools +git clone https://gitea.brrd.tech/rob/CmdForge.git +cd CmdForge pip install -e ".[dev]" ``` @@ -107,7 +107,7 @@ export PATH="$HOME/.local/bin:$PATH" Then refresh wrapper scripts: ```bash -smarttools refresh +cmdforge refresh ``` ## Usage @@ -115,7 +115,7 @@ smarttools refresh ### UI Mode (Recommended for Beginners) ```bash -smarttools ui +cmdforge ui ``` Navigate with arrow keys, Tab, Enter, and mouse. Create tools visually with the built-in prompt editor. @@ -123,13 +123,13 @@ Navigate with arrow keys, Tab, Enter, and mouse. Create tools visually with the ### CLI Mode ```bash -smarttools list # List all tools -smarttools create mytool # Create new tool -smarttools edit mytool # Edit in $EDITOR -smarttools delete mytool # Delete tool -smarttools run mytool # Run a tool -smarttools test mytool # Test with mock provider -smarttools refresh # Update executable wrappers +cmdforge list # List all tools +cmdforge create mytool # Create new tool +cmdforge edit mytool # Edit in $EDITOR +cmdforge delete mytool # Delete tool +cmdforge run mytool # Run a tool +cmdforge test mytool # Test with mock provider +cmdforge refresh # Update executable wrappers ``` ### Running Tools @@ -155,10 +155,10 @@ cat file.txt | mytool --provider mock ### Composing Tools -SmartTools follows Unix philosophy: each tool does one thing well, and tools chain together for complex workflows. +CmdForge follows Unix philosophy: each tool does one thing well, and tools chain together for complex workflows. ```bash -# Chain SmartTools together +# Chain CmdForge together cat error.log | log-errors | summarize | translate --lang Spanish # Code review pipeline: focus on changes, review, then summarize @@ -208,7 +208,7 @@ translate-doc() { ## Example Tools -SmartTools comes with 28 pre-built examples you can install: +CmdForge comes with 28 pre-built examples you can install: ### Text Processing @@ -259,14 +259,14 @@ SmartTools comes with 28 pre-built examples you can install: ### Install Example Tools ```bash -# Run the example installer (from the SmartTools directory) +# Run the example installer (from the CmdForge directory) python examples/install.py -smarttools refresh +cmdforge refresh ``` ## Providers -SmartTools works with any AI CLI tool. We've profiled 12 providers: +CmdForge works with any AI CLI tool. We've profiled 12 providers: | Provider | Speed | Accuracy | Cost | Best For | |----------|-------|----------|------|----------| @@ -281,7 +281,7 @@ See [docs/PROVIDERS.md](docs/PROVIDERS.md) for setup instructions. ## Tool Anatomy -A tool is a YAML config file in `~/.smarttools//config.yaml`: +A tool is a YAML config file in `~/.cmdforge//config.yaml`: ```yaml name: summarize @@ -429,7 +429,7 @@ This lets you generate or modify Python code using AI directly within the tool b ## Philosophy -SmartTools is built on **Unix philosophy**: +CmdForge is built on **Unix philosophy**: 1. **Do one thing well** - Each tool solves one problem. `summarize` summarizes. `translate` translates. No bloated mega-tools. @@ -444,15 +444,15 @@ SmartTools is built on **Unix philosophy**: ## Contributing ```bash -git clone https://gitea.brrd.tech/rob/smarttools.git -cd smarttools +git clone https://gitea.brrd.tech/rob/cmdforge.git +cd cmdforge pip install -e ".[dev]" pytest ``` ## Support -If SmartTools saves you time, consider supporting the project: +If CmdForge saves you time, consider supporting the project: **Bitcoin:** `3KeLqGv2Xo8jGYkqA1i68a6nXwgQnuJoza` @@ -470,16 +470,16 @@ Pull and run the pre-built image directly: ```bash # Pull from registry -docker pull gitea.brrd.tech/rob/smarttools:latest +docker pull gitea.brrd.tech/rob/cmdforge:latest -# Run SmartTools -docker run -it --rm gitea.brrd.tech/rob/smarttools smarttools --help +# Run CmdForge +docker run -it --rm gitea.brrd.tech/rob/cmdforge cmdforge --help # List available tools -docker run -it --rm gitea.brrd.tech/rob/smarttools smarttools list +docker run -it --rm gitea.brrd.tech/rob/cmdforge cmdforge list # Interactive shell -docker run -it --rm gitea.brrd.tech/rob/smarttools bash +docker run -it --rm gitea.brrd.tech/rob/cmdforge bash ``` ### Build from Source @@ -488,8 +488,8 @@ Alternatively, build the container yourself: ```bash # Clone the repo -git clone https://gitea.brrd.tech/rob/SmartTools.git -cd SmartTools +git clone https://gitea.brrd.tech/rob/CmdForge.git +cd CmdForge # Build the container docker-compose build @@ -498,7 +498,7 @@ docker-compose build docker-compose run --rm test # Use the CLI -docker-compose run --rm cli smarttools list +docker-compose run --rm cli cmdforge list # Interactive shell docker-compose run --rm shell @@ -518,12 +518,12 @@ xhost +local:docker docker run -it --rm \ -e DISPLAY=$DISPLAY \ -v /tmp/.X11-unix:/tmp/.X11-unix \ - -v smarttools-data:/root/.smarttools \ + -v cmdforge-data:/root/.cmdforge \ --network host \ - gitea.brrd.tech/rob/smarttools bash + gitea.brrd.tech/rob/cmdforge bash # Inside the container: -smarttools providers install +cmdforge providers install ``` **Using docker-compose (build from source):** @@ -533,14 +533,14 @@ xhost +local:docker docker-compose run --rm setup # Inside the container: -smarttools providers install +cmdforge providers install ``` **After installing a provider:** ```bash # Test the provider works -smarttools providers test claude +cmdforge providers test claude ``` **Available Providers:** diff --git a/docker-compose.yml b/docker-compose.yml index 0ff07cc..eab8c4c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,9 +1,9 @@ -# SmartTools - AI-powered CLI command builder +# CmdForge - AI-powered CLI command builder # # Quick Start: # docker-compose build # Build the image # docker-compose run --rm test # Run tests -# docker-compose run --rm cli smarttools list +# docker-compose run --rm cli cmdforge list # # This is a standalone project with no external dependencies. @@ -17,10 +17,10 @@ services: build: context: . dockerfile: Dockerfile - image: smarttools:latest + image: cmdforge:latest volumes: - - smarttools-data:/root/.smarttools - command: ["smarttools", "--help"] + - cmdforge-data:/root/.cmdforge + command: ["cmdforge", "--help"] # ============================================================================ # Tests @@ -29,9 +29,9 @@ services: build: context: . dockerfile: Dockerfile - image: smarttools:latest + image: cmdforge:latest volumes: - - smarttools-data:/root/.smarttools + - cmdforge-data:/root/.cmdforge command: ["pytest", "-v"] # ============================================================================ @@ -41,9 +41,9 @@ services: build: context: . dockerfile: Dockerfile - image: smarttools:latest + image: cmdforge:latest volumes: - - smarttools-data:/root/.smarttools + - cmdforge-data:/root/.cmdforge command: ["/bin/bash"] stdin_open: true tty: true @@ -57,11 +57,11 @@ services: build: context: . dockerfile: Dockerfile - image: smarttools:latest + image: cmdforge:latest environment: - DISPLAY=${DISPLAY:-:0} volumes: - - smarttools-data:/root/.smarttools + - cmdforge-data:/root/.cmdforge - /tmp/.X11-unix:/tmp/.X11-unix:ro command: ["/bin/bash"] stdin_open: true @@ -69,8 +69,8 @@ services: network_mode: host volumes: - smarttools-data: - # Persists ~/.smarttools between container runs + cmdforge-data: + # Persists ~/.cmdforge between container runs # ============================================================================== # Usage Examples @@ -83,8 +83,8 @@ volumes: # docker-compose run --rm test # # Use CLI: -# docker-compose run --rm cli smarttools list -# docker-compose run --rm cli smarttools run hello-world +# docker-compose run --rm cli cmdforge list +# docker-compose run --rm cli cmdforge run hello-world # # Interactive shell: # docker-compose run --rm shell @@ -93,5 +93,5 @@ volumes: # xhost +local:docker # docker-compose run --rm setup # # Inside container: -# smarttools providers install # Interactive guide +# cmdforge providers install # Interactive guide # # Select a provider, it will install and open browser for auth diff --git a/docs/DEPLOYMENT.md b/docs/DEPLOYMENT.md index 7e2f0e8..fe32a5c 100644 --- a/docs/DEPLOYMENT.md +++ b/docs/DEPLOYMENT.md @@ -1,17 +1,17 @@ -# SmartTools Deployment Guide +# CmdForge Deployment Guide -This guide covers deploying the SmartTools Registry web application. +This guide covers deploying the CmdForge Registry web application. ## Quick Start (Development) ```bash # Clone and install -git clone https://gitea.brrd.tech/rob/SmartTools.git -cd SmartTools +git clone https://gitea.brrd.tech/rob/CmdForge.git +cd CmdForge pip install -e ".[dev]" # Initialize database -cd src/smarttools/web +cd src/cmdforge/web python -c "from app import create_app; create_app()" # Run development server @@ -33,12 +33,12 @@ Access at `http://localhost:5050` ```bash # Create application directory -sudo mkdir -p /opt/smarttools -sudo chown $USER:$USER /opt/smarttools -cd /opt/smarttools +sudo mkdir -p /opt/cmdforge +sudo chown $USER:$USER /opt/cmdforge +cd /opt/cmdforge # Clone repository -git clone https://gitea.brrd.tech/rob/SmartTools.git . +git clone https://gitea.brrd.tech/rob/CmdForge.git . # Create virtual environment python3 -m venv venv @@ -51,7 +51,7 @@ pip install gunicorn ### 2. Configure Environment -Create `/opt/smarttools/.env`: +Create `/opt/cmdforge/.env`: ```bash # Required @@ -60,40 +60,40 @@ SECRET_KEY=your-secret-key-here # Generate with: python -c "import secrets; pri # Optional SENTRY_DSN=https://xxx@sentry.io/xxx # Error monitoring -SITE_URL=https://registry.smarttools.dev # For sitemap/SEO +SITE_URL=https://cmdforge.brrd.tech # For sitemap/SEO ``` ### 3. Initialize Database ```bash -cd /opt/smarttools/src/smarttools/web +cd /opt/cmdforge/src/cmdforge/web python -c "from app import create_app; create_app()" ``` -Database will be created at `data/smarttools.db`. +Database will be created at `data/cmdforge.db`. ### 4. systemd Service -Create `/etc/systemd/system/smarttools-web.service`: +Create `/etc/systemd/system/cmdforge-web.service`: ```ini [Unit] -Description=SmartTools Registry Web Application +Description=CmdForge Registry Web Application After=network.target [Service] Type=simple User=www-data Group=www-data -WorkingDirectory=/opt/smarttools -Environment="PATH=/opt/smarttools/venv/bin" -EnvironmentFile=/opt/smarttools/.env -ExecStart=/opt/smarttools/venv/bin/gunicorn \ +WorkingDirectory=/opt/cmdforge +Environment="PATH=/opt/cmdforge/venv/bin" +EnvironmentFile=/opt/cmdforge/.env +ExecStart=/opt/cmdforge/venv/bin/gunicorn \ --workers 4 \ --bind 127.0.0.1:5050 \ - --access-logfile /var/log/smarttools/access.log \ - --error-logfile /var/log/smarttools/error.log \ - 'smarttools.web.app:create_app()' + --access-logfile /var/log/cmdforge/access.log \ + --error-logfile /var/log/cmdforge/error.log \ + 'cmdforge.web.app:create_app()' Restart=always RestartSec=5 @@ -105,26 +105,26 @@ Enable and start: ```bash # Create log directory -sudo mkdir -p /var/log/smarttools -sudo chown www-data:www-data /var/log/smarttools +sudo mkdir -p /var/log/cmdforge +sudo chown www-data:www-data /var/log/cmdforge # Enable service sudo systemctl daemon-reload -sudo systemctl enable smarttools-web -sudo systemctl start smarttools-web +sudo systemctl enable cmdforge-web +sudo systemctl start cmdforge-web # Check status -sudo systemctl status smarttools-web +sudo systemctl status cmdforge-web ``` ### 5. nginx Configuration -Create `/etc/nginx/sites-available/smarttools`: +Create `/etc/nginx/sites-available/cmdforge`: ```nginx server { listen 80; - server_name registry.smarttools.dev; + server_name cmdforge.brrd.tech; # Redirect HTTP to HTTPS return 301 https://$server_name$request_uri; @@ -132,11 +132,11 @@ server { server { listen 443 ssl http2; - server_name registry.smarttools.dev; + server_name cmdforge.brrd.tech; # SSL certificates (use certbot for Let's Encrypt) - ssl_certificate /etc/letsencrypt/live/registry.smarttools.dev/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/registry.smarttools.dev/privkey.pem; + ssl_certificate /etc/letsencrypt/live/cmdforge.brrd.tech/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/cmdforge.brrd.tech/privkey.pem; # SSL settings ssl_protocols TLSv1.2 TLSv1.3; @@ -145,7 +145,7 @@ server { # Static files (optional - Flask can serve these) location /static/ { - alias /opt/smarttools/src/smarttools/web/static/; + alias /opt/cmdforge/src/cmdforge/web/static/; expires 1d; add_header Cache-Control "public, immutable"; } @@ -164,7 +164,7 @@ server { Enable site: ```bash -sudo ln -s /etc/nginx/sites-available/smarttools /etc/nginx/sites-enabled/ +sudo ln -s /etc/nginx/sites-available/cmdforge /etc/nginx/sites-enabled/ sudo nginx -t sudo systemctl reload nginx ``` @@ -173,7 +173,7 @@ sudo systemctl reload nginx ```bash sudo apt install certbot python3-certbot-nginx -sudo certbot --nginx -d registry.smarttools.dev +sudo certbot --nginx -d cmdforge.brrd.tech ``` ## Environment Variables @@ -184,16 +184,16 @@ sudo certbot --nginx -d registry.smarttools.dev | `SECRET_KEY` | Yes | Secret key for sessions (32+ chars) | | `SENTRY_DSN` | No | Sentry error monitoring DSN | | `SITE_URL` | No | Public URL for sitemap generation | -| `DATABASE_PATH` | No | Override database path (default: `data/smarttools.db`) | +| `DATABASE_PATH` | No | Override database path (default: `data/cmdforge.db`) | ## Database Backup ```bash # Backup -cp /opt/smarttools/data/smarttools.db /backup/smarttools-$(date +%Y%m%d).db +cp /opt/cmdforge/data/cmdforge.db /backup/cmdforge-$(date +%Y%m%d).db # Or use SQLite backup command for consistency -sqlite3 /opt/smarttools/data/smarttools.db ".backup '/backup/smarttools.db'" +sqlite3 /opt/cmdforge/data/cmdforge.db ".backup '/backup/cmdforge.db'" ``` ## Monitoring @@ -202,11 +202,11 @@ sqlite3 /opt/smarttools/data/smarttools.db ".backup '/backup/smarttools.db'" ```bash # Application logs -tail -f /var/log/smarttools/error.log -tail -f /var/log/smarttools/access.log +tail -f /var/log/cmdforge/error.log +tail -f /var/log/cmdforge/access.log # systemd logs -journalctl -u smarttools-web -f +journalctl -u cmdforge-web -f ``` ### Sentry Integration @@ -225,33 +225,33 @@ curl http://localhost:5050/api/v1/tools ```bash # Check logs -journalctl -u smarttools-web -n 50 +journalctl -u cmdforge-web -n 50 # Verify Python path -/opt/smarttools/venv/bin/python -c "import smarttools" +/opt/cmdforge/venv/bin/python -c "import cmdforge" # Test gunicorn manually -cd /opt/smarttools +cd /opt/cmdforge source venv/bin/activate -gunicorn --bind 127.0.0.1:5050 'smarttools.web.app:create_app()' +gunicorn --bind 127.0.0.1:5050 'cmdforge.web.app:create_app()' ``` ### Database errors ```bash # Check database exists and is readable -ls -la /opt/smarttools/data/smarttools.db +ls -la /opt/cmdforge/data/cmdforge.db # Verify permissions -chown www-data:www-data /opt/smarttools/data/ -chown www-data:www-data /opt/smarttools/data/smarttools.db +chown www-data:www-data /opt/cmdforge/data/ +chown www-data:www-data /opt/cmdforge/data/cmdforge.db ``` ### Static files not loading ```bash # Rebuild Tailwind CSS -cd /opt/smarttools +cd /opt/cmdforge npm install npm run css:build diff --git a/docs/DESIGN.md b/docs/DESIGN.md index 19dd73c..bcf4e38 100644 --- a/docs/DESIGN.md +++ b/docs/DESIGN.md @@ -1,10 +1,10 @@ -# SmartTools - Design Document +# CmdForge - Design Document > A lightweight personal tool builder for AI-powered CLI commands ## Overview -SmartTools lets you create custom AI-powered terminal commands. You define a tool once (name, steps, provider), then use it like any Linux command. +CmdForge lets you create custom AI-powered terminal commands. You define a tool once (name, steps, provider), then use it like any Linux command. **Example:** ```bash @@ -17,7 +17,7 @@ sum -i text.txt -o summary.txt --max 512 ### Tool = Directory + Config ``` -~/.smarttools/ +~/.cmdforge/ sum/ config.yaml processed.py # Optional external code file @@ -128,8 +128,8 @@ sum --stdin # No input (empty string) - useful for tools using only arguments sum --max 100 -# Or via smarttools run -smarttools run sum -i document.txt +# Or via cmdforge run +cmdforge run sum -i document.txt ``` ### Input Handling @@ -158,17 +158,17 @@ smarttools run sum -i document.txt ```bash # Launch the UI to manage tools -smarttools +cmdforge # Or use CLI directly: -smarttools list # List all tools -smarttools create sum # Create new tool (basic) -smarttools edit sum # Edit tool config in $EDITOR -smarttools delete sum # Delete tool -smarttools test sum # Test with mock provider -smarttools run sum # Run tool for real -smarttools refresh # Refresh all wrapper scripts -smarttools ui # Launch interactive UI +cmdforge list # List all tools +cmdforge create sum # Create new tool (basic) +cmdforge edit sum # Edit tool config in $EDITOR +cmdforge delete sum # Delete tool +cmdforge test sum # Test with mock provider +cmdforge run sum # Run tool for real +cmdforge refresh # Refresh all wrapper scripts +cmdforge ui # Launch interactive UI ``` ## Terminal UI @@ -179,7 +179,7 @@ A BIOS-style terminal UI using `urwid` with full mouse support. ``` ┌──────────────────────────────────────┐ -│ SmartTools Manager │ +│ CmdForge Manager │ ├──────────────────────────────────────┤ │ Tools: │ │ ┌────────────────────────────────┐ │ @@ -256,7 +256,7 @@ The current section's title is highlighted with brackets: `[ Tool Info ]` **Code Step Features:** - **Multiline editor** - Write multi-line Python code -- **External file storage** - Code is auto-saved to `~/.smarttools//` on OK +- **External file storage** - Code is auto-saved to `~/.cmdforge//` on OK - **Load button** - Load code from external file (with confirmation) - **Multiple output vars** - Capture multiple variables (comma-separated) @@ -265,7 +265,7 @@ The current section's title is highlighted with brackets: `[ Tool Info ]` ### Directory Structure ``` -smarttools/ +cmdforge/ __init__.py cli.py # Entry point, argument parsing ui.py # UI dispatcher (chooses urwid/snack/dialog) @@ -278,7 +278,7 @@ smarttools/ ### Provider System -Providers are defined in `~/.smarttools/providers.yaml`: +Providers are defined in `~/.cmdforge/providers.yaml`: ```yaml providers: @@ -297,18 +297,18 @@ The provider command receives the prompt via stdin and outputs to stdout. ### Wrapper Scripts -When you save a tool, SmartTools creates a wrapper script in `~/.local/bin/`: +When you save a tool, CmdForge creates a wrapper script in `~/.local/bin/`: ```bash #!/bin/bash -# SmartTools wrapper for 'sum' +# CmdForge wrapper for 'sum' # Auto-generated - do not edit -exec /path/to/python -m smarttools.runner sum "$@" +exec /path/to/python -m cmdforge.runner sum "$@" ``` The wrapper uses the full Python path to ensure the correct environment is used. -Use `smarttools refresh` to regenerate all wrapper scripts (e.g., after changing Python environments). +Use `cmdforge refresh` to regenerate all wrapper scripts (e.g., after changing Python environments). ### Tool Name Validation @@ -319,12 +319,12 @@ Tool names must: ## Tool Composition -SmartTools are designed to chain together like any Unix command. +CmdForge are designed to chain together like any Unix command. ### External Pipelines (Tool-to-Tool) ```bash -# Chain multiple SmartTools +# Chain multiple CmdForge cat logs.txt | log-errors | summarize | translate --lang Japanese # Mix with standard Unix tools @@ -389,7 +389,7 @@ Optional fallbacks: ## Example Workflow -1. Run `smarttools` to open UI +1. Run `cmdforge` to open UI 2. Select "Create" to create a new tool 3. Fill in: name, description, output template 4. Add arguments (e.g., `--max` with default `500`) diff --git a/docs/EXAMPLES.md b/docs/EXAMPLES.md index b7a323e..15591e7 100644 --- a/docs/EXAMPLES.md +++ b/docs/EXAMPLES.md @@ -1,13 +1,13 @@ # Example Tools -This document contains all 28 pre-built SmartTools with their full configurations. +This document contains all 28 pre-built CmdForge with their full configurations. ## Quick Install ```bash -# Install all example tools (from the SmartTools directory) +# Install all example tools (from the CmdForge directory) python examples/install.py -smarttools refresh +cmdforge refresh ``` ## Text Processing Tools @@ -17,7 +17,7 @@ smarttools refresh Condense long documents to key points. ```yaml -# ~/.smarttools/summarize/config.yaml +# ~/.cmdforge/summarize/config.yaml name: summarize description: Condense long documents to key points arguments: @@ -963,7 +963,7 @@ output: "{result}" ## Pipeline Recipes -SmartTools chain together like Unix commands. Here are practical examples: +CmdForge chain together like Unix commands. Here are practical examples: ### Development Workflows diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 7230937..54f3cf4 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -1,15 +1,15 @@ # Installation Guide -Complete installation instructions for SmartTools. +Complete installation instructions for CmdForge. ## Quick Install ```bash -git clone https://gitea.brrd.tech/rob/SmartTools.git -cd SmartTools +git clone https://gitea.brrd.tech/rob/CmdForge.git +cd CmdForge pip install -e . export PATH="$HOME/.local/bin:$PATH" -smarttools providers install +cmdforge providers install ``` ## Detailed Installation @@ -32,11 +32,11 @@ brew install python@3.11 python3 --version # Should be 3.10 or higher ``` -### Step 2: Install SmartTools +### Step 2: Install CmdForge ```bash -git clone https://gitea.brrd.tech/rob/SmartTools.git -cd SmartTools +git clone https://gitea.brrd.tech/rob/CmdForge.git +cd CmdForge pip install -e . ``` @@ -47,7 +47,7 @@ pip install -e ".[dev]" ### Step 3: Configure PATH -SmartTools creates executable wrappers in `~/.local/bin/`. Add this to your shell config: +CmdForge creates executable wrappers in `~/.local/bin/`. Add this to your shell config: **Bash (~/.bashrc):** ```bash @@ -74,7 +74,7 @@ source ~/.bashrc # or restart terminal You need at least one AI CLI tool. The easiest way is the interactive installer: ```bash -smarttools providers install +cmdforge providers install ``` This guides you through installing and authenticating providers. @@ -110,7 +110,7 @@ gemini # Opens browser for Google sign-in ```bash curl -fsSL https://ollama.ai/install.sh | bash ollama pull llama3 -smarttools providers add ollama "ollama run llama3" -d "Local Llama 3" +cmdforge providers add ollama "ollama run llama3" -d "Local Llama 3" ``` See [PROVIDERS.md](PROVIDERS.md) for full provider setup instructions. @@ -118,17 +118,17 @@ See [PROVIDERS.md](PROVIDERS.md) for full provider setup instructions. ### Step 5: Verify Installation ```bash -# Check SmartTools is installed -smarttools --version +# Check CmdForge is installed +cmdforge --version # List configured providers -smarttools providers list +cmdforge providers list # Check which providers are available -smarttools providers check +cmdforge providers check # Test with mock provider (no AI needed) -echo "hello world" | smarttools run --provider mock +echo "hello world" | cmdforge run --provider mock ``` ### Step 6: Create Wrapper Scripts @@ -136,7 +136,7 @@ echo "hello world" | smarttools run --provider mock After installation or any Python environment change: ```bash -smarttools refresh +cmdforge refresh ``` This creates executable scripts in `~/.local/bin/` for all your tools. @@ -147,18 +147,18 @@ This creates executable scripts in `~/.local/bin/` for all your tools. ```bash python examples/install.py -smarttools refresh +cmdforge refresh ``` ### Manual Install -Copy individual tool configs to `~/.smarttools//config.yaml`. +Copy individual tool configs to `~/.cmdforge//config.yaml`. See [EXAMPLES.md](EXAMPLES.md) for all tool configurations. ## Troubleshooting -### "smarttools: command not found" +### "cmdforge: command not found" PATH is not configured. Add to your shell config: ```bash @@ -168,14 +168,14 @@ export PATH="$HOME/.local/bin:$PATH" ### "Provider 'X' not found" 1. Check provider is installed: `which claude` or `which opencode` -2. Check provider is configured: `smarttools providers` -3. Add missing provider: `smarttools providers add` +2. Check provider is configured: `cmdforge providers` +3. Add missing provider: `cmdforge providers add` ### "Permission denied" on tool execution Refresh wrapper scripts: ```bash -smarttools refresh +cmdforge refresh ``` ### TUI doesn't start / looks broken @@ -187,28 +187,28 @@ pip install urwid Ensure your terminal supports mouse (most modern terminals do). -### Tools work with `smarttools run` but not directly +### Tools work with `cmdforge run` but not directly The wrapper scripts may be outdated. Refresh them: ```bash -smarttools refresh +cmdforge refresh ``` ### Python version mismatch -If you have multiple Python versions, ensure SmartTools uses the right one: +If you have multiple Python versions, ensure CmdForge uses the right one: ```bash -python3.11 -m pip install smarttools +python3.11 -m pip install cmdforge ``` ## Uninstalling ```bash # Remove package -pip uninstall smarttools +pip uninstall cmdforge # Remove config and tools (optional) -rm -rf ~/.smarttools +rm -rf ~/.cmdforge # Remove wrapper scripts (optional) rm ~/.local/bin/{summarize,translate,fix-grammar,...} @@ -217,8 +217,8 @@ rm ~/.local/bin/{summarize,translate,fix-grammar,...} ## Upgrading ```bash -pip install --upgrade smarttools -smarttools refresh +pip install --upgrade cmdforge +cmdforge refresh ``` ## Directory Structure @@ -226,7 +226,7 @@ smarttools refresh After installation: ``` -~/.smarttools/ +~/.cmdforge/ ├── providers.yaml # Provider configurations ├── summarize/ │ └── config.yaml # Tool config @@ -236,7 +236,7 @@ After installation: └── ... ~/.local/bin/ -├── smarttools # Main command +├── cmdforge # Main command ├── summarize # Tool wrapper script ├── translate # Tool wrapper script └── ... @@ -246,4 +246,4 @@ After installation: 1. [Set up providers](PROVIDERS.md) 2. [Browse example tools](EXAMPLES.md) -3. Run `smarttools ui` to create your first tool +3. Run `cmdforge ui` to create your first tool diff --git a/docs/PROJECT.md b/docs/PROJECT.md index 0bad2a4..5407360 100644 --- a/docs/PROJECT.md +++ b/docs/PROJECT.md @@ -1,12 +1,12 @@ -# SmartTools Project Overview +# CmdForge Project Overview -This document provides a comprehensive overview of the SmartTools project structure, components, and how everything fits together. +This document provides a comprehensive overview of the CmdForge project structure, components, and how everything fits together. -## What is SmartTools? +## What is CmdForge? -SmartTools is a personal tool builder for AI-powered CLI commands. It consists of three main components: +CmdForge is a personal tool builder for AI-powered CLI commands. It consists of three main components: -1. **CLI Tool** (`smarttools`) - Create, manage, and run AI-powered command-line tools +1. **CLI Tool** (`cmdforge`) - Create, manage, and run AI-powered command-line tools 2. **Registry API** - REST API for publishing and discovering tools 3. **Web UI** - Browser interface for the registry with docs, search, and user dashboard @@ -14,11 +14,11 @@ SmartTools is a personal tool builder for AI-powered CLI commands. It consists o | Component | Location | Purpose | |-----------|----------|---------| -| CLI | `src/smarttools/cli.py` | Main entry point for `smarttools` command | -| Registry API | `src/smarttools/registry/` | REST API for tool registry | -| Web UI | `src/smarttools/web/` | Flask web application | -| Tool Storage | `~/.smarttools/` | User's installed tools | -| Database | `data/smarttools.db` | SQLite with FTS5 search | +| CLI | `src/cmdforge/cli.py` | Main entry point for `cmdforge` command | +| Registry API | `src/cmdforge/registry/` | REST API for tool registry | +| Web UI | `src/cmdforge/web/` | Flask web application | +| Tool Storage | `~/.cmdforge/` | User's installed tools | +| Database | `data/cmdforge.db` | SQLite with FTS5 search | ## Architecture Diagrams @@ -31,7 +31,7 @@ See `docs/diagrams/` for visual representations: ## Source Code Structure ``` -src/smarttools/ +src/cmdforge/ ├── cli.py # Entry point, subcommand routing ├── tool.py # Tool dataclasses, YAML loading ├── runner.py # Step execution engine @@ -68,7 +68,7 @@ src/smarttools/ ## Database Schema -SQLite database at `data/smarttools.db`: +SQLite database at `data/cmdforge.db`: | Table | Purpose | |-------|---------| @@ -106,9 +106,9 @@ Base URL: `/api/v1/` ## Key Files to Know ### Configuration -- `~/.smarttools/providers.yaml` - AI provider configurations -- `~/.smarttools/config.yaml` - Global settings -- `~/.smarttools//config.yaml` - Individual tool configs +- `~/.cmdforge/providers.yaml` - AI provider configurations +- `~/.cmdforge/config.yaml` - Global settings +- `~/.cmdforge//config.yaml` - Individual tool configs ### Development - `pyproject.toml` - Package configuration @@ -130,10 +130,10 @@ Base URL: `/api/v1/` pip install -e ".[dev]" # Run CLI -python -m smarttools.cli +python -m cmdforge.cli # Run web server (development) -cd src/smarttools/web +cd src/cmdforge/web flask run --port 5050 ``` @@ -141,7 +141,7 @@ flask run --port 5050 ```bash # Using gunicorn -gunicorn -w 4 -b 0.0.0.0:5050 'smarttools.web.app:create_app()' +gunicorn -w 4 -b 0.0.0.0:5050 'cmdforge.web.app:create_app()' # Environment variables needed: # FLASK_ENV=production @@ -164,7 +164,7 @@ pytest pytest tests/test_name.py::test_function # Run with coverage -pytest --cov=smarttools +pytest --cov=cmdforge ``` ## Design Documents diff --git a/docs/PROVIDERS.md b/docs/PROVIDERS.md index ea3ff16..ecec89e 100644 --- a/docs/PROVIDERS.md +++ b/docs/PROVIDERS.md @@ -1,6 +1,6 @@ # Provider Setup Guide -SmartTools works with any AI CLI tool that accepts input via stdin or arguments. This guide covers setup for the most popular providers. +CmdForge works with any AI CLI tool that accepts input via stdin or arguments. This guide covers setup for the most popular providers. ## Provider Comparison @@ -139,7 +139,7 @@ echo "Hello" | gemini --model gemini-2.5-flash The easiest way to install providers: ```bash -smarttools providers install +cmdforge providers install ``` This interactive guide: @@ -151,22 +151,22 @@ This interactive guide: ### List Providers ```bash -smarttools providers list +cmdforge providers list ``` ### Check Availability ```bash -smarttools providers check +cmdforge providers check ``` ### Add Custom Provider ```bash -smarttools providers add myname "my-command --args" -d "Description" +cmdforge providers add myname "my-command --args" -d "Description" ``` -Or edit `~/.smarttools/providers.yaml`: +Or edit `~/.cmdforge/providers.yaml`: ```yaml providers: @@ -242,9 +242,9 @@ cat file.txt | summarize --provider claude-opus ### "Provider 'X' not found" -1. Check it's in your providers list: `smarttools providers` +1. Check it's in your providers list: `cmdforge providers` 2. Verify the command works: `echo "test" | ` -3. Add it: `smarttools providers add` +3. Add it: `cmdforge providers add` ### "Command 'X' not found" @@ -273,8 +273,8 @@ echo "Say hello" | claude -p echo "Say hello" | ~/.opencode/bin/opencode run ``` -If it works directly but not in SmartTools, check: -1. Provider command in `~/.smarttools/providers.yaml` +If it works directly but not in CmdForge, check: +1. Provider command in `~/.cmdforge/providers.yaml` 2. Environment variables are expanded correctly ## Cost Optimization diff --git a/docs/REGISTRY.md b/docs/REGISTRY.md index a93c152..9e2ead0 100644 --- a/docs/REGISTRY.md +++ b/docs/REGISTRY.md @@ -1,7 +1,7 @@ -# SmartTools Registry Design +# CmdForge Registry Design ## Purpose -Build a centralized registry for SmartTools to enable discovery, publishing, dependency management, and future curation at scale. +Build a centralized registry for CmdForge to enable discovery, publishing, dependency management, and future curation at scale. ## Terminology @@ -9,20 +9,20 @@ Build a centralized registry for SmartTools to enable discovery, publishing, dep |------|------------| | **Tool definition** | The full YAML file in the registry (`config.yaml`) containing name, steps, arguments, etc. | | **Tool config** | The configuration within a tool definition (arguments, steps, provider settings) | -| **smarttools.yaml** | Project manifest file declaring tool dependencies and overrides | +| **cmdforge.yaml** | Project manifest file declaring tool dependencies and overrides | | **config.yaml** | The tool definition file, both in registry and when installed locally | | **Owner** | Immutable namespace slug identifying the publisher (e.g., `rob`, `alice`) | | **Publisher** | A registered user who can publish tools to the registry | | **Wrapper script** | Auto-generated bash script in `~/.local/bin/` that invokes a tool | -**Canonical naming:** Use `SmartTools-Registry` (capitalized, hyphenated) for the repository name. +**Canonical naming:** Use `CmdForge-Registry` (capitalized, hyphenated) for the repository name. ## Diagram References -- System overview: `discussions/diagrams/smarttools-registry_rob_1.puml` -- Data flows: `discussions/diagrams/smarttools-registry_rob_5.puml` +- System overview: `discussions/diagrams/cmdforge-registry_rob_1.puml` +- Data flows: `discussions/diagrams/cmdforge-registry_rob_5.puml` ## System Overview -Users interact via the CLI and a future Web UI. Both call a Registry API hosted at `https://gitea.brrd.tech/api/v1` (future alias: `registry.smarttools.dev/api/v1`). The API syncs from a Gitea-backed registry repo and maintains a SQLite cache/search index. +Users interact via the CLI and a future Web UI. Both call a Registry API hosted at `https://gitea.brrd.tech/api/v1` (future alias: `cmdforge.brrd.tech/api/v1`). The API syncs from a Gitea-backed registry repo and maintains a SQLite cache/search index. **Canonical API base path:** `https://gitea.brrd.tech/api/v1` @@ -166,7 +166,7 @@ tool = ToolSchema.parse(response['data']) # May fail on new fields **Client version header:** ``` -X-SmartTools-Client: cli/1.2.0 +X-CmdForge-Client: cli/1.2.0 ``` Helps server track client versions for deprecation decisions. @@ -181,8 +181,8 @@ If the cache is stale, the API can fall back to repo reads; a warning header may Support owner/name from day one: - Registry path: `tools/{owner}/{name}/config.yaml` - API URL: `/tools/{owner}/{name}` -- Install: `smarttools registry install rob/summarize` -- Shorthand: `smarttools registry install summarize` resolves to the official namespace. +- Install: `cmdforge registry install rob/summarize` +- Shorthand: `cmdforge registry install summarize` resolves to the official namespace. PR branches: `submit/{owner}/{name}/{version}`. @@ -227,7 +227,7 @@ tools/ README.md ``` -Tool files match the existing SmartTools format. Registry-specific metadata is kept under `registry:`. Deprecation is tool-defined and top-level: +Tool files match the existing CmdForge format. Registry-specific metadata is kept under `registry:`. Deprecation is tool-defined and top-level: ```yaml name: summarize version: "1.2.0" @@ -239,7 +239,7 @@ registry: downloads: 142 ``` -**Schema compatibility note:** The current SmartTools config parser may reject unknown top-level keys like `deprecated`, `replacement`, and `registry`. Before implementing registry features: +**Schema compatibility note:** The current CmdForge config parser may reject unknown top-level keys like `deprecated`, `replacement`, and `registry`. Before implementing registry features: 1. Update the YAML parser to ignore unknown keys (permissive mode) 2. Or explicitly define these fields in the Tool dataclass with defaults 3. Validate registry-specific fields only when publishing, not when running locally @@ -346,7 +346,7 @@ When resolving a version constraint: ### Prerelease Handling - Prereleases are **not** returned for `*` or range constraints by default -- To install prerelease: `smarttools registry install rob/summarize@2.0.0-beta.1` +- To install prerelease: `cmdforge registry install rob/summarize@2.0.0-beta.1` - To allow prereleases in manifest: `version: ">=2.0.0-0"` (the `-0` suffix includes prereleases) ### Download Endpoint Version Selection @@ -401,14 +401,14 @@ Response (404): ## Tool Resolution Order When a tool is invoked, the CLI searches in this order: -1. **Local project**: `./.smarttools///config.yaml` (or `./.smarttools//` for unnamespaced) -2. **Global user**: `~/.smarttools///config.yaml` +1. **Local project**: `./.cmdforge///config.yaml` (or `./.cmdforge//` for unnamespaced) +2. **Global user**: `~/.cmdforge///config.yaml` 3. **Registry**: Fetch from API, install to global, then run 4. **Error**: `Tool '' not found` Step 3 only occurs if `auto_fetch_from_registry: true` in config (default: true). -**Path convention:** Use `.smarttools/` (with leading dot) for both local and global to maintain consistency. +**Path convention:** Use `.cmdforge/` (with leading dot) for both local and global to maintain consistency. Resolution also respects namespacing: - `summarize` → searches for any tool named `summarize`, prefers `official/summarize` if exists @@ -422,7 +422,7 @@ The slug `official` is reserved for curated, high-quality tools maintained by th - If no `official/summarize`, falls back to most-downloaded tool named `summarize` - To avoid ambiguity, always use full `owner/name` in manifests -Reserved slugs that cannot be registered: `official`, `admin`, `system`, `api`, `registry`, `smarttools` +Reserved slugs that cannot be registered: `official`, `admin`, `system`, `api`, `registry`, `cmdforge` ## Auto-Fetch Behavior When enabled (`auto_fetch_from_registry: true`), missing tools are automatically fetched: @@ -436,14 +436,14 @@ $ summarize < file.txt ``` Behavior details: -- Fetches latest stable version unless pinned in `smarttools.yaml` -- Installs to `~/.smarttools///` +- Fetches latest stable version unless pinned in `cmdforge.yaml` +- Installs to `~/.cmdforge///` - Generates wrapper script in `~/.local/bin/` - Subsequent runs use local copy (no re-fetch) To disable (require explicit install): ```yaml -# ~/.smarttools/config.yaml +# ~/.cmdforge/config.yaml auto_fetch_from_registry: false ``` @@ -467,11 +467,11 @@ summarize < file.txt # Explicit owner form (always works) rob-summarize < file.txt -# Or via smarttools run -smarttools run rob/summarize < file.txt +# Or via cmdforge run +cmdforge run rob/summarize < file.txt ``` -## Project Manifest (smarttools.yaml) +## Project Manifest (cmdforge.yaml) Defines tool dependencies with optional runtime overrides: ``` name: my-ai-project @@ -487,7 +487,7 @@ overrides: Overrides are applied at runtime and do not mutate installed tool configs. ## CLI Config and Tokens -Global config lives in `~/.smarttools/config.yaml`: +Global config lives in `~/.cmdforge/config.yaml`: ```yaml registry: url: https://gitea.brrd.tech/api/v1 # Must match canonical base path @@ -540,7 +540,7 @@ Publishing uses registry accounts, not Gitea accounts: **Update flow (new version, not overwrite):** 1. Developer modifies tool locally 2. Bumps version in `config.yaml` (e.g., `1.2.0` → `1.3.0`) -3. Runs `smarttools registry publish` +3. Runs `cmdforge registry publish` 4. New PR created for `1.3.0` 5. Old version `1.2.0` remains available @@ -548,7 +548,7 @@ Publishing uses registry accounts, not Gitea accounts: Publishers register on the registry website, not Gitea: **Registration flow:** -1. User visits `https://gitea.brrd.tech/registry/register` (or future `registry.smarttools.dev`) +1. User visits `https://gitea.brrd.tech/registry/register` (or future `cmdforge.brrd.tech`) 2. Creates account with email + password + slug 3. Receives verification email (optional in v1, but track `verified` status) 4. Logs into dashboard at `/dashboard` @@ -690,7 +690,7 @@ Dashboard login uses session cookies (not tokens) for browser auth: **Cookie settings:** ```python -SESSION_COOKIE_NAME = 'smarttools_session' +SESSION_COOKIE_NAME = 'cmdforge_session' SESSION_COOKIE_HTTPONLY = True # Prevent JS access SESSION_COOKIE_SECURE = True # HTTPS only in production SESSION_COOKIE_SAMESITE = 'Lax' # CSRF protection @@ -844,7 +844,7 @@ CREATE TABLE tool_tags ( **CLI first-time publish flow:** ```bash -$ smarttools registry publish +$ cmdforge registry publish No registry account configured. @@ -853,7 +853,7 @@ No registry account configured. 3. Enter your token below Registry token: ******** -Token saved to ~/.smarttools/config.yaml +Token saved to ~/.cmdforge/config.yaml Validating tool... ✓ config.yaml is valid @@ -861,7 +861,7 @@ Validating tool... ✓ Version 1.0.0 not yet published Publishing rob/my-tool@1.0.0... -✓ PR created: https://gitea.brrd.tech/rob/SmartTools-Registry/pulls/42 +✓ PR created: https://gitea.brrd.tech/rob/CmdForge-Registry/pulls/42 Your tool is pending review. You'll receive an email when it's approved. ``` @@ -873,67 +873,67 @@ Full mapping of CLI commands to API calls: ```bash # Search for tools -$ smarttools registry search [--category=] [--limit=20] +$ cmdforge registry search [--category=] [--limit=20] → GET /api/v1/tools/search?q=&category=&limit=20 # Browse tools (TUI) -$ smarttools registry browse [--category=] +$ cmdforge registry browse [--category=] → GET /api/v1/tools?category=&page=1 → GET /api/v1/categories # View tool details -$ smarttools registry info +$ cmdforge registry info → GET /api/v1/tools// # Install a tool -$ smarttools registry install [--version=] +$ cmdforge registry install [--version=] → GET /api/v1/tools///download?version=&install=true - → Writes to ~/.smarttools///config.yaml + → Writes to ~/.cmdforge///config.yaml → Generates ~/.local/bin/ wrapper (or - if collision) # Uninstall a tool -$ smarttools registry uninstall - → Removes ~/.smarttools/// +$ cmdforge registry uninstall + → Removes ~/.cmdforge/// → Removes wrapper script # Publish a tool -$ smarttools registry publish [path] [--dry-run] +$ cmdforge registry publish [path] [--dry-run] → POST /api/v1/tools (with registry token) → Returns PR URL # List my published tools -$ smarttools registry my-tools +$ cmdforge registry my-tools → GET /api/v1/me/tools (with registry token) # Update index cache -$ smarttools registry update +$ cmdforge registry update → GET /api/v1/index.json - → Writes to ~/.smarttools/registry/index.json + → Writes to ~/.cmdforge/registry/index.json ``` ### Project Commands ```bash -# Install project dependencies from smarttools.yaml -$ smarttools install - → Reads ./smarttools.yaml +# Install project dependencies from cmdforge.yaml +$ cmdforge install + → Reads ./cmdforge.yaml → For each dependency: GET /api/v1/tools///download?version=&install=true - → Installs to ~/.smarttools/// + → Installs to ~/.cmdforge/// -# Add a dependency to smarttools.yaml -$ smarttools add [--version=] - → Adds to ./smarttools.yaml dependencies +# Add a dependency to cmdforge.yaml +$ cmdforge add [--version=] + → Adds to ./cmdforge.yaml dependencies → Runs install for that tool # Show project dependencies status -$ smarttools deps - → Reads ./smarttools.yaml +$ cmdforge deps + → Reads ./cmdforge.yaml → Shows installed status for each dependency - → Note: "smarttools list" is reserved for listing installed tools + → Note: "cmdforge list" is reserved for listing installed tools ``` -**Command naming note:** `smarttools list` already exists to list locally installed tools. Use `smarttools deps` to show project manifest dependencies. +**Command naming note:** `cmdforge list` already exists to list locally installed tools. Use `cmdforge deps` to show project manifest dependencies. ### Flags available on most commands @@ -1081,7 +1081,7 @@ def sync_from_repo_atomic(): | Lock timeout | Skip this sync, next webhook will retry | ## Automated CI Validation -PRs are validated automatically using SmartTools (dogfooding): +PRs are validated automatically using CmdForge (dogfooding): ``` PR Submitted @@ -1121,16 +1121,16 @@ jobs: - name: Validate schema run: python scripts/validate_tool.py ${{ github.event.pull_request.head.sha }} - name: Security scan - run: smarttools run security-scanner < changed_files.txt + run: cmdforge run security-scanner < changed_files.txt - name: Check duplicates - run: smarttools run duplicate-detector < changed_files.txt + run: cmdforge run duplicate-detector < changed_files.txt ``` ## Registry Repository Structure -Full structure of the SmartTools-Registry repo: +Full structure of the CmdForge-Registry repo: ``` -SmartTools-Registry/ +CmdForge-Registry/ ├── README.md # Registry overview ├── CONTRIBUTING.md # How to submit tools ├── LICENSE @@ -1236,7 +1236,7 @@ CLI generates a persistent anonymous ID on first run: import uuid import os -CONFIG_PATH = os.path.expanduser("~/.smarttools/config.yaml") +CONFIG_PATH = os.path.expanduser("~/.cmdforge/config.yaml") def get_or_create_client_id(): config = load_config() @@ -1424,7 +1424,7 @@ def search_tools(q): "name": "bar", "suggestion": "Did you mean 'rob/bar'?" }, - "docs_url": "https://registry.smarttools.dev/docs/errors#TOOL_NOT_FOUND" + "docs_url": "https://cmdforge.brrd.tech/docs/errors#TOOL_NOT_FOUND" } } ``` @@ -1482,17 +1482,17 @@ When `VALIDATION_ERROR` occurs, provide specific field errors: } ] }, - "docs_url": "https://registry.smarttools.dev/docs/tool-format" + "docs_url": "https://cmdforge.brrd.tech/docs/tool-format" } } ``` ### Dependency Resolution Failures -When `smarttools install` fails on a manifest: +When `cmdforge install` fails on a manifest: ```bash -$ smarttools install +$ cmdforge install Error: Could not resolve all dependencies @@ -1511,7 +1511,7 @@ Suggestions: | Component Down | Fallback Behavior | |----------------|-------------------| -| API server | CLI uses `~/.smarttools/registry/index.json` for search | +| API server | CLI uses `~/.cmdforge/registry/index.json` for search | | Gitea repo | API serves from DB cache (may be stale) | | FTS5 index | Fall back to LIKE queries (slower but works) | | Network | Use locally installed tools, skip registry features | @@ -1520,9 +1520,9 @@ Suggestions: ### Publishing UX -- `smarttools registry publish --dry-run` validates locally and shows what would be submitted: +- `cmdforge registry publish --dry-run` validates locally and shows what would be submitted: ```bash - $ smarttools registry publish --dry-run + $ cmdforge registry publish --dry-run Validating tool... ✓ config.yaml is valid @@ -1559,7 +1559,7 @@ Suggestions: Long-running operations show progress: ```bash -$ smarttools install +$ cmdforge install Installing project dependencies... [1/3] rob/summarize@^1.0.0 @@ -1579,24 +1579,24 @@ Installing project dependencies... ``` ```bash -$ smarttools registry publish +$ cmdforge registry publish Submitting rob/summarize@1.1.0... Validating... done ✓ Uploading... done ✓ Creating PR... done ✓ -✓ PR created: https://gitea.brrd.tech/rob/SmartTools-Registry/pulls/42 +✓ PR created: https://gitea.brrd.tech/rob/CmdForge-Registry/pulls/42 Your tool is pending review. You'll receive an email when it's approved. ``` ### TUI Browse -`smarttools registry browse` opens a full-screen terminal UI: +`cmdforge registry browse` opens a full-screen terminal UI: ``` -┌─ SmartTools Registry ───────────────────────────────────────┐ +┌─ CmdForge Registry ───────────────────────────────────────┐ │ Search: [________________] [All Categories ▼] [Sort: Popular ▼] │ ├─────────────────────────────────────────────────────────────┤ │ │ @@ -1634,9 +1634,9 @@ Your tool is pending review. You'll receive an email when it's approved. ### Project Initialization ```bash -$ smarttools init +$ cmdforge init -Creating smarttools.yaml... +Creating cmdforge.yaml... Project name [my-project]: my-ai-project Version [1.0.0]: @@ -1652,7 +1652,7 @@ Added rob/summarize@^1.2.0 Add tool (number, or Enter to finish): -✓ Created smarttools.yaml +✓ Created cmdforge.yaml name: my-ai-project version: "1.0.0" @@ -1660,7 +1660,7 @@ dependencies: - name: rob/summarize version: "^1.2.0" -Run 'smarttools install' to install dependencies. +Run 'cmdforge install' to install dependencies. ``` ### Accessibility @@ -1676,7 +1676,7 @@ Run 'smarttools install' to install dependencies. ## Offline Cache Cache registry index locally: ``` -~/.smarttools/registry/index.json +~/.cmdforge/registry/index.json ``` Refresh when older than 24 hours; support `--offline` and `--refresh` flags. @@ -1730,7 +1730,7 @@ The registry includes a full website, not just an API: **Site structure:** ``` -registry.smarttools.dev (or gitea.brrd.tech/registry) +cmdforge.brrd.tech (or gitea.brrd.tech/registry) ├── / # Landing page ├── /tools # Browse all tools ├── /tools/{owner}/{name} # Tool detail page @@ -1843,9 +1843,9 @@ def render_readme_safe(readme_raw: str) -> str: ## Implementation Phases ### Phase 1: Foundation -- Define `smarttools.yaml` manifest format +- Define `cmdforge.yaml` manifest format - Implement tool resolution order (local → global → registry) -- Create SmartTools-Registry repo on Gitea (bootstrap) +- Create CmdForge-Registry repo on Gitea (bootstrap) - Add 3-5 example tools to seed the registry ### Phase 2: Core Backend @@ -1856,22 +1856,22 @@ def render_readme_safe(readme_raw: str) -> str: - Set up HMAC verification ### Phase 3: CLI Commands -- `smarttools registry search` -- `smarttools registry install` -- `smarttools registry info` -- `smarttools registry browse` (TUI) +- `cmdforge registry search` +- `cmdforge registry install` +- `cmdforge registry info` +- `cmdforge registry browse` (TUI) - Local index caching ### Phase 4: Publishing - Publisher registration (web UI) - Token management -- `smarttools registry publish` command +- `cmdforge registry publish` command - PR creation via Gitea API - CI validation workflows ### Phase 5: Project Dependencies -- `smarttools install` (from manifest) -- `smarttools add` command +- `cmdforge install` (from manifest) +- `cmdforge add` command - Runtime override application - Dependency resolution diff --git a/docs/WEB_UI.md b/docs/WEB_UI.md index fa44a82..1879946 100644 --- a/docs/WEB_UI.md +++ b/docs/WEB_UI.md @@ -1,10 +1,10 @@ -# SmartTools Web UI Design +# CmdForge Web UI Design ## Purpose -Deliver a professional web front-end that explains SmartTools, helps users discover tools, and supports a collaborative ecosystem. The site should drive sustainable revenue without undermining trust or usability. +Deliver a professional web front-end that explains CmdForge, helps users discover tools, and supports a collaborative ecosystem. The site should drive sustainable revenue without undermining trust or usability. ## Mission Alignment -This web UI serves the broader SmartTools mission: to provide a **universally accessible development ecosystem** that empowers regular people to collaborate and build upon each other's progress rather than compete. Revenue generated supports: +This web UI serves the broader CmdForge mission: to provide a **universally accessible development ecosystem** that empowers regular people to collaborate and build upon each other's progress rather than compete. Revenue generated supports: - Maintaining and expanding the project - Future hosting of AI models for users with less access to paid services - Building a sustainable, community-first platform @@ -131,14 +131,14 @@ Use an 8px base grid for consistent spacing: ### Landing Page (`/`) -**Purpose:** Convert visitors to users by clearly communicating SmartTools' value proposition and providing immediate paths to explore. +**Purpose:** Convert visitors to users by clearly communicating CmdForge' value proposition and providing immediate paths to explore. -**Reference mockup:** `discussions/diagrams/smarttools-registry_rob_6.svg` +**Reference mockup:** `discussions/diagrams/cmdforge-registry_rob_6.svg` #### Section 1: Hero (Above the Fold) ``` ┌─────────────────────────────────────────────────────────────────┐ -│ [SmartTools] Docs Tutorials Registry Community About 🔍 │ +│ [CmdForge] Docs Tutorials Registry Community About 🔍 │ ├─────────────────────────────────────────────────────────────────┤ │ │ │ Build Custom AI Commands in YAML │ @@ -147,7 +147,7 @@ Use an 8px base grid for consistent spacing: │ provider. Provider-agnostic and composable. │ │ │ │ ┌──────────────────────────────────────────────────────┐ │ -│ │ $ pip install smarttools && smarttools init │ [📋]│ +│ │ $ pip install cmdforge && cmdforge init │ [📋]│ │ └──────────────────────────────────────────────────────┘ │ │ │ │ [Get Started] [View Tutorials] │ @@ -158,7 +158,7 @@ Use an 8px base grid for consistent spacing: **Content:** - **Headline:** "Build Custom AI Commands in YAML" (benefit-focused, differentiating) - **Subheadline:** "Create Unix-style pipeable tools that work with any AI provider. Provider-agnostic and composable for ultimate flexibility." -- **Install snippet:** `pip install smarttools && smarttools init` with copy button +- **Install snippet:** `pip install cmdforge && cmdforge init` with copy button - **Primary CTA:** "Get Started" → links to `/docs/getting-started` (indigo background) - **Secondary CTA:** "View Tutorials" → links to `/tutorials` (outlined, cyan border) @@ -167,10 +167,10 @@ Use an 8px base grid for consistent spacing: - Maximum content width: 1100px centered - Install snippet: monospace font, light gray background (#E0E0E0), copy icon on right -#### Section 2: Three Pillars (Why SmartTools?) +#### Section 2: Three Pillars (Why CmdForge?) ``` ┌─────────────────────────────────────────────────────────────────┐ -│ Why SmartTools? │ +│ Why CmdForge? │ ├──────────────────┬──────────────────┬────────────────────────────┤ │ [✓] Easy │ [⚡] Powerful │ [👥] Community │ │ │ │ │ @@ -267,7 +267,7 @@ Use an 8px base grid for consistent spacing: #### Section 6: Footer Ad Zone (Optional) ``` ┌─────────────────────────────────────────────────────────────────┐ -│ [Advertisement: Support SmartTools Development] │ +│ [Advertisement: Support CmdForge Development] │ └─────────────────────────────────────────────────────────────────┘ ``` @@ -279,12 +279,12 @@ Use an 8px base grid for consistent spacing: #### Section 7: Footer ``` ┌─────────────────────────────────────────────────────────────────┐ -│ SmartTools │ +│ CmdForge │ │ ───────────────────────────────────────────────────────────── │ │ Docs | Registry | Community | About | Donate │ │ Privacy | Terms | GitHub | Twitter │ │ │ -│ © 2025 SmartTools. Open source under MIT License. │ +│ © 2025 CmdForge. Open source under MIT License. │ └─────────────────────────────────────────────────────────────────┘ ``` @@ -511,7 +511,7 @@ Use an 8px base grid for consistent spacing: │ ⬇ 1,234 downloads │ │ │ │ ┌─────────────────────────────────┐ │ -│ │ smarttools run owner/tool │ │ +│ │ cmdforge run owner/tool │ │ │ └─────────────────────────────────┘ │ └───────────────────────────────────────┘ ``` @@ -637,7 +637,7 @@ Registry > owner > tool-name > v1.2.0 **Inline Code:** ```html -smarttools run foo +cmdforge run foo ``` - Background: Light gray (#F3F4F6) - Font: Monospace @@ -1011,14 +1011,14 @@ Publisher dashboard uses auth endpoints: Landing page: ```html -SmartTools - Build Custom AI Commands in YAML +CmdForge - Build Custom AI Commands in YAML - + ``` Tool detail page: ```html -{tool-name} by {owner} - SmartTools Registry +{tool-name} by {owner} - CmdForge Registry ``` @@ -1036,7 +1036,7 @@ Tool detail page: "@type": "Person", "name": "owner-name" }, - "downloadUrl": "https://registry.smarttools.dev/tools/owner/summarize", + "downloadUrl": "https://cmdforge.brrd.tech/tools/owner/summarize", "softwareVersion": "1.2.0", "aggregateRating": { "@type": "AggregateRating", @@ -1051,12 +1051,12 @@ Tool detail page: { "@context": "https://schema.org", "@type": "Organization", - "name": "SmartTools", - "url": "https://smarttools.dev", - "logo": "https://smarttools.dev/logo.png", + "name": "CmdForge", + "url": "https://cmdforge.dev", + "logo": "https://cmdforge.dev/logo.png", "sameAs": [ - "https://github.com/your-org/smarttools", - "https://twitter.com/smarttools" + "https://github.com/your-org/cmdforge", + "https://twitter.com/cmdforge" ] } ``` @@ -1066,7 +1066,7 @@ Tool detail page: { "@context": "https://schema.org", "@type": "TechArticle", - "headline": "Getting Started with SmartTools", + "headline": "Getting Started with CmdForge", "author": {"@type": "Person", "name": "Author Name"}, "datePublished": "2025-01-15", "dateModified": "2025-01-20" @@ -1077,18 +1077,18 @@ Tool detail page: ```html - + - - + + - - + + - + ``` ### Sitemap @@ -1104,12 +1104,12 @@ Auto-generate `sitemap.xml`: - https://smarttools.dev/ + https://cmdforge.dev/ 1.0 daily - https://smarttools.dev/tools + https://cmdforge.dev/tools 0.9 daily @@ -1129,7 +1129,7 @@ Disallow: /register Disallow: /dashboard Disallow: /api/ -Sitemap: https://smarttools.dev/sitemap.xml +Sitemap: https://cmdforge.dev/sitemap.xml ``` ### Canonical URLs @@ -1297,11 +1297,11 @@ The web UI consumes these existing API endpoints: ## Diagram References -- Landing page mockup: `discussions/diagrams/smarttools-registry_rob_6.svg` -- System overview: `discussions/diagrams/smarttools-registry_rob_1.puml` -- Data flows: `discussions/diagrams/smarttools-registry_rob_5.puml` -- Web UI strategy: `discussions/diagrams/smarttools-web-ui-strategy.puml` -- UI visual strategy: `discussions/diagrams/smarttools-web-ui-visual-strategy.puml` +- Landing page mockup: `discussions/diagrams/cmdforge-registry_rob_6.svg` +- System overview: `discussions/diagrams/cmdforge-registry_rob_1.puml` +- Data flows: `discussions/diagrams/cmdforge-registry_rob_5.puml` +- Web UI strategy: `discussions/diagrams/cmdforge-web-ui-strategy.puml` +- UI visual strategy: `discussions/diagrams/cmdforge-web-ui-visual-strategy.puml` ## Deployment Guide @@ -1315,8 +1315,8 @@ The web UI consumes these existing API endpoints: ```bash # Clone the repository -git clone https://gitea.brrd.tech/rob/SmartTools.git -cd SmartTools +git clone https://gitea.brrd.tech/rob/CmdForge.git +cd CmdForge # Create virtual environment python3 -m venv venv @@ -1326,7 +1326,7 @@ source venv/bin/activate pip install -e ".[registry]" # Run the web server -python -m smarttools.web.app +python -m cmdforge.web.app ``` The server will start on `http://localhost:5000`. @@ -1337,47 +1337,47 @@ The server will start on `http://localhost:5000`. ```bash # Required -export SMARTTOOLS_REGISTRY_DB=/path/to/registry.db +export CMDFORGE_REGISTRY_DB=/path/to/registry.db export PORT=5050 # Optional -export SMARTTOOLS_ENV=production # Enables secure cookies -export SMARTTOOLS_SHOW_ADS=true # Enable ad placeholders +export CMDFORGE_ENV=production # Enables secure cookies +export CMDFORGE_SHOW_ADS=true # Enable ad placeholders ``` #### 2. Database Location -By default, the registry uses `~/.smarttools/registry.db`. For production: +By default, the registry uses `~/.cmdforge/registry.db`. For production: ```bash # Create dedicated directory -mkdir -p /var/lib/smarttools -export SMARTTOOLS_REGISTRY_DB=/var/lib/smarttools/registry.db +mkdir -p /var/lib/cmdforge +export CMDFORGE_REGISTRY_DB=/var/lib/cmdforge/registry.db ``` **Note**: If using a merged filesystem (e.g., mergerfs), store the database on a single disk or in `/tmp` to avoid SQLite WAL mode issues: ```bash -export SMARTTOOLS_REGISTRY_DB=/tmp/smarttools-registry/registry.db +export CMDFORGE_REGISTRY_DB=/tmp/cmdforge-registry/registry.db ``` #### 3. Running with systemd -Create `/etc/systemd/system/smarttools-registry.service`: +Create `/etc/systemd/system/cmdforge-registry.service`: ```ini [Unit] -Description=SmartTools Registry Web Server +Description=CmdForge Registry Web Server After=network.target [Service] Type=simple -User=smarttools -WorkingDirectory=/opt/smarttools -Environment=SMARTTOOLS_REGISTRY_DB=/var/lib/smarttools/registry.db +User=cmdforge +WorkingDirectory=/opt/cmdforge +Environment=CMDFORGE_REGISTRY_DB=/var/lib/cmdforge/registry.db Environment=PORT=5050 -Environment=SMARTTOOLS_ENV=production -ExecStart=/opt/smarttools/venv/bin/python -m smarttools.web.app +Environment=CMDFORGE_ENV=production +ExecStart=/opt/cmdforge/venv/bin/python -m cmdforge.web.app Restart=always RestartSec=5 @@ -1387,8 +1387,8 @@ WantedBy=multi-user.target ```bash sudo systemctl daemon-reload -sudo systemctl enable smarttools-registry -sudo systemctl start smarttools-registry +sudo systemctl enable cmdforge-registry +sudo systemctl start cmdforge-registry ``` #### 4. Reverse Proxy (nginx) @@ -1396,7 +1396,7 @@ sudo systemctl start smarttools-registry ```nginx server { listen 80; - server_name registry.smarttools.dev; + server_name cmdforge.brrd.tech; location / { proxy_pass http://127.0.0.1:5050; @@ -1407,7 +1407,7 @@ server { } location /static { - alias /opt/smarttools/src/smarttools/web/static; + alias /opt/cmdforge/src/cmdforge/web/static; expires 1y; add_header Cache-Control "public, immutable"; } @@ -1417,7 +1417,7 @@ server { #### 5. SSL with Certbot ```bash -sudo certbot --nginx -d registry.smarttools.dev +sudo certbot --nginx -d cmdforge.brrd.tech ``` ### Tailwind CSS Build @@ -1429,8 +1429,8 @@ The CSS is pre-built and committed. To rebuild after changes: npm install # Build for production -npx tailwindcss -i src/smarttools/web/static/css/input.css \ - -o src/smarttools/web/static/css/main.css \ +npx tailwindcss -i src/cmdforge/web/static/css/input.css \ + -o src/cmdforge/web/static/css/main.css \ --minify ``` @@ -1447,7 +1447,7 @@ curl http://localhost:5050/api/v1/tools |-------|----------| | `disk I/O error` | Move database to non-merged filesystem | | Port already in use | Change PORT environment variable | -| 500 errors | Check `/tmp/smarttools.log` for stack traces | +| 500 errors | Check `/tmp/cmdforge.log` for stack traces | | Static files not loading | Verify static folder path in deployment | ## Future Considerations (Phase 8+) diff --git a/examples/install.py b/examples/install.py index cc0ae23..b9e40cf 100644 --- a/examples/install.py +++ b/examples/install.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """ -Install all SmartTools example tools. +Install all CmdForge example tools. Usage: python3 install.py # Install all tools @@ -9,7 +9,7 @@ Usage: python3 install.py --category dev # Install category Run from anywhere: - curl -sSL https://gitea.brrd.tech/rob/smarttools/raw/branch/main/examples/install.py | python3 + curl -sSL https://gitea.brrd.tech/rob/cmdforge/raw/branch/main/examples/install.py | python3 """ import argparse @@ -22,7 +22,7 @@ except ImportError: print("PyYAML required. Install with: pip install pyyaml") sys.exit(1) -TOOLS_DIR = Path.home() / ".smarttools" +TOOLS_DIR = Path.home() / ".cmdforge" # All example tool configurations TOOLS = { @@ -298,7 +298,7 @@ def list_tools(): def main(): - parser = argparse.ArgumentParser(description="Install SmartTools example tools") + parser = argparse.ArgumentParser(description="Install CmdForge example tools") parser.add_argument("tools", nargs="*", help="Specific tools to install (default: all)") parser.add_argument("--list", action="store_true", help="List available tools") parser.add_argument("--category", "-c", choices=list(CATEGORIES.keys()), help="Install tools from category") @@ -335,7 +335,7 @@ def main(): installed += 1 print(f"\nInstalled {installed} tools.") - print("\nRun 'smarttools refresh' to create executable wrappers.") + print("\nRun 'cmdforge refresh' to create executable wrappers.") if __name__ == "__main__": diff --git a/package.json b/package.json index a92064c..1d293cf 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { - "name": "smarttools-web", + "name": "cmdforge-web", "private": true, "scripts": { - "css:build": "tailwindcss -i src/smarttools/web/static/src/input.css -o src/smarttools/web/static/css/main.css --minify", - "css:watch": "tailwindcss -i src/smarttools/web/static/src/input.css -o src/smarttools/web/static/css/main.css --watch" + "css:build": "tailwindcss -i src/cmdforge/web/static/src/input.css -o src/cmdforge/web/static/css/main.css --minify", + "css:watch": "tailwindcss -i src/cmdforge/web/static/src/input.css -o src/cmdforge/web/static/css/main.css --watch" }, "devDependencies": { "tailwindcss": "^3.4.19" diff --git a/pyproject.toml b/pyproject.toml index 629f7e6..1cbf68c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,9 +3,9 @@ requires = ["setuptools>=61.0", "wheel"] build-backend = "setuptools.build_meta" [project] -name = "smarttools" +name = "cmdforge" version = "0.1.0" -description = "A lightweight personal tool builder for AI-powered CLI commands" +description = "Build custom AI-powered CLI commands in YAML" readme = "README.md" license = {text = "MIT"} requires-python = ">=3.10" @@ -56,13 +56,13 @@ all = [ ] [project.scripts] -smarttools = "smarttools.cli:main" +cmdforge = "cmdforge.cli:main" [project.urls] -Homepage = "https://gitea.brrd.tech/rob/smarttools" -Documentation = "https://gitea.brrd.tech/rob/smarttools#readme" -Repository = "https://gitea.brrd.tech/rob/smarttools.git" -Issues = "https://gitea.brrd.tech/rob/smarttools/issues" +Homepage = "https://cmdforge.brrd.tech" +Documentation = "https://cmdforge.brrd.tech/docs" +Repository = "https://gitea.brrd.tech/rob/CmdForge.git" +Issues = "https://gitea.brrd.tech/rob/CmdForge/issues" [tool.setuptools.packages.find] where = ["src"] diff --git a/scripts/health_check.py b/scripts/health_check.py index 0d73003..0a4ce08 100644 --- a/scripts/health_check.py +++ b/scripts/health_check.py @@ -1,4 +1,4 @@ -"""Basic health check for the SmartTools Registry API and DB.""" +"""Basic health check for the CmdForge Registry API and DB.""" from __future__ import annotations @@ -17,13 +17,13 @@ def _add_src_to_path() -> None: def _get_registry_url() -> str: - from smarttools.config import get_registry_url + from cmdforge.config import get_registry_url return get_registry_url().rstrip("/") def _get_db_path() -> Path: - from smarttools.registry.db import get_db_path + from cmdforge.registry.db import get_db_path return get_db_path() diff --git a/scripts/sync_to_db.py b/scripts/sync_to_db.py index a1262cd..74db07e 100644 --- a/scripts/sync_to_db.py +++ b/scripts/sync_to_db.py @@ -16,8 +16,8 @@ import yaml # Allow running from repo root sys.path.append(str(Path(__file__).resolve().parents[1] / "src")) -from smarttools.registry.db import connect_db, query_one -from smarttools.registry.sync import ensure_publisher, normalize_tags +from cmdforge.registry.db import connect_db, query_one +from cmdforge.registry.sync import ensure_publisher, normalize_tags def load_yaml(path: Path) -> Dict[str, Any]: diff --git a/src/cmdforge/__init__.py b/src/cmdforge/__init__.py new file mode 100644 index 0000000..5d9e724 --- /dev/null +++ b/src/cmdforge/__init__.py @@ -0,0 +1,3 @@ +"""CmdForge - A lightweight personal tool builder for AI-powered CLI commands.""" + +__version__ = "0.1.0" diff --git a/src/smarttools/cli.py b/src/cmdforge/cli.py similarity index 85% rename from src/smarttools/cli.py rename to src/cmdforge/cli.py index 54401c6..5fb4d0b 100644 --- a/src/smarttools/cli.py +++ b/src/cmdforge/cli.py @@ -1,4 +1,4 @@ -"""CLI entry point for SmartTools. +"""CLI entry point for CmdForge. This module is a thin wrapper for backwards compatibility. The actual implementation is in the cli/ package. diff --git a/src/smarttools/cli/__init__.py b/src/cmdforge/cli/__init__.py similarity index 98% rename from src/smarttools/cli/__init__.py rename to src/cmdforge/cli/__init__.py index deea620..d23678f 100644 --- a/src/smarttools/cli/__init__.py +++ b/src/cmdforge/cli/__init__.py @@ -1,4 +1,4 @@ -"""CLI entry point for SmartTools.""" +"""CLI entry point for CmdForge.""" import argparse import sys @@ -18,7 +18,7 @@ from .config_commands import cmd_config def main(): """Main CLI entry point.""" parser = argparse.ArgumentParser( - prog="smarttools", + prog="cmdforge", description="A lightweight personal tool builder for AI-powered CLI commands" ) parser.add_argument("--version", action="version", version=f"%(prog)s {__version__}") @@ -179,7 +179,7 @@ def main(): p_deps.set_defaults(func=cmd_deps) # 'install' command (for dependencies) - p_install = subparsers.add_parser("install", help="Install dependencies from smarttools.yaml") + p_install = subparsers.add_parser("install", help="Install dependencies from cmdforge.yaml") p_install.set_defaults(func=cmd_install_deps) # 'add' command @@ -190,7 +190,7 @@ def main(): p_add.set_defaults(func=cmd_add) # 'init' command - p_init = subparsers.add_parser("init", help="Initialize smarttools.yaml") + p_init = subparsers.add_parser("init", help="Initialize cmdforge.yaml") p_init.add_argument("-n", "--name", help="Project name") p_init.add_argument("-v", "--version", help="Project version") p_init.add_argument("-f", "--force", action="store_true", help="Overwrite existing") diff --git a/src/smarttools/cli/__main__.py b/src/cmdforge/cli/__main__.py similarity index 100% rename from src/smarttools/cli/__main__.py rename to src/cmdforge/cli/__main__.py diff --git a/src/smarttools/cli/config_commands.py b/src/cmdforge/cli/config_commands.py similarity index 95% rename from src/smarttools/cli/config_commands.py rename to src/cmdforge/cli/config_commands.py index b0f46bd..8af0c31 100644 --- a/src/smarttools/cli/config_commands.py +++ b/src/cmdforge/cli/config_commands.py @@ -4,7 +4,7 @@ from ..config import load_config, save_config, set_registry_token def cmd_config(args): - """Manage SmartTools configuration.""" + """Manage CmdForge configuration.""" if args.config_cmd == "show": return _cmd_config_show(args) elif args.config_cmd == "set-token": @@ -22,7 +22,7 @@ def cmd_config(args): def _cmd_config_show(args): """Show current configuration.""" config = load_config() - print("SmartTools Configuration:") + print("CmdForge Configuration:") print(f" Registry URL: {config.registry.url}") print(f" Token: {'***' if config.registry.token else '(not set)'}") print(f" Client ID: {config.client_id}") diff --git a/src/smarttools/cli/project_commands.py b/src/cmdforge/cli/project_commands.py similarity index 87% rename from src/smarttools/cli/project_commands.py rename to src/cmdforge/cli/project_commands.py index 2d78a03..d675ddb 100644 --- a/src/smarttools/cli/project_commands.py +++ b/src/cmdforge/cli/project_commands.py @@ -13,12 +13,12 @@ from ..resolver import ( def cmd_deps(args): - """Show project dependencies from smarttools.yaml.""" + """Show project dependencies from cmdforge.yaml.""" manifest = load_manifest() if manifest is None: - print("No smarttools.yaml found in current project.") - print("Create one with: smarttools init") + print("No cmdforge.yaml found in current project.") + print("Create one with: cmdforge init") return 1 print(f"Project: {manifest.name} v{manifest.version}") @@ -26,7 +26,7 @@ def cmd_deps(args): if not manifest.dependencies: print("No dependencies defined.") - print("Add one with: smarttools add ") + print("Add one with: cmdforge add ") return 0 print(f"Dependencies ({len(manifest.dependencies)}):") @@ -52,14 +52,14 @@ def cmd_deps(args): def cmd_install_deps(args): - """Install dependencies from smarttools.yaml.""" + """Install dependencies from cmdforge.yaml.""" from ..registry_client import RegistryError manifest = load_manifest() if manifest is None: - print("No smarttools.yaml found in current project.") - print("Create one with: smarttools init") + print("No cmdforge.yaml found in current project.") + print("Create one with: cmdforge init") return 1 if not manifest.dependencies: @@ -150,19 +150,19 @@ def cmd_add(args): print(f"It's been added to your dependencies - you can install it manually later.", file=sys.stderr) elif e.code == "CONNECTION_ERROR": print(f"Could not connect to registry.", file=sys.stderr) - print("Run 'smarttools install' to try again later.", file=sys.stderr) + print("Run 'cmdforge install' to try again later.", file=sys.stderr) else: print(f"Install failed: {e.message}", file=sys.stderr) - print("Run 'smarttools install' to try again.", file=sys.stderr) + print("Run 'cmdforge install' to try again.", file=sys.stderr) except Exception as e: print(f"Install failed: {e}", file=sys.stderr) - print("Run 'smarttools install' to try again.", file=sys.stderr) + print("Run 'cmdforge install' to try again.", file=sys.stderr) return 0 def cmd_init(args): - """Initialize a new smarttools.yaml.""" + """Initialize a new cmdforge.yaml.""" manifest_path = Path.cwd() / MANIFEST_FILENAME if manifest_path.exists() and not args.force: @@ -196,7 +196,7 @@ def cmd_init(args): print(f"Created {MANIFEST_FILENAME}") print() - print("Add dependencies with: smarttools add ") - print("Install them with: smarttools install") + print("Add dependencies with: cmdforge add ") + print("Install them with: cmdforge install") return 0 diff --git a/src/smarttools/cli/provider_commands.py b/src/cmdforge/cli/provider_commands.py similarity index 96% rename from src/smarttools/cli/provider_commands.py rename to src/cmdforge/cli/provider_commands.py index 370a0d4..588da33 100644 --- a/src/smarttools/cli/provider_commands.py +++ b/src/cmdforge/cli/provider_commands.py @@ -48,7 +48,7 @@ PROVIDER_INSTALL_INFO = { "cost": "FREE (runs entirely on your machine)", "variants": [], "custom": True, - "post_install_note": "After installing, add the provider:\n smarttools providers add ollama 'ollama run llama3' -d 'Local Llama 3'", + "post_install_note": "After installing, add the provider:\n cmdforge providers add ollama 'ollama run llama3' -d 'Local Llama 3'", }, } @@ -73,7 +73,7 @@ def cmd_providers(args): def _cmd_providers_install(args): """Interactive guide to install AI providers.""" print("=" * 60) - print("SmartTools Provider Installation Guide") + print("CmdForge Provider Installation Guide") print("=" * 60) print() @@ -185,9 +185,9 @@ def _cmd_providers_install(args): print(f" 2. {info['setup']}") if info.get('post_install_note'): print(f" 3. {info['post_install_note']}") - print(f" 4. Test with: smarttools providers test {selected}") + print(f" 4. Test with: cmdforge providers test {selected}") else: - print(f" 3. Test with: smarttools providers test {info['variants'][0] if info['variants'] else selected}") + print(f" 3. Test with: cmdforge providers test {info['variants'][0] if info['variants'] else selected}") else: print() print(f"Installation failed (exit code {result.returncode})") diff --git a/src/smarttools/cli/registry_commands.py b/src/cmdforge/cli/registry_commands.py similarity index 95% rename from src/smarttools/cli/registry_commands.py rename to src/cmdforge/cli/registry_commands.py index 2a68fa9..9a2209b 100644 --- a/src/smarttools/cli/registry_commands.py +++ b/src/cmdforge/cli/registry_commands.py @@ -86,7 +86,7 @@ def _cmd_registry_search(args): return 1 except Exception as e: print(f"Error searching registry: {e}", file=sys.stderr) - print("If the problem persists, check: smarttools config show", file=sys.stderr) + print("If the problem persists, check: cmdforge config show", file=sys.stderr) return 1 return 0 @@ -120,7 +120,7 @@ def _cmd_registry_install(args): except RegistryError as e: if e.code == "TOOL_NOT_FOUND": print(f"Tool '{tool_spec}' not found in the registry.", file=sys.stderr) - print(f"Try: smarttools registry search {tool_spec.split('/')[-1]}", file=sys.stderr) + print(f"Try: cmdforge registry search {tool_spec.split('/')[-1]}", file=sys.stderr) elif e.code == "VERSION_NOT_FOUND" or e.code == "CONSTRAINT_UNSATISFIABLE": print(f"Error: {e.message}", file=sys.stderr) if e.details and "available_versions" in e.details: @@ -191,12 +191,12 @@ def _cmd_registry_info(args): if len(versions) > 5: print(f" ...and {len(versions) - 5} more") - print(f"\nInstall: smarttools registry install {tool_info.owner}/{tool_info.name}") + print(f"\nInstall: cmdforge registry install {tool_info.owner}/{tool_info.name}") except RegistryError as e: if e.code == "TOOL_NOT_FOUND": print(f"Tool '{tool_spec}' not found in the registry.", file=sys.stderr) - print(f"Try: smarttools registry search {parsed.name}", file=sys.stderr) + print(f"Try: cmdforge registry search {parsed.name}", file=sys.stderr) elif e.code == "CONNECTION_ERROR": print("Could not connect to the registry.", file=sys.stderr) print("Check your internet connection or try again later.", file=sys.stderr) @@ -380,7 +380,7 @@ def _cmd_registry_my_tools(args): if not tools: print("You haven't published any tools yet.") - print("Publish your first tool with: smarttools registry publish") + print("Publish your first tool with: cmdforge registry publish") return 0 print(f"Your published tools ({len(tools)}):\n") @@ -393,7 +393,7 @@ def _cmd_registry_my_tools(args): except RegistryError as e: if e.code == "UNAUTHORIZED": print("Not logged in. Set your registry token first:", file=sys.stderr) - print(" smarttools config set-token ", file=sys.stderr) + print(" cmdforge config set-token ", file=sys.stderr) print() print("Don't have a token? Register at the registry website.", file=sys.stderr) elif e.code == "CONNECTION_ERROR": @@ -418,8 +418,8 @@ def _cmd_registry_browse(args): return run_registry_browser() except ImportError: print("TUI browser requires urwid. Install with:", file=sys.stderr) - print(" pip install 'smarttools[tui]'", file=sys.stderr) + print(" pip install 'cmdforge[tui]'", file=sys.stderr) print() print("Or search from command line:", file=sys.stderr) - print(" smarttools registry search ", file=sys.stderr) + print(" cmdforge registry search ", file=sys.stderr) return 1 diff --git a/src/smarttools/cli/tool_commands.py b/src/cmdforge/cli/tool_commands.py similarity index 97% rename from src/smarttools/cli/tool_commands.py rename to src/cmdforge/cli/tool_commands.py index 0a0a717..0c12116 100644 --- a/src/smarttools/cli/tool_commands.py +++ b/src/cmdforge/cli/tool_commands.py @@ -16,7 +16,7 @@ def cmd_list(args): if not tools: print("No tools found.") - print("Create your first tool with: smarttools ui") + print("Create your first tool with: cmdforge ui") return 0 print(f"Available tools ({len(tools)}):\n") @@ -76,7 +76,7 @@ def cmd_create(args): path = save_tool(tool) print(f"Created tool '{name}'") print(f"Config: {path}") - print(f"\nUse 'smarttools ui' to add arguments, steps, and customize.") + print(f"\nUse 'cmdforge ui' to add arguments, steps, and customize.") print(f"Or run: {name} < input.txt") return 0 @@ -326,7 +326,7 @@ echo "input" | {args.name} # View README if not readme_path.exists(): print(f"No documentation found for '{args.name}'.") - print(f"Create it with: smarttools docs {args.name} --edit") + print(f"Create it with: cmdforge docs {args.name} --edit") return 1 print(readme_path.read_text()) diff --git a/src/smarttools/config.py b/src/cmdforge/config.py similarity index 94% rename from src/smarttools/config.py rename to src/cmdforge/config.py index a85c7a0..c9f60c0 100644 --- a/src/smarttools/config.py +++ b/src/cmdforge/config.py @@ -1,6 +1,6 @@ -"""Global configuration handling for SmartTools. +"""Global configuration handling for CmdForge. -Manages ~/.smarttools/config.yaml with registry settings, tokens, and preferences. +Manages ~/.cmdforge/config.yaml with registry settings, tokens, and preferences. """ import uuid @@ -12,7 +12,7 @@ import yaml # Default configuration directory -CONFIG_DIR = Path.home() / ".smarttools" +CONFIG_DIR = Path.home() / ".cmdforge" CONFIG_FILE = CONFIG_DIR / "config.yaml" # Default registry URL (canonical base path) @@ -41,7 +41,7 @@ class RegistryConfig: @dataclass class Config: - """Global SmartTools configuration.""" + """Global CmdForge configuration.""" registry: RegistryConfig = field(default_factory=RegistryConfig) client_id: str = "" auto_fetch_from_registry: bool = True diff --git a/src/smarttools/manifest.py b/src/cmdforge/manifest.py similarity index 96% rename from src/smarttools/manifest.py rename to src/cmdforge/manifest.py index f996029..3447189 100644 --- a/src/smarttools/manifest.py +++ b/src/cmdforge/manifest.py @@ -1,4 +1,4 @@ -"""Project manifest (smarttools.yaml) handling. +"""Project manifest (cmdforge.yaml) handling. Manages project-level tool dependencies and overrides. """ @@ -11,7 +11,7 @@ from typing import Optional, List, Dict import yaml -MANIFEST_FILENAME = "smarttools.yaml" +MANIFEST_FILENAME = "cmdforge.yaml" @dataclass @@ -76,7 +76,7 @@ class ToolOverride: @dataclass class Manifest: - """Project manifest (smarttools.yaml).""" + """Project manifest (cmdforge.yaml).""" name: str = "my-project" version: str = "1.0.0" dependencies: List[Dependency] = field(default_factory=list) @@ -144,7 +144,7 @@ class Manifest: def find_manifest(start_dir: Optional[Path] = None) -> Optional[Path]: """ - Find smarttools.yaml by searching up from start_dir. + Find cmdforge.yaml by searching up from start_dir. Args: start_dir: Directory to start searching from (default: cwd) @@ -201,7 +201,7 @@ def save_manifest(manifest: Manifest, path: Optional[Path] = None) -> Path: Args: manifest: Manifest to save - path: Path to save to (default: ./smarttools.yaml) + path: Path to save to (default: ./cmdforge.yaml) Returns: Path where manifest was saved diff --git a/src/smarttools/providers.py b/src/cmdforge/providers.py similarity index 95% rename from src/smarttools/providers.py rename to src/cmdforge/providers.py index f6b332d..114a882 100644 --- a/src/smarttools/providers.py +++ b/src/cmdforge/providers.py @@ -12,7 +12,7 @@ import yaml # Default providers config location -PROVIDERS_FILE = Path.home() / ".smarttools" / "providers.yaml" +PROVIDERS_FILE = Path.home() / ".cmdforge" / "providers.yaml" @dataclass @@ -161,7 +161,7 @@ def call_provider(provider_name: str, prompt: str, timeout: int = 300) -> Provid return ProviderResult( text="", success=False, - error=f"Provider '{provider_name}' not found. Use 'smarttools providers' to manage providers." + error=f"Provider '{provider_name}' not found. Use 'cmdforge providers' to manage providers." ) # Parse command (expand environment variables) @@ -181,7 +181,7 @@ def call_provider(provider_name: str, prompt: str, timeout: int = 300) -> Provid return ProviderResult( text="", success=False, - error=f"Command '{base_cmd}' not found. Is it installed and in PATH?\n\nTo install AI providers, run: smarttools providers install" + error=f"Command '{base_cmd}' not found. Is it installed and in PATH?\n\nTo install AI providers, run: cmdforge providers install" ) try: @@ -197,7 +197,7 @@ def call_provider(provider_name: str, prompt: str, timeout: int = 300) -> Provid if result.returncode != 0: error_msg = f"Provider exited with code {result.returncode}: {result.stderr}" if "not found" in result.stderr.lower() or "not installed" in result.stderr.lower(): - error_msg += "\n\nTo install AI providers, run: smarttools providers install" + error_msg += "\n\nTo install AI providers, run: cmdforge providers install" return ProviderResult( text="", success=False, @@ -224,14 +224,14 @@ def call_provider(provider_name: str, prompt: str, timeout: int = 300) -> Provid f"To fix this, either:\n" f" 1. Run 'opencode' to connect the {provider_id} provider\n" f" 2. Use --provider to pick a different model (e.g., --provider opencode-pickle)\n" - f" 3. Run 'smarttools ui' to edit the tool's default provider" + f" 3. Run 'cmdforge ui' to edit the tool's default provider" ) stderr_hint = f" (stderr: {stderr[:200]}...)" if len(stderr) > 200 else (f" (stderr: {stderr})" if stderr else "") return ProviderResult( text="", success=False, - error=f"Provider returned empty output{stderr_hint}.\n\nThis may mean the model is not available. Try a different provider or run: smarttools providers install" + error=f"Provider returned empty output{stderr_hint}.\n\nThis may mean the model is not available. Try a different provider or run: cmdforge providers install" ) return ProviderResult(text=result.stdout, success=True) diff --git a/src/smarttools/registry/__init__.py b/src/cmdforge/registry/__init__.py similarity index 100% rename from src/smarttools/registry/__init__.py rename to src/cmdforge/registry/__init__.py diff --git a/src/smarttools/registry/app.py b/src/cmdforge/registry/app.py similarity index 99% rename from src/smarttools/registry/app.py rename to src/cmdforge/registry/app.py index 17340c6..7c579da 100644 --- a/src/smarttools/registry/app.py +++ b/src/cmdforge/registry/app.py @@ -1,4 +1,4 @@ -"""Flask app for SmartTools Registry API (Phase 2).""" +"""Flask app for CmdForge Registry API (Phase 2).""" from __future__ import annotations @@ -51,7 +51,7 @@ ALLOWED_SORT = { TOOL_NAME_RE = re.compile(r"^[A-Za-z0-9-]{1,64}$") OWNER_RE = re.compile(r"^[a-z0-9][a-z0-9-]{0,37}[a-z0-9]$") EMAIL_RE = re.compile(r"^[^@\s]+@[^@\s]+\.[^@\s]+$") -RESERVED_SLUGS = {"official", "admin", "system", "api", "registry", "smarttools"} +RESERVED_SLUGS = {"official", "admin", "system", "api", "registry", "cmdforge"} rate_limiter = RateLimiter() password_hasher = PasswordHasher(memory_cost=65536, time_cost=3, parallelism=4) @@ -1517,7 +1517,7 @@ def create_app() -> Flask: status=413, details={"limit": MAX_BODY_BYTES}, ) - secret = os.environ.get("SMARTTOOLS_REGISTRY_WEBHOOK_SECRET", "") + secret = os.environ.get("CMDFORGE_REGISTRY_WEBHOOK_SECRET", "") if not secret: return error_response("UNAUTHORIZED", "Webhook secret not configured", 401) status, payload = process_webhook(request.data, dict(request.headers), secret) diff --git a/src/smarttools/registry/categorize.py b/src/cmdforge/registry/categorize.py similarity index 100% rename from src/smarttools/registry/categorize.py rename to src/cmdforge/registry/categorize.py diff --git a/src/smarttools/registry/db.py b/src/cmdforge/registry/db.py similarity index 98% rename from src/smarttools/registry/db.py rename to src/cmdforge/registry/db.py index 71956d7..8295da3 100644 --- a/src/smarttools/registry/db.py +++ b/src/cmdforge/registry/db.py @@ -232,8 +232,8 @@ CREATE INDEX IF NOT EXISTS idx_pageviews_date ON pageviews(date(viewed_at), path def get_db_path() -> Path: - default_path = Path.home() / ".smarttools" / "registry" / "registry.db" - return Path(os.environ.get("SMARTTOOLS_REGISTRY_DB", default_path)) + default_path = Path.home() / ".cmdforge" / "registry" / "registry.db" + return Path(os.environ.get("CMDFORGE_REGISTRY_DB", default_path)) def ensure_db_directory(path: Path) -> None: diff --git a/src/smarttools/registry/rate_limit.py b/src/cmdforge/registry/rate_limit.py similarity index 100% rename from src/smarttools/registry/rate_limit.py rename to src/cmdforge/registry/rate_limit.py diff --git a/src/smarttools/registry/scrutiny.py b/src/cmdforge/registry/scrutiny.py similarity index 100% rename from src/smarttools/registry/scrutiny.py rename to src/cmdforge/registry/scrutiny.py diff --git a/src/smarttools/registry/similarity.py b/src/cmdforge/registry/similarity.py similarity index 100% rename from src/smarttools/registry/similarity.py rename to src/cmdforge/registry/similarity.py diff --git a/src/smarttools/registry/sync.py b/src/cmdforge/registry/sync.py similarity index 93% rename from src/smarttools/registry/sync.py rename to src/cmdforge/registry/sync.py index fa74009..5088feb 100644 --- a/src/smarttools/registry/sync.py +++ b/src/cmdforge/registry/sync.py @@ -19,22 +19,22 @@ from .db import connect_db, query_one def get_repo_dir() -> Path: - default_dir = Path.home() / ".smarttools" / "registry" / "repo" - return Path(os.environ.get("SMARTTOOLS_REGISTRY_REPO_DIR", default_dir)) + default_dir = Path.home() / ".cmdforge" / "registry" / "repo" + return Path(os.environ.get("CMDFORGE_REGISTRY_REPO_DIR", default_dir)) def get_repo_url() -> str: - return os.environ.get("SMARTTOOLS_REGISTRY_REPO_URL", "https://gitea.brrd.tech/rob/SmartTools-Registry.git") + return os.environ.get("CMDFORGE_REGISTRY_REPO_URL", "https://gitea.brrd.tech/rob/CmdForge-Registry.git") def get_repo_branch() -> str: - return os.environ.get("SMARTTOOLS_REGISTRY_REPO_BRANCH", "main") + return os.environ.get("CMDFORGE_REGISTRY_REPO_BRANCH", "main") def get_categories_cache_path() -> Path: return Path(os.environ.get( - "SMARTTOOLS_REGISTRY_CATEGORIES_CACHE", - Path.home() / ".smarttools" / "registry" / "categories_cache.json", + "CMDFORGE_REGISTRY_CATEGORIES_CACHE", + Path.home() / ".cmdforge" / "registry" / "categories_cache.json", )) @@ -249,7 +249,7 @@ def process_webhook(body: bytes, headers: Dict[str, str], secret: str, timeout: if is_delivery_processed(conn, delivery_id): return 200, {"data": {"status": "already_processed"}} - lock_path = Path.home() / ".smarttools" / "registry" / "locks" / "webhook.lock" + lock_path = Path.home() / ".cmdforge" / "registry" / "locks" / "webhook.lock" if not acquire_lock(lock_path, timeout): return 200, {"data": {"status": "skipped", "reason": "sync_in_progress"}} diff --git a/src/smarttools/registry_client.py b/src/cmdforge/registry_client.py similarity index 98% rename from src/smarttools/registry_client.py rename to src/cmdforge/registry_client.py index 84a0ae8..fadcc91 100644 --- a/src/smarttools/registry_client.py +++ b/src/cmdforge/registry_client.py @@ -1,4 +1,4 @@ -"""Registry API client for SmartTools. +"""Registry API client for CmdForge. Handles all HTTP communication with the registry server. """ @@ -114,7 +114,7 @@ class DownloadResult: class RegistryClient: - """Client for interacting with the SmartTools registry API.""" + """Client for interacting with the CmdForge registry API.""" def __init__( self, @@ -141,8 +141,8 @@ class RegistryClient: # Session for connection pooling self._session = requests.Session() self._session.headers.update({ - "User-Agent": "SmartTools-CLI/1.0", - "X-SmartTools-Client": "cli/1.0.0", + "User-Agent": "CmdForge-CLI/1.0", + "X-CmdForge-Client": "cli/1.0.0", "Accept": "application/json" }) @@ -198,7 +198,7 @@ class RegistryClient: if not self.token: raise RegistryError( code="UNAUTHORIZED", - message="Authentication required. Set registry token with 'smarttools config set-token'", + message="Authentication required. Set registry token with 'cmdforge config set-token'", http_status=401 ) headers.update(self._auth_headers()) diff --git a/src/smarttools/resolver.py b/src/cmdforge/resolver.py similarity index 97% rename from src/smarttools/resolver.py rename to src/cmdforge/resolver.py index 077460f..83afc66 100644 --- a/src/smarttools/resolver.py +++ b/src/cmdforge/resolver.py @@ -1,8 +1,8 @@ """Tool resolution with proper search order. Implements the tool resolution order: -1. Local project: ./.smarttools///config.yaml -2. Global user: ~/.smarttools///config.yaml +1. Local project: ./.cmdforge///config.yaml +2. Global user: ~/.cmdforge///config.yaml 3. Registry: Fetch from API, install to global, then run 4. Error if not found """ @@ -24,7 +24,7 @@ logger = logging.getLogger(__name__) # Local project tools directories (support both legacy and documented paths) -LOCAL_TOOLS_DIRS = [Path(".smarttools"), Path("smarttools")] +LOCAL_TOOLS_DIRS = [Path(".cmdforge"), Path("cmdforge")] @dataclass @@ -436,9 +436,9 @@ class ToolResolver: python_path = sys.executable script = f"""#!/bin/bash -# SmartTools wrapper for '{owner}/{name}' +# CmdForge wrapper for '{owner}/{name}' # Auto-generated - do not edit -exec {python_path} -m smarttools.runner {owner}/{name} "$@" +exec {python_path} -m cmdforge.runner {owner}/{name} "$@" """ wrapper_path.write_text(script) @@ -450,9 +450,9 @@ exec {python_path} -m smarttools.runner {owner}/{name} "$@" """Extract owner from existing wrapper script.""" try: content = wrapper_path.read_text() - # Look for pattern: smarttools.runner owner/name + # Look for pattern: cmdforge.runner owner/name # Owner slugs can contain lowercase alphanumeric and hyphens - match = re.search(r'smarttools\.runner\s+([a-z0-9][a-z0-9-]*)/([a-zA-Z0-9_-]+)', content) + match = re.search(r'cmdforge\.runner\s+([a-z0-9][a-z0-9-]*)/([a-zA-Z0-9_-]+)', content) if match: return match.group(1) return None diff --git a/src/smarttools/runner.py b/src/cmdforge/runner.py similarity index 98% rename from src/smarttools/runner.py rename to src/cmdforge/runner.py index 6e3ee75..26249db 100644 --- a/src/smarttools/runner.py +++ b/src/cmdforge/runner.py @@ -210,7 +210,7 @@ def create_argument_parser(tool: Tool) -> argparse.ArgumentParser: """ parser = argparse.ArgumentParser( prog=tool.name, - description=tool.description or f"SmartTools: {tool.name}" + description=tool.description or f"CmdForge: {tool.name}" ) # Universal flags @@ -244,7 +244,7 @@ def create_argument_parser(tool: Tool) -> argparse.ArgumentParser: def main(): """Entry point for tool execution via wrapper script.""" if len(sys.argv) < 2: - print("Usage: python -m smarttools.runner [args...]", file=sys.stderr) + print("Usage: python -m cmdforge.runner [args...]", file=sys.stderr) sys.exit(1) tool_spec = sys.argv[1] diff --git a/src/smarttools/tool.py b/src/cmdforge/tool.py similarity index 97% rename from src/smarttools/tool.py rename to src/cmdforge/tool.py index f8cc0cc..618a6f5 100644 --- a/src/smarttools/tool.py +++ b/src/cmdforge/tool.py @@ -10,7 +10,7 @@ import yaml # Default tools directory -TOOLS_DIR = Path.home() / ".smarttools" +TOOLS_DIR = Path.home() / ".cmdforge" # Default bin directory for wrapper scripts BIN_DIR = Path.home() / ".local" / "bin" @@ -106,7 +106,7 @@ DEFAULT_CATEGORIES = ["Text", "Developer", "Data", "Other"] @dataclass class Tool: - """A SmartTools tool definition.""" + """A CmdForge tool definition.""" name: str description: str = "" category: str = "Other" # Tool category for organization @@ -275,13 +275,13 @@ def create_wrapper_script(name: str) -> Path: bin_dir = get_bin_dir() wrapper_path = bin_dir / name - # Use the current Python interpreter to ensure smarttools is available + # Use the current Python interpreter to ensure cmdforge is available python_path = sys.executable script = f"""#!/bin/bash -# SmartTools wrapper for '{name}' +# CmdForge wrapper for '{name}' # Auto-generated - do not edit -exec {python_path} -m smarttools.runner {name} "$@" +exec {python_path} -m cmdforge.runner {name} "$@" """ wrapper_path.write_text(script) diff --git a/src/smarttools/ui.py b/src/cmdforge/ui.py similarity index 99% rename from src/smarttools/ui.py rename to src/cmdforge/ui.py index 5d45d9a..df15fc2 100644 --- a/src/smarttools/ui.py +++ b/src/cmdforge/ui.py @@ -1,4 +1,4 @@ -"""Dialog-based UI for managing SmartTools.""" +"""Dialog-based UI for managing CmdForge.""" import subprocess import sys @@ -762,7 +762,7 @@ def main_menu(dialog_prog: str): """Show the main menu.""" while True: choice = show_menu( - "SmartTools Manager", + "CmdForge Manager", [ ("list", "List all tools"), ("create", "Create new tool"), diff --git a/src/smarttools/ui_registry.py b/src/cmdforge/ui_registry.py similarity index 98% rename from src/smarttools/ui_registry.py rename to src/cmdforge/ui_registry.py index 9b7f0dd..e6c14f5 100644 --- a/src/smarttools/ui_registry.py +++ b/src/cmdforge/ui_registry.py @@ -1,4 +1,4 @@ -"""TUI for browsing the SmartTools Registry using urwid. +"""TUI for browsing the CmdForge Registry using urwid. Uses threading for non-blocking network operations. """ @@ -170,7 +170,7 @@ class AsyncOperation: class RegistryBrowser: - """TUI browser for the SmartTools Registry.""" + """TUI browser for the CmdForge Registry.""" def __init__(self): self.client = get_client() @@ -195,7 +195,7 @@ class RegistryBrowser: """Build the main UI layout.""" # Header self.header = urwid.AttrMap( - urwid.Text(" SmartTools Registry Browser ", align='center'), + urwid.Text(" CmdForge Registry Browser ", align='center'), 'header' ) @@ -344,7 +344,7 @@ Downloads: {downloads} Tags: {', '.join(tags) if tags else 'None'} Install command: - smarttools registry install {owner}/{name} + cmdforge registry install {owner}/{name} Press 'i' to install this tool """ diff --git a/src/smarttools/ui_snack.py b/src/cmdforge/ui_snack.py similarity index 99% rename from src/smarttools/ui_snack.py rename to src/cmdforge/ui_snack.py index ea6cf5b..6a47cff 100644 --- a/src/smarttools/ui_snack.py +++ b/src/cmdforge/ui_snack.py @@ -1,4 +1,4 @@ -"""BIOS-style TUI for SmartTools using snack (python3-newt).""" +"""BIOS-style TUI for CmdForge using snack (python3-newt).""" import sys # Ensure system packages are accessible @@ -15,8 +15,8 @@ from .tool import ( from .providers import Provider, load_providers, add_provider, delete_provider, get_provider -class SmartToolsUI: - """BIOS-style UI for SmartTools.""" +class CmdForgeUI: + """BIOS-style UI for CmdForge.""" def __init__(self): self.screen = None @@ -51,7 +51,7 @@ class SmartToolsUI: for label, value in items: listbox.append(label, value) - grid = snack.GridForm(self.screen, "SmartTools Manager", 1, 1) + grid = snack.GridForm(self.screen, "CmdForge Manager", 1, 1) grid.add(listbox, 0, 0) result = grid.runOnce() @@ -698,7 +698,7 @@ class SmartToolsUI: def run_ui(): """Entry point for the snack UI.""" - ui = SmartToolsUI() + ui = CmdForgeUI() ui.run() diff --git a/src/smarttools/ui_urwid.py b/src/cmdforge/ui_urwid.py similarity index 83% rename from src/smarttools/ui_urwid.py rename to src/cmdforge/ui_urwid.py index e4e0e5d..2efe405 100644 --- a/src/smarttools/ui_urwid.py +++ b/src/cmdforge/ui_urwid.py @@ -1,10 +1,10 @@ -"""BIOS-style TUI for SmartTools using urwid. +"""BIOS-style TUI for CmdForge using urwid. This module is a thin wrapper for backwards compatibility. The actual implementation is in the ui_urwid/ package. """ -from .ui_urwid import run_ui, SmartToolsUI +from .ui_urwid import run_ui, CmdForgeUI from .ui_urwid.palette import PALETTE from .ui_urwid.widgets import ( SelectableText, Button3D, Button3DCompact, ClickableButton, @@ -13,7 +13,7 @@ from .ui_urwid.widgets import ( ) __all__ = [ - 'run_ui', 'SmartToolsUI', 'PALETTE', + 'run_ui', 'CmdForgeUI', 'PALETTE', 'SelectableText', 'Button3D', 'Button3DCompact', 'ClickableButton', 'SelectableToolItem', 'ToolListBox', 'TabCyclePile', 'TabPassEdit', 'UndoableEdit', 'DOSScrollBar', 'ToolBuilderLayout', 'Dialog' diff --git a/src/smarttools/ui_urwid/__init__.py b/src/cmdforge/ui_urwid/__init__.py similarity index 99% rename from src/smarttools/ui_urwid/__init__.py rename to src/cmdforge/ui_urwid/__init__.py index 415fa5d..81598d1 100644 --- a/src/smarttools/ui_urwid/__init__.py +++ b/src/cmdforge/ui_urwid/__init__.py @@ -1,4 +1,4 @@ -"""BIOS-style TUI for SmartTools using urwid (with mouse support).""" +"""BIOS-style TUI for CmdForge using urwid (with mouse support).""" import urwid from typing import Optional, Callable @@ -18,8 +18,8 @@ from .widgets import ( ) -class SmartToolsUI: - """Urwid-based UI for SmartTools with mouse support.""" +class CmdForgeUI: + """Urwid-based UI for CmdForge with mouse support.""" def __init__(self): self.loop = None @@ -226,7 +226,7 @@ class SmartToolsUI: ], tab_positions=[0, 1, 5]) # Tool list, buttons row, exit button # Header - header = urwid.Text(('header', ' SmartTools Manager '), align='center') + header = urwid.Text(('header', ' CmdForge Manager '), align='center') # Footer footer = urwid.Text(('footer', ' Arrow:Navigate list | Tab:Jump to buttons | Enter/Click:Select | Q:Quit '), align='center') @@ -1566,5 +1566,5 @@ No explanations, no markdown fencing, just the code.""" def run_ui(): """Entry point for the urwid UI.""" - ui = SmartToolsUI() + ui = CmdForgeUI() ui.run() diff --git a/src/smarttools/ui_urwid/__main__.py b/src/cmdforge/ui_urwid/__main__.py similarity index 100% rename from src/smarttools/ui_urwid/__main__.py rename to src/cmdforge/ui_urwid/__main__.py diff --git a/src/smarttools/ui_urwid/palette.py b/src/cmdforge/ui_urwid/palette.py similarity index 100% rename from src/smarttools/ui_urwid/palette.py rename to src/cmdforge/ui_urwid/palette.py diff --git a/src/smarttools/ui_urwid/widgets.py b/src/cmdforge/ui_urwid/widgets.py similarity index 100% rename from src/smarttools/ui_urwid/widgets.py rename to src/cmdforge/ui_urwid/widgets.py diff --git a/src/smarttools/web/__init__.py b/src/cmdforge/web/__init__.py similarity index 89% rename from src/smarttools/web/__init__.py rename to src/cmdforge/web/__init__.py index 1defcec..84e8a4a 100644 --- a/src/smarttools/web/__init__.py +++ b/src/cmdforge/web/__init__.py @@ -1,4 +1,4 @@ -"""Web UI blueprint for SmartTools.""" +"""Web UI blueprint for CmdForge.""" import os from flask import Blueprint diff --git a/src/smarttools/web/app.py b/src/cmdforge/web/app.py similarity index 83% rename from src/smarttools/web/app.py rename to src/cmdforge/web/app.py index 675b0f0..ff0817f 100644 --- a/src/smarttools/web/app.py +++ b/src/cmdforge/web/app.py @@ -1,4 +1,4 @@ -"""Web app factory for SmartTools UI.""" +"""Web app factory for CmdForge UI.""" from __future__ import annotations @@ -19,13 +19,13 @@ if _sentry_dsn: integrations=[FlaskIntegration()], traces_sample_rate=float(os.environ.get("SENTRY_TRACES_RATE", "0.1")), profiles_sample_rate=float(os.environ.get("SENTRY_PROFILES_RATE", "0.1")), - environment=os.environ.get("SMARTTOOLS_ENV", "development"), + environment=os.environ.get("CMDFORGE_ENV", "development"), send_default_pii=False, # Privacy: don't send user IPs, emails, etc. ) except ImportError: pass # sentry-sdk not installed -from smarttools.registry import app as registry_app +from cmdforge.registry import app as registry_app from . import web_bp from .auth import login, register, logout @@ -44,10 +44,10 @@ def create_web_app() -> Flask: app.register_blueprint(forum_bp) # Session configuration - app.session_interface = SQLiteSessionInterface(cookie_name="smarttools_session") - app.config["SESSION_COOKIE_NAME"] = "smarttools_session" - app.config["SESSION_COOKIE_SECURE"] = os.environ.get("SMARTTOOLS_ENV") == "production" - app.config["SHOW_ADS"] = os.environ.get("SMARTTOOLS_SHOW_ADS", "").lower() == "true" + app.session_interface = SQLiteSessionInterface(cookie_name="cmdforge_session") + app.config["SESSION_COOKIE_NAME"] = "cmdforge_session" + app.config["SESSION_COOKIE_SECURE"] = os.environ.get("CMDFORGE_ENV") == "production" + app.config["SHOW_ADS"] = os.environ.get("CMDFORGE_SHOW_ADS", "").lower() == "true" # CSRF token generator app.config["CSRF_GENERATOR"] = lambda: secrets.token_urlsafe(32) diff --git a/src/smarttools/web/auth.py b/src/cmdforge/web/auth.py similarity index 100% rename from src/smarttools/web/auth.py rename to src/cmdforge/web/auth.py diff --git a/src/smarttools/web/docs_content.py b/src/cmdforge/web/docs_content.py similarity index 95% rename from src/smarttools/web/docs_content.py rename to src/cmdforge/web/docs_content.py index 5e55fd5..0f9fe08 100644 --- a/src/smarttools/web/docs_content.py +++ b/src/cmdforge/web/docs_content.py @@ -1,4 +1,4 @@ -"""Documentation content for SmartTools web UI. +"""Documentation content for CmdForge web UI. This module contains the actual documentation text that gets rendered on the /docs pages. Content is stored as markdown-ish HTML for simplicity. @@ -7,13 +7,13 @@ on the /docs pages. Content is stored as markdown-ish HTML for simplicity. DOCS = { "getting-started": { "title": "Getting Started", - "description": "Learn how to install SmartTools and create your first AI-powered CLI tool", + "description": "Learn how to install CmdForge and create your first AI-powered CLI tool", "content": """ -

SmartTools lets you build custom AI-powered CLI commands using simple YAML configuration. +

CmdForge lets you build custom AI-powered CLI commands using simple YAML configuration. Create tools that work with any AI provider and compose them like Unix pipes.

-

What is SmartTools?

-

SmartTools is a lightweight personal tool builder that lets you:

+

What is CmdForge?

+

CmdForge is a lightweight personal tool builder that lets you:

  • Create custom CLI commands that call AI providers
  • Chain prompts with Python code for complex workflows
  • @@ -24,23 +24,23 @@ Create tools that work with any AI provider and compose them like Unix pipes.

    Quick Start

    Get up and running in under a minute:

    -
    # Install SmartTools
    -pip install smarttools
    +
    # Install CmdForge
    +pip install cmdforge
     
     # Create your first tool (choose your style)
    -smarttools ui       # Visual builder with menus
    -smarttools create   # CLI wizard
    +cmdforge ui       # Visual builder with menus
    +cmdforge create   # CLI wizard
     
     # Or install a tool from the registry
    -smarttools registry install official/summarize
    +cmdforge registry install official/summarize
     
     # Use it!
     cat article.txt | summarize

    Two Ways to Build

    -

    smarttools ui launches a visual builder with menus and forms. - smarttools create uses a command-line wizard. Both create the same YAML config files.

    +

    cmdforge ui launches a visual builder with menus and forms. + cmdforge create uses a command-line wizard. Both create the same YAML config files.

    How It Works

    @@ -87,11 +87,11 @@ output: "{summary}"
    """, "headings": [ - ("what-is-smarttools", "What is SmartTools?"), + ("what-is-cmdforge", "What is CmdForge?"), ("quick-start", "Quick Start"), ("how-it-works", "How It Works"), ("next-steps", "Next Steps"), @@ -101,24 +101,24 @@ output: "{summary}" "installation": { "title": "Installation", - "description": "How to install SmartTools on your system", + "description": "How to install CmdForge on your system", "parent": "getting-started", "content": """ -

    SmartTools requires Python 3.8+ and works on Linux, macOS, and Windows.

    +

    CmdForge requires Python 3.8+ and works on Linux, macOS, and Windows.

    Install with pip

    -

    The simplest way to install SmartTools:

    -
    pip install smarttools
    +

    The simplest way to install CmdForge:

    +
    pip install cmdforge

    Or with pipx for isolated installation:

    -
    pipx install smarttools
    +
    pipx install cmdforge

    Verify Installation

    -
    smarttools --version
    -smarttools --help
    +
    cmdforge --version
    +cmdforge --help

    Configure a Provider

    -

    SmartTools needs at least one AI provider configured. The easiest is Claude CLI:

    +

    CmdForge needs at least one AI provider configured. The easiest is Claude CLI:

    # Install Claude CLI (if you have an Anthropic API key)
     pip install claude-cli
    @@ -127,17 +127,17 @@ pip install claude-cli
     pip install openai
     
     # Configure your provider
    -smarttools config
    +cmdforge config

    Wrapper Scripts Location

    -

    SmartTools installs wrapper scripts to ~/.local/bin/. Make sure this is in your PATH:

    +

    CmdForge installs wrapper scripts to ~/.local/bin/. Make sure this is in your PATH:

    # Add to ~/.bashrc or ~/.zshrc
     export PATH="$HOME/.local/bin:$PATH"

    Development Installation

    -

    To contribute or modify SmartTools:

    -
    git clone https://gitea.brrd.tech/rob/SmartTools.git
    -cd SmartTools
    +

    To contribute or modify CmdForge:

    +
    git clone https://gitea.brrd.tech/rob/CmdForge.git
    +cd CmdForge
     pip install -e ".[dev]"
    """, "headings": [ @@ -151,16 +151,16 @@ pip install -e ".[dev]"
    "first-tool": { "title": "Your First Tool", - "description": "Create your first SmartTools command step by step", + "description": "Create your first CmdForge command step by step", "parent": "getting-started", "content": """

    Let's create a simple tool that explains code. You'll learn the basics of tool configuration.

    Create the Tool

    Run the interactive creator:

    -
    smarttools create
    +
    cmdforge create
    -

    Or create the file manually at ~/.smarttools/explain/config.yaml:

    +

    Or create the file manually at ~/.cmdforge/explain/config.yaml:

    name: explain
     version: "1.0.0"
     description: Explain code or concepts in simple terms
    @@ -230,9 +230,9 @@ cat complex_algorithm.py | explain --level expert
    "publishing": { "title": "Publishing Tools", - "description": "Share your tools with the SmartTools community", + "description": "Share your tools with the CmdForge community", "content": """ -

    Share your tools with the community by publishing to the SmartTools Registry.

    +

    Share your tools with the community by publishing to the CmdForge Registry.

    Before Publishing

    Make sure your tool has:

    @@ -255,20 +255,20 @@ cat complex_algorithm.py | explain --level expert

    Publish Your Tool

    # Navigate to your tool directory
    -cd ~/.smarttools/my-tool/
    +cd ~/.cmdforge/my-tool/
     
     # First time: enter your token when prompted
    -smarttools registry publish
    +cmdforge registry publish
     
     # Dry run to validate without publishing
    -smarttools registry publish --dry-run
    +cmdforge registry publish --dry-run

    Versioning

    Published versions are immutable. To update a tool:

    1. Make your changes
    2. Bump the version in config.yaml
    3. -
    4. Run smarttools registry publish
    5. +
    6. Run cmdforge registry publish

    Best Practices

    @@ -294,11 +294,11 @@ smarttools registry publish --dry-run "title": "AI Providers", "description": "Configure different AI providers for your tools", "content": """ -

    SmartTools works with any AI provider that has a CLI interface. Configure providers in -~/.smarttools/providers.yaml.

    +

    CmdForge works with any AI provider that has a CLI interface. Configure providers in +~/.cmdforge/providers.yaml.

    Provider Configuration

    -

    Create or edit ~/.smarttools/providers.yaml:

    +

    Create or edit ~/.cmdforge/providers.yaml:

    providers:
       - name: claude
    @@ -397,9 +397,9 @@ providers:
     
         "parallel-orchestration": {
             "title": "Parallel Orchestration",
    -        "description": "Run multiple SmartTools concurrently for faster workflows",
    +        "description": "Run multiple CmdForge concurrently for faster workflows",
             "content": """
    -

    SmartTools executes steps sequentially within a tool, but you can run +

    CmdForge executes steps sequentially within a tool, but you can run multiple tools in parallel using Python's ThreadPoolExecutor. This pattern is ideal for multi-agent workflows, parallel analysis, or any task where you need responses from multiple AI providers simultaneously.

    @@ -412,7 +412,7 @@ from multiple AI providers simultaneously.

Basic Pattern

-

Use Python's concurrent.futures to run multiple SmartTools in parallel:

+

Use Python's concurrent.futures to run multiple CmdForge in parallel:

import subprocess
 from concurrent.futures import ThreadPoolExecutor, as_completed
@@ -604,11 +604,11 @@ def run_with_progress(tools: list[str], input_text: str):
 
 
 

Full Example: orchestrated-discussions

-

For a complete implementation of parallel SmartTools orchestration, see the +

For a complete implementation of parallel CmdForge orchestration, see the orchestrated-discussions project. It implements:

    -
  • Multiple AI "participants" as SmartTools
  • +
  • Multiple AI "participants" as CmdForge
  • Parallel execution with live progress logging
  • Shared log files for real-time monitoring
  • Discussion workflows with voting and consensus
  • @@ -656,7 +656,7 @@ steps: output: "{result}"
-

Save this to ~/.smarttools/shout/config.yaml and you've got a working command:

+

Save this to ~/.cmdforge/shout/config.yaml and you've got a working command:

$ echo "hello world" | shout
 HELLO WORLD!!!
@@ -1697,7 +1697,7 @@ loops, and more.

  • Using different AI models for different tasks
  • Building tools that adapt to their input
  • Self-critiquing workflows that iterate to perfection
  • -
  • Calling external tools from within your SmartTools
  • +
  • Calling external tools from within your CmdForge
  • @@ -1912,7 +1912,7 @@ output: "{result}"

    Calling External Tools

    -

    SmartTools can wrap any command-line tool:

    +

    CmdForge can wrap any command-line tool:

    name: lint-explain
     version: "1.0.0"
    @@ -2087,7 +2087,7 @@ output: "{formatted}"
    "title": "The Visual Builder", "description": "Build tools without touching YAML using the terminal UI", "content": """ -

    Not everyone wants to write YAML by hand. SmartTools includes a full-featured +

    Not everyone wants to write YAML by hand. CmdForge includes a full-featured terminal UI that lets you create, edit, and test tools with menus and forms—no text editor required.

    @@ -2104,13 +2104,13 @@ terminal UI that lets you create, edit, and test tools with menus and forms—no

    Start the UI with a single command:

    -
    smarttools ui
    +
    cmdforge ui

    You'll see a menu-driven interface that works in any terminal:

    ┌─────────────────────────────────────────────────────────┐
    -│                  SmartTools Manager                      │
    +│                  CmdForge Manager                      │
     ├─────────────────────────────────────────────────────────┤
     │                                                          │
     │   [ List all tools      ]                               │
    @@ -2158,7 +2158,7 @@ terminal UI that lets you create, edit, and test tools with menus and forms—no
     

    Step-by-Step: Creating a Summarizer

      -
    1. Launch: Run smarttools ui
    2. +
    3. Launch: Run cmdforge ui
    4. Select: Choose "Create new tool"
    5. Info: Go to "Info & Args", set name to summarize
    6. Add Argument: Click "Add Argument", set flag to --length, default to 100
    7. @@ -2243,7 +2243,7 @@ terminal UI that lets you create, edit, and test tools with menus and forms—no

      UI Backends

      -

      SmartTools automatically uses the best available terminal UI library:

      +

      CmdForge automatically uses the best available terminal UI library:

      @@ -2276,7 +2276,7 @@ terminal UI that lets you create, edit, and test tools with menus and forms—no - You're new to SmartTools + You're new to CmdForge You're comfortable with YAML diff --git a/src/smarttools/web/filters.py b/src/cmdforge/web/filters.py similarity index 100% rename from src/smarttools/web/filters.py rename to src/cmdforge/web/filters.py diff --git a/src/cmdforge/web/forum/__init__.py b/src/cmdforge/web/forum/__init__.py new file mode 100644 index 0000000..c370e50 --- /dev/null +++ b/src/cmdforge/web/forum/__init__.py @@ -0,0 +1,5 @@ +"""Forum blueprint for CmdForge community discussions.""" + +from .routes import forum_bp + +__all__ = ["forum_bp"] diff --git a/src/smarttools/web/forum/models.py b/src/cmdforge/web/forum/models.py similarity index 97% rename from src/smarttools/web/forum/models.py rename to src/cmdforge/web/forum/models.py index 6638d36..624f6c6 100644 --- a/src/smarttools/web/forum/models.py +++ b/src/cmdforge/web/forum/models.py @@ -6,7 +6,7 @@ import re import sqlite3 from typing import Any -from smarttools.registry.db import connect_db, query_one, query_all +from cmdforge.registry.db import connect_db, query_one, query_all FORUM_SCHEMA = """ @@ -51,9 +51,9 @@ CREATE INDEX IF NOT EXISTS idx_forum_replies_topic ON forum_replies(topic_id); """ DEFAULT_CATEGORIES = [ - ("general", "General Discussion", "Chat about anything SmartTools related", "chat", 1), + ("general", "General Discussion", "Chat about anything CmdForge related", "chat", 1), ("help", "Help & Support", "Get help with installation, configuration, or usage", "question", 2), - ("showcase", "Showcase", "Share tools and projects you've built with SmartTools", "star", 3), + ("showcase", "Showcase", "Share tools and projects you've built with CmdForge", "star", 3), ("ideas", "Ideas & Feedback", "Suggest features and improvements", "lightbulb", 4), ("tutorials", "Tutorials & Guides", "Community-written guides and how-tos", "book", 5), ] diff --git a/src/smarttools/web/forum/routes.py b/src/cmdforge/web/forum/routes.py similarity index 99% rename from src/smarttools/web/forum/routes.py rename to src/cmdforge/web/forum/routes.py index e1a5954..d510248 100644 --- a/src/smarttools/web/forum/routes.py +++ b/src/cmdforge/web/forum/routes.py @@ -19,7 +19,7 @@ from flask import ( url_for, ) -from smarttools.registry.db import connect_db +from cmdforge.registry.db import connect_db from .models import ( create_reply, diff --git a/src/smarttools/web/routes.py b/src/cmdforge/web/routes.py similarity index 99% rename from src/smarttools/web/routes.py rename to src/cmdforge/web/routes.py index 9e9ad37..3d12640 100644 --- a/src/smarttools/web/routes.py +++ b/src/cmdforge/web/routes.py @@ -1,4 +1,4 @@ -"""Public web routes for the SmartTools UI.""" +"""Public web routes for the CmdForge UI.""" from __future__ import annotations @@ -8,7 +8,7 @@ from typing import Any, Dict, List, Optional, Tuple from markupsafe import Markup, escape from flask import current_app, redirect, render_template, request, session, url_for -from smarttools.registry.db import connect_db, query_all, query_one +from cmdforge.registry.db import connect_db, query_all, query_one from . import web_bp @@ -499,7 +499,7 @@ def docs(path: str): else: page = SimpleNamespace( title=_title_case(current), - description="SmartTools documentation", + description="CmdForge documentation", content_html=Markup(f"

      Documentation for {escape(current)} is coming soon.

      "), headings=[], parent=None, diff --git a/src/smarttools/web/seo.py b/src/cmdforge/web/seo.py similarity index 97% rename from src/smarttools/web/seo.py rename to src/cmdforge/web/seo.py index 59e1950..ad257fd 100644 --- a/src/smarttools/web/seo.py +++ b/src/cmdforge/web/seo.py @@ -7,7 +7,7 @@ from typing import List from flask import Response, current_app, url_for -from smarttools.registry.db import connect_db, query_all +from cmdforge.registry.db import connect_db, query_all SITEMAP_TTL = timedelta(hours=6) _sitemap_cache = {"generated_at": None, "xml": ""} diff --git a/src/smarttools/web/sessions.py b/src/cmdforge/web/sessions.py similarity index 96% rename from src/smarttools/web/sessions.py rename to src/cmdforge/web/sessions.py index caef973..ad886d7 100644 --- a/src/smarttools/web/sessions.py +++ b/src/cmdforge/web/sessions.py @@ -10,7 +10,7 @@ from typing import Optional from flask.sessions import SessionInterface, SessionMixin from werkzeug.datastructures import CallbackDict -from smarttools.registry.db import connect_db +from cmdforge.registry.db import connect_db SESSION_TTL = timedelta(days=7) @@ -22,7 +22,7 @@ class SQLiteSession(CallbackDict, SessionMixin): class SQLiteSessionInterface(SessionInterface): - def __init__(self, cookie_name: str = "smarttools_session"): + def __init__(self, cookie_name: str = "cmdforge_session"): self.cookie_name = cookie_name def open_session(self, app, request): diff --git a/src/smarttools/web/static/css/main.css b/src/cmdforge/web/static/css/main.css similarity index 100% rename from src/smarttools/web/static/css/main.css rename to src/cmdforge/web/static/css/main.css diff --git a/src/smarttools/web/static/js/main.js b/src/cmdforge/web/static/js/main.js similarity index 99% rename from src/smarttools/web/static/js/main.js rename to src/cmdforge/web/static/js/main.js index 7c0e991..51ff060 100644 --- a/src/smarttools/web/static/js/main.js +++ b/src/cmdforge/web/static/js/main.js @@ -1,5 +1,5 @@ /** - * SmartTools Web UI - Main JavaScript + * CmdForge Web UI - Main JavaScript */ // Copy to clipboard utility diff --git a/src/smarttools/web/static/robots.txt b/src/cmdforge/web/static/robots.txt similarity index 76% rename from src/smarttools/web/static/robots.txt rename to src/cmdforge/web/static/robots.txt index f1002c3..8455670 100644 --- a/src/smarttools/web/static/robots.txt +++ b/src/cmdforge/web/static/robots.txt @@ -1,6 +1,6 @@ -# SmartTools Registry - robots.txt +# CmdForge Registry - robots.txt # We welcome all crawlers! Index everything to help users find us -# and enable AI assistants to help solve SmartTools issues. +# and enable AI assistants to help solve CmdForge issues. User-agent: * Allow: / @@ -11,7 +11,7 @@ Allow: /tutorials/ Allow: /tools/ Allow: /categories/ -# Allow AI crawlers explicitly (we want AI to learn about SmartTools) +# Allow AI crawlers explicitly (we want AI to learn about CmdForge) User-agent: GPTBot Allow: / @@ -42,6 +42,6 @@ Disallow: /api/v1/tokens Allow: /api/ # Sitemap location -Sitemap: https://registry.smarttools.dev/sitemap.xml +Sitemap: https://cmdforge.brrd.tech/sitemap.xml # Crawl-delay: none - crawl as fast as you want! diff --git a/src/smarttools/web/static/src/input.css b/src/cmdforge/web/static/src/input.css similarity index 100% rename from src/smarttools/web/static/src/input.css rename to src/cmdforge/web/static/src/input.css diff --git a/src/smarttools/web/templates/base.html b/src/cmdforge/web/templates/base.html similarity index 92% rename from src/smarttools/web/templates/base.html rename to src/cmdforge/web/templates/base.html index 397cb65..4608ca1 100644 --- a/src/smarttools/web/templates/base.html +++ b/src/cmdforge/web/templates/base.html @@ -3,14 +3,14 @@ - {% block title %}SmartTools{% endblock %} - Build Custom AI Commands + {% block title %}CmdForge{% endblock %} - Build Custom AI Commands {% block meta_extra %}{% endblock %} - + @@ -18,7 +18,7 @@ - + {% block twitter_extra %}{% endblock %} @@ -40,7 +40,7 @@ { "@context": "https://schema.org", "@type": "Organization", - "name": "SmartTools", + "name": "CmdForge", "url": "{{ request.host_url }}", "description": "Build custom AI commands in YAML" } diff --git a/src/smarttools/web/templates/components/callouts.html b/src/cmdforge/web/templates/components/callouts.html similarity index 100% rename from src/smarttools/web/templates/components/callouts.html rename to src/cmdforge/web/templates/components/callouts.html diff --git a/src/smarttools/web/templates/components/code_block.html b/src/cmdforge/web/templates/components/code_block.html similarity index 100% rename from src/smarttools/web/templates/components/code_block.html rename to src/cmdforge/web/templates/components/code_block.html diff --git a/src/smarttools/web/templates/components/consent_banner.html b/src/cmdforge/web/templates/components/consent_banner.html similarity index 100% rename from src/smarttools/web/templates/components/consent_banner.html rename to src/cmdforge/web/templates/components/consent_banner.html diff --git a/src/smarttools/web/templates/components/contributor_card.html b/src/cmdforge/web/templates/components/contributor_card.html similarity index 100% rename from src/smarttools/web/templates/components/contributor_card.html rename to src/cmdforge/web/templates/components/contributor_card.html diff --git a/src/smarttools/web/templates/components/footer.html b/src/cmdforge/web/templates/components/footer.html similarity index 93% rename from src/smarttools/web/templates/components/footer.html rename to src/cmdforge/web/templates/components/footer.html index 3511880..bed099f 100644 --- a/src/smarttools/web/templates/components/footer.html +++ b/src/cmdforge/web/templates/components/footer.html @@ -3,19 +3,19 @@
      - SmartTools + CmdForge

      Build custom AI commands in YAML. Create Unix-style pipeable tools that work with any AI provider. Provider-agnostic, composable, and community-driven.

      - - @@ -50,7 +50,7 @@

      - © {{ now().year }} SmartTools. Open source under MIT License. + © {{ now().year }} CmdForge. Open source under MIT License.

      Made with care for the developer community. diff --git a/src/smarttools/web/templates/components/forms.html b/src/cmdforge/web/templates/components/forms.html similarity index 100% rename from src/smarttools/web/templates/components/forms.html rename to src/cmdforge/web/templates/components/forms.html diff --git a/src/smarttools/web/templates/components/header.html b/src/cmdforge/web/templates/components/header.html similarity index 99% rename from src/smarttools/web/templates/components/header.html rename to src/cmdforge/web/templates/components/header.html index 5577429..669a003 100644 --- a/src/smarttools/web/templates/components/header.html +++ b/src/cmdforge/web/templates/components/header.html @@ -4,7 +4,7 @@

      diff --git a/src/smarttools/web/templates/components/tool_card.html b/src/cmdforge/web/templates/components/tool_card.html similarity index 94% rename from src/smarttools/web/templates/components/tool_card.html rename to src/cmdforge/web/templates/components/tool_card.html index 1bc1a61..7ed32d6 100644 --- a/src/smarttools/web/templates/components/tool_card.html +++ b/src/cmdforge/web/templates/components/tool_card.html @@ -54,10 +54,10 @@
      - smarttools install {{ tool.owner }}/{{ tool.name }} + cmdforge install {{ tool.owner }}/{{ tool.name }}
      diff --git a/src/smarttools/web/templates/dashboard/tools.html b/src/cmdforge/web/templates/dashboard/tools.html similarity index 99% rename from src/smarttools/web/templates/dashboard/tools.html rename to src/cmdforge/web/templates/dashboard/tools.html index 04576bd..8abdb0e 100644 --- a/src/smarttools/web/templates/dashboard/tools.html +++ b/src/cmdforge/web/templates/dashboard/tools.html @@ -1,7 +1,7 @@ {% extends "dashboard/base.html" %} {% set active_page = 'tools' %} -{% block title %}My Tools - SmartTools Dashboard{% endblock %} +{% block title %}My Tools - CmdForge Dashboard{% endblock %} {% block dashboard_header %}
      diff --git a/src/smarttools/web/templates/errors/404.html b/src/cmdforge/web/templates/errors/404.html similarity index 94% rename from src/smarttools/web/templates/errors/404.html rename to src/cmdforge/web/templates/errors/404.html index dfc4068..a3938f7 100644 --- a/src/smarttools/web/templates/errors/404.html +++ b/src/cmdforge/web/templates/errors/404.html @@ -1,6 +1,6 @@ {% extends "base.html" %} -{% block title %}Page Not Found - SmartTools{% endblock %} +{% block title %}Page Not Found - CmdForge{% endblock %} {% block content %}
      diff --git a/src/smarttools/web/templates/errors/500.html b/src/cmdforge/web/templates/errors/500.html similarity index 90% rename from src/smarttools/web/templates/errors/500.html rename to src/cmdforge/web/templates/errors/500.html index a2816d7..99692dd 100644 --- a/src/smarttools/web/templates/errors/500.html +++ b/src/cmdforge/web/templates/errors/500.html @@ -1,6 +1,6 @@ {% extends "base.html" %} -{% block title %}Server Error - SmartTools{% endblock %} +{% block title %}Server Error - CmdForge{% endblock %} {% block content %}
      @@ -15,7 +15,7 @@ class="w-full sm:w-auto inline-flex justify-center items-center px-6 py-3 text-base font-medium text-white bg-indigo-600 rounded-md hover:bg-indigo-700"> Go Home - diff --git a/src/smarttools/web/templates/forum/category.html b/src/cmdforge/web/templates/forum/category.html similarity index 100% rename from src/smarttools/web/templates/forum/category.html rename to src/cmdforge/web/templates/forum/category.html diff --git a/src/smarttools/web/templates/forum/index.html b/src/cmdforge/web/templates/forum/index.html similarity index 97% rename from src/smarttools/web/templates/forum/index.html rename to src/cmdforge/web/templates/forum/index.html index ca2aaa4..97a6fbd 100644 --- a/src/smarttools/web/templates/forum/index.html +++ b/src/cmdforge/web/templates/forum/index.html @@ -2,7 +2,7 @@ {% block title %}Community Forum{% endblock %} -{% block meta_description %}Join the SmartTools community. Ask questions, share your projects, and connect with other users.{% endblock %} +{% block meta_description %}Join the CmdForge community. Ask questions, share your projects, and connect with other users.{% endblock %} {% block content %}
      @@ -11,7 +11,7 @@

      Community Forum

      - Ask questions, share your projects, and connect with other SmartTools users. + Ask questions, share your projects, and connect with other CmdForge users.

      {{ stats.topics }} topics @@ -119,7 +119,7 @@ Browse Tools - diff --git a/src/smarttools/web/templates/forum/new_topic.html b/src/cmdforge/web/templates/forum/new_topic.html similarity index 100% rename from src/smarttools/web/templates/forum/new_topic.html rename to src/cmdforge/web/templates/forum/new_topic.html diff --git a/src/smarttools/web/templates/forum/topic.html b/src/cmdforge/web/templates/forum/topic.html similarity index 100% rename from src/smarttools/web/templates/forum/topic.html rename to src/cmdforge/web/templates/forum/topic.html diff --git a/src/smarttools/web/templates/pages/about.html b/src/cmdforge/web/templates/pages/about.html similarity index 90% rename from src/smarttools/web/templates/pages/about.html rename to src/cmdforge/web/templates/pages/about.html index 421f1c0..d690863 100644 --- a/src/smarttools/web/templates/pages/about.html +++ b/src/cmdforge/web/templates/pages/about.html @@ -1,14 +1,14 @@ {% extends "base.html" %} -{% block title %}About - SmartTools{% endblock %} +{% block title %}About - CmdForge{% endblock %} -{% block meta_description %}Learn about SmartTools, the open-source platform for building custom AI-powered command-line tools.{% endblock %} +{% block meta_description %}Learn about CmdForge, the open-source platform for building custom AI-powered command-line tools.{% endblock %} {% block content %}
      -

      About SmartTools

      +

      About CmdForge

      An open-source platform for building and sharing AI-powered command-line tools.

      @@ -20,7 +20,7 @@

      Our Mission

      - SmartTools was created with a simple belief: powerful AI tools should be accessible to everyone, + CmdForge was created with a simple belief: powerful AI tools should be accessible to everyone, not just those with extensive programming knowledge or expensive API subscriptions.

      @@ -29,7 +29,7 @@

      Our platform follows the Unix philosophy: simple, composable tools that do one thing well. - With SmartTools, you can create custom AI commands using simple YAML configuration, + With CmdForge, you can create custom AI commands using simple YAML configuration, chain them together, and share them with the community.

      @@ -49,7 +49,7 @@

      Open Source

      - SmartTools is MIT licensed and open source. We believe in transparency and community ownership. + CmdForge is MIT licensed and open source. We believe in transparency and community ownership.

      @@ -98,7 +98,7 @@

      Sustainability

      - SmartTools is committed to long-term sustainability. Revenue from optional ads + CmdForge is committed to long-term sustainability. Revenue from optional ads and donations supports:

        @@ -121,9 +121,9 @@

        Contribute

        - SmartTools is open source and welcomes contributions of all kinds. + CmdForge is open source and welcomes contributions of all kinds.

        -
        diff --git a/src/smarttools/web/templates/pages/community.html b/src/cmdforge/web/templates/pages/community.html similarity index 94% rename from src/smarttools/web/templates/pages/community.html rename to src/cmdforge/web/templates/pages/community.html index adc0958..ec599b9 100644 --- a/src/smarttools/web/templates/pages/community.html +++ b/src/cmdforge/web/templates/pages/community.html @@ -1,8 +1,8 @@ {% extends "base.html" %} -{% block title %}Community - SmartTools{% endblock %} +{% block title %}Community - CmdForge{% endblock %} -{% block meta_description %}Connect with SmartTools - report issues, request features, and contribute to the project.{% endblock %} +{% block meta_description %}Connect with CmdForge - report issues, request features, and contribute to the project.{% endblock %} {% block content %}
        @@ -11,7 +11,7 @@

        Community

        - SmartTools is open source. Get help, report issues, and contribute. + CmdForge is open source. Get help, report issues, and contribute.

        @@ -52,7 +52,7 @@

        Browse the source, fork the project, and submit pull requests.

        -
        View Repository @@ -72,7 +72,7 @@

        Found a bug? Have a feature request? Open an issue.

        -
        Open Issue @@ -137,7 +137,7 @@

        Report Bugs

        - Help make SmartTools better by reporting issues with clear reproduction steps. + Help make CmdForge better by reporting issues with clear reproduction steps.

        @@ -163,7 +163,7 @@ class="inline-flex items-center px-4 py-2 text-sm font-medium text-white bg-indigo-600 rounded-md hover:bg-indigo-700"> Visit Forum - Installation diff --git a/src/smarttools/web/templates/pages/content.html b/src/cmdforge/web/templates/pages/content.html similarity index 84% rename from src/smarttools/web/templates/pages/content.html rename to src/cmdforge/web/templates/pages/content.html index 16e00d2..040b0e2 100644 --- a/src/smarttools/web/templates/pages/content.html +++ b/src/cmdforge/web/templates/pages/content.html @@ -1,6 +1,6 @@ {% extends "base.html" %} -{% block title %}{{ title }} - SmartTools{% endblock %} +{% block title %}{{ title }} - CmdForge{% endblock %} {% block content %}
        diff --git a/src/smarttools/web/templates/pages/docs.html b/src/cmdforge/web/templates/pages/docs.html similarity index 98% rename from src/smarttools/web/templates/pages/docs.html rename to src/cmdforge/web/templates/pages/docs.html index 5064c1b..cae96f6 100644 --- a/src/smarttools/web/templates/pages/docs.html +++ b/src/cmdforge/web/templates/pages/docs.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% from "components/callouts.html" import info, warning, tip %} -{% block title %}{{ page.title }} - SmartTools Docs{% endblock %} +{% block title %}{{ page.title }} - CmdForge Docs{% endblock %} {% block meta_description %}{{ page.description or page.title }}{% endblock %} @@ -124,7 +124,7 @@ diff --git a/src/smarttools/web/templates/pages/index.html b/src/cmdforge/web/templates/pages/index.html similarity index 96% rename from src/smarttools/web/templates/pages/index.html rename to src/cmdforge/web/templates/pages/index.html index 10ade91..4e5204f 100644 --- a/src/smarttools/web/templates/pages/index.html +++ b/src/cmdforge/web/templates/pages/index.html @@ -3,7 +3,7 @@ {% from "components/tutorial_card.html" import tutorial_card %} {% from "components/contributor_card.html" import contributor_card %} -{% block title %}SmartTools - Build Custom AI Commands in YAML{% endblock %} +{% block title %}CmdForge - Build Custom AI Commands in YAML{% endblock %} {% block meta_description %}Create Unix-style pipeable AI tools with simple YAML configuration. Provider-agnostic, composable, and community-driven.{% endblock %} @@ -21,7 +21,7 @@
        - @@ -50,7 +50,7 @@

        - Why SmartTools? + Why CmdForge?

        @@ -144,7 +144,7 @@
        {{ tutorial_card( title="Basic Setup", - description="Learn how to install SmartTools and configure your first AI provider.", + description="Learn how to install CmdForge and configure your first AI provider.", href=url_for('web.docs', path='getting-started'), step_number=1 ) }} @@ -191,7 +191,7 @@

        Advertisement

        diff --git a/src/smarttools/web/templates/pages/login.html b/src/cmdforge/web/templates/pages/login.html similarity index 97% rename from src/smarttools/web/templates/pages/login.html rename to src/cmdforge/web/templates/pages/login.html index ab30ecb..ac1cdcb 100644 --- a/src/smarttools/web/templates/pages/login.html +++ b/src/cmdforge/web/templates/pages/login.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% from "components/forms.html" import text_input, button_primary, form_errors %} -{% block title %}Sign In - SmartTools{% endblock %} +{% block title %}Sign In - CmdForge{% endblock %} {% block content %}
        @@ -12,7 +12,7 @@ -

        Sign in to SmartTools

        +

        Sign in to CmdForge

        Access your dashboard and manage your tools

        diff --git a/src/smarttools/web/templates/pages/privacy.html b/src/cmdforge/web/templates/pages/privacy.html similarity index 93% rename from src/smarttools/web/templates/pages/privacy.html rename to src/cmdforge/web/templates/pages/privacy.html index d06cc60..9ffbab3 100644 --- a/src/smarttools/web/templates/pages/privacy.html +++ b/src/cmdforge/web/templates/pages/privacy.html @@ -1,8 +1,8 @@ {% extends "base.html" %} -{% block title %}Privacy Policy - SmartTools{% endblock %} +{% block title %}Privacy Policy - CmdForge{% endblock %} -{% block meta_description %}SmartTools privacy policy. Learn how we collect, use, and protect your data.{% endblock %} +{% block meta_description %}CmdForge privacy policy. Learn how we collect, use, and protect your data.{% endblock %} {% block content %}
        @@ -13,7 +13,7 @@

        Introduction

        - SmartTools ("we", "our", or "us") respects your privacy and is committed to protecting + CmdForge ("we", "our", or "us") respects your privacy and is committed to protecting your personal data. This privacy policy explains how we collect, use, and safeguard your information when you use our website and services.

        @@ -121,8 +121,8 @@ contact us at:

        diff --git a/src/smarttools/web/templates/pages/publisher.html b/src/cmdforge/web/templates/pages/publisher.html similarity index 97% rename from src/smarttools/web/templates/pages/publisher.html rename to src/cmdforge/web/templates/pages/publisher.html index abb1810..2990341 100644 --- a/src/smarttools/web/templates/pages/publisher.html +++ b/src/cmdforge/web/templates/pages/publisher.html @@ -1,9 +1,9 @@ {% extends "base.html" %} {% from "components/tool_card.html" import tool_card %} -{% block title %}{{ publisher.display_name }} (@{{ publisher.slug }}) - SmartTools{% endblock %} +{% block title %}{{ publisher.display_name }} (@{{ publisher.slug }}) - CmdForge{% endblock %} -{% block meta_description %}{{ publisher.bio or 'SmartTools publisher profile for ' ~ publisher.display_name }}{% endblock %} +{% block meta_description %}{{ publisher.bio or 'CmdForge publisher profile for ' ~ publisher.display_name }}{% endblock %} {% block content %}
        diff --git a/src/smarttools/web/templates/pages/register.html b/src/cmdforge/web/templates/pages/register.html similarity index 98% rename from src/smarttools/web/templates/pages/register.html rename to src/cmdforge/web/templates/pages/register.html index b500683..e4414f8 100644 --- a/src/smarttools/web/templates/pages/register.html +++ b/src/cmdforge/web/templates/pages/register.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% from "components/forms.html" import text_input, button_primary, form_errors, checkbox %} -{% block title %}Create Account - SmartTools{% endblock %} +{% block title %}Create Account - CmdForge{% endblock %} {% block content %}
        diff --git a/src/smarttools/web/templates/pages/search.html b/src/cmdforge/web/templates/pages/search.html similarity index 98% rename from src/smarttools/web/templates/pages/search.html rename to src/cmdforge/web/templates/pages/search.html index 38f8464..49704ff 100644 --- a/src/smarttools/web/templates/pages/search.html +++ b/src/cmdforge/web/templates/pages/search.html @@ -1,9 +1,9 @@ {% extends "base.html" %} {% from "components/tool_card.html" import tool_card %} -{% block title %}Search: {{ query }} - SmartTools Registry{% endblock %} +{% block title %}Search: {{ query }} - CmdForge Registry{% endblock %} -{% block meta_description %}Search results for "{{ query }}" in the SmartTools Registry.{% endblock %} +{% block meta_description %}Search results for "{{ query }}" in the CmdForge Registry.{% endblock %} {% block content %}
        diff --git a/src/smarttools/web/templates/pages/terms.html b/src/cmdforge/web/templates/pages/terms.html similarity index 80% rename from src/smarttools/web/templates/pages/terms.html rename to src/cmdforge/web/templates/pages/terms.html index 9e1f0bc..e2ccf59 100644 --- a/src/smarttools/web/templates/pages/terms.html +++ b/src/cmdforge/web/templates/pages/terms.html @@ -1,8 +1,8 @@ {% extends "base.html" %} -{% block title %}Terms of Service - SmartTools{% endblock %} +{% block title %}Terms of Service - CmdForge{% endblock %} -{% block meta_description %}SmartTools terms of service. Read our terms and conditions for using the platform.{% endblock %} +{% block meta_description %}CmdForge terms of service. Read our terms and conditions for using the platform.{% endblock %} {% block content %}
        @@ -13,19 +13,19 @@

        1. Acceptance of Terms

        - By accessing or using SmartTools ("the Service"), you agree to be bound by these + By accessing or using CmdForge ("the Service"), you agree to be bound by these Terms of Service ("Terms"). If you do not agree to these Terms, you may not use the Service.

        2. Description of Service

        - SmartTools is a platform for creating, publishing, and sharing AI-powered + CmdForge is a platform for creating, publishing, and sharing AI-powered command-line tools. The Service includes:

          -
        • The SmartTools CLI application
        • -
        • The SmartTools Registry (tool hosting and discovery)
        • +
        • The CmdForge CLI application
        • +
        • The CmdForge Registry (tool hosting and discovery)
        • Documentation and tutorials
        • Community features
        @@ -46,7 +46,7 @@

        4.1 Your Content

        You retain ownership of tools and content you publish ("User Content"). By publishing - to the Registry, you grant SmartTools a non-exclusive, worldwide license to host, + to the Registry, you grant CmdForge a non-exclusive, worldwide license to host, distribute, and display your User Content.

        @@ -80,22 +80,22 @@

        6. API and CLI Usage

        - Access to the SmartTools API and CLI is subject to rate limits. Excessive use + Access to the CmdForge API and CLI is subject to rate limits. Excessive use that impacts service availability for others may result in temporary or permanent restrictions.

        7. Third-Party Services

        - SmartTools is designed to work with various AI providers and external services. + CmdForge is designed to work with various AI providers and external services. Your use of these third-party services is subject to their respective terms and conditions. We are not responsible for third-party services.

        8. Intellectual Property

        - The SmartTools software is open source and licensed under the MIT License. - The SmartTools name, logo, and branding are trademarks of SmartTools. + The CmdForge software is open source and licensed under the MIT License. + The CmdForge name, logo, and branding are trademarks of CmdForge.

        9. Disclaimer of Warranties

        @@ -104,20 +104,20 @@ WE DO NOT WARRANT THAT THE SERVICE WILL BE UNINTERRUPTED, ERROR-FREE, OR SECURE.

        - Tools published by third parties are not endorsed by SmartTools. You use third-party + Tools published by third parties are not endorsed by CmdForge. You use third-party tools at your own risk.

        10. Limitation of Liability

        - TO THE MAXIMUM EXTENT PERMITTED BY LAW, SMARTTOOLS SHALL NOT BE LIABLE FOR ANY + TO THE MAXIMUM EXTENT PERMITTED BY LAW, CMDFORGE SHALL NOT BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES ARISING FROM YOUR USE OF THE SERVICE.

        11. Indemnification

        - You agree to indemnify and hold harmless SmartTools and its contributors from + You agree to indemnify and hold harmless CmdForge and its contributors from any claims, damages, or expenses arising from your use of the Service or violation of these Terms.

        @@ -140,7 +140,7 @@

        14. Governing Law

        - These Terms are governed by the laws of the jurisdiction in which SmartTools + These Terms are governed by the laws of the jurisdiction in which CmdForge operates, without regard to conflict of law principles.

        @@ -149,8 +149,8 @@ For questions about these Terms, please contact us at:

        diff --git a/src/smarttools/web/templates/pages/tool_detail.html b/src/cmdforge/web/templates/pages/tool_detail.html similarity index 96% rename from src/smarttools/web/templates/pages/tool_detail.html rename to src/cmdforge/web/templates/pages/tool_detail.html index 1cd132b..ab11fcb 100644 --- a/src/smarttools/web/templates/pages/tool_detail.html +++ b/src/cmdforge/web/templates/pages/tool_detail.html @@ -1,12 +1,12 @@ {% extends "base.html" %} {% from "components/callouts.html" import warning, info %} -{% block title %}{{ tool.owner }}/{{ tool.name }} - SmartTools Registry{% endblock %} +{% block title %}{{ tool.owner }}/{{ tool.name }} - CmdForge Registry{% endblock %} -{% block meta_description %}{{ tool.description or 'A SmartTools command-line tool' }}{% endblock %} +{% block meta_description %}{{ tool.description or 'A CmdForge command-line tool' }}{% endblock %} {% block og_title %}{{ tool.owner }}/{{ tool.name }}{% endblock %} -{% block og_description %}{{ tool.description or 'A SmartTools command-line tool' }}{% endblock %} +{% block og_description %}{{ tool.description or 'A CmdForge command-line tool' }}{% endblock %} {% block content %}
        @@ -91,7 +91,7 @@

        {{ tool.description or 'No additional documentation available.' }}

        Installation

        -
        smarttools install {{ tool.owner }}/{{ tool.name }}
        +
        cmdforge install {{ tool.owner }}/{{ tool.name }}

        Usage

        {{ tool.name }} --help
        @@ -108,7 +108,7 @@

        Install

        $ - smarttools install {{ tool.owner }}/{{ tool.name }} + cmdforge install {{ tool.owner }}/{{ tool.name }}