Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add documentation for environment in CLI #462

Merged
merged 3 commits into from
Sep 24, 2024

Conversation

Allan2000-Git
Copy link
Contributor

@Allan2000-Git Allan2000-Git commented Sep 23, 2024

User description

Description

This PR adds documentation for the new environment feature in the CLI, providing users with clear instructions on how to utilize this functionality effectively.

Fixes #457

Dependencies

No new dependencies introduced.

Future Improvements

Consider adding examples for common use cases of the scan feature in future documentation updates.

Mentions

@rajdip-b

Screenshots of relevant screens

N/A

Developer's checklist

  • My PR follows the style guidelines of this project
  • I have performed a self-check on my work

If changes are made in the code:

  • I have followed the coding guidelines
  • My changes in code generate no new warnings
  • My changes are breaking another fix/feature of the project
  • I have added test cases to show that my feature works
  • I have added relevant screenshots in my PR
  • There are no UI/UX issues

Documentation Update

  • This PR requires an update to the documentation at docs.keyshade.xyz
  • I have made the necessary updates to the documentation, or no documentation changes are required.

PR Type

Documentation


Description

  • Added a new documentation file for the environment command in the Keyshade CLI.
  • Documented subcommands including create, delete, get, list, and update.
  • Provided detailed usage instructions, arguments, and options for each subcommand.
  • Enhanced user understanding of managing environments within Keyshade.

Changes walkthrough 📝

Relevant files
Documentation
environment.md
Add comprehensive documentation for `environment` CLI command

docs/cli/environment.md

  • Added documentation for the environment command in Keyshade CLI.
  • Detailed subcommands: create, delete, get, list, update.
  • Provided usage examples and options for each subcommand.
  • Included arguments and options descriptions for better understanding.
  • +126/-0 

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    Copy link
    Contributor

    PR Reviewer Guide 🔍

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Key issues to review

    Inconsistent Formatting
    The formatting for the 'Options' section under the 'list' command (lines 93-99) is inconsistent with other commands. It mentions 'create' command instead of 'list'.

    Unclear Information
    The 'Options' section for the 'update' command (lines 115-125) uses tentative language ("might be supported"), which could confuse users about the actual available options.

    Copy link
    Contributor

    codiumai-pr-agent-free bot commented Sep 23, 2024

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Possible issue
    ✅ Correct the description of arguments for the list command
    Suggestion Impact:The suggestion corrected the command name from "update" to "list" in the documentation, which was implemented in the commit.

    code diff:

    -These are the arguments supported by the update command:
    +These are the arguments supported by the list command:
     

    Correct the description of arguments for the list command. It currently mentions
    "update command" which is incorrect.

    docs/cli/environment.md [85-91]

     ### Arguments
     
    -These are the arguments supported by the update command:
    +These are the arguments supported by the list command:
     
     #### `<project-slug>`
     
    -Slug of the project whose environments you want.
    +Slug of the project whose environments you want to list.
     
    • Apply this suggestion
    Suggestion importance[1-10]: 9

    Why: The suggestion addresses a clear error in the documentation, where the wrong command is referenced. Correcting this mistake is crucial for clarity and accuracy.

    9
    Enhancement
    Provide more detailed information about pagination options

    Clarify the description of the PAGINATION_OPTION for the list command. Provide more
    details or a link to where these options are defined.

    docs/cli/environment.md [97-99]

    -#### `PAGINATION_OPTION`
    +#### Pagination Options
     
    -The `list` command supports pagination options. These options are defined in the `PAGINATION_OPTION` constant.
    +The `list` command supports pagination options. These options include:
     
    +- `--page <number>`: The page number to retrieve (default: 1)
    +- `--per-page <number>`: Number of items per page (default: 20)
    +
    +For more details on pagination, refer to the [Pagination section](link-to-pagination-docs).
    +
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    Why: Clarifying the pagination options with specific details and a reference link improves the documentation's usefulness and helps users understand how to effectively use pagination.

    8
    Improve the clarity of the update command options description

    Update the description of options for the update command to be more definitive,
    removing the uncertainty implied by "might be supported".

    docs/cli/environment.md [115-125]

     ### Options
     
    -These are the options that might be supported by the `update` command:
    +These are the options supported by the `update` command:
     
     #### `-n, --name <string>`
     
     The new name for the environment.
     
     #### `-d, --description <string>`
     
     The new description for the environment.
     
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    Why: Removing uncertainty in the options description for the update command enhances clarity, ensuring users have a definitive understanding of the available options.

    8
    Add usage examples for each subcommand to improve user understanding

    Consider adding a brief example for each subcommand to demonstrate its usage. This
    will help users understand how to use the commands in practice.

    docs/cli/environment.md [21-47]

     ## `create`
     
     ### Usage
     
     ```bash
     keyshade environment create <project-slug> [options]

    Arguments

    -These are the arguments supported by the update command:
    +These are the arguments supported by the create command:

    <project-slug>

    The slug of the project under which you want to add the environment.

    Options

    These are the options supported by the create command:

    -n, --name <string>

    The name of the environment.

    -d, --description <string>

    A description of the environment.

    +### Example
    +
    +bash +keyshade environment create my-project -n "Production" -d "Production environment for my-project" +
    +

    
    - [ ] **Apply this suggestion** <!-- /improve --apply_suggestion=3 -->
    
    <details><summary>Suggestion importance[1-10]: 7</summary>
    
    Why: Adding examples for each subcommand enhances the documentation by providing practical usage scenarios, which can significantly aid user comprehension and application of the commands.
    
    
    </details></details></td><td align=center>7
    
    </td></tr></tr></tbody></table>
    
    >💡 Need additional feedback ? start a [PR chat](https://chromewebstore.google.com/detail/ephlnjeghhogofkifjloamocljapahnl)
    
    

    @rajdip-b
    Copy link
    Member

    Needs a few changes, I'll mark them late tonight.

    docs/cli/environment.md Outdated Show resolved Hide resolved
    @Allan2000-Git
    Copy link
    Contributor Author

    @rajdip-b I have made the changes.

    @rajdip-b rajdip-b merged commit dad7394 into keyshade-xyz:develop Sep 24, 2024
    5 checks passed
    @Allan2000-Git Allan2000-Git deleted the docs/environment branch September 25, 2024 09:03
    @Allan2000-Git Allan2000-Git restored the docs/environment branch September 25, 2024 09:03
    Meeran-Tofiq pushed a commit to Meeran-Tofiq/keyshade that referenced this pull request Sep 29, 2024
    Kiranchaudhary537 pushed a commit to Kiranchaudhary537/keyshade that referenced this pull request Oct 13, 2024
    rajdip-b pushed a commit that referenced this pull request Oct 24, 2024
    ## [2.6.0](v2.5.0...v2.6.0) (2024-10-24)
    
    ### 🚀 Features
    
    * **api:**  Add icon and remove description field from workspace ([#435](#435)) ([a99c0db](a99c0db))
    * **api-client:** Added workspace-membership and related tests ([#452](#452)) ([6a1c091](6a1c091))
    * **api-client:** Create controller for User module ([#484](#484)) ([f9d8e83](f9d8e83))
    * **api:** Add prod env schema in env file ([#436](#436)) ([21c3004](21c3004))
    * **api:** Add resend otp implementation ([#445](#445)) ([4dc6aa1](4dc6aa1))
    * **api:** Fetch total count of environments, [secure]s and variables in project ([#434](#434)) ([0c9e50a](0c9e50a))
    * **api:** Replace `projectId` with `name` and `slug` in workspace-role response.  ([#432](#432)) ([af06071](af06071))
    * **cli:** Add functionality to operate on Secrets ([#504](#504)) ([1b4bf2f](1b4bf2f))
    * **cli:** Add project command ([#451](#451)) ([70448e1](70448e1))
    * **cli:** Add workspace operations ([#441](#441)) ([ed38d22](ed38d22))
    * **cli:** implement commands to get, list, update, and delete, workspace roles ([#469](#469)) ([957ea8d](957ea8d))
    * **cli:** Implemented pagination support ([#453](#453)) ([feb1806](feb1806))
    * **cli:** Secret scan ([#438](#438)) ([85cb8ab](85cb8ab))
    * **cli:** Update environment command outputs ([f4af874](f4af874))
    * **platform:** Clearing email field after waitlisting the user email ([#481](#481)) ([256d659](256d659))
    * Remove project IDs from workspace role export data and update tests ([#448](#448)) ([8fdb328](8fdb328))
    * **web:** Configured extra check for waitlisted users already in the list and created toast message for them ([#492](#492)) ([2ddd0ef](2ddd0ef))
    * **web:** show the toast only when email add successfully ([#490](#490)) ([783c411](783c411))
    
    ### 🐛 Bug Fixes
    
    * **api,api-client:** Add environmentSlug in multiple places across the variable module ([#468](#468)) ([d970aff](d970aff))
    * **api:** Replace the id with slug in the global-search service ([#455](#455)) ([74804b1](74804b1))
    * **platform:** Fixed duplicate Google Logo UI fix  ([#450](#450)) ([fb0d6f7](fb0d6f7))
    * resolve footer website name cut-off or overlap issue ([#444](#444)) ([fe03ba2](fe03ba2))
    * **web:** Horizontal Scrolling issue on the website ([#440](#440)) ([655177b](655177b))
    
    ### 📚 Documentation
    
    * Add documentation for environment in CLI ([#462](#462)) ([dad7394](dad7394))
    * Add documentation for project in CLI ([#466](#466)) ([341fb32](341fb32))
    * Add documentation for scan in CLI ([#461](#461)) ([72281e6](72281e6))
    * Add documentation for workspace command ([#464](#464)) ([4aad8a2](4aad8a2))
    * Add instructions for resetting the local Prisma database ([#495](#495)) ([#501](#501)) ([b07ea17](b07ea17))
    * Added docker support documentation ([#465](#465)) ([bc04be4](bc04be4))
    * Added documentation for running the platform ([#473](#473)) ([8b8386b](8b8386b))
    * Added missing mappings to pages ([5de9fd8](5de9fd8))
    * Fix Documentation Hyperlink and update expired Discord invite link ([#496](#496)) ([5a10e39](5a10e39))
    * Updated CLI docs ([#460](#460)) ([c7e0f13](c7e0f13))
    
    ### 🔧 Miscellaneous Chores
    
    * Add more logging to Sentry init ([#470](#470)) ([de4925d](de4925d))
    * **api:** Optimise API docker image size ([#360](#360)) ([ea40dc1](ea40dc1))
    * **api:** Updated lockfile ([a968e78](a968e78))
    * **CI:** Add [secure] scan validation ([f441262](f441262))
    * **cli:** Update controller invocation in environment commands ([#477](#477)) ([596bd1a](596bd1a))
    * Minor changes to variables ([fe01ca6](fe01ca6))
    * **[secure]-scan:** Failing lint issues ([#507](#507)) ([48f45df](48f45df))
    * **[secure]-scan:** Formatted files ([5884833](5884833))
    * Update .env.example ([70ad4f7](70ad4f7))
    * Updated scripts ([9eb76a7](9eb76a7))
    * **web:** email validation ([#487](#487)) ([e8e737a](e8e737a))
    @rajdip-b
    Copy link
    Member

    🎉 This PR is included in version 2.6.0 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    DOCS: Add docs for environment in CLI
    2 participants