gemini-cli


Namegemini-cli JSON
Version 0.2.5 PyPI version JSON
download
home_page
Summarygoogle gemini api for terminal (CLI)
upload_time2024-02-08 06:10:37
maintainer
docs_urlNone
authorhitsmaxft
requires_python>=3.9,<4.0
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Gemini CLI

[![PyPI](https://img.shields.io/pypi/v/gemini-cli)](https://pypi.org/project/gemini-cli)

Gemini is a Google Generative AI API for the terminal. It allows streaming responses from Google Generative AI models, designed to harness the capabilities of Google's Generative AI for creating rich, contextually relevant content. It's tailored for users seeking a straightforward, efficient means of leveraging AI for content generation, offering a seamless integration with Google's Generative AI API. With Gemini CLI, you can prompt the AI to craft stories, generate ideas, or even compose detailed texts, all from the comfort of your terminal.

## Getting Started

### Installation

To install Gemini, run:

```bash
pip install gemini-cli
```

### Usage

To use Gemini, simply run the `gemini-cli` command followed by the prompt you want to send to the model. For example:

```bash
gemini-cli "Write a story about a robot who falls in love with a human."
```

This will send the prompt "Write a story about a robot who falls in love with a human." to the model, and the model's response will be printed to the terminal.

You can also provide a token for authentication using the `--token` flag. This is required if you want to use a model that is not available for public use. To get a token, [follow the instructions on the Google Generative AI website](https://generativelanguage.googleapis.com/start).


    Prompt Input (param or stdin):
        Use Case: You're a writer looking for creative inspiration to start a new story. You can use the --prompt option to feed the AI a starting point, like --prompt "In a world where dragons are pets,", and let the AI generate an intriguing storyline continuation.

    API Token (--token):
        Use Case: As a developer working in different environments (development, staging, production), you might need to use different API tokens. The --token option allows you to specify the token directly in the command line for quick switches without changing the configuration file, like --token "your_api_token_here".

    Configuration File (-f/--config-file):
        Use Case: You're managing multiple projects with different configuration needs. The -f/--config-file option allows you to specify a custom path to a configuration file, enabling you to maintain separate configurations for each project. For instance, you can use --config-file "path/to/project_a_config.toml" for one project and switch to another with --config-file "path/to/project_b_config.toml".

    generation_config in TOML File:

        top_p, top_k, candidate_count, max_output_tokens, stop_sequences:
            Use Case: You're fine-tuning the AI's content generation for a chatbot application. You need the responses to be concise and contextually appropriate without veering off-topic. By adjusting top_p, top_k, candidate_count, max_output_tokens, and stop_sequences in the gemini.toml file, you can control the randomness, length, and termination of the AI-generated responses to fit the chatbot's conversational flow.


### Examples

Here are a few examples of how you can use Gemini:

* Write a story about a robot who falls in love with a human.
* Generate a poem about the beauty of nature.
* Translate a sentence from English to Spanish.
* Summarize a news article.
* Write a song about a lost love.

### How to Uage

## Features

* **Stream responses:** Gemini streams responses from the model, so you can see the model's output as it is being generated.
* **Authentication:** Gemini supports authentication with a token, so you can use models that are not available for public use.
* **Command-line interface:** Gemini provides a simple command-line interface that is easy to use.

## Contributing

Gemini is open source and contributions are welcome. To contribute, please read the [contributing guidelines](CONTRIBUTING.md).

## License

Gemini is licensed under the MIT License.%


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "gemini-cli",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "hitsmaxft",
    "author_email": "mfthits@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/09/9e/da607b592f8d3d56caeb3e74b76e6a2e6b14096ca1e9dedecddf3628bae8/gemini_cli-0.2.5.tar.gz",
    "platform": null,
    "description": "# Gemini CLI\n\n[![PyPI](https://img.shields.io/pypi/v/gemini-cli)](https://pypi.org/project/gemini-cli)\n\nGemini is a Google Generative AI API for the terminal. It allows streaming responses from Google Generative AI models, designed to harness the capabilities of Google's Generative AI for creating rich, contextually relevant content. It's tailored for users seeking a straightforward, efficient means of leveraging AI for content generation, offering a seamless integration with Google's Generative AI API. With Gemini CLI, you can prompt the AI to craft stories, generate ideas, or even compose detailed texts, all from the comfort of your terminal.\n\n## Getting Started\n\n### Installation\n\nTo install Gemini, run:\n\n```bash\npip install gemini-cli\n```\n\n### Usage\n\nTo use Gemini, simply run the `gemini-cli` command followed by the prompt you want to send to the model. For example:\n\n```bash\ngemini-cli \"Write a story about a robot who falls in love with a human.\"\n```\n\nThis will send the prompt \"Write a story about a robot who falls in love with a human.\" to the model, and the model's response will be printed to the terminal.\n\nYou can also provide a token for authentication using the `--token` flag. This is required if you want to use a model that is not available for public use. To get a token, [follow the instructions on the Google Generative AI website](https://generativelanguage.googleapis.com/start).\n\n\n    Prompt Input (param or stdin):\n        Use Case: You're a writer looking for creative inspiration to start a new story. You can use the --prompt option to feed the AI a starting point, like --prompt \"In a world where dragons are pets,\", and let the AI generate an intriguing storyline continuation.\n\n    API Token (--token):\n        Use Case: As a developer working in different environments (development, staging, production), you might need to use different API tokens. The --token option allows you to specify the token directly in the command line for quick switches without changing the configuration file, like --token \"your_api_token_here\".\n\n    Configuration File (-f/--config-file):\n        Use Case: You're managing multiple projects with different configuration needs. The -f/--config-file option allows you to specify a custom path to a configuration file, enabling you to maintain separate configurations for each project. For instance, you can use --config-file \"path/to/project_a_config.toml\" for one project and switch to another with --config-file \"path/to/project_b_config.toml\".\n\n    generation_config in TOML File:\n\n        top_p, top_k, candidate_count, max_output_tokens, stop_sequences:\n            Use Case: You're fine-tuning the AI's content generation for a chatbot application. You need the responses to be concise and contextually appropriate without veering off-topic. By adjusting top_p, top_k, candidate_count, max_output_tokens, and stop_sequences in the gemini.toml file, you can control the randomness, length, and termination of the AI-generated responses to fit the chatbot's conversational flow.\n\n\n### Examples\n\nHere are a few examples of how you can use Gemini:\n\n* Write a story about a robot who falls in love with a human.\n* Generate a poem about the beauty of nature.\n* Translate a sentence from English to Spanish.\n* Summarize a news article.\n* Write a song about a lost love.\n\n### How to Uage\n\n## Features\n\n* **Stream responses:** Gemini streams responses from the model, so you can see the model's output as it is being generated.\n* **Authentication:** Gemini supports authentication with a token, so you can use models that are not available for public use.\n* **Command-line interface:** Gemini provides a simple command-line interface that is easy to use.\n\n## Contributing\n\nGemini is open source and contributions are welcome. To contribute, please read the [contributing guidelines](CONTRIBUTING.md).\n\n## License\n\nGemini is licensed under the MIT License.%\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "google gemini api for terminal (CLI)",
    "version": "0.2.5",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8f65953aa5b1a935944360e5738cc103874aabb21fa52b1fdd34478cbe0af763",
                "md5": "b617c67ac9eac008f4fbf35a40dde6f1",
                "sha256": "5fb84af47b09266b1c794425386cbcc35d11f8d3c3af1ee2794b9e30174673e0"
            },
            "downloads": -1,
            "filename": "gemini_cli-0.2.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b617c67ac9eac008f4fbf35a40dde6f1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<4.0",
            "size": 6461,
            "upload_time": "2024-02-08T06:10:35",
            "upload_time_iso_8601": "2024-02-08T06:10:35.196106Z",
            "url": "https://files.pythonhosted.org/packages/8f/65/953aa5b1a935944360e5738cc103874aabb21fa52b1fdd34478cbe0af763/gemini_cli-0.2.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "099eda607b592f8d3d56caeb3e74b76e6a2e6b14096ca1e9dedecddf3628bae8",
                "md5": "819d10c8af87da3057b24d04b0da65e1",
                "sha256": "353085aad5286bcba5dc4855aa5c95e34cc22b7ea9562362dfc32f8c864dd02d"
            },
            "downloads": -1,
            "filename": "gemini_cli-0.2.5.tar.gz",
            "has_sig": false,
            "md5_digest": "819d10c8af87da3057b24d04b0da65e1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<4.0",
            "size": 5087,
            "upload_time": "2024-02-08T06:10:37",
            "upload_time_iso_8601": "2024-02-08T06:10:37.176206Z",
            "url": "https://files.pythonhosted.org/packages/09/9e/da607b592f8d3d56caeb3e74b76e6a2e6b14096ca1e9dedecddf3628bae8/gemini_cli-0.2.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-08 06:10:37",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "gemini-cli"
}
        
Elapsed time: 0.17557s