AstraCLI is a modular, extensible AI command‑line assistant that supports local models, external API providers, plugin tools, and automatic self‑updates.
It is designed for developers who want a fast, offline‑friendly, customizable AI workflow directly from the terminal.
Use one CLI tool to interact with:
- Local models (Ollama, llama.cpp, GPT4All)
- External APIs (OpenAI, Groq, Gemini, Anthropic, Mistral)
Providers live in astra/providers/ and auto‑load at runtime.
Add new providers by dropping in a Python file.
Models are defined in YAML configs under astra/models/.
Supports local GGUF models and remote API models.
API keys are stored locally in ~/.astra/credentials.json with optional encryption.
Drop tools into astra/plugins/ to extend AstraCLI:
- Code refactoring
- Bot command generation
- Log analysis
- Prompt testing
Run:
astra update
AstraCLI fetches the latest version, modules, and configs from GitHub automatically.
Local models and rule-based tools work without internet.
astra-cli/
│
├── astra/
│ ├── core/
│ ├── providers/
│ ├── models/
│ ├── plugins/
│ ├── utils/
│ └── data/
│
├── tests/
├── scripts/
├── docs/
├── examples/
│
├── README.md
├── LICENSE
├── pyproject.toml
├── requirements.txt
└── setup.cfg
Clone the repository:
git clone https://github.com/developer51709/AstraCLI
cd AstraCLIInstall dependencies:
pip install -r requirements.txtRun AstraCLI:
python -m astraInteractive mode
python -m astra interactiveastra ask "Explain this Python error."astra gen command banastra refactor bot.pyastra analyze logs/latest.logastra updateCreate a new file in:
astra/providers/myprovider.py
Implement:
class Provider:
def __init__(self, credentials):
...
def generate(self, prompt, model):
...AstraCLI will auto‑detect it.
Add a YAML file in:
astra/models/my-model.yaml
Example:
name: llama3.1-8b
provider: ollama
parameters:
temperature: 0.7
max_tokens: 2048Drop a Python file into:
astra/plugins/
Example:
def run(context):
# context contains prompt, model, provider, etc.
return "Plugin output"Pull requests are welcome!
Please follow the commit template and issue templates included in .github/.
This project uses a custom attribution license. See LICENSE for terms requiring credit to the original creator when the software is used or redistributed.
Documentation
See the docs/ folder for detailed guides including platform setup: docs/README.md