|
| 1 | +# Setupr Features |
| 2 | + |
| 3 | +## Smart Detection |
| 4 | + |
| 5 | +Setupr automatically detects: |
| 6 | +- **Languages**: TypeScript, JavaScript, Python, Rust, Go, Java, Ruby, PHP, Dart, Elixir, Swift, C#, Kotlin, Scala, and more |
| 7 | +- **Frameworks**: Next.js, Nuxt, SvelteKit, React, Vue, Angular, Express, Django, Flask, Rails, Spring Boot, and 20+ more |
| 8 | +- **Package Managers**: npm, yarn, pnpm, bun, pip, poetry, cargo, go, bundler, composer, pub, mix |
| 9 | +- **Services**: PostgreSQL, MySQL, MongoDB, Redis, RabbitMQ, Elasticsearch, Docker |
| 10 | +- **Monorepos**: npm workspaces, pnpm workspaces, Turborepo, Lerna, Nx |
| 11 | + |
| 12 | +### Detection Priority |
| 13 | + |
| 14 | +1. `.setupr.json` config file (explicit, highest priority) |
| 15 | +2. `package.json` "setupr" field |
| 16 | +3. File-based scanning (lock files, config files) |
| 17 | +4. Content analysis (dependency inspection) |
| 18 | +5. AI fallback (novel situations only) |
| 19 | + |
| 20 | +## AI-Powered Intelligence |
| 21 | + |
| 22 | +Setupr uses a 3-tier progressive intelligence system: |
| 23 | + |
| 24 | +1. **Pattern Matching** (Level 0) — Free, instant. Handles ~80% of queries |
| 25 | +2. **Cached Responses** (Level 1) — Free after first hit. Smart deduplication |
| 26 | +3. **Live AI** (Level 2) — Only for novel situations. Uses compressed DSL for minimal token usage |
| 27 | + |
| 28 | +The compressed DSL is internal-only. Setupr compresses docs, scan facts, and parsed user intent before sending context to a model, but generated explanations, docs, code edits, commands, and TUI messages stay in normal human-readable language. |
| 29 | + |
| 30 | +Supports 7 AI providers (25+ models, plus custom GitHub Models catalog IDs): |
| 31 | + |
| 32 | +| Provider | Models | Env Key | |
| 33 | +|----------|--------|---------| |
| 34 | +| OpenAI | gpt-5.4-pro, gpt-5.4-mini, gpt-4o, gpt-4o-mini | `OPENAI_API_KEY` | |
| 35 | +| Anthropic | claude-opus-4-6, claude-sonnet-4-6, claude-haiku-4-5, claude-3.5-sonnet | `ANTHROPIC_API_KEY` | |
| 36 | +| Google | gemini-3.1-pro, gemini-3-flash, gemini-2.5-flash-lite | `GOOGLE_API_KEY` | |
| 37 | +| Groq (Llama) | llama-4-maverick, llama-4-scout, llama-3.3-70b | `GROQ_API_KEY` | |
| 38 | +| MiniMax | minimax-m2.7, minimax-m2.5-lightning | `MINIMAX_API_KEY` | |
| 39 | +| Moonshot (Kimi) | kimi-latest, kimi-k2-thinking, kimi-k2-turbo-preview, kimi-k2.5-vision, moonshot-v1-128k | `MOONSHOT_API_KEY` | |
| 40 | +| GitHub Models | openai/gpt-4.1, openai/gpt-4.1-mini, openai/gpt-4o, openai/gpt-4o-mini, or any GitHub catalog ID | `GITHUB_MODELS_API_KEY`, `GITHUB_TOKEN`, or `GITHUB_API_KEY` | |
| 41 | + |
| 42 | +```bash |
| 43 | +# Guided setup for provider API keys |
| 44 | +setup auth login |
| 45 | + |
| 46 | +# Save one provider API key globally |
| 47 | +setup auth set-key github |
| 48 | + |
| 49 | +# View configured providers without printing raw keys |
| 50 | +setup auth list |
| 51 | + |
| 52 | +# Test configured providers with tiny requests |
| 53 | +setup auth test |
| 54 | + |
| 55 | +# View available models |
| 56 | +setup auth models |
| 57 | + |
| 58 | +# Set preferred model |
| 59 | +setup auth use openai/gpt-4.1-mini |
| 60 | +``` |
| 61 | + |
| 62 | +Setupr stores provider API keys globally in `~/.setupr/secrets.json` with file permissions `0600`. Raw keys are never printed. |
| 63 | + |
| 64 | +### AI Director Runtime |
| 65 | + |
| 66 | +Setupr's AI layer is a director runtime, not a one-shot planner: |
| 67 | + |
| 68 | +- Reads bounded project context from README/setup docs, `.env.example`, package scripts, Docker files, CI files, and scanner output |
| 69 | +- Compresses setup docs into compact facts before model calls |
| 70 | +- Parses user chat into compact intent facts while preserving the exact raw message for AI fallback |
| 71 | +- Caches context under `.setupr/cache` so startup stays fast |
| 72 | +- Turns failures into structured diagnosis and safe re-planning decisions |
| 73 | +- Shows plan diffs when chat steering changes the active plan |
| 74 | +- Writes agent workflow checkpoints to `.setupr/agent-workflow.json` so interrupted flows can resume |
| 75 | + |
| 76 | +AI output is not treated as unrestricted shell text. The director proposes structured actions, then Setupr's executor and safety policy decide whether the action is allowed, needs confirmation, or must be blocked. |
| 77 | + |
| 78 | +```bash |
| 79 | +setupr chat |
| 80 | +setupr chat "how do I start this app?" |
| 81 | +setupr chat "what failed last time?" |
| 82 | +setupr chat "switch model to moonshot-v1-128k" |
| 83 | +setupr chat --new |
| 84 | +setupr chat resume |
| 85 | +``` |
| 86 | + |
| 87 | +## Agent-Guided TUI Flow |
| 88 | + |
| 89 | +The `setup` TUI is an agent workspace, not just a log viewer: |
| 90 | + |
| 91 | +- Before the dashboard opens, Setupr prints a plain-text warning describing what it may do |
| 92 | +- Inside the TUI, the main panel shows a time-ordered timeline: system events, AI decisions, user messages, command output, warnings, and confirmations |
| 93 | +- When the agent needs input, it pauses with an option card above the persistent chat input |
| 94 | +- The AI director can act on natural language while setup is open: change models, fill env values, skip or rewrite plan steps |
| 95 | +- `--force` skips safe prompts and uses defaults where possible, but does not invent secrets and still stops for blockers |
| 96 | + |
| 97 | +## Safety Policy |
| 98 | + |
| 99 | +All command-like actions pass through one safety layer. Safe checks and normal dependency installs can run. Medium/high-risk actions require confirmation. Critical actions (root/home wildcard deletion, `curl | sh`, unsafe elevated commands) are blocked. `--force` never bypasses critical safety blockers. |
| 100 | + |
| 101 | +## Environment Management |
| 102 | + |
| 103 | +```bash |
| 104 | +setup env # Open interactive .env editor TUI |
| 105 | +setup env init # Create .env from .env.example |
| 106 | +setup env check # Check for missing variables |
| 107 | +setup env sync # Sync structure with .env.example |
| 108 | +setup env smart # Smart reorganize + auto-fill |
| 109 | +``` |
| 110 | + |
| 111 | +## Checkpoint & Resume |
| 112 | + |
| 113 | +- Progress saved to `.setupr/checkpoint.json` |
| 114 | +- Agent workflow state saved to `.setupr/agent-workflow.json` |
| 115 | +- Setup stops on the first failed step (non-zero exit in plain mode) |
| 116 | +- Persists across terminals and reboots |
| 117 | +- Automatically cleaned up on success |
| 118 | + |
| 119 | +## Verification And Security |
| 120 | + |
| 121 | +```bash |
| 122 | +setupr test quick # Fast local check |
| 123 | +setupr test full --report .setupr/test-report.md # Broader check |
| 124 | +setupr test doctor # Coverage explanation |
| 125 | +setupr security scan # Defensive local scan |
| 126 | +setupr security deep --report .setupr/security-report.json |
| 127 | +``` |
| 128 | + |
| 129 | +## Plugin Development |
| 130 | + |
| 131 | +```bash |
| 132 | +setupr plugin create team-tools |
| 133 | +setupr plugin validate . |
| 134 | +setupr plugin doctor |
| 135 | +``` |
| 136 | + |
| 137 | +Plugins extend Setupr with commands, scanners, planners, doctor checks, fixers, and TUI panels. Plugin-proposed work still routes through Setupr's safety systems. |
0 commit comments