Rename project from SmartTools to CmdForge

Major rename operation:
- Rename Python package: smarttools -> cmdforge
- Update CLI entry point: smarttools -> cmdforge
- Update all imports and module references
- Update pyproject.toml with new name, URLs, entry point
- Update all HTML templates with new branding
- Update documentation (CLAUDE.md, README.md, docs/*, wiki/*)
- Update environment variables:
  - SMARTTOOLS_ENV -> CMDFORGE_ENV
  - SMARTTOOLS_REGISTRY_DB -> CMDFORGE_REGISTRY_DB
  - SMARTTOOLS_TOKEN -> CMDFORGE_TOKEN
  - SMARTTOOLS_REGISTRY_* -> CMDFORGE_REGISTRY_*
- Update Dockerfile and docker-compose.yml
- Update tests to use new package name
- Update scripts and examples
- Update package.json and tailwind.config.js

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

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
This commit is contained in:
rob
2026-01-02 22:15:55 -04:00
co-authored by Claude Opus 4.5
parent 2939dd806b
commit 497fe87fc5
113 changed files with 822 additions and 822 deletions
+49 -49
View File
@@ -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://[email protected]/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
+25 -25
View File
@@ -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/<toolname>/<filename>` on OK
- **External file storage** - Code is auto-saved to `~/.cmdforge/<toolname>/<filename>` 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`)
+5 -5
View File
@@ -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
+33 -33
View File
@@ -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 [email protected]
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/<toolname>/config.yaml`.
Copy individual tool configs to `~/.cmdforge/<toolname>/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
+19 -19
View File
@@ -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/<tool>/config.yaml` - Individual tool configs
- `~/.cmdforge/providers.yaml` - AI provider configurations
- `~/.cmdforge/config.yaml` - Global settings
- `~/.cmdforge/<tool>/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
+10 -10
View File
@@ -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" | <command>`
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
+85 -85
View File
@@ -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/[email protected]`
- To install prerelease: `cmdforge registry install rob/[email protected]`
- 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/<owner>/<name>/config.yaml` (or `./.smarttools/<name>/` for unnamespaced)
2. **Global user**: `~/.smarttools/<owner>/<name>/config.yaml`
1. **Local project**: `./.cmdforge/<owner>/<name>/config.yaml` (or `./.cmdforge/<name>/` for unnamespaced)
2. **Global user**: `~/.cmdforge/<owner>/<name>/config.yaml`
3. **Registry**: Fetch from API, install to global, then run
4. **Error**: `Tool '<toolname>' 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/<owner>/<name>/`
- Fetches latest stable version unless pinned in `cmdforge.yaml`
- Installs to `~/.cmdforge/<owner>/<name>/`
- 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/[email protected]...
✓ 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 <query> [--category=<cat>] [--limit=20]
$ cmdforge registry search <query> [--category=<cat>] [--limit=20]
→ GET /api/v1/tools/search?q=<query>&category=<cat>&limit=20
# Browse tools (TUI)
$ smarttools registry browse [--category=<cat>]
$ cmdforge registry browse [--category=<cat>]
→ GET /api/v1/tools?category=<cat>&page=1
→ GET /api/v1/categories
# View tool details
$ smarttools registry info <owner/name>
$ cmdforge registry info <owner/name>
→ GET /api/v1/tools/<owner>/<name>
# Install a tool
$ smarttools registry install <owner/name> [--version=<ver>]
$ cmdforge registry install <owner/name> [--version=<ver>]
→ GET /api/v1/tools/<owner>/<name>/download?version=<ver>&install=true
→ Writes to ~/.smarttools/<owner>/<name>/config.yaml
→ Writes to ~/.cmdforge/<owner>/<name>/config.yaml
→ Generates ~/.local/bin/<name> wrapper (or <owner>-<name> if collision)
# Uninstall a tool
$ smarttools registry uninstall <owner/name>
→ Removes ~/.smarttools/<owner>/<name>/
$ cmdforge registry uninstall <owner/name>
→ Removes ~/.cmdforge/<owner>/<name>/
→ 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/<owner>/<name>/download?version=<constraint>&install=true
→ Installs to ~/.smarttools/<owner>/<name>/
→ Installs to ~/.cmdforge/<owner>/<name>/
# Add a dependency to smarttools.yaml
$ smarttools add <owner/name> [--version=<constraint>]
→ Adds to ./smarttools.yaml dependencies
# Add a dependency to cmdforge.yaml
$ cmdforge add <owner/name> [--version=<constraint>]
→ 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/[email protected]...
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
+64 -64
View File
@@ -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
<code>smarttools run foo</code>
<code>cmdforge run foo</code>
```
- Background: Light gray (#F3F4F6)
- Font: Monospace
@@ -1011,14 +1011,14 @@ Publisher dashboard uses auth endpoints:
Landing page:
```html
<title>SmartTools - Build Custom AI Commands in YAML</title>
<title>CmdForge - Build Custom AI Commands in YAML</title>
<meta name="description" content="Create Unix-style pipeable tools that work with any AI provider. Provider-agnostic, composable, and community-driven.">
<meta name="keywords" content="ai cli tools, yaml automation, ai commands, smarttools">
<meta name="keywords" content="ai cli tools, yaml automation, ai commands, cmdforge">
```
Tool detail page:
```html
<title>{tool-name} by {owner} - SmartTools Registry</title>
<title>{tool-name} by {owner} - CmdForge Registry</title>
<meta name="description" content="{tool description, max 160 chars}">
```
@@ -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
<!-- Open Graph -->
<meta property="og:title" content="SmartTools - AI CLI Tools">
<meta property="og:title" content="CmdForge - AI CLI Tools">
<meta property="og:description" content="Build custom AI commands...">
<meta property="og:image" content="https://smarttools.dev/og-image.png">
<meta property="og:url" content="https://smarttools.dev">
<meta property="og:image" content="https://cmdforge.dev/og-image.png">
<meta property="og:url" content="https://cmdforge.dev">
<meta property="og:type" content="website">
<!-- Twitter Card -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@smarttools">
<meta name="twitter:title" content="SmartTools">
<meta name="twitter:site" content="@cmdforge">
<meta name="twitter:title" content="CmdForge">
<meta name="twitter:description" content="Build custom AI commands...">
<meta name="twitter:image" content="https://smarttools.dev/twitter-card.png">
<meta name="twitter:image" content="https://cmdforge.dev/twitter-card.png">
```
### Sitemap
@@ -1104,12 +1104,12 @@ Auto-generate `sitemap.xml`:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://smarttools.dev/</loc>
<loc>https://cmdforge.dev/</loc>
<priority>1.0</priority>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://smarttools.dev/tools</loc>
<loc>https://cmdforge.dev/tools</loc>
<priority>0.9</priority>
<changefreq>daily</changefreq>
</url>
@@ -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+)