An AI assistant tool for your terminal, designed to help you with tasks like documentation, performance optimization, refactoring, and more, using custom commands.
GPL-3.0 License
env-ai is an intelligent assistant tool for your terminal, designed to help you with tasks like documentation, performance optimization, refactoring, and more, using custom commands.
[!IMPORTANT] env-ai needs the Ollama technology to work. Make sure you have it installed before using this CLI.
.mjs
, .js
, .json
, .yml
, .yaml
, .toml
, and .tml
.Install the CLI or add it as a dependency to your project:
## npm
npm install env-ai
## pnpm
pnpm add env-ai
## yarn
yarn add env-ai
## npm
npm install -g env-ai
## pnpm
pnpm add -g env-ai
## yarn
yarn global add env-ai
The env-ai CLI allows you to easily interact with the AI assistant. Here are some useful commands and options:
# Start a chat with the AI assistant
env-ai ask
-i, --include
- Files or URLs to include using glob patterns. (array)
-e, --exclude
- Files or URLs to exclude using glob patterns. (array)
-m, --model
- Name of the Ollama model to use. (string)
-p, --prompt
- Custom text or path for the prompt. (string)
-s, --system
- Custom system text or path. (string)
-t, --theme
- Topic of conversation (custom
, explain
, docs
, fix
, performance
, refactor
, tests
). (string)
-o, --output
- Output path for the generated response. (string)
--overwrite
- Behavior control if the output file exists (always
, ask
, last
). (boolean)
--single
- Get only one response. (boolean)
-c, --config
- Configuration file path. (string)
--debug
- Debug mode. (boolean)
-h, --help
- Show help. (boolean)
-v, --version
- Show version number. (boolean)
env-ai can also be integrated as a library into your JavaScript
or TypeScript
project.
import { run } from 'env-ai';
run({
include: ['./src/**', 'https://example.com'],
theme: 'docs',
output: 'README.md',
});
Use defineConfig
to define a reusable configuration:
import { defineConfig } from 'env-ai';
export default defineConfig({
include: ['./src/**', 'https://example.com'],
theme: 'docs',
output: 'README.md',
});
You can see more examples here.
env-ai ask -i "./src/**" -t "docs" -o "output.md"
import { run } from 'env-ai';
run({
include: ['./src/**', 'https://example.com'],
theme: 'docs',
output: 'README.md',
});
js
config fileenv-ai ask --config dovenv.config.js
import { defineConfig } from 'env-ai';
export default defineConfig({
include: ['./src/**', 'https://example.com'],
theme: 'docs',
output: 'README.md',
});
json
config fileenv-ai ask --config dovenv.config.json
{
"theme": "custom",
"system": "./your-system-content.txt"
}
toml
config fileenv-ai ask --config documentation-context.toml
theme = "docs"
include = ["./docs", "./src"]
system = """
You are a helpful assistant explaining how to use the provided code library and provide detailed documentation.
The content for the following code library:
{{content}}
"""
yaml
config fileenv-ai ask --config dovenv.config.yaml
theme: custom
system: ./your-system-content.md
env-ai is an open-source project and its development is open to anyone who wants to participate.
Help us to develop more interesting things.
This software is licensed with GPL-3.0.
PigeonPosse is a โจ code development collective โจ focused on creating practical and interesting tools that help developers and users enjoy a more agile and comfortable experience. Our projects cover various programming sectors and we do not have a thematic limitation in terms of projects.
Name | Role | GitHub | |
---|---|---|---|
Angelo | Idea & Development & UI Design | @angelespejo | |
PigeonPosse | Collective | @PigeonPosse |