aineed


Nameaineed JSON
Version 0.1.12 PyPI version JSON
download
home_pageNone
SummaryAI assistant CLI tool for multiple providers
upload_time2024-12-27 18:22:32
maintainerNone
docs_urlNone
authorNbiish <nbiish@umich.edu>
requires_python>=3.8
licenseMIT
keywords ai cli openai anthropic togetherai openrouter google text generation image generation llm
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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


### Prerequisites
- Python 3.7 or higher
- Rust toolchain (install from https://rustup.rs/)

### Using pip
```bash
# Install Rust first if you haven't already
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

```bash
pip install aineed
```

### Install without needing rust COMING SOON~


## Support

As a full-time student, your support would be greatly appreciated!

- **CashApp**: [\$Nbiish](https://cash.app/$Nbiish)
- **Venmo**: [@Nbiish](https://venmo.com/@Nbiish)
- **Linktree**: [https://linktr.ee/nbiish](https://linktr.ee/nbiish)


## Upcoming Features

We are excited to announce that future releases of **aineed** will include:

- **Google Models and Enhanced Capabilities**: Integrate with Google's extensive AI models to provide even more powerful and diverse functionalities.

- **Voice and Audio Input/Output**: Enable voice commands and audio responses for a more interactive and seamless user experience.

Stay tuned for these and more exciting updates!



## Configuration

Set your API keys:

```bash
# 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

```bash
# 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

```bash
# 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:

```bash
# 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

```bash
# 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

```bash
# Set a new default model
aineed -d "openrouter:google/gemini-2.0-flash-exp"
```

### Additional Examples of Use

```bash
aineed openai:gpt-4o -t 444 -p "Short story about Nanaboozhoo" -o nanaboozhoo.txt
cat nanaboozhoo.txt | aineed openrouter:google/gemini-2.0-flash-exp -p "Rephrase the story to be extra silly" -o nanaboozhoo-silly.txt
aineed anthropic:claude-3.5-sonnet-latest -s -f nanaboozhoo-silly.txt -p "End every sentence with hashtags" -o nanaboozhoo-silly-hashtags.txt
```

#### Translating Text

Translate a sentence from English to Spanish using Anthropic's Claude model:

```bash
aineed anthropic:claude-3.5-sonnet-latest -p "Translate the following sentence to Spanish: 'Artificial intelligence is transforming the world.'"
```

#### Creating Detailed Images

Generate a high-resolution image of a futuristic cityscape with TogetherAI's FLUX model:

```bash
aineed togetherai:black-forest-labs/FLUX.1-schnell -i -p "Create a high-resolution image of Cyberpunk Nanaboozhoo" -o cyberpunk_nanaboozhoo.png
```

#### Automating File Processing

```bash
for file in reports/*.txt; do
    aineed openrouter:google/gemini-2.0-flash-exp -f "$file" -p "Summarize the key points of the following report." -o "summaries/$(basename "$file")"
done
```

#### Streaming Long-Form Content

Stream the generation of a comprehensive guide on machine learning with controlled token usage:

```bash
aineed openai:gpt-4o-mini -s -t 1500 -p "Write a comprehensive guide on machine learning, including definitions, algorithms, and applications."
```

#### Setting and Using Default Models

Set a default model and generate content without specifying the provider each time:

```bash
# Set the default model to OpenAI's GPT-4
aineed -d "openai:gpt-4o-mini"

# Now generate content using the default model
aineed -p "Describe the impact of climate change on global ecosystems and how indigenous people protect the majority of remaining healthy ecosystems." -o climate_change_impact.txt
```

#### Integrating with Other Tools

Use `aineed` in a shell script to automate the generation and processing of content:

```bash
#!/bin/bash

# Generate an article
aineed openai:gpt-4 -p "Write an article about the benefits of renewable energy." -o article.txt

# Summarize the article
aineed openai:gpt-4o -f article.txt -p "Summarize the main points of this article." -o summary.txt

# Log the actions
echo "Article and summary generated on $(date)" >> generation.log
```

## 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](LICENSE) for details

# #LANDBACK


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "aineed",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "ai, cli, openai, anthropic, togetherai, openrouter, google, text generation, image generation, llm",
    "author": "Nbiish <nbiish@umich.edu>",
    "author_email": "Nbiish <nbiish@umich.edu>",
    "download_url": null,
    "platform": null,
    "description": "# aineed\n\nA minimal CLI tool for interacting with multiple AI providers (OpenAI, Anthropic, TogetherAI, OpenRouter) with a unified interface.\n\n## Features\n\n- \ud83e\udd16 Multiple AI Provider Support\n  - OpenAI (text and image generation with DALL-E 3)\n  - Anthropic (Claude models)\n  - TogetherAI (Llama and FLUX models)\n  - OpenRouter (various models)\n- \ud83d\udd04 Streaming Support for Text Generation\n- \ud83d\udcc1 File Input/Output with Prompt Prefixing\n- \ud83c\udfa8 Image Generation with Automatic Timestamped Filenames\n- \ud83d\udd12 Local API Key Management\n\n\n### Prerequisites\n- Python 3.7 or higher\n- Rust toolchain (install from https://rustup.rs/)\n\n### Using pip\n```bash\n# Install Rust first if you haven't already\ncurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n```\n\n```bash\npip install aineed\n```\n\n### Install without needing rust COMING SOON~\n\n\n## Support\n\nAs a full-time student, your support would be greatly appreciated!\n\n- **CashApp**: [\\$Nbiish](https://cash.app/$Nbiish)\n- **Venmo**: [@Nbiish](https://venmo.com/@Nbiish)\n- **Linktree**: [https://linktr.ee/nbiish](https://linktr.ee/nbiish)\n\n\n## Upcoming Features\n\nWe are excited to announce that future releases of **aineed** will include:\n\n- **Google Models and Enhanced Capabilities**: Integrate with Google's extensive AI models to provide even more powerful and diverse functionalities.\n\n- **Voice and Audio Input/Output**: Enable voice commands and audio responses for a more interactive and seamless user experience.\n\nStay tuned for these and more exciting updates!\n\n\n\n## Configuration\n\nSet your API keys:\n\n```bash\n# OpenAI\naineed --set-openai \"your-api-key\"\n\n# Anthropic\naineed --set-anthropic \"your-api-key\"\n\n# TogetherAI\naineed --set-togetherai \"your-api-key\"\n\n# OpenRouter\naineed --set-openrouter \"your-api-key\"\n```\n\n## Usage\n\n### Basic Text Generation\n\n```bash\n# Default model (togetherai:meta-llama/Llama-3.3-70b-instruct-turbo)\naineed -p \"Who are the Anishinaabe?\"\n\n# Using OpenAI\naineed openai:gpt-3.5-turbo -p \"who are the Anishinaabe?\"\n\n# Using OpenRouter\naineed openrouter:google/gemini-exp-1206:free -p \"who are the Anishinaabe?\" -o Anishinaabe.txt\n```\n\n### Image Generation\n\n```bash\n# Using OpenAI DALL-E 3 (saves as dall-e-3_TIMESTAMP.png)\naineed openai:dall-e-3 -i -p \"Cyberpunk Nanaboozhoo\"\n\n# Using TogetherAI FLUX (with custom output name)\naineed togetherai:black-forest-labs/FLUX.1-schnell -i -p \"Cyberpunk Nanaboozhoo\" -o cyberpunk-nanaboozhoo.png\n```\n\n### File Processing with Prompts\n\nWhen using a file input with `-f`, you can provide a prompt with `-p` that will be prepended to the file content:\n\n```bash\n# Process a file with a specific instruction\naineed openai:gpt-4o -f story.txt -p \"Take significant text and make it hashtags\" -o story_optimized.txt\n```\n\nThe API request will be formatted like so when using `-p` and `-f`:\n```\nUSER PROMPT:\n<your prompt>\n\nFILE CONTENT:\n<file content>\n```\n\n### Streaming and Token Control\n\n```bash\n# Stream the response\naineed openai:gpt-4o-turbo -s -p \"Tell me a story about Nanaboozhoo and the rabbits\"\n\n# Control max tokens and temperature\naineed openrouter:google/gemini-2.0-flash-exp --temp 0.9 -t 999 -p \"Tell me a Nanaboozhoo fantasy adventure\"\n```\n\n### Setting Default Model\n\n```bash\n# Set a new default model\naineed -d \"openrouter:google/gemini-2.0-flash-exp\"\n```\n\n### Additional Examples of Use\n\n```bash\naineed openai:gpt-4o -t 444 -p \"Short story about Nanaboozhoo\" -o nanaboozhoo.txt\ncat nanaboozhoo.txt | aineed openrouter:google/gemini-2.0-flash-exp -p \"Rephrase the story to be extra silly\" -o nanaboozhoo-silly.txt\naineed anthropic:claude-3.5-sonnet-latest -s -f nanaboozhoo-silly.txt -p \"End every sentence with hashtags\" -o nanaboozhoo-silly-hashtags.txt\n```\n\n#### Translating Text\n\nTranslate a sentence from English to Spanish using Anthropic's Claude model:\n\n```bash\naineed anthropic:claude-3.5-sonnet-latest -p \"Translate the following sentence to Spanish: 'Artificial intelligence is transforming the world.'\"\n```\n\n#### Creating Detailed Images\n\nGenerate a high-resolution image of a futuristic cityscape with TogetherAI's FLUX model:\n\n```bash\naineed togetherai:black-forest-labs/FLUX.1-schnell -i -p \"Create a high-resolution image of Cyberpunk Nanaboozhoo\" -o cyberpunk_nanaboozhoo.png\n```\n\n#### Automating File Processing\n\n```bash\nfor file in reports/*.txt; do\n    aineed openrouter:google/gemini-2.0-flash-exp -f \"$file\" -p \"Summarize the key points of the following report.\" -o \"summaries/$(basename \"$file\")\"\ndone\n```\n\n#### Streaming Long-Form Content\n\nStream the generation of a comprehensive guide on machine learning with controlled token usage:\n\n```bash\naineed openai:gpt-4o-mini -s -t 1500 -p \"Write a comprehensive guide on machine learning, including definitions, algorithms, and applications.\"\n```\n\n#### Setting and Using Default Models\n\nSet a default model and generate content without specifying the provider each time:\n\n```bash\n# Set the default model to OpenAI's GPT-4\naineed -d \"openai:gpt-4o-mini\"\n\n# Now generate content using the default model\naineed -p \"Describe the impact of climate change on global ecosystems and how indigenous people protect the majority of remaining healthy ecosystems.\" -o climate_change_impact.txt\n```\n\n#### Integrating with Other Tools\n\nUse `aineed` in a shell script to automate the generation and processing of content:\n\n```bash\n#!/bin/bash\n\n# Generate an article\naineed openai:gpt-4 -p \"Write an article about the benefits of renewable energy.\" -o article.txt\n\n# Summarize the article\naineed openai:gpt-4o -f article.txt -p \"Summarize the main points of this article.\" -o summary.txt\n\n# Log the actions\necho \"Article and summary generated on $(date)\" >> generation.log\n```\n\n## Error Handling\n\nThe tool provides detailed error messages from providers to help troubleshoot:\n- API key issues\n- Rate limiting\n- Connection problems\n- Model access restrictions\n- File I/O errors\n\n## License\n\nMIT License - see [LICENSE](LICENSE) for details\n\n# #LANDBACK\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "AI assistant CLI tool for multiple providers",
    "version": "0.1.12",
    "project_urls": {
        "Source Code": "https://github.com/nbiish/aineed"
    },
    "split_keywords": [
        "ai",
        " cli",
        " openai",
        " anthropic",
        " togetherai",
        " openrouter",
        " google",
        " text generation",
        " image generation",
        " llm"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5d02e805913ebecb915c87133d7592b5a7a519c57eddfb8737b0f4ac88f3db41",
                "md5": "ee6b331b52f4a1bd82881d93439ebf93",
                "sha256": "a883a8b2276bf00bef0155ea7a948b6626e557f439d03cb0852832745ffe7363"
            },
            "downloads": -1,
            "filename": "aineed-0.1.12-cp311-cp311-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "ee6b331b52f4a1bd82881d93439ebf93",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 1595348,
            "upload_time": "2024-12-27T18:22:32",
            "upload_time_iso_8601": "2024-12-27T18:22:32.121875Z",
            "url": "https://files.pythonhosted.org/packages/5d/02/e805913ebecb915c87133d7592b5a7a519c57eddfb8737b0f4ac88f3db41/aineed-0.1.12-cp311-cp311-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-27 18:22:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "nbiish",
    "github_project": "aineed",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "aineed"
}
        
Elapsed time: 7.10351s