{"id":19268903,"url":"https://github.com/shivasurya/sourcegraph-cody-gateway-cli","last_synced_at":"2025-08-04T19:40:20.491Z","repository":{"id":174204196,"uuid":"651917213","full_name":"shivasurya/sourcegraph-cody-gateway-cli","owner":"shivasurya","description":"Sourcegraph Cody Gateway CLI App","archived":false,"fork":false,"pushed_at":"2023-06-27T12:45:20.000Z","size":3672,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-05T12:42:14.438Z","etag":null,"topics":["golang-cli","sourcegraph"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shivasurya.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-06-10T13:44:30.000Z","updated_at":"2024-07-01T21:36:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"80a0b6b2-0431-4298-849e-5127a8964307","html_url":"https://github.com/shivasurya/sourcegraph-cody-gateway-cli","commit_stats":null,"previous_names":["shivasurya/sourcegraph-cody-gateway-cli"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shivasurya%2Fsourcegraph-cody-gateway-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shivasurya%2Fsourcegraph-cody-gateway-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shivasurya%2Fsourcegraph-cody-gateway-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shivasurya%2Fsourcegraph-cody-gateway-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shivasurya","download_url":"https://codeload.github.com/shivasurya/sourcegraph-cody-gateway-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240371759,"owners_count":19790888,"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":["golang-cli","sourcegraph"],"created_at":"2024-11-09T20:17:43.646Z","updated_at":"2025-02-23T20:11:22.506Z","avatar_url":"https://github.com/shivasurya.png","language":"Go","readme":"# Cody Gateway CLI (un-official)\n\nThis CLI project refers test cody-gateway API from command line.\n\n![cody-logo](./assets/cody-logo.png)\n\n## Available APIs\n\n- Health Check API\n- Version API\n- Anthropic Completion API \n- OpenAI Embedding API\n- OpenAI Completion API\n\nThe Completion API has both code and chat completion modes. This project uses the chat completion mode.\n\n## Usage\n\ncody-gateway-cli uses flags to parses options from command line. (I wish golang has salesforce oclif.io framework to easily generate and manage cli apps)\n\n### HealthCheck API\n\n```bash\n\n./main --host http://localhost:9992 --debugtoken {{TOKEN}} --verbose --healthcheckapi\n\n✅ Health check OK!\nExecution completed successfully\n\n```\n\n### Version API\n\n```bash\n./main --host http://localhost:9992 --debugtoken {{TOKEN}} --verbose --versionapi\n\nVersion: 0.0.0+dev\nExecution completed successfully\n\n```\n\n### OpenAI Embeddings API\n\n```bash\nsourcegraph-cody-gateway-cli % ./main --host http://localhost:9992 --embeddingsapi true --accesstoken --mode chat\nEnter Cody Gateway Access Token for \n{{TOKEN}}\nEnter keyphrases to embed ✨ (supports multi-line and type --END-- to terminate input):\n-\u003e hi\n-\u003e --END--\n[-0.035099167 -0.020636523 -0.015421565 -0.03990691 -0.027375247 0.021122552 -0.022002658 -0.019467426 -0.009484131 -0.013129348 0.029608354 -0.00469609 -0...]\n```\n\n### Anthropic Chat Completion API\n\n```bash\nsourcegraph-cody-gateway-cli % ./main --host http://localhost:9992 --anthropicapi true --accesstoken --mode chat\nEnter Cody Gateway Access Token for \n{{TOKEN}}\n🪄 🪄 🪄 🪄 🪄 🪄 \nEstablishing Session with Anthropic AI 🪄 ✨ (supports multi-line and type --END-- to terminate input):\n🪄 🪄 🪄 🪄 🪄 🪄 \nYou -\u003e Can you list the beaches nearby Ontario Toronto region ?\n200\n🪄 🪄 🪄 🪄 🪄 🪄 \n------------\nSome of the popular beaches near Toronto in Ontario are:\n\n- Cherry Beach - Located on the shore of Lake Ontario, about 5 km from downtown Toronto. It has swimming areas, picnic spots and hiking trails.\n...\n------------\n🪄 🪄 🪄 🪄 🪄 🪄 \nYou -\u003e Can you summarize about Goderich beach ?\n🪄 🪄 🪄 🪄 🪄 🪄 \n------------\nGoderich beach is a popular beach located on the shores of Lake Huron in the town of Goderich, Ontario, Canada. Some key highlights of the beach include:\n\n• It is a very scenic beach with clear blue waters and sandy shores. It is considered one of the prettiest beaches on Lake Huron.\n...\n\nYou -\u003e --END--\n```\n\n### OpenAI Chat Completion API\n\n```bash\nsourcegraph-cody-gateway-cli % ./main --host http://localhost:9992 --openaiapi true --accesstoken --mode chat\nEnter Cody Gateway Access Token for \n{{TOKEN}}\n🪄 🪄 🪄 🪄 🪄 🪄 \nEstablishing Session with OpenAI GPT-3.5-Turbo 🪄 ✨ (supports multi-line and type --END-- to terminate input):\n🪄 🪄 🪄 🪄 🪄 🪄 \nYou -\u003e Could you please list best beaches to visit in Ontario for this summer?\n🪄 🪄 🪄 🪄 🪄 🪄 \n------------\nAs an AI language model, I do not have personal preferences. However, here are some of the best beaches to visit in Ontario for this summer:\n\n1. Wasaga Beach\n2. Sandbanks Provincial Park\n3. Sauble Beach\n...\n------------\n🪄 🪄 🪄 🪄 🪄 🪄 \nYou -\u003e What about Goderich beach ?\n🪄 🪄 🪄 🪄 🪄 🪄 \n------------\nYes, Goderich Beach is also a great beach to visit in Ontario. It is located ...\n------------\n🪄 🪄 🪄 🪄 🪄 🪄 \nYou -\u003e --END--\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshivasurya%2Fsourcegraph-cody-gateway-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshivasurya%2Fsourcegraph-cody-gateway-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshivasurya%2Fsourcegraph-cody-gateway-cli/lists"}