{"id":28162,"library":"sage-ai-cli","title":"Sage AI CLI","description":"Sage is a local-first AI coding CLI (like Claude Code) that supports free/open models. Current version 1.19.1. Released regularly on GitHub.","status":"active","version":"1.19.1","language":"python","source_language":"en","source_url":"https://github.com/laynef/claude-ai-clone","tags":["cli","ai","code-generation","local-models"],"install":[{"cmd":"pip install sage-ai-cli","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for local model inference","package":"torch","optional":true},{"reason":"For Hugging Face model support","package":"transformers","optional":true}],"imports":[{"note":"Old import path; correct module is 'sage'","wrong":"from sage_ai import Sage","symbol":"sage","correct":"from sage import SageClient"},{"note":"Common mistake: using hyphenated module name","wrong":"from sage_cli import SageClient","symbol":"SageClient","correct":"from sage import SageClient"}],"quickstart":{"code":"from sage import SageClient\nfrom os import environ\n\nclient = SageClient(api_key=environ.get('SAGE_API_KEY', ''))\nresponse = client.generate('Explain Python decorators in one sentence.')\nprint(response['text'])","lang":"python","description":"Initialize SageClient with API key and generate a response."},"warnings":[{"fix":"Upgrade Python to 3.10+.","message":"Version 1.19.0 dropped support for Python 3.9; requires >=3.10.","severity":"breaking","affected_versions":">=1.19.0"},{"fix":"Replace generate_text() with generate() in your code.","message":"The method `SageClient.generate_text()` is deprecated. Use `generate()` instead.","severity":"deprecated","affected_versions":">=1.17.0"},{"fix":"Do not set SAGE_API_KEY if you want to use local models; leave it unset.","message":"API key is not required for local models, but if set it overrides local inference. Many users mistakenly set a key when intending to use local models.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Use 'from sage import SageClient' (module name is 'sage').","cause":"Installed sage-ai-cli but trying to import 'sage_cli' or 'sage_ai'.","error":"ModuleNotFoundError: No module named 'sage'"},{"fix":"Upgrade sage-ai-cli: pip install --upgrade sage-ai-cli","cause":"Older version of sage-ai-cli where SageClient was named 'Sage' or not exported.","error":"ImportError: cannot import name 'SageClient' from 'sage'"},{"fix":"Use absolute path and ensure model exists. Or omit 'model_path' to use default.","cause":"Local model path specified incorrectly or model not downloaded.","error":"RuntimeError: Model not found at path /path/to/model"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}