### Install the nullplatform plugin Source: https://docs.nullplatform.com/docs/tutorials/ai-plugins-setup Clones the plugin repository and installs the full nullplatform plugin suite using the claude CLI. ```bash git clone https://github.com/nullplatform/ai-plugins.git cd ai-plugins claude plugin install . ``` -------------------------------- ### Example Setup Configuration Source: https://docs.nullplatform.com/docs/providers/supported-integrations/code-repository/github-configuration This example shows the structure for the setup section of the GitHub configuration. ```json { "organization": "my-org", "installation_id": "12345678" } ``` -------------------------------- ### GitLab Setup Configuration Example Source: https://docs.nullplatform.com/docs/providers/supported-integrations/code-repository/gitlab-configuration Example of the setup section for GitLab integration. ```json { "group_path": "my-organization/my-group", "access_token": "glpat-XXXXXXXXXXXXXXXXXXXXX", "installation_url": "https://gitlab.com" } ``` -------------------------------- ### Docker registry setup example Source: https://docs.nullplatform.com/docs/providers/supported-integrations/assets-repository/docker-server Example configuration for the setup properties of a Docker registry. ```json { "path": "myorg/team-a", "server": "https://registry.hub.docker.com" } ``` -------------------------------- ### Setup Properties Example Source: https://docs.nullplatform.com/docs/providers/supported-integrations/parameters-storage/hashicorp-vault-self-hosted An example JSON configuration illustrating the 'setup' properties for HashiCorp Vault Self-Hosted. ```json { "vault_address": "https://vault.acme-corp.io", "mount": "secret", "secret_path": "nullplatform" } ``` -------------------------------- ### Start the agent Source: https://docs.nullplatform.com/docs/agent/install-local Run the agent with your API key and a few required flags. ```bash np-agent \ --api-key=$NP_API_KEY \ --runtime=host \ --tags=key:value \ --command-executor-env=NP_API_KEY=$NP_API_KEY \ --command-executor-debug \ --webserver-enabled ``` -------------------------------- ### Start blue green (CLI) Source: https://docs.nullplatform.com/docs/agent-backed-scopes/craft-scopes/scope-action-spec Example of how to start a blue green deployment using the NullPlatform CLI. ```bash np service specification action specification create \ --serviceSpecificationId $service-spec-id \ --body '{ "name": "Start blue green", "type": "custom", "parameters": { // defines the input requirements for the action "schema": { "type": "object", "required": ["scope_id", "deployment_id"], // required parameters to start blue green "properties": { "scope_id": { "type": "string" }, "deployment_id": { "type": "string" } } }, "values": {} }, "results": { "schema": { "type": "object", "properties": {} }, "values": {} } }' ``` -------------------------------- ### Run your first prompt Source: https://docs.nullplatform.com/docs/tutorials/ai-plugins-setup Executes a sample prompt to list open action items using the governance plugin. ```bash /np-governance list my open action items ``` -------------------------------- ### Start blue green (cURL) Source: https://docs.nullplatform.com/docs/agent-backed-scopes/craft-scopes/scope-action-spec Example of how to start a blue green deployment using cURL. ```bash curl -L -X POST "https://api.nullplatform.com/service_specification/$service-spec/action_specification" \ -H "Content-Type: application/json" \ -d '{ "name": "Start blue green", "type": "custom", "parameters": { // defines the input requirements for the action "schema": { "type": "object", "required": ["scope_id", "deployment_id"], // required parameters to start blue green "properties": { "scope_id": { "type": "string" }, "deployment_id": { "type": "string" } } }, "values": {} }, "results": { "schema": { "type": "object", "properties": {} }, "values": {} } }' ``` -------------------------------- ### Setup Properties Example Source: https://docs.nullplatform.com/docs/providers/supported-integrations/code-repository/azure-devops-configuration Example JSON object detailing the properties for Azure DevOps setup, such as project, agent pool, access token, and organization. ```json { "project": "CryptoKong", "agent_pool": "Default", "access_token": "pat_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "organization": "my-azure-org" } ``` -------------------------------- ### Start Initial Deployment using CLI Source: https://docs.nullplatform.com/docs/agent-backed-scopes/craft-scopes/scope-action-spec Example of initiating a deployment using the NullPlatform CLI, including the necessary parameters for scope and deployment IDs. ```bash np service specification action specification create \ --serviceSpecificationId $service-spec-id \ --body '{ "name": "Start initial", "type": "custom", "parameters": { // defines the input requirements for the action "schema": { "type": "object", "required": ["scope_id", "deployment_id"], // required parameters to start initial "properties": { "scope_id": { "type": "string" }, "deployment_id": { "type": "string" } } }, "values": {} }, "results": { "schema": { "type": "object", "properties": {} }, "values": {} } }' ``` -------------------------------- ### GitLab Configuration Example Source: https://docs.nullplatform.com/docs/providers/supported-integrations/code-repository/gitlab-configuration Example of the complete GitLab configuration, including setup and access details. ```json { "setup": { "group_path": "my-organization/my-group", "access_token": "glpat-XXXXXXXXXXXXXXXXXXXXX", "installation_url": "https://gitlab.com" }, "access": { "default_collaborators": [ { "id": "np-pilundain", "role": "developer", "type": "user" }, { "id": "wallet", "role": "developer", "type": "group" } ] } } ``` -------------------------------- ### Docker Image Asset Makefile Example Source: https://docs.nullplatform.com/docs/applications/ci-cd/makefile-build-push This Makefile example shows how to build and push a Docker image asset, including setup, testing, compilation, packaging, and pushing to a Docker registry. ```makefile .PHONY: all clean build setup test compile package push all: clean build push build: setup test compile package setup: docker build -t $(ASSET_NAME)-test --target test -f $(ASSET_WORKING_DIRECTORY)/Dockerfile . test: docker run -it --rm --name $(ASSET_NAME)-test-run $(ASSET_NAME)-test compile: package: docker build -t $(ASSET_NAME) --target build -f $(ASSET_WORKING_DIRECTORY)/Dockerfile . push: docker tag $(ASSET_NAME):latest $(ASSET_TARGET_URL) docker push $(ASSET_TARGET_URL) ``` -------------------------------- ### Node.js Serverless Asset Makefile Example Source: https://docs.nullplatform.com/docs/applications/ci-cd/makefile-build-push This Makefile example demonstrates how to build and push a Node.js serverless asset, including setup, testing, compilation, packaging, and pushing to S3. ```makefile ASSET_FILE=$(ASSET_NAME).zip .PHONY: all clean build setup test compile package push all: clean build push build: setup test compile package clean: rm -r $(ASSET_OUTPUT_DIRECTORY) setup: mkdir -p $(ASSET_OUTPUT_DIRECTORY) cp $(ASSET_WORKING_DIRECTORY)/package.json $(ASSET_OUTPUT_DIRECTORY) npm --prefix $(ASSET_OUTPUT_DIRECTORY) install --omit=dev test: npm --prefix $(ASSET_WORKING_DIRECTORY) install --only=dev npm --prefix $(ASSET_WORKING_DIRECTORY) run test compile: cp $(ASSET_WORKING_DIRECTORY)/*.js $(ASSET_OUTPUT_DIRECTORY) package: cd $(ASSET_OUTPUT_DIRECTORY) && zip -r $(ASSET_FILE) . push: aws s3 cp $(ASSET_OUTPUT_DIRECTORY)/$(ASSET_FILE) $(ASSET_TARGET_URL) ``` -------------------------------- ### Multiple repos format for AGENT_REPO Source: https://docs.nullplatform.com/docs/agent/install-helm Example format for specifying multiple agent repositories, including private ones with tokens. ```bash AGENT_REPO="https://git-provider/your-org/your-repo.git#your_branch,https://@git-provider.com/your-org/private-repo.git#your_branch" ``` -------------------------------- ### Node.js Sequelize example Source: https://docs.nullplatform.com/docs/services/sql-service-integration Example of how to initialize Sequelize with connection parameters fetched from environment variables for a MySQL database. ```javascript const { Sequelize } = require('sequelize'); const dbHost = env.DB_HOST; const dbPort = env.DB_PORT; const dbUser = env.DB_USER; const dbPass = env.DB_PASS; const dbName = env.DB_NAME; const sequelize = new Sequelize( dbName, dbUser, dbPass, { host: dbHost, port: dbPort, dialect: 'mysql' } ); ``` -------------------------------- ### Set up QEMU and Docker Buildx in GitHub Actions Source: https://docs.nullplatform.com/docs/applications/ci-cd/build-arm Import actions to set up QEMU and Docker Buildx for GitHub Actions. ```yaml name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 ``` -------------------------------- ### Setup Properties Example Source: https://docs.nullplatform.com/docs/providers/supported-integrations/logging/aws-cloudwatch-logs-configuration Example JSON for the 'setup' section of the AWS CloudWatch configuration, detailing IAM role ARNs and external IDs. ```json { "reader_role_arn": "arn:aws:iam::123456789012:role/reader-role", "reader_role_external_id": "external-id", "reader_intermediate_role": "arn:aws:iam::123456789012:role/reader-role", "reader_intermediate_role_external_id": "external-id" } ``` -------------------------------- ### Setup Configuration Example Source: https://docs.nullplatform.com/docs/providers/supported-integrations/compute-management/aws-lambda-configuration Example of the setup configuration for an AWS Lambda function, demonstrating role ARN, certificate ARN, and endpoint enablement. ```json { "role_arn": "arn:aws:iam::123456789012:role/lambda-role", "certificate_arn": "arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012", "enable_endpoint": true } ``` -------------------------------- ### Install the agent chart Source: https://docs.nullplatform.com/docs/tutorials/kubernetes-prod-ready Installs the nullplatform-agent Helm chart with specified configuration values for API key, tags, and agent repository. ```bash helm install nullplatform-agent nullplatform/nullplatform-agent \ --set configuration.values.NP_API_KEY=$NP_API_KEY \ --set configuration.values.TAGS="$AGENT_TAGS" \ --set configuration.values.AGENT_REPO=$AGENT_REPO ``` -------------------------------- ### Override repository structure example Source: https://docs.nullplatform.com/docs/agent-backed-scopes/overrides/setup An example of how your override repository should be structured, including configuration and workflow files. ```json your-override-repo/ ├── values.yaml ├── scope/workflows/ │ ├── create.yaml │ └── delete.yaml ├── deployment/workflows/ │ └── initial.yaml └── ... ``` -------------------------------- ### Add the Helm repo Source: https://docs.nullplatform.com/docs/tutorials/kubernetes-prod-ready Adds the nullplatform Helm repository and updates the local Helm chart repository. ```bash helm repo add nullplatform https://nullplatform.github.io/helm-charts helm repo update ``` -------------------------------- ### Payload example - Parameter Source: https://docs.nullplatform.com/docs/notifications/event-payloads This is an example payload for a parameter approval, detailing the structure of a GET request to the parameter endpoint. ```json { "approval_id": 1, "approve_url": "https://api.nullplatform.com/approval/1/approve?token=xxx", "deny_url": "https://api.nullplatform.com/approval/1/deny?token=yyy", "requested_by": { "user_id": 1, "email": "alex.doe.developer@domain.com", "first_name": "alex", "last_name": "doe", "avatar": null }, "action": "parameter:read-secrets", "details": { "user": { "id": 123, "email": "alex.doe.developer@domain.com", "status": "active", "firstName": "alex", "lastName": "doe", "organizationId": 1, "avatar": null, "type": "person", "provider": "cognito", "nrn": "organization=1", "metadata": {} }, "parameter": { "id": 11, "name": "my secret", "nrn": "organization=1:account=2:namespace=3:application=4", "type": "environment", "encoding": "plaintext", "variable": "MY_SECRET", "secret": true, "values": [], "version_id": 11, "read_only": false }, "application": { "id": 4, "name": "Acme parameters app", "status": "active", "namespace_id": 3, "repository_url": "https://github.com/acme-corp/kong-namespace-acme-parameters-app", "slug": "acme-parameters-app", "template_id": 9, "auto_deploy_on_creation": false, "repository_app_path": null, "is_mono_repo": false, "tags": {}, "nrn": "organization=1:account=2:namespace=3:application=4", "metadata": {} }, "namespace": { "id": 3, "name": "Kong namespace", "account_id": 2, "slug": "kong-namespace", "status": "active", "nrn": "organization=1:account=2:namespace=3", "metadata": {} }, "account": { "id": 2, "name": "main", "organization_id": 1, "status": "active", "slug": "acme-corp-main", "nrn": "organization=1:account=2", "metadata": {} }, "organization": { "id": 1, "name": "acme corp", "slug": "acme-corp", "logo": null, "short_logo": null, "logo_dark": null, "short_logo_dark": null, "nrn": "organization=1", "metadata": {} } }, "policy_details": null, "expires_at": "2025-02-17T20:30:35.563Z", "time_to_reply": "259200000", "allowed_time_to_execute": "86400000" } ``` -------------------------------- ### AWS CloudWatch Configuration Example Source: https://docs.nullplatform.com/docs/providers/supported-integrations/logging/aws-cloudwatch-logs-configuration An example JSON configuration for AWS CloudWatch logs collection, specifying setup and settings. ```json { "setup": { "reader_role_arn": "arn:aws:iam::123456789012:role/reader-role", "reader_role_external_id": "external-id", "reader_intermediate_role": "arn:aws:iam::123456789012:role/reader-role", "reader_intermediate_role_external_id": "external-id" }, "settings": { "retention_in_days": 7 } } ``` -------------------------------- ### AWS Lambda Configuration Example Source: https://docs.nullplatform.com/docs/providers/supported-integrations/compute-management/aws-lambda-configuration An example of the AWS Lambda configuration schema, including setup, runtime, and concurrency settings. ```json { "setup": { "role_arn": "arn:aws:iam::123456789012:role/lambda-role", "certificate_arn": "arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012", "enable_endpoint": true }, "runtime": { "available_layers": [] }, "concurrency": { "reserved_concurrency_type": "unreserved", "provisioned_concurrency_type": "unprovisioned" } } ``` -------------------------------- ### Import Existing Resources Source: https://docs.nullplatform.com/docs/providers/tutorials/setting-up-gcp-and-gke Imports existing GCP and GKE resources into Nullplatform configuration. Replace `` with actual resource IDs. ```bash tofu import nullplatform_provider_config.gcp-configuration tofu import nullplatform_provider_config.gke-configuration ``` ```bash terraform import nullplatform_provider_config.gcp-configuration terraform import nullplatform_provider_config.gke-configuration ``` -------------------------------- ### Clone the scopes repository Source: https://docs.nullplatform.com/docs/tutorials/kubernetes-prod-ready Clones the nullplatform scopes repository and navigates into the cloned directory. ```bash git clone https://github.com/nullplatform/scopes.git cd scopes ``` -------------------------------- ### AWS ECR Configuration Example Source: https://docs.nullplatform.com/docs/providers/supported-integrations/assets-repository/ecr Example configuration for AWS ECR integration, including CI/CD, cross-account pull access, and storage setup. ```json { "ci": { "region": "us-east-1" }, "read": { "region": "us-east-1", "role_arn": "arn:aws:iam::123456789012:role/ecr-read-role" }, "setup": { "region": "us-east-1", "role_arn": "arn:aws:iam::123456789012:role/ecr-access-role", "naming_rule": "\(.namespace.slug)/\(.application.slug)" } } ``` -------------------------------- ### Payload example - Service Source: https://docs.nullplatform.com/docs/notifications/event-payloads This is an example payload received when a service action is created, matching the structure of a GET request to the service action spec endpoint. ```json { "action": "service:action:create", "id": "6f3d91ba-4e2c-41f8-9c0a-bb1e2d44a7fc", "name": "create-testing", "slug": "create-testing", "status": "pending", "created_at": "2025-03-18T14:09:33.412Z", "updated_at": "2025-05-10T08:47:19.983Z", "parameters": { "fifo": false, "dead_letter": false }, "results": {}, "type": "create", "specification": { "id": "f4ce298b-9d7e-4564-8a12-7e0dcb11f5a6", "slug": "create-sqs-queue" }, "service": { "id": "73bda6f0-2c91-4fa7-bf3a-dccf8c4e7e1d", "slug": "testing", "attributes": { "visibility_timeout": 30 }, "specification": { "id": "8c1a3f92-b7e0-4d13-a98f-21f56ae0c4bb", "slug": "sqs-queue" }, "dimensions": {} }, "link": null, "tags": { "organization_id": "1", "organization": "acme-corp", "application_id": "4", "application": "acme-services-action-app", "account_id": "2", "account": "main", "namespace_id": "3", "namespace": "Kong namespace" }, "entity_nrn": "organization=1:account=2:namespace=3:application=4" } ``` -------------------------------- ### Set up Docker Buildx Source: https://docs.nullplatform.com/docs/applications/ci-cd/build-arm Command to create and use Docker Buildx. ```shell docker buildx create --use ``` -------------------------------- ### Check that the repo is installed Source: https://docs.nullplatform.com/docs/tutorials/kubernetes-prod-ready Executes a command inside the nullplatform-agent pod to check if the repository is installed. ```bash kubectl exec <> -n nullplatform-tools -- ls /root/.np ``` -------------------------------- ### Basic Helm install with personal access token Source: https://docs.nullplatform.com/docs/agent/install-helm-github-app Example of how the agent repo is authenticated using a token embedded in the URL for a basic Helm install. ```bash AGENT_REPO="https://@github.com/your-org/private-repo.git#main" ``` -------------------------------- ### Getting a dimension Source: https://docs.nullplatform.com/docs/dimensions Example API call to retrieve details of a specific dimension. ```http GET /dimension/1 { "id": 1, "name": "Environment", "nrn": "organization=1234", "slug": "environment", "status": "active", "order": 1 } ``` -------------------------------- ### Install nullplatform CLI Source: https://docs.nullplatform.com/docs/tutorials/create-sqs-queue-service Command to install the nullplatform CLI. ```bash curl https://cli.nullplatform.com/install.sh | sh ``` -------------------------------- ### Example GitHub Configuration Source: https://docs.nullplatform.com/docs/providers/supported-integrations/code-repository/github-configuration This is an example of the complete GitHub configuration structure. ```json { "setup": { "organization": "my-org", "installation_id": "12345678" }, "access": { "collaborators": [ { "id": "johndoe", "role": "push", "type": "user" } ] }, "repository": {} } ``` -------------------------------- ### Single public repo format for AGENT_REPO Source: https://docs.nullplatform.com/docs/agent/install-helm Example format for specifying a single public agent repository. ```bash AGENT_REPO="https://git-provider/your-org/your-repo.git#your_branch" ``` -------------------------------- ### Run the scope configuration script Source: https://docs.nullplatform.com/docs/tutorials/kubernetes-prod-ready Executes the configuration script to register the scope schema, actions, and agent notification channel. ```bash ./configure ``` -------------------------------- ### Getting a dimension value Source: https://docs.nullplatform.com/docs/dimensions Example API call to retrieve details of a specific dimension value. ```http GET /dimension/value/1 { "id": 1, "name": "Dev", "nrn": "organization=1:account=2:namespace=3", "slug": "dev", "status": "active" } ``` -------------------------------- ### Example Command Configuration Source: https://docs.nullplatform.com/docs/telemetry/scopes-logs-and-metrics Example of a command line script path for a specific GitHub organization, repository, and provider. ```bash /root/.np/nullplatform/scopes/entrypoint --service-path=/root/.np/acme-corp/telemetry/grafana ``` -------------------------------- ### Configure your API key Source: https://docs.nullplatform.com/docs/tutorials/ai-plugins-setup Exports the nullplatform API key as an environment variable for authentication. ```bash export NULLPLATFORM_API_KEY= ```