ALNX Documentation

Complete reference for the ALNX terminal assistant.

Getting Started

Installation

# One-line install (Linux/macOS)

curl -fsSL https://alnx.dev/install.sh | sh

# Or with Homebrew (macOS)

brew install alnx

# Windows (PowerShell)

winget install alnx

First steps

alnx doctor

# Check your environment

alnx config set provider openai

alnx config set custom.api_key YOUR_KEY

# Configure a provider

alnx ask "how do I see disk usage"

# Ask your first question

Commands Reference

alnx ask <MESSAGE> [--raw] [-o FILE]

Ask anything in natural language. ALNX detects your environment and responds with the correct command dialect.

alnx ask "how do I see open ports"

alnx ask --raw "compress current folder"

alnx ask "generate backup script" -o backup.sh

--raw outputs only the command/code without formatting. -o writes directly to a file.

alnx cmd <MESSAGE> [--raw] [-o FILE]

Request a specific command for a task. Optimized for getting the command directly.

alnx cmd "list processes by memory"

alnx cmd --raw "restart nginx" > restart.sh

alnx explain <COMMAND>

Explain a command in detail: what it does, risk level, whether it needs sudo/admin, and safer alternatives.

alnx explain "chmod 777 /var/www"

alnx explain "rm -rf /tmp/*"

alnx explain "iptables -F"

alnx explain-log <FILE> [-l LINES]

Analyze a log file with AI. Secrets are automatically redacted before sending. Use - for stdin.

alnx explain-log /var/log/syslog

alnx explain-log /var/log/nginx/error.log --lines 100

tail -50 /var/log/syslog | alnx explain-log -

journalctl -u nginx --no-pager | alnx explain-log -

alnx powershell <MESSAGE>

Force PowerShell dialect response, regardless of detected shell.

alnx powershell "list stopped services"

alnx powershell "check disk space on all drives"

alnx review <FILE> <PROMPT> [-o OUTPUT]

Analyze a file with a specific prompt. Useful for security audits, code review, optimization.

alnx review nginx.conf "are there security issues?"

alnx review main.py "find bugs"

alnx review docker-compose.yml "optimize this" -o optimized.yml

alnx edit <FILE> [--editor EDITOR]

Open a file in your editor. After saving, ALNX processes any ALNX markers and inserts AI responses inline.

alnx edit script.sh

alnx edit main.py --editor vim

alnx watch <PATH> [-r]

Monitor a directory for ALNX markers. When a file is saved with a marker, the AI processes it automatically.

alnx watch .

alnx watch ~/project -r

alnx doctor | status | login | init | completions | config | provider

Utility commands for environment diagnostics, authentication, shell integration, and configuration management.

alnx doctor

alnx login --token YOUR_TOKEN

alnx init bash --apply

alnx completions zsh >> ~/.zshrc

alnx config set provider openai

alnx provider test

File Watcher & Inline AI

ALNX can respond inline inside any file you're editing — in any editor (vi, nano, emacs, VS Code).

Markers by language

LanguagesMarkerExample
bash, python, yaml, ruby, perl# ALNX:# ALNX: generate a for loop
rust, go, js, ts, c, c++, java// ALNX:// ALNX: parse JSON from file
sql, lua, haskell-- ALNX:-- ALNX: add index for this query

Variations accepted: #ALNX:, # alnx:, #alnx: — spacing and case are flexible.

Files without extension are also monitored. After processing, markers become #> ALNX: to prevent re-triggering.

Providers Configuration

OpenAI (recommended)

alnx config set provider custom

alnx config set custom.endpoint https://api.openai.com/v1

alnx config set custom.model gpt-4o-mini

alnx config set custom.api_key sk-your-key

Ollama (local, no internet)

alnx config set provider ollama

alnx config set ollama.endpoint http://127.0.0.1:11434

alnx config set ollama.model llama3.2

Any OpenAI-compatible endpoint

Works with vLLM, LM Studio, LocalAI, GLM (ZhipuAI), etc.

alnx config set provider custom

alnx config set custom.endpoint http://your-server:8000/v1

alnx config set custom.model your-model-name

alnx config set custom.api_key your-key

Security & Risk Classification

ALNX is secure by default. It never executes commands automatically.

LevelDescriptionExamples
lowRead-only, no side effectsls, pwd, df -h, Get-Service
mediumModifies services/packagessystemctl restart, apt install
highModifies permissions/configchmod 777, chown -R, ufw
criticalPotentially destructiverm -rf /, dd, mkfs, Format-Volume

Secret redaction

Before sending context to the AI provider, ALNX automatically redacts: API keys, tokens, passwords, SSH keys, connection strings, certificates.

Environment Variables

VariableDefaultDescription
ALNX_API_ENDPOINThttp://127.0.0.1:8080API URL
ALNX_TIMEOUT30CLI timeout in seconds
ALNX_PROVIDER_TIMEOUT30Provider timeout in seconds
ALNX_REQUIRE_AUTHfalseRequire Bearer token for API
EDITORnano/vim/viEditor for alnx edit

Configuration Files

PathPurpose
~/.config/alnx/config.tomlMain config (Linux/macOS)
~/.config/alnx/credentials.tomlAuth tokens (perms 600)
%APPDATA%\alnx\config.tomlMain config (Windows)
.alnx.cacheEdit cache (per directory)

ALNX v0.2.0 — Arzen Group SpA - Chile