Socket
Socket
Sign inDemoInstall

basehub

Package Overview
Dependencies
Maintainers
1
Versions
225
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

basehub

The first AI-native headless cms.


Version published
Weekly downloads
23K
increased by2.14%
Maintainers
1
Weekly downloads
 
Created
Source

basehub 🪄

The First AI-Native Headless CMS. JavaScript / TypeScript SDK.

Install

npm i basehub

Quickstart for Next.js

1. Set required environment variable:
# .env

BASEHUB_URL="https://basehub.com/<team-slug>/<repo-slug>/graphql?token=<read-token>"

# or disambiguated
BASEHUB_TEAM="<team-slug>"
BASEHUB_REPO="<repo-slug>"
BASEHUB_TOKEN="<read-token>"
  • Get your read token in the Connect panel: https://basehub.com/<team-slug>/<repo-slug>/connect
2. Run your first query:
// src/app/page.ts

import { basehub } from "basehub";

const Page = async () => {
  const firstQuery = await basehub.query({
    __typename: true,
  });

  return <pre>{JSON.stringify(firstQuery, null, 2)}</pre>;
};

export default Page;
3. (Optional) Generate TypeScript types for Intellisense:
npm run basehub

Tip: to keep your types up to date, you can add basehub to your postinstall script.

FAQs

Package last updated on 18 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc