Skip to main content

AI assistant CLI tool for multiple providers

Project description

aineed icon

aineed

A minimal CLI tool for interacting with multiple AI providers (OpenAI, Anthropic, TogetherAI, OpenRouter) with a unified interface.

Features

  • 🤖 Multiple AI Provider Support
    • OpenAI (text and image generation with DALL-E 3)
    • Anthropic (Claude models)
    • TogetherAI (Llama and FLUX models)
    • OpenRouter (various models)
  • 🔄 Streaming Support for Text Generation
  • 📁 File Input/Output with Prompt Prefixing
  • 🎨 Image Generation with Automatic Timestamped Filenames
  • 🔒 Local API Key Management

Installation

From Source

git clone https://github.com/Nbiish/aineed
cd aineed
cargo build --release

The binary will be available at target/release/aineed

Configuration

Set your API keys:

# OpenAI
aineed --set-openai "your-api-key"

# Anthropic
aineed --set-anthropic "your-api-key"

# TogetherAI
aineed --set-togetherai "your-api-key"

# OpenRouter
aineed --set-openrouter "your-api-key"

Usage

Basic Text Generation

# Default model (togetherai:meta-llama/Llama-3.3-70b-instruct-turbo)
aineed -p "Who are the Anishinaabe?"

# Using OpenAI
aineed openai:gpt-3.5-turbo -p "who are the Anishinaabe?"

# Using OpenRouter
aineed openrouter:google/gemini-exp-1206:free -p "who are the Anishinaabe?" -o Anishinaabe.txt

Image Generation

# Using OpenAI DALL-E 3 (saves as dall-e-3_TIMESTAMP.png)
aineed openai:dall-e-3 -i -p "Cyberpunk Nanaboozhoo"

# Using TogetherAI FLUX (with custom output name)
aineed togetherai:black-forest-labs/FLUX.1-schnell -i -p "Cyberpunk Nanaboozhoo" -o cyberpunk-nanaboozhoo.png

File Processing with Prompts

When using a file input with -f, you can provide a prompt with -p that will be prepended to the file content:

# Process a file with a specific instruction
aineed openai:gpt-4o -f story.txt -p "Take significant text and make it hashtags" -o story_optimized.txt

The API request will be formatted like so when using -p and -f:

USER PROMPT:
<your prompt>

FILE CONTENT:
<file content>

Streaming and Token Control

# Stream the response
aineed openai:gpt-4o-turbo -s -p "Tell me a story about Nanaboozhoo and the rabbits"

# Control max tokens and temperature
aineed openrouter:google/gemini-2.0-flash-exp --temp 0.9 -t 999 -p "Tell me a Nanaboozhoo fantasy adventure"

Setting Default Model

# Set a new default model
aineed -d "togetherai:meta-llama/Llama-3.3-70b-instruct-turbo"

Error Handling

The tool provides detailed error messages from providers to help troubleshoot:

  • API key issues
  • Rate limiting
  • Connection problems
  • Model access restrictions
  • File I/O errors

License

MIT License - see LICENSE for details

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aineed-0.1.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aineed-0.1.1-cp311-cp311-macosx_11_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

Details for the file aineed-0.1.1.tar.gz.

File metadata

  • Download URL: aineed-0.1.1.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.11

File hashes

Hashes for aineed-0.1.1.tar.gz
Algorithm Hash digest
SHA256 4f106b2a66cc801ddcbf3d97cab1e379c05dbf225f66ecea0bbe4606ddaabcac
MD5 4ddf8c3e203f627d7eb08404927ec306
BLAKE2b-256 5011833233c6d71b06389dbd97759feb736518dae8f9deac370487b32dcea4b3

See more details on using hashes here.

File details

Details for the file aineed-0.1.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for aineed-0.1.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ac5efad373bfb3a6634b51a69a9a8c5d7bce8bc878fa08efa49e92d3a85df8ea
MD5 6e2cd254018286e97130496e25d5ca2e
BLAKE2b-256 3a8ec525f9e67bb73977b3b044f208c5aee8fa427c4385338c5aef208d043eda

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page