aiai is a Nushell collection providing CLI functions to interact with AI models.
- Interactive AI chat assistant
- Automated commit message generation (Conventional Commits)
- Git diff summarization
- Generate a resumeow template tailored to a job offer
- Configuration and prompt management
-
Clone the repository (or copy the module files) into one of your
$env.NU_LIB_DIRS:git clone <your-repo-url> ~/nu_libs/aiai
-
Use the module (e.g., in
~/.config/nushell/config.nu):use aiai
-
Ensure dependencies are installed:
Interactive AI chat assistant.
aiai chat [--prompt(-p) <prompt>]--prompt(-p): Name of a saved system prompt to use. Supports autocompletion
Features:
- Chat with an AI model.
- Inline commands:
:q,:quit,:h,:help,:n,:new,:e,:edit,:c,:ctx,:p,:prompt. - Switch system prompt, reset context, edit context or prompt, and more.
Edit or create system prompts.
aiai chat prompts- Opens the prompt directory in your editor (location is configurable via
cfg).
Tailored resume generation
aiai action generate-resumeow-spec \
--profile-file(-P) <profile.json> \
--offer-file(-O) <offer.txt> \
[--color(-c) <hex>] \
[--lang(-l) <lang>] \
[--output(-o) <file>] \
[--yes(-y)]- Generates a resumeow JSON spec for a CV based on a profile and job offer, tailored to the offer.
- Filters and translates competences as needed.
- Output can be piped into resumeow for PDF/LaTeX generation.
AI-powered Conventional Commit message generator.
aiai action commit [--path(-p) <glob>]- Analyzes recent git log and diff (optionally restricted by path).
- Proposes a Conventional Commit message (no scope, with explanation).
- Asks for approval before committing.
Summarize git diffs using AI.
aiai action summarize-diff [--diff(-d) <diff>]- Summarizes the current or provided git diff using the configured model.
Get current AI configuration.
aiai cfg- Returns the current configuration (model, prompt_dir, options, etc).
Set a configuration parameter.
aiai cfg set-param <param> <value>- Example:
cfg set-param model llama3.2:latest - Supports autocompletion for parameter names and values.
Edit the AI configuration in your editor.
aiai cfg edit- Opens the configuration in your
$EDITORor fallback editor.
Autonomous coding agent with tool execution.
aiai do- Interacts with an AI agent that can request file/directory creation or ask questions.
- Executes tool requests as specified by the AI (with user confirmation).
- Experimental feature.
- Configuration is stored in the
$env.AI_CFGenvironment variable. - Default config includes:
model: e.g.llama3.2:latestoptions: temperature, num_predict, top_p, num_ctx, repeat_penaltyprompt_dir: Directory for prompt files (default:$env.HOME)
- Use
cfg,cfg set-param, andcfg editto view and modify configuration.
- Prompts are stored in the directory specified by
prompt_dir(default:~/prompts). - Use
chat promptsto manage them.
-
Chat with the AI:
aiai chat
-
Generate a commit message:
aiai action commit
-
Filter and translate a resume:
aiai action generate-resumeow-spec -P profile.json -O offer.txt -l italian