{"id":21186894,"url":"https://github.com/shadmeoli/gopl","last_synced_at":"2025-07-10T01:31:37.326Z","repository":{"id":204750508,"uuid":"712576294","full_name":"shadmeoli/gopl","owner":"shadmeoli","description":"A simple but effective Go CLI to generate and structure you API app","archived":false,"fork":false,"pushed_at":"2024-08-24T17:05:36.000Z","size":26446,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-24T18:34:20.259Z","etag":null,"topics":["api","cli","go","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shadmeoli.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},"funding":{"ko_fi":"https://ko-fi.com/shadcodes"}},"created_at":"2023-10-31T18:36:51.000Z","updated_at":"2024-08-24T17:05:39.000Z","dependencies_parsed_at":"2023-12-25T20:55:05.843Z","dependency_job_id":"68bca99f-172d-4d4b-8213-59c65b2ea6c7","html_url":"https://github.com/shadmeoli/gopl","commit_stats":null,"previous_names":["shadmeoli/gopl"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadmeoli%2Fgopl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadmeoli%2Fgopl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadmeoli%2Fgopl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadmeoli%2Fgopl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shadmeoli","download_url":"https://codeload.github.com/shadmeoli/gopl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225609197,"owners_count":17496047,"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","cli","go","golang"],"created_at":"2024-11-20T18:27:00.432Z","updated_at":"2024-11-20T18:27:01.290Z","avatar_url":"https://github.com/shadmeoli.png","language":"Go","funding_links":["https://ko-fi.com/https://ko-fi.com/shadcodes"],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"./gopl-logo.png\" alt=\"GoPL Logo\" width=\"400\"\u003e\n\n# Go API Project Structure CLI Documentation\n\nWelcome to the Go API Project Structure CLI (gopl) documentation. This command-line tool allows you to create a new Go API project structure quickly and efficiently. It offers you the flexibility to configure the project with or without Docker.\n\n\u003e I am to re-write it with the help of Bubble tee and Huh\n\n\n\u003e This is just a quick CLI Hack I came up with to help me structure my API for a pet project I am doing and also sicne I am learning GO I will be needing this. \u003cbr\u003e Feel free to add changes to this. It is mainly tailored to my liking and current knowledge of go \u003cbr\u003e\n\n### Make sure to run this if you are lazy to run `go build`\n\n```\nalias build=\"go build gopl.go\"\n```\n\n\u003e Now you can run `build` to build the binary\n\n## Table of Contents\n\n1. [Installation](#installation)\n2. [Usage](#usage)\n3. [Command Overview](#command-overview)\n   - [Create](#create-command)\n4. [Project Structure](#project-structure)\n5. [Configuration](#configuration)\n6. [Examples](#examples)\n7. [Contributing](#contributing)\n8. [License](#license)\n\n## Installation \u003ca name=\"installation\"\u003e\u003c/a\u003e\n\nBefore using the Go API Project Structure CLI, you must install it. You can do this by running the following command:\n\n```shell\ngo get github.com/shadmeoli/gopl\n```\n\nEnsure that your Go environment is set up correctly before proceeding.\n\n## Usage \u003ca name=\"usage\"\u003e\u003c/a\u003e\n\nTo use the CLI, run the `gopl` command followed by a specific sub-command. The primary sub-command is `create`, which generates a new Go API project structure.\n\n```shell\ngopl create --project-name myapi\n```\n\n## Command Overview \u003ca name=\"command-overview\"\u003e\u003c/a\u003e\n\n### Create \u003ca name=\"create-command\"\u003e\u003c/a\u003e\n\nThe `create` command is the main functionality of this CLI. It allows you to create a new Go API project structure.\n\n#### Usage\n\n```shell\ngopl create [flags]\n```\n\n#### Flags\n\n- `--project-name, -p`: Specify the name of the project directory.\n- `--use-docker, -d`: Configure Docker for the project (optional).\n\n## Project Structure \u003ca name=\"project-structure\"\u003e\u003c/a\u003e\n\nThe CLI will generate a well-organized project structure for your Go API project. This structure includes directories and files such as:\n\n- `cmd/myapi`: Main application entry point.\n- `internal/api/handlers`: API request handlers.\n- `internal/app/config`: Configuration files.\n- `internal/app/database/postgres`: Database configuration (PostgreSQL).\n- `internal/app/middleware`: Middleware components.\n- `api/v1/routes`: API routes.\n- `scripts`: Custom scripts.\n- `web`: Web-related assets and files.\n- `Dockerfile`: Docker configuration (if Docker is enabled).\n- `go.mod` and `go.sum`: Go module files.\n- `README.md`: Project documentation.\n\n## Configuration \u003ca name=\"configuration\"\u003e\u003c/a\u003e\n\nYou can configure your project by creating a `.env` file in your project directory. The CLI will prompt you to create this file during project structure generation. This file can store environment-specific configuration variables. An example `.env` file content is as follows:\n\n```shell\n# Environment Configuration\nDATABASE_URL=your_database_url\nSECRET_KEY=your_secret_key\n# Add other environment variables here\n```\n\n## Examples \u003ca name=\"examples\"\u003e\u003c/a\u003e\n\nHere are some examples of using the Go API Project Structure CLI:\n\n1. Create a project named \"myapi\" without Docker:\n\n```shell\ngopl create --project-name myapi\n```\n\n2. Create a project named \"myapi\" with Docker configuration:\n\n```shell\ngopl create --project-name myapi --use-docker\n```\n\n## Contributing \u003ca name=\"contributing\"\u003e\u003c/a\u003e\n\nWe welcome contributions to this open-source project. If you have suggestions, bug reports, or want to add new features, please check the project repository on GitHub.\n\n## License \u003ca name=\"license\"\u003e\u003c/a\u003e\n\nThis CLI is open-source and distributed under the [MIT License](https://opensource.org/licenses/MIT). You are free to use, modify, and distribute it as per the license terms.\n\n---\n\nThank you for using the Go API Project Structure CLI. We hope this tool makes it easier for you to start new Go API projects and accelerates your development process. If you have any questions or need further assistance, please refer to the project's documentation or GitHub repository for support.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshadmeoli%2Fgopl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshadmeoli%2Fgopl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshadmeoli%2Fgopl/lists"}