{"id":19322644,"url":"https://github.com/picatz/openai","last_synced_at":"2025-04-22T19:31:38.765Z","repository":{"id":65211486,"uuid":"587565917","full_name":"picatz/openai","owner":"picatz","description":"🤖 CLI for OpenAI","archived":false,"fork":false,"pushed_at":"2025-04-11T23:40:46.000Z","size":1506,"stargazers_count":36,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-12T00:29:31.801Z","etag":null,"topics":["cli","go","openapi"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/picatz/openai","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/picatz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-01-11T03:33:09.000Z","updated_at":"2025-04-11T23:40:49.000Z","dependencies_parsed_at":"2023-11-21T00:44:00.628Z","dependency_job_id":"2249326e-4b57-44b9-b0c9-8050c893905f","html_url":"https://github.com/picatz/openai","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picatz%2Fopenai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picatz%2Fopenai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picatz%2Fopenai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picatz%2Fopenai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/picatz","download_url":"https://codeload.github.com/picatz/openai/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250308415,"owners_count":21409264,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","go","openapi"],"created_at":"2024-11-10T01:41:55.642Z","updated_at":"2025-04-22T19:31:38.751Z","avatar_url":"https://github.com/picatz.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenAI [![Go Reference](https://pkg.go.dev/badge/github.com/picatz/openai.svg)](https://pkg.go.dev/github.com/picatz/openai) [![Go Report Card](https://goreportcard.com/badge/github.com/picatz/openai)](https://goreportcard.com/report/github.com/picatz/openai) [![License: MPL 2.0](https://img.shields.io/badge/License-MPL_2.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0) \n \nAn unofficial community-maintained CLI application for [OpenAI](https://openai.com/).\n\n## Installation\n\n```console\n$ go install github.com/picatz/openai/cmd/openai@latest\n```\n\n\u003e [!IMPORTANT] \n\u003e To use the CLI you must have a valid `OPENAI_API_KEY` environment variable set. You can get one [here](https://platform.openai.com/).\n\n\u003e [!TIP]\n\u003e You can customize which model is used by setting the `OPENAI_MODEL` environment variable. The default is `gpt-4o` today, but it may change in the future.\n\n### Usage\n\n```console\n$ openai --help\nOpenAI CLI\n\nUsage:\n  openai [flags]\n  openai [command]\n\nAvailable Commands:\n  assistant   Start an interactive assistant chat session\n  chat        Chat with the OpenAI API\n  completion  Generate the autocompletion script for the specified shell\n  help        Help about any command\n  image       Generate an image with DALL·E\n  responses   Manage the OpenAI Responses API\n\nFlags:\n  -h, --help   help for openai\n\nUse \"openai [command] --help\" for more information about a command.\n```\n\n```console\n$ openai assistant --help\nInteract with the OpenAI API using the assistant API.\n\nThis can be used to create a temporary assistant, or interact with an existing assistant.\n\nUsage:\n  openai assistant [flags]\n  openai assistant [command]\n\nExamples:\n  $ openai assistant      # create a temporary assistant and start chatting\n  $ openai assistant chat # same as above\n  $ openai assistant create --name \"Example\" --model \"gpt-4-turbo-preview\" --description \"...\" --instructions \"...\" --code-interpreter --retrieval\n  $ openai assistant list\n  $ openai assistant info \u003cassistant-id\u003e\n  $ openai assistant chat \u003cassistant-id\u003e\n  $ openai assistant delete \u003cassistant-id\u003e\n\nAvailable Commands:\n  chat        Start an interactive assistant chat session\n  create      Create an assistant\n  delete      Delete an assistant\n  file        Manage assistant files\n  info        Get information about an assistant\n  list        List assistants\n  update      Update an assistant\n\nFlags:\n  -h, --help   help for assistant\n\nUse \"openai assistant [command] --help\" for more information about a command.\n```\n\n\u003e [!TIP]\n\u003e\n\u003e If provided no arguments, the CLI will default to the `assistant` command with an ephemeral session,\n\u003e meaning messages and files will be deleted after exiting the session.\n\n#### With Ollama\n\nYou can use the CLI with [Ollama](https://ollama.com/) to use models that are run locally, such as [IBM Granite](https://ollama.com/library/granite3.1-dense).\n\n```console\n$ brew install ollama\n...\n$ ollama serve \u0026\n...\n$ ollama run granite3.1-dense:2b\n...\n$ OPENAI_MODEL=\"granite3.1-dense:2b\" OPENAI_EMBEDDING_MODEL=\"granite3.1-dense:2b\" OPENAI_API_URL=\"http://localhost:11434/v1/\" openai chat\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpicatz%2Fopenai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpicatz%2Fopenai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpicatz%2Fopenai/lists"}