{"id":40553,"library":"agroplan-ai-cli","title":"AgroPlan AI CLI","description":"AgroPlan AI CLI (v1.0.48) is a command-line tool for running the AgroPlan AI agricultural planning system locally. It uses genetic algorithms to optimize crop planting and provides a local FastAPI backend for faster performance (~0.1s vs ~0.3s+ on Render). The CLI is written in TypeScript and requires Bun ≥ 1.0 and Python ≥ 3.8. It copies the backend to ~/.agroplan, creates a Python virtual environment, and manages the local server (start/stop/status/logs). The frontend auto-detects local vs Render API. Designed for daily development with hybrid architecture.","status":"active","version":"1.0.48","language":"javascript","source_language":"en","source_url":"https://github.com/Kuuhaku-Allan/agroplan-ai","tags":["javascript","agroplan","agricultura","cli","local-api","farming","genetic-algorithm"],"install":[{"cmd":"npm install agroplan-ai-cli","lang":"bash","label":"npm"},{"cmd":"yarn add agroplan-ai-cli","lang":"bash","label":"yarn"},{"cmd":"pnpm add agroplan-ai-cli","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Runtime requirement: the CLI is distributed via bun and uses bun add -g for installation. Bun ≥ 1.0 required.","package":"bun","optional":false},{"reason":"Backend requires Python ≥ 3.8 to create virtual environment and run FastAPI server.","package":"python","optional":false}],"imports":[{"note":"This package is distributed exclusively for Bun (see engines.bun). npm install will fail or produce unexpected results.","wrong":"npm install -g agroplan-ai-cli","symbol":"CLI entry","correct":"bun add -g agroplan-ai-cli"}],"quickstart":{"code":"# Install CLI globally using Bun (required)\nbun add -g agroplan-ai-cli\n\n# Setup local API environment (creates ~/.agroplan/backend, .venv, installs Python deps)\nagroplan setup\n\n# Start local server (FastAPI on localhost:8000)\nagroplan serve on\n\n# Open AgroPlan AI in browser (auto-detects local API)\nagroplan open\n\n# Check server status and logs\nagroplan serve status\nagroplan serve logs\n\n# Stop server\nagroplan serve off","lang":"typescript","description":"Installation (via Bun, not npm), setup, start local server, open browser, monitor, and stop. Demonstrates all primary commands."},"warnings":[{"fix":"Install Bun from bun.sh first, then use 'bun add -g agroplan-ai-cli'.","message":"Package requires Bun ≥ 1.0 — npm/yarn installation will fail or break.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Ensure Python 3.8+ is installed and accessible as 'python3' or 'python'.","message":"Backend requires Python ≥ 3.8 and virtualenv support on PATH.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Kill existing process (e.g., 'pkill -f fastapi') and remove PID file: rm ~/.agroplan/agroplan-api.pid","message":"'agroplan serve on' may fail if port 8000 is already in use or if previous PID file exists at ~/.agroplan/agroplan-api.pid","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use a supported OS or run inside a compatible VM/container.","message":"The CLI only runs on Windows, macOS, or Linux; no FreeBSD or other Unix support.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'/.agroplan':65 '0.1':40 '0.3':43 '1.0':56 '3.8':59 'agricultur':19 'agricultura':95 'agroplan':1,4,17,94 'ai':2,5,18 'algorithm':26,103 'api':85,99 'architectur':92 'auto':80 'auto-detect':79 'backend':36,63 'bun':55 'cli':3,6,48,96 'command':11 'command-lin':10 'copi':61 'creat':66 'crop':29 'daili':88 'design':86 'detect':81 'develop':89 'environ':70 'farm':100 'fastapi':35 'faster':38 'frontend':78 'genet':25,102 'genetic-algorithm':101 'hybrid':91 'javascript':93 'line':12 'local':22,34,74,82,98 'local-api':97 'manag':72 'optim':28 'perform':39 'plan':20 'plant':30 'provid':32 'python':58,68 'render':46,84 'requir':54 'run':15 'server':75 'start/stop/status/logs':76 'system':21 'tool':13 'typescript':52 'use':24 'v1.0.48':7 'virtual':69 'vs':42,83 'written':50","created_at":"2026-06-04T18:48:07.159016+00:00","updated_at":"2026-06-04T18:48:07.159016+00:00","problems":[{"fix":"Install Bun: curl -fsSL https://bun.sh/install | bash","cause":"Bun is not installed on the system.","error":"bun: command not found"},{"fix":"Install Python 3.8+ and ensure it is added to PATH.","cause":"Python is not available on PATH or version < 3.8.","error":"Error: Python not found. Please install Python >= 3.8"},{"fix":"Stop the conflicting process or run 'agroplan serve off' to clean up.","cause":"Another process is using the required port or a stale PID file exists.","error":"Error: Port 8000 already in use"},{"fix":"Run 'bun add -g agroplan-ai-cli' to install.","cause":"CLI not installed globally or not on PATH.","error":"agroplan: command not found"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://agroplan-ai.vercel.app","github":"https://github.com/Kuuhaku-Allan/agroplan-ai","docs":null,"changelog":null,"pypi":null,"npm":"agroplan-ai-cli","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}