Skip to content

🛠️ How to Install Penify on AzureDevops?

Installing Penify on your AzureDevops repository or organization is a straightforward process. This guide will walk you through the steps to integrate Penify, ensuring your project's documentation is automatically generated and updated.

📋 Pre-requisites

  • An AzureDevops account.
  • A PAT Token
  • A Repository in which you want to install

🧭 Step-by-Step Installation Guide

  1. Open your Repository

    • Open your web browser and navigate to your repositoryAzureDevOps.
    • In my case I will be opening this repository xeno-rat.
  2. Create a YAML File in your Repository

    • Create a folder .pipelines
    • Create a file snorkell-auto-doc.yaml
    • Add the following contents in the file.
      • NOTE: Modify the trigger and BRANCH_NAME as desired.
      • NOTE: Modify the pool as desired.
    - master # It could be "master", "main" or any branch on which you want to run this pipeline.
    pr: none
      pythonVersion: '3.x'
      # Direct secret variable reference removed to ensure proper handling in the steps
      BRANCH_NAME: 'master' # Ensure this matches your intended branch for documentation generation
      name: my-personal-computer #You can use your "pool" name. 
          python.version: '3.9'
    # this will install SnorkellClient to run on your Repository
    - script: |
        curl -o
        python -m pip install requests
      displayName: 'Install Penify Client'
    - script: |
        ESCAPED_COMMIT_MSG=$(printf '%s\n' "$(Build.SourceVersionMessage)" | jq -R -s -c .)
        STRIPPED_COMMIT_MSG=$(echo "$ESCAPED_COMMIT_MSG" | sed 's/ //g' | sed 's/\\n//g')
        echo "STRIPPED_COMMIT_MSG=$STRIPPED_COMMIT_MSG" >> $(Build.SourcesDirectory)/.env
      displayName: 'Extract Commit Message'
    - script: |
        ORG_NAME=$(echo $ORG_URL | cut -d'/' -f4)
        REPO_NAME=$(echo $(Build.Repository.Name) | cut -d'/' -f2)
        echo "ORG_NAME=$ORG_NAME" >> $(Build.SourcesDirectory)/.env
        echo "REPO_NAME=$REPO_NAME" >> $(Build.SourcesDirectory)/.env
        echo "ORG_NAME - $ORG_NAME"
        echo "REPO_NAME - $REPO_NAME"
        echo "BRANCH_NAME - $BRANCH_NAME"
      displayName: 'Extract Repository Information'
    - script: |
        export $(cat $(Build.SourcesDirectory)/.env | xargs)
        python -u
      displayName: 'Run Penify Client'
        # Correctly passing secrets as environment variables
        # You need to generate PAT token so that Penify can read your code changes and generate documentation.
        GITHUB_SHA: $(Build.SourceVersion)
        ORG_NAME: $(ORG_NAME)
  3. Create Pipeline for your Repository

    • You can follow this video on how to create Penify and Azure Devops integration.
    • Contains information on
      • Pipeline Creation via YAML file
      • PAT Token Generation
      • SNORKELL API Key generation
      • How to set the variables in the Pipeline

    Penify Azure Devops Installation

  4. See Penify in Action: When Repository contents are modified

    • Check the below video to watch Penify AI Documentation Generation in Action on Code Changes

    Penify Azure Devops AI Documentation Generation

  5. Penify in Action: Generate Documentation of entire Repository

    • Once you finish Step 4, Penify will automatically get configured for your Repository.

    • You will see the Repository information in Penify Dashboard.

    • To generate Documentation for your entire Repository.

    • Click on your Repository

    • You will be redirected to a your repository page

    • Click on "Generate Documentation for your Repository"

    • Repository Documentation generation has now started

      • Note: In case of "Freemium" repository, only top 10 files will be documented.
      • If you want to Document your entire repository - you need to buy Credits from the Payments Page.
    • I will add the Demo for the same

    • For now you can always refer this demo from time(0:57)

      Penify Full Repo Demo.