AIStack CLI is a Bash-based tool that installs and configures AI tools (Gemini CLI, Opencode, Orla, CLIProxyAPI, MCP servers, etc.) in an isolated environment, without polluting the host system.
- Language: Bash (MUST be compatible with bash 3.2)
- Entrypoint:
./aistack - Framework: Stella
https://github.com/StudioEtrange/stella - Internal Libraries:
lib/*.sh - Tests: Bats (
test/launch_test.sh,test/test/*.bats) - Docs:
README.md,doc/*.md
Before using any command:
./aistack initThis installs dependencies and prepares the environment. This MUST be launch only once before using any AIStack CLI commands.
All commands are defined in:
./aistack
- Keep
aistackthin (menu only) - Delegate logic to domain modules:
lib/lib_<domain>.sh - Use submain scripts for command wiring:
lib/main_<domain>.sh
When adding a new feature:
- Implement logic in:
lib/lib_<domain>.sh - Expose command in:
lib/main_<domain>.sh - Keep
aistackminimal - Add documentation in:
README.mddoc/<domain>.md
- MUST support bash 3.2 (Linux + macOS)
- Avoid modern bash features (
mapfile, associative arrays, etc.)
- Always quote variables:
"$VAR" - Use tabs for indentation
- Prefer:
local var="value"
- Inside functions:
return <code>
- Only CLI entrypoints may use:
exit <code>
Use explicit prefixes:
ERROR: ...
WARN: ...
INFO: ...
- Minimize global side effects
- Keep
PATHmodifications controlled and scoped
- Keep changes small and focused
- Avoid large refactors unless explicitly requested
- Run tests
- Validate CLI behavior
- Update documentation if needed
./aistack init./test/launch_test.sh json
./test/launch_test.sh yaml- Add/update Bats tests for functional changes
- Cover:
- missing arguments
- missing dependencies
- invalid inputs
- Avoid reliance on network when possible
Tests may depend on:
- network
- proxy
- certificates
If tests cannot run → document clearly.
- Proactivity: HIGH
- Tone: Professional, concise, technical
MUST ask for confirmation before:
- creating files (
write_file) - modifying files (
replace)
Use Conventional Commits:
feat: add htop v3.2.2
fix: handle missing dependency
- Never degrade CLI usability
- Always update:
- help output
- README
- Keep commands predictable and consistent
- Adding global system dependencies without justification
- Mixing in the same commit:
- style changes
- functional changes
- Adding undocumented scripts
- Changes are targeted and readable
- Documentation updated (README / doc/*)
- Tests executed (or limitation explained)
- No sensitive data added
When in doubt:
- Prefer small, testable, and reversible changes (
git revertfriendly)