{"id":26879744,"url":"https://github.com/skysingh04/gist_magic","last_synced_at":"2025-08-04T08:39:34.742Z","repository":{"id":235579153,"uuid":"790950648","full_name":"SkySingh04/Gist_Magic","owner":"SkySingh04","description":"A command-line application written in Rust that allows you to manage Gists  directly from the CLI.","archived":false,"fork":false,"pushed_at":"2024-05-03T21:24:50.000Z","size":58,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T13:37:29.307Z","etag":null,"topics":["clap","clap-rs","cli","gists","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SkySingh04.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-23T20:25:00.000Z","updated_at":"2025-01-17T12:13:34.000Z","dependencies_parsed_at":"2024-05-03T22:31:57.427Z","dependency_job_id":"11c282a2-37be-4f1e-89c0-17610b5c66ab","html_url":"https://github.com/SkySingh04/Gist_Magic","commit_stats":null,"previous_names":["akash-singh04/gist_magic","skysingh04/gist_magic"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SkySingh04/Gist_Magic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SkySingh04%2FGist_Magic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SkySingh04%2FGist_Magic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SkySingh04%2FGist_Magic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SkySingh04%2FGist_Magic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SkySingh04","download_url":"https://codeload.github.com/SkySingh04/Gist_Magic/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SkySingh04%2FGist_Magic/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268671956,"owners_count":24288242,"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","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["clap","clap-rs","cli","gists","rust"],"created_at":"2025-03-31T13:31:53.759Z","updated_at":"2025-08-04T08:39:34.668Z","avatar_url":"https://github.com/SkySingh04.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust Gist Magic\n\nA command-line application written in Rust that allows you to perform CRUD operations for GitHub Gist for a file directly from the CLI using API calls to the Github API.\n\n\n### Commands\n\n---\n\n#### List\n\n```\nUsage: gist_magic list [OPTIONS]\n\nDescription: List all gists associated with the provided username. If no username is provided, it lists all gists available to the authenticated user.\n\nOptions:\n  -o, --username \u003cUSERNAME\u003e    Username of the owner of gists to list\n```\n\n---\n\n#### Create\n\n```\nUsage: gist_magic create [OPTIONS]\n\nDescription: Create a new gist either from a file or by manually entering content.\n\nOptions:\n  -f, --filepath \u003cFILEPATH\u003e    File to create a gist from\n  -s, --start \u003cSTART\u003e          Starting line of the file to create a gist from\n  -e, --end \u003cEND\u003e              Ending line of the file to create a gist from\n```\n\n---\n\n#### Edit\n\n```\nUsage: gist_magic edit [OPTIONS]\n\nDescription: Edit an existing gist.\n\nOptions:\n  -g, --gistid \u003cGISTID\u003e    ID of the gist to edit\n```\n\n---\n\n#### Delete\n\n```\nUsage: gist_magic delete [OPTIONS]\n\nDescription: Delete an existing gist.\n\nOptions:\n  -g, --gistid \u003cGISTID\u003e    ID of the gist to be deleted\n```\n\n---\n\n#### View\n\n```\nUsage: gist_magic view [OPTIONS]\n\nDescription: View details of a specific gist.\n\nOptions:\n  -g, --gistid \u003cGISTID\u003e    ID of the gist to view\n```\n\n---\n\n#### Star\n\n```\nUsage: gist_magic star [OPTIONS]\n\nDescription: Star a specific gist.\n\nOptions:\n  -g, --gistid \u003cGISTID\u003e    ID of the gist to star\n```\n\n---\n\n#### Unstar\n\n```\nUsage: gist_magic unstar [OPTIONS]\n\nDescription: Unstar a specific gist.\n\nOptions:\n  -g, --gistid \u003cGISTID\u003e    ID of the gist to unstar\n```\n\n---\n\n\n#### GitHub OAuth Token Configuration\n\nTo configure your GitHub OAuth token with Gist Magic, follow these steps:\n\n1. **Access GitHub OAuth Token**: First, you need to obtain your GitHub OAuth token from the GitHub Developer Settings. This token acts as your authentication key when interacting with GitHub's APIs.\n\n2. **Setting the OAuth Token**:\n   - If you already have your GitHub OAuth token, you can set it directly in the Gist Magic configuration file.\n   - If you don't have a token or haven't set it yet, Gist Magic prompts you to input your GitHub OAuth token the first time you run the tool.\n\n3. **Saving the Configuration**:\n   - After entering your GitHub OAuth token, Gist Magic automatically saves it to a configuration file named `.gist_magic.json` located in your home directory.\n\n4. **Persisting Configuration**:\n   - Gist Magic persists your GitHub OAuth token in the configuration file so that you don't need to re-enter it each time you use the tool.\n\n#### Accessing the Configuration File\n\nYou can manually access and modify the configuration file if needed. The file is located at the following path:\n\n- **Location**: `$HOME/.gist_magic.json`\n- **Content**: The configuration file contains your GitHub OAuth token in JSON format.\n\n#### Updating the OAuth Token\n\nIf you ever need to update or change your GitHub OAuth token, you can do so by directly editing the configuration file or by running the Gist Magic tool, which will prompt you to enter the new token.\n\nBy configuring your GitHub OAuth token with Gist Magic, you ensure seamless integration with GitHub's services, allowing you to manage your gists effortlessly from the command line.\n\n\n### Additional Notes\n- **Authorization:** All commands except `list` require a GitHub token for authorization.\n- **Error Handling:** Errors are logged and printed to the console for user visibility.\n- **Output:** The output for commands like `list` and `view` includes gist details such as ID, description, owner, and gist files (if applicable).\n\n\n## Installation\n\n1. Clone the repository:\n\n    ```shell\n    git clone https://github.com/Akash-Singh04/rust-gist-magic.git\n    ```\n\n2. Build the application:\n\n    ```shell\n    cd rust-gist-magic\n    cargo build --release\n    ```\n\n3. Run the application:\n\n    ```shell\n    cargo run --release -- \u003cfile-name\u003e \u003cfile-content\u003e\n    ```\n\n\n### License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n### Contributing Guide\n\nWe welcome contributions from the community to improve and expand Gist Magic. Here's how you can contribute:\n\n1. Fork the repository to your GitHub account.\n2. Clone the forked repository to your local machine.\n3. Create a new branch for your feature or bug fix.\n4. Make your changes and ensure they adhere to the project's coding style and guidelines.\n5. Write tests for your changes if applicable.\n6. Commit your changes with descriptive commit messages.\n7. Push your changes to your fork on GitHub.\n8. Open a pull request (PR) against the main repository's `main` branch.\n\nBefore opening a PR, ensure that you've tested your changes thoroughly. If your changes affect the project's behavior, update the documentation accordingly.\n\n### Additional Information\n\nFor any questions or discussions related to this project, feel free to open an issue on the repository. We appreciate your interest and contributions!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskysingh04%2Fgist_magic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskysingh04%2Fgist_magic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskysingh04%2Fgist_magic/lists"}