diff --git a/.github/workflows/build-docs.yaml b/.github/workflows/build-docs.yaml index 9f43c6127e..534ee554f5 100644 --- a/.github/workflows/build-docs.yaml +++ b/.github/workflows/build-docs.yaml @@ -78,7 +78,7 @@ jobs: if [ $PROVIDER == "root" ]; then echo "adding vanity url redirects to _redirects file.." touch ./build/_redirects - array=( aws azure azure-extras azure-isv azure-stack digitalocean firebase github openai google googleadmin k8s linode netlify okta sumologic vercel godaddy pagerduty homebrew datadog ) + array=( aws azure azure-extras azure-isv azure-stack digitalocean firebase github openai anthropic google googleadmin k8s linode netlify okta sumologic vercel godaddy pagerduty homebrew datadog ) for i in "${array[@]}" do echo "adding redirects for $i" diff --git a/README.md b/README.md index 5c0ebb9157..99a0a8b238 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,8 @@ This repository contains documentation for StackQL providers, which is published | Netlify Deploy Azure ISV | [![Netlify Status](https://api.netlify.com/api/v1/badges/35fc840c-0494-462f-9b3f-cbd3418a3c78/deploy-status)](https://app.netlify.com/sites/stackql-azure-isv-docs/deploys) | [azure-isv-docs.stackql.io](https://azure-isv-docs.stackql.io)
[azure-isv.stackql.io](https://azure-isv.stackql.io) | | Netlify Deploy Azure Stack | [![Netlify Status](https://api.netlify.com/api/v1/badges/53abcb20-0194-41dd-b466-4d933cfffcad/deploy-status)](https://app.netlify.com/sites/stackql-azure-stack-docs/deploys) | [azure-stack-docs.stackql.io](https://azure-stack-docs.stackql.io)
[azure-stack.stackql.io](https://azure-stack.stackql.io) | | Netlify Deploy OpenAI | [![Netlify Status](https://api.netlify.com/api/v1/badges/6df5743b-8c5d-4949-866e-eda4ca3f74d0/deploy-status)](https://app.netlify.com/sites/stackql-openai-docs/deploys) | [openai-docs.stackql.io](https://openai-docs.stackql.io)
[openai.stackql.io](https://openai.stackql.io) | +| Netlify Deploy Anthropic | [![Netlify Status](https://api.netlify.com/api/v1/badges/114c5a2a-9b76-4941-a0e8-3669ee7d2016/deploy-status)](https://app.netlify.com/sites/stackql-anthropic-docs/deploys) | [anthropic-docs.stackql.io](https://anthropic-docs.stackql.io)
[anthropic.stackql.io](https://anthropic.stackql.io) | + ## Adding Docs for a New Provider diff --git a/ci-scripts/get-providers-to-deploy.js b/ci-scripts/get-providers-to-deploy.js index 5df08add1d..620b09508a 100644 --- a/ci-scripts/get-providers-to-deploy.js +++ b/ci-scripts/get-providers-to-deploy.js @@ -16,6 +16,7 @@ const allProviders = [ 'firebase', 'github', 'openai', + 'anthropic', 'google', 'googleadmin', 'k8s', diff --git a/docs/anthropic-docs/index.md b/docs/anthropic-docs/index.md new file mode 100644 index 0000000000..8a53b5976e --- /dev/null +++ b/docs/anthropic-docs/index.md @@ -0,0 +1,87 @@ +--- +title: anthropic +hide_title: false +hide_table_of_contents: false +keywords: + - anthropic + - stackql + - infrastructure-as-code + - configuration-as-data + - cloud inventory +description: Query, deploy, and manage Anthropic resources using SQL. +custom_edit_url: null +image: /img/providers/anthropic/stackql-anthropic-provider-featured-image.png +id: anthropic-doc +slug: /providers/anthropic +--- + +import CopyableCode from '@site/src/components/CopyableCode/CopyableCode'; + +AI models including Claude for advanced language understanding and generation. + +:::info Provider Summary (v24.10.00267) + +
+
+total services: 1
+total methods: 2
+
+
+total resources: 2
+total selectable resources: 2
+
+
+ +::: + +See also: +[[` SHOW `]](https://stackql.io/docs/language-spec/show) [[` DESCRIBE `]](https://stackql.io/docs/language-spec/describe) [[` REGISTRY `]](https://stackql.io/docs/language-spec/registry) +* * * + +## Installation + +To pull the latest version of the `anthropic` provider, run the following command: + +```bash +REGISTRY PULL anthropic; +``` +> To view previous provider versions or to pull a specific provider version, see [here](https://stackql.io/docs/language-spec/registry). + +## Authentication + +The following system environment variables are used for authentication by default: + +- - Anthropic API key (see How to Create an Anthropic API Key) + +These variables are sourced at runtime (from the local machine or as CI variables/secrets). + +
+ +Using different environment variables + +To use different environment variables (instead of the defaults), use the `--auth` flag of the `stackql` program. For example: + +```bash + +AUTH='{ "anthropic": { "type": "bearer", "credentialsenvvar": "MY_ANTHROPIC_API_KEY" }}' +stackql shell --auth="${AUTH}" + +``` +or using PowerShell: + +```powershell + +$Auth = "{ 'anthropic': { 'type': 'bearer', 'credentialsenvvar': 'MY_ANTHROPIC_API_KEY' }}" +stackql.exe shell --auth=$Auth + +``` +
+ +## Services +
+ +
+
+
diff --git a/docs/anthropic-docs/providers/anthropic/messages/claude_35_chat/index.md b/docs/anthropic-docs/providers/anthropic/messages/claude_35_chat/index.md new file mode 100644 index 0000000000..2228f5e855 --- /dev/null +++ b/docs/anthropic-docs/providers/anthropic/messages/claude_35_chat/index.md @@ -0,0 +1,43 @@ +--- +title: claude_35_chat +hide_title: false +hide_table_of_contents: false +keywords: + - claude_35_chat + - messages + - anthropic + - stackql + - infrastructure-as-code + - configuration-as-data + - cloud inventory +description: Query, deploy, and manage Anthropic resources using SQL. +custom_edit_url: null +image: /img/providers/anthropic/stackql-anthropic-provider-featured-image.png +--- + +import CopyableCode from '@site/src/components/CopyableCode/CopyableCode'; + + + + +## Overview + + + + +
Nameclaude_35_chat
TypeResource
Id
+ +## Fields +> This resource is a view. For the view definition, please refer to the provider spec in the [stackql-provider-registry](https://github.com/stackql/stackql-provider-registry/blob/dev/providers/src/anthropic/v00.00.00000/services/messages.yaml), located under `components -> x-stackQL-resources -> claude_35_chat`. + +| Name | Datatype | +|:-----|:---------| +| || +| | `text` | +| | `text` | +| | `text` | +| | `text` | +| | `text` | +| | `text` | +## Methods +No additional methods available for this resource diff --git a/docs/anthropic-docs/providers/anthropic/messages/index.md b/docs/anthropic-docs/providers/anthropic/messages/index.md new file mode 100644 index 0000000000..c4356c4179 --- /dev/null +++ b/docs/anthropic-docs/providers/anthropic/messages/index.md @@ -0,0 +1,48 @@ +--- +title: messages +hide_title: false +hide_table_of_contents: false +keywords: + - messages + - anthropic + - stackql + - infrastructure-as-code + - configuration-as-data + - cloud inventory +description: Query, deploy, and manage Anthropic resources using SQL. +custom_edit_url: null +image: /img/providers/anthropic/stackql-anthropic-provider-featured-image.png +--- + +Given A List Of Messages Comprising A Conversation, The Model Will Return A Response. + +:::info Service Summary + +
+
+total resources: 2
+total selectable resources: 2
+total methods: 2
+
+
+ +::: + +## Overview + + + + + + +
Nameanthropic.messages
TypeService
TitleAnthropic API - Messages
DescriptionGiven A List Of Messages Comprising A Conversation, The Model Will Return A Response.
Idmessages:v24.10.00267
+ +## Resources +
+ + +
diff --git a/docs/anthropic-docs/providers/anthropic/messages/message/index.md b/docs/anthropic-docs/providers/anthropic/messages/message/index.md new file mode 100644 index 0000000000..638d40156f --- /dev/null +++ b/docs/anthropic-docs/providers/anthropic/messages/message/index.md @@ -0,0 +1,44 @@ +--- +title: message +hide_title: false +hide_table_of_contents: false +keywords: + - message + - messages + - anthropic + - stackql + - infrastructure-as-code + - configuration-as-data + - cloud inventory +description: Query, deploy, and manage Anthropic resources using SQL. +custom_edit_url: null +image: /img/providers/anthropic/stackql-anthropic-provider-featured-image.png +--- + +import CopyableCode from '@site/src/components/CopyableCode/CopyableCode'; + + + + +## Overview + + + + +
Namemessage
TypeResource
Id
+ +## Fields +| Name | Datatype | Description | +|:-----|:---------|:------------| +| | `string` | Unique object identifier. | +| | `array` | The generated content blocks by the model. | +| | `string` | The model that handled the request. | +| | `string` | The conversational role of the generated message. | +| | `string` | The reason the model stopped generating. | +| | `string` | The stop sequence that caused the model to stop, if applicable. | +| | `string` | Object type, which is always "message" for Messages API. | +| | `object` | Information about token usage and rate limits. | +## Methods +| Name | Accessible by | Required Params | +|:-----|:--------------|:----------------| +| | `SELECT` | | diff --git a/docs/anthropic-docs/stackql-provider-registry.mdx b/docs/anthropic-docs/stackql-provider-registry.mdx new file mode 100644 index 0000000000..9733361889 --- /dev/null +++ b/docs/anthropic-docs/stackql-provider-registry.mdx @@ -0,0 +1,20 @@ +--- +title: StackQL Provider Registry +hide_title: true +hide_table_of_contents: true +keywords: + - stackql + - infrastructure-as-code + - configuration-as-data + - cloud inventory +description: Query and Deploy Cloud Infrastructure and Resources using SQL +custom_edit_url: null +image: https://storage.googleapis.com/stackql-web-assets/blog/stackql-blog-post-featured-image.png +slug: / +--- +import RegistryPage from '@site/src/shared/shared-stackql-provider-registry.mdx'; + + + +--- + diff --git a/package.json b/package.json index 5dc14b4baf..cca96aec76 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "start:firebase": "export REGISTRY=firebase && docusaurus start", "start:github": "export REGISTRY=github && docusaurus start", "start:openai": "export REGISTRY=openai && docusaurus start", + "start:anthropic": "export REGISTRY=anthropic && docusaurus start", "start:google": "export REGISTRY=google && docusaurus start", "start:k8s": "export REGISTRY=k8s && docusaurus start", "start:netlify": "export REGISTRY=netlify && docusaurus start", @@ -34,6 +35,7 @@ "build:firebase": "export REGISTRY=firebase && docusaurus build", "build:github": "export REGISTRY=github && docusaurus build", "build:openai": "export REGISTRY=openai && docusaurus build", + "build:anthropic": "export REGISTRY=anthropic && docusaurus build", "build:google": "export REGISTRY=google && docusaurus build", "build:k8s": "export REGISTRY=k8s && docusaurus build", "build:netlify": "export REGISTRY=netlify && docusaurus build", diff --git a/scripts/docgen/provider_data.py b/scripts/docgen/provider_data.py index bd98635210..c6e8b9b3eb 100644 --- a/scripts/docgen/provider_data.py +++ b/scripts/docgen/provider_data.py @@ -131,6 +131,11 @@ """ provider_data = { + 'anthropic': { + 'meta_description': 'Query, deploy, and manage Anthropic resources using SQL.', + 'description': 'AI models including Claude for advanced language understanding and generation.', + 'image': '/img/providers/anthropic/stackql-anthropic-provider-featured-image.png' + }, 'openai': { 'meta_description': 'Query, deploy, and manage OpenAI and ChatGPT resources using SQL.', 'description': 'AI models for natural language processing and content generation.', @@ -240,6 +245,23 @@ auth_blocks = { # +# Anthropic +# +'anthropic': { + 'custom': False, + 'variables': """ +- - Anthropic API key (see How to Create an Anthropic API Key) + """, + 'linux': """ +AUTH='{ "anthropic": { "type": "bearer", "credentialsenvvar": "MY_ANTHROPIC_API_KEY" }}' +stackql shell --auth="${AUTH}" + """, + 'windows': """ +$Auth = "{ 'anthropic': { 'type': 'bearer', 'credentialsenvvar': 'MY_ANTHROPIC_API_KEY' }}" +stackql.exe shell --auth=$Auth + """, +}, +# # OpenAI # 'openai': { diff --git a/sidebars.js b/sidebars.js index 30d8cfdcce..b53ae41ac6 100644 --- a/sidebars.js +++ b/sidebars.js @@ -14,19 +14,17 @@ const isLocal = process.env.NODE_ENV=== 'development' const registry = process.env.REGISTRY || 'root' const providers = [ + {name: 'aws'}, + {name: 'azure'}, {name: 'google'}, {name: 'googleadmin'}, - {name: 'azure'}, - {name: 'aws'}, {name: 'digitalocean'}, {name: 'github'}, {name: 'openai'}, + {name: 'anthropic'}, {name: 'linode'}, {name: 'netlify'}, {name: 'okta'}, - {name: 'azure_extras'}, - {name: 'azure_isv'}, - {name: 'azure_stack'}, {name: 'sumologic'}, {name: 'firebase'}, {name: 'k8s'}, @@ -35,6 +33,9 @@ const providers = [ {name: 'datadog'}, {name: 'godaddy'}, {name: 'homebrew'}, + {name: 'azure_extras'}, + {name: 'azure_isv'}, + {name: 'azure_stack'}, ] const getProviderSiteUrl = (name) =>{ diff --git a/src/configs/providers.ts b/src/configs/providers.ts index bf4c42d7bd..e22d4a4457 100644 --- a/src/configs/providers.ts +++ b/src/configs/providers.ts @@ -8,6 +8,7 @@ export const providers = [ {name: 'digitalocean', description: 'Cloud computing services and Infrastructure as a Service (IaaS).', title: 'Digital Ocean'}, {name: 'github', description: 'Web-based version-control and collaboration.', title: 'GitHub'}, {name: 'openai', description: 'AI models and services by OpenAI.', title: 'OpenAI'}, + {name: 'anthropic', description: 'AI language models and services powered by Claude.', title: 'Anthropic'}, {name: 'linode', description: 'Cloud computing services by Akamai.', title: 'Linode'}, {name: 'netlify', description: 'Web development and content distribution platform.', title: 'Netlify'}, {name: 'okta', description: 'Authentication and authorization services.', title: 'Okta'}, diff --git a/static/img/providers/anthropic/anthropic.png b/static/img/providers/anthropic/anthropic.png new file mode 100644 index 0000000000..68c00c2af1 Binary files /dev/null and b/static/img/providers/anthropic/anthropic.png differ diff --git a/static/img/providers/anthropic/stackql-anthropic-provider-featured-image.png b/static/img/providers/anthropic/stackql-anthropic-provider-featured-image.png new file mode 100644 index 0000000000..ddd94a5c64 Binary files /dev/null and b/static/img/providers/anthropic/stackql-anthropic-provider-featured-image.png differ