{"id":13456956,"url":"https://github.com/shenjinti/fgpt","last_synced_at":"2025-07-19T19:36:22.523Z","repository":{"id":233839464,"uuid":"787765446","full_name":"shenjinti/fgpt","owner":"shenjinti","description":"A free reverse proxy and CLI tool for OpenAI GPT-3.5-turbo.","archived":false,"fork":false,"pushed_at":"2024-04-25T05:54:24.000Z","size":89,"stargazers_count":93,"open_issues_count":4,"forks_count":5,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-29T18:18:24.796Z","etag":null,"topics":["api","chat-gpt","free-gpt","gpt","gpt-35-turbo","openai","openai-api","reverse-proxy"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shenjinti.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":"2024-04-17T06:26:20.000Z","updated_at":"2025-03-19T08:19:35.000Z","dependencies_parsed_at":"2024-04-25T06:50:28.235Z","dependency_job_id":null,"html_url":"https://github.com/shenjinti/fgpt","commit_stats":null,"previous_names":["shenjinti/rgpt","shenjinti/fgpt"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shenjinti%2Ffgpt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shenjinti%2Ffgpt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shenjinti%2Ffgpt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shenjinti%2Ffgpt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shenjinti","download_url":"https://codeload.github.com/shenjinti/fgpt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253112359,"owners_count":21856123,"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":["api","chat-gpt","free-gpt","gpt","gpt-35-turbo","openai","openai-api","reverse-proxy"],"created_at":"2024-07-31T08:01:30.823Z","updated_at":"2025-05-08T17:21:50.477Z","avatar_url":"https://github.com/shenjinti.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# A free reverse proxy and CLI tool for OpenAI GPT-3.5-turbo\n\nIt allows you to use the GPT-3.5 API without needing to sign up for an API key or pay for usage.\n\u003e 😄 OpenAI GPT-3.5-turbo is free to use, without any account or API key   \n\u003e 🔔 DON'T USE IN PRODUCTION, ONLY FOR PERSONAL USE/TESTING\n\n## Features\n\n- [x] **REPL** mode, you can input questions and get answers interactively\n- [x] **Reverse proxy mode**, you can use the OpenAI OpenAPI with a local server\n- [x] **CLI mode**, with shell pipe, file input, code output, etc.\n- [x] 🔏 Support https proxy and socks5 proxy\n\n## Download precompiled binary\n\n- [Linux x64](https://github.com/shenjinti/fgpt/releases/download/v0.1.7/fgpt-linux_x64.tar.gz) executable binary\n- [Mac M1/M2](https://github.com/shenjinti/fgpt/releases/download/v0.1.7/fgpt-mac_aarch64.tar.gz) executable binary\n- Windows (Coming soon)\n- Or via [Docker](https://hub.docker.com/r/shenjinti/fgpt)\n- Or build from source (see below, cargo is required)\n    ```bash\n    cargo install fgpt\n    ```\n\n## How to use\n\n[![asciicast](https://asciinema.org/a/654921.svg)](https://asciinema.org/a/654921)\n\n```bash\n# To get answers from GPT-3.5\nfgpt \"How to get a domain's MX record on linux shell?\"\n\n# Output plain code -c/--code\nfgpt -c \"Write python code to reverse a string\"\n\n# With pipe\ncat README.md | fgpt \"summarize for reddit post\"\n\n# With stdin\nfgpt \"Convert the follow csv data to json, without any description\" \u003c contacts.csv\n\n# With file -f/--file\nfgpt -f contacts.csv  \"Convert the follow csv data to json, without any description\"\n\n# REPL mode\nfgpt\n\u003e\u003e Write a javascript code to reverse a string\n...\n```\n\n### With http proxy\n\nIf you are unable to connect , you can try using a proxy. HTTP and SOCKS5 proxies are supported. For example:\n\n```bash\n# 1. pass the proxy address by -p/--proxy\nfgpt -p 'socks5://127.0.0.1:9080' \"Linux command to list files in a directory\"\n\n# 2. pass the proxy address by environment variable\nexport HTTPS_PROXY='socks5://127.0.0.1:9080'\nfgpt \"Linux command to list files in a directory\"\n\n# 3. use alias to set the proxy address\nalias fgpt='fgpt -p \"socks5://127.0.0.1:9080\"'\nfgpt \"Linux command to list files in a directory\"\n```\n\n### Dump stats\n\n```bash\nfgpt --stats \"Linux command to list files in a directory\"\n```\n\n## Use by docker\n\n```bash\ndocker run -it --rm shenjinti/fgpt \"Linux command to list files in a directory\"\n```\n\n## How to use Reverse Proxy\n\nOffering free self-hosted API access to ChatGPT. This is useful if you want to use the OpenAI API without needing to sign up for an API key.\n\n### 1. Start the server\n\n```bash\nfgpt -s 127.0.0.1:4090\n```\n\nYour local server will now be running and accessible at: `http://127.0.0.1:4090/v1/chat/completions`\n\n### 2. Example Usage with OpenAI Libraries\n\n```python\nimport openai\nimport sys\nopenai.api_key = 'nothing'\nopenai.base_url = \"http://127.0.0.1:4090/v1/\"\n\ncompletion = openai.chat.completions.create(\n    model=\"gpt-3.5-turbo\",\n    messages=[\n        {\"role\": \"user\", \"content\": \"Write a javascript simple code\"},\n    ],\n    stream=True,\n)\n\nfor chunk in completion:\n    print(chunk.choices[0].delta.content, end='')\n    sys.stdout.flush()\n\nprint()\n```\n\nor test with curl:\n\n```bash\ncurl -X POST -H \"Content-Type: application/json\" -d '{\"model\":\"gpt-3.5-turbo\",\n\"messages\":[{\"role\":\"user\",\"content\":\"Write a javascript simple code\"}], \n\"stream\":true}' \\\nhttp://127.0.0.1:4090/v1/chat/completions\n ```\n\n```bash\ncurl -X POST -H \"Content-Type: application/json\" -d '{\"model\":\"gpt-3.5-turbo\",\n\"messages\":[{\"role\":\"user\",\"content\":\"Write a javascript simple code\"}]}' \\\nhttp://127.0.0.1:4090/v1/chat/completions\n ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshenjinti%2Ffgpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshenjinti%2Ffgpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshenjinti%2Ffgpt/lists"}