{"id":15194492,"url":"https://github.com/mleidel/gptcmd","last_synced_at":"2026-03-04T16:02:16.934Z","repository":{"id":211463237,"uuid":"729215662","full_name":"MLeidel/gptcmd","owner":"MLeidel","description":"A command line AI client for Windows/Linux/ARM written in Go using the Open-AI API","archived":false,"fork":false,"pushed_at":"2023-12-10T20:33:21.000Z","size":17489,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-01T11:17:20.135Z","etag":null,"topics":["ai","golang","gpt-4","linux-shell","openai","windows-11"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MLeidel.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}},"created_at":"2023-12-08T16:46:21.000Z","updated_at":"2024-12-15T04:48:58.000Z","dependencies_parsed_at":"2024-06-20T20:36:33.421Z","dependency_job_id":"7bb4b7b6-1a22-4da1-ba5f-abf410a696c5","html_url":"https://github.com/MLeidel/gptcmd","commit_stats":null,"previous_names":["mleidel/gptcmd"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MLeidel/gptcmd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MLeidel%2Fgptcmd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MLeidel%2Fgptcmd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MLeidel%2Fgptcmd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MLeidel%2Fgptcmd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MLeidel","download_url":"https://codeload.github.com/MLeidel/gptcmd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MLeidel%2Fgptcmd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30085818,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T15:40:14.053Z","status":"ssl_error","status_checked_at":"2026-03-04T15:40:13.655Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["ai","golang","gpt-4","linux-shell","openai","windows-11"],"created_at":"2024-09-27T23:00:49.725Z","updated_at":"2026-03-04T16:02:16.913Z","avatar_url":"https://github.com/MLeidel.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# gptcmd\n**A command line AI chat client for windows  \nand linux written in Go using the OpenAI API**\n\n Requires 2 Environment Variables:  \n\u003e   GPTKEY=\"your OpenAI key\" (required)  \n    GPTMOD=\"engine model\" (required)  \n    GPTWRAP=\"line wrap length\" (optional)  \n    GPTTMP=\"temperature\" (optional)  \n\nType your prompt on the command-line.\n```bash\n  $\u003e gptcmd Hello my prompt is everything I type after gptcmd ...\n\n```\n\nA log of requests is kept in file _HOME_/gptcmd.log  \nfor Windows _USERPROFILE_/gptcmd.log\n\nCompiled versions are offered here to use at your own risk.  \nThe source is here as well. Install Golang and compile yourself:  \n```bash\n  $\u003e GOOS=linux GOARCH=386 go build gptcmd.go   # linux\n  $\u003e GOOS=windows GOARCH=386 go build gptcmd.go   # windows\n  $\u003e GOOS=linux GOARCH=arm GOARM=5 go build gptcmd.go   # raspberry pi\n\n```\n\n\n---\n**gptcmd**, **GptCLI**, and **gptcom** are basically  \ngo, c, and python versions of the following bash script:\n\n```bash\n#!/bin/bash\n\nMODEL=\"gpt-4\"\n\nread -p \"Enter prompt: \" PROMPT\n\nRESPONSE=$(curl -s https://api.openai.com/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer ${GPTKEY}\" \\\n  -d '{\n    \"model\": \"'\"$MODEL\"'\",\n    \"messages\": [\n      {\n        \"role\": \"system\",\n        \"content\": \"You are a helpful assistant.\"\n      },\n      {\n        \"role\": \"user\",\n        \"content\": \"'\"$PROMPT\"'\"\n      }\n    ]\n  }')\n\n  date\n  echo \"You said: ${PROMPT}\"\n  echo \"-------\"\n  echo $RESPONSE | jq -r '.choices[0].message.content'\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmleidel%2Fgptcmd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmleidel%2Fgptcmd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmleidel%2Fgptcmd/lists"}