### Liam ERD CLI Quick Start Source: https://context7_llms Initiates the interactive setup process for the Liam ERD CLI, guiding the user through initial configuration. ```bash npx @liam-hq/cli init ``` -------------------------------- ### Run Database Tests and Setup (Shell) Source: https://github.com/ridgepole/ridgepole Common shell commands for setting up and running tests related to database interactions. This includes starting Docker services, installing dependencies, and executing test suites with different database configurations. ```shell docker compose up -d bundle install bundle exec appraisal install bundle exec appraisal activerecord-7.0 rake # POSTGRESQL=1 bundle exec appraisal activerecord-7.0 rake # MYSQL80=1 bundle exec appraisal activerecord-7.0 rake ``` -------------------------------- ### Prisma CLI: Initialize Project Source: https://www.prisma.io/ Initializes a new Prisma project with database setup. This command is used to start a new project or add Prisma to an existing one. ```sh npx prisma@latest init --db ``` -------------------------------- ### Travis CI Configuration for tbls Source: https://github.com/k1LoW/tbls Example Travis CI configuration file (.travis.yml) to install and run tbls commands. It demonstrates fetching the tbls installation script and executing diff/lint checks. ```yaml # .travis.yml language: go install: - source &(curl -sL https://raw.githubusercontent.com/k1LoW/tbls/main/use) script: - tbls diff - tbls lint ``` -------------------------------- ### Install and Initialize pg-query-emscripten Source: https://github.com/pganalyze/pg-query-emscripten Demonstrates how to install the pg-query-emscripten package via npm and initialize the module to parse SQL queries in a Javascript environment. It shows the asynchronous loading of the Emscripten module and a basic parsing example. ```javascript npm install pg-query-emscripten --save import Module from "pg-query-emscripten"; let pgQuery; (async () => { pgQuery = await new Module(); console.log(pgQuery.parse("select 1")); })(); ``` -------------------------------- ### Initialize Liam ERD Project Configuration Source: https://context7_llms The `init` command in the Liam ERD CLI offers an interactive setup process. It helps generate necessary configuration files or GitHub Actions templates, simplifying the initial project configuration by guiding users through specifying input files and schema formats. ```npm npx @liam-hq/cli init ``` -------------------------------- ### Deploy Vite App with Vercel CLI Source: https://vite.dev/guide/static-deploy.html This snippet details the process of installing the Vercel Command Line Interface (CLI) and initializing a Vite project for deployment. It covers the essential commands to get started with Vercel deployments for Vite applications. ```bash $ npm i -g vercel $ vercel init vite Vercel CLI > Success! Initialized "vite" example in ~/your-folder. - To deploy, `cd vite` and run `vercel`. ``` -------------------------------- ### Initialize Liam ERD CLI Source: https://context7_llms Command to start an interactive setup for private repositories. This command initiates the CLI process, guiding users through building a static version of their ER diagrams. ```bash npx @liam-hq/cli init ``` -------------------------------- ### README Documentation Source: https://github.com/notiz-dev/prisma-dbml-generator Provides an overview of the project, installation instructions, usage examples, and contribution guidelines. This markdown file serves as the primary documentation for users. ```markdown # Prisma to DBML generator This project generates DBML (Database Markup Language) from Prisma schema files. ## Installation ```bash npm install -g prisma-dbml-generator ``` ## Usage ```bash prisma-dbml-generator --output ./schema.dbml ``` ## Contributing Contributions are welcome! Please read the CONTRIBUTING.md file for details. ``` -------------------------------- ### Compile C Example Source: https://github.com/pganalyze/libpg_query Command to compile the C example code. It specifies include and library paths for libpg_query and links against the library. ```shell cc -Ilibpg_query -Llibpg_query example.c -lpg_query ``` -------------------------------- ### Compile C Example Source: https://github.com/pganalyze/libpg_query Command to compile the C example code, linking against the libpg_query library. ```Shell cc -Ilibpg_query -Llibpg_query example.c -lpg_query ``` -------------------------------- ### Install tbls using go install Source: https://github.com/k1LoW/tbls Installs the tbls tool using the Go programming language's install command. This fetches, builds, and installs the latest version of the tool globally. ```shell $ go install github.com/k1LoW/tbls@latest ``` -------------------------------- ### Install prisma-uml CLI Source: https://github.com/emyann/prisma-uml Instructions for installing the prisma-uml command-line interface globally using npm or executing it directly via npx. ```shell npx prisma-uml --help ``` ```shell npm i -g prisma-uml prisma-uml --help ``` -------------------------------- ### Run Ridgepole Tests with Docker Source: https://github.com/ridgepole/ridgepole Provides instructions on setting up and running Ridgepole tests, including database setup using Docker Compose and dependency installation with Bundler. It also shows how to run tests against different database versions. ```shell docker compose up -d bundle install bundle exec appraisal install bundle exec appraisal activerecord-7.0 rake # POSTGRESQL=1 bundle exec appraisal activerecord-7.0 rake # MYSQL80=1 bundle exec appraisal activerecord-7.0 rake ``` -------------------------------- ### Install Django PostgreSQL Dependencies Source: https://github.com/liam-hq/liam-erd-samples/tree/main/samples/django-with-postgres Sets up a Python virtual environment and installs necessary packages like Django and psycopg2-binary for PostgreSQL interaction. ```shell python -m venv venv source venv/bin/activate pip install django psycopg2-binary ``` -------------------------------- ### Install tbls via go install Source: https://github.com/k1LoW/tbls This command installs the tbls tool directly from its Go source code repository using the 'go install' command. Ensure Go is installed and configured. ```shell go install github.com/k1LoW/tbls@latest ``` -------------------------------- ### Install and Execute Prisma-UML Globally Source: https://github.com/emyann/prisma-uml Provides instructions for installing the Prisma-UML CLI globally using npm. After installation, the command can be executed directly from any terminal location. ```shell npm i -g prisma-uml prisma-uml --help ``` -------------------------------- ### Download and Source tbls Setup Script Source: https://github.com/k1LoW/tbls This command downloads the tbls setup script from GitHub and sources it into the current shell session. This is typically the first step to make the tbls command available. ```shell curl -sL https://raw.githubusercontent.com/k1LoW/tbls/main/use > /tmp/use-tbls.tmp && . /tmp/use-tbls.tmp ``` -------------------------------- ### tbls Configuration File Example Source: https://github.com/k1LoW/tbls An example of a `.tbls.yml` configuration file. It specifies the Database Source Name (DSN) for connecting to a PostgreSQL database and the output path for the generated documentation. ```yaml # .tbls.yml # DSN (Database Source Name) to connect database dsn: postgres://dbuser:dbpass@localhost:5432/dbname # Path to generate document # Default is `dbdoc` docPath: doc/schema ``` -------------------------------- ### Execute Prisma-UML with npx Source: https://github.com/emyann/prisma-uml Demonstrates how to run the Prisma-UML CLI without global installation using npx. This is useful for quick execution or when avoiding global package installations. ```shell npx prisma-uml --help ``` -------------------------------- ### Ridgepole Configuration File Example Source: https://github.com/ridgepole/ridgepole An example of a `config.yml` file used by Ridgepole to specify database connection details. This file is essential for Ridgepole to interact with the target database. ```yaml adapter: mysql2 encoding: utf8 database: blog username: root ``` -------------------------------- ### Initialize Fumadocs App Source: https://fumadocs.vercel.app/ Command to create a new Fumadocs documentation project. It prompts for project name and content source selection. ```bash npm create fumadocs-app # Example prompts: # Project name: my-app # Choose a content source: Fumadocs MDX ``` -------------------------------- ### Git Push Deployment Example Source: https://vercel.com/ Demonstrates the process of pushing code changes to a Git repository hosted on Vercel, triggering a deployment. This snippet shows typical Git output after a push operation. ```git ▲ ~ vercel-site/ git push Enumerating objects: 1, done. Counting objects: 100% (1/1), done. Writing objects: 100% (1/1), 72 bytes, done. Total 1 (delta 0), reused 0 (delta 0). To github.com:vercel/vercel-site.git 21326a9..81663c3 main -> main vercel.com ``` -------------------------------- ### Initialization and Configuration Source: https://zenn-dev.translate.goog/nextbeat/articles/liam-erd-tbls-mysql Handles the initialization of the library or framework, setting up configurations, and potentially processing command-line flags or environment variables. It includes logic for versioning and feature detection. ```javascript var Zf=function(a){_.w.call(this);this.G=a;this.B=Df(a);this.l=this.o=null;this.J=!0;this.h=new _.Ef(this);this.M=[];this.A=new Set;this.g=[];this.O=new Yf;this.j=[];this.C=!1;a=(0,_.C)(this.F,this);hf.version=a}; _.y(Zf,_.w); Zf.prototype.I=function(a,b,c){var d=c===void 0?{}:c;var e=d.qj;c=d.tj;var f=d.If;d=d.Wk;a=ag(this,a,b,e,c);bg(this,a,f,d,c)}; Zf.prototype.K=function(){this.h.dispose();delete hf.version;_.w.prototype.K.call(this)}; var mg=new tf(!1),ng=document.location.href; bf({flags:{dml:mg},initialize:function(a){var b=mg.get(),c="",d="";window&&window._F_cssRowKey&&(c=window._F_cssRowKey,window._F_combinedSigna ``` -------------------------------- ### Nextra Guide: Syntax Highlighting Source: https://nextra.site/ Markdown example demonstrating syntax highlighting for code blocks using standard Markdown fenced code blocks with language identifiers. ```mdx ```javascript function greet(name) { console.log(`Hello, ${name}!`); } greet('World'); ``` ```python def greet(name): print(f"Hello, {name}!") greet('World') ``` ``` -------------------------------- ### Fumadocs UI Template - Header Navigation Source: https://fumadocs.vercel.app/ Renders the main navigation bar for the Fumadocs UI template. Includes links for 'Getting Started' and an external demo link. ```javascript self.__next_f.push([ 1, "2a:[\"$\",\"div\",null,{\"className\":\"inline-flex items-center gap-3\",\"children\":[[\"$\",\"$L27\",null,{\"href\":\"/docs\",\"className\":\"inline-flex items-center justify-center text-sm font-medium ring-offset-fd-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fd-ring disabled:pointer-events-none disabled:opacity-50 bg-gradient-to-b from-fd-primary to-fd-primary/60 text-fd-primary-foreground shadow-fd-background/20 hover:bg-fd-primary/90 h-11 px-6 rounded-full\",\"children\":\"Getting Started\"}], [\"$\",\"a\",null,{\"href\":\"https://stackblitz.com/~/github.com/fuma-nama/fumadocs-ui-template\",\"className\":\"inline-flex items-center justify-center text-sm font-medium ring-offset-fd-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fd-ring disabled:pointer-events-none disabled:opacity-50 border hover:bg-fd-accent hover:text-fd-accent-foreground h-11 px-6 rounded-full bg-fd-background\",\"children\":\"Open Demo\"} ]]} ]) ``` -------------------------------- ### Run Local Preview with npm Source: https://vite.dev/guide/static-deploy.html Executes the 'preview' script defined in package.json to start a local static web server. This server serves files from the 'dist' directory, allowing you to preview the production build locally. The port can be configured using the --port flag. ```bash $ npm run preview ``` -------------------------------- ### Code Block Configuration Source: https://fumadocs.vercel.app/ Configures a code block component, including its type table, search router, theme, interactivity, and MDX support. This setup is typical for rendering and interacting with code examples in documentation. ```javascript self.__next_f.push([ 1, "31:[\"$\",\"div\",null,{\"className\":\"relative overflow-hidden border-x border-t p-2\",\"children\":[\"$\",\"$L5f\",null,{\"typeTable\":[\"$\",\"$L60\",null,{\"type\":{\"name\":{\"type\":\"string\",\"description\":\"The name of player\",\"default\":\"hello\"},\"code\":{\"type\":\"string\",\"description\":\"$L61\"}}}],\"codeblockSearchRouter\":\"$L62\",\"codeblockTheme\":\"$L63\",\"codeblockInteractive\":\"$L64\",\"codeblockMdx\":\"$L65\"}]} ]) ``` -------------------------------- ### Serve ERD Locally Source: https://zenn.dev/nextbeat/articles/liam-erd-tbls-mysql Starts a local HTTP server to serve the generated ER diagram files from the 'dist/' directory. This allows viewing the ER diagram in a web browser. The 'http-server' package needs to be installed if not already present. ```shell npx http-server dist/ ``` -------------------------------- ### GitHub Product Features Overview Source: https://github.com/liam-hq/liam-erd-samples/tree/main/samples/mssql-with-tbls A list of key GitHub products and features, including AI-powered tools and development environments. ```text GitHub Copilot Write better code with AI GitHub Spark New Build and deploy intelligent apps GitHub Models New Manage and compare prompts GitHub Advanced Security Find and fix vulnerabilities Actions Automate any workflow Codespaces Instant dev environments Issues Plan and track work Code Review Manage code changes Discussions ``` -------------------------------- ### Create Vite Server Source: https://vite.dev/ Demonstrates how to create a Vite development server instance using the `createServer` function. This setup allows for custom configuration and starting the server to print available URLs. ```javascript import { createServer } from 'vite' const server = await createServer({ // user config options }) await server.listen() server.printUrls() ``` -------------------------------- ### Install libpg_query Source: https://github.com/pganalyze/libpg_query Instructions for cloning the libpg_query repository and compiling the library. Supports standard 'make' for Unix-like systems and 'nmake' with Makefile.msvc for Windows. ```Shell git clone -b 17-latest git://github.com/pganalyze/libpg_query cd libpg_query make ``` ```Shell nmake /F Makefile.msvc ``` -------------------------------- ### Initialize Prisma Project with Database Source: https://www.prisma.io/ This command initializes a new Prisma project and sets up the database connection. It's the first step to integrating Prisma into your application, ensuring your project is ready to interact with your database. ```shell npx prisma@latest init --db ``` -------------------------------- ### Deploy AI Chatbot Template Source: https://www.netlify.com/ Example JavaScript code for an AI chatbot template, demonstrating how to get a chat stream from an API. It requires API configuration and messages. ```js const stream = await getChatStream( { ...appConfig.apiConfig, user: context.ip, messages: [{ role: "system", content: prompt }, ...messages], }, appConfig.OPENAI_API_KEY ?? "" ); return new Response(stream, { headers: { "Content-Type": "text/plain" }, }); ``` -------------------------------- ### Server-Side Search Handler Setup Source: https://fumadocs.vercel.app/ This snippet shows how to create a server-side route handler for search functionality in Fumadocs. It utilizes `createFromSource` from `fumadocs-core/search/server` to process a `source` object, making search capabilities available via a GET request. ```typescript import { source } from '@/lib/source'; import { createFromSource } from 'fumadocs-core/search/server'; export const { GET } = createFromSource(source); ``` -------------------------------- ### Dockerfile for Liam ERD Setup Source: https://tech.gree-x.com/automated-er-diagram-generation/index.html Dockerfile to set up a Node.js environment, install the Liam ERD CLI and http-server, copy the schema file, and build the ER diagram. It uses a specific version of the Liam ERD CLI. ```dockerfile # Dockerfile FROM node:22-slim WORKDIR /app ARG LIAM_VERSION=0.5.5 RUN npm install @liam-hq/cli@${LIAM_VERSION} http-server COPY db/schemas/schema.rb . RUN npx @liam-hq/cli@${LIAM_VERSION} erd build \ --format schemarb --input schema.rb --output-dir dist ``` -------------------------------- ### Netlify CLI Installation and Deployment Source: https://vite.dev/guide/static-deploy.html Commands for installing the Netlify CLI, initializing a new Netlify site, and deploying the project. The 'ntl deploy' command deploys to a preview URL, while 'ntl deploy --prod' deploys to the production URL. ```bash # Install the Netlify CLI $ npm install -g netlify-cli # Create a new site in Netlify $ ntl init # Deploy to a unique preview URL $ ntl deploy # Deploy the site into production $ ntl deploy --prod ``` -------------------------------- ### Get Chat Stream Example Source: https://www.netlify.com/ Demonstrates calling a chat stream API with configuration and messages. It uses provided API configuration, user context, and messages to generate a stream response, setting the Content-Type header. ```typescript const stream = await getChatStream( { ...appConfig.apiConfig, user: context.ip, messages: [{ role: "system", content: prompt }, ...messages], }, appConfig.OPENAI_API_KEY ?? "" ); return new Response(stream, { headers: { "Content-Type": "text/plain" }, }); ``` -------------------------------- ### Prisma-UML CLI Usage Examples Source: https://github.com/emyann/prisma-uml Demonstrates common ways to use the prisma-uml command-line tool to generate diagrams from a Prisma schema file. Examples include basic generation, saving to a file, specifying output formats (SVG, PNG), and using a custom PlantUML server. ```shell # Output a plantUML Entity Relation Diagram as text prisma-uml ./schema.prisma ``` ```shell # Save the diagram into a .plantuml file prisma-uml ./schema.prisma > my-erd.plantuml ``` ```shell # Output a diagram as SVG prisma-uml ./schema.prisma --output svg --file my-erd.svg ``` ```shell # Output a diagram as PNG prisma-uml ./schema.prisma -o png -f my-erd.png ``` ```shell # Use a plantUML custom server to render the image prisma-uml ./schema.prisma --server http://localhost:8080 ``` -------------------------------- ### KPSDK Initialization and Configuration Source: https://vercel.com/ Manages the initialization and configuration of a Key Protection SDK (KPSDK). It ensures the SDK is available in the browser environment, handles loading and readiness events, and configures the SDK with provided domain and path mappings. It also includes logic for server-side detection. ```javascript var c=class a{#a=!1;#b;constructor(a){this.#b=a}get loaded(){return this.#a}load=async()=>{ this.#a||await this.#f() };#c=()=>{ if(typeof globalThis.window>"u")throw Error("KPSDK is not available in the server"); if(!window.KPSDK)throw Error("KPSDK is not loaded"); let b=this.#b.map(b=>{ let c=a.#e(b.path); return{domain:c.host,path:c.pathname,method:b.method} }); try{ window.KPSDK.configure(b) }catch(a){ console.error("Error configuring KPSDK...",a) } }; #f=async()=>{ let a=this; return new Promise((c,d)=>{ let e=()=>{ document.removeEventListener("kpsdk-load",e),this.#c() },f=()=>{ document.removeEventListener("kpsdk-ready",f),a.#a=!0,c() }; document.addEventListener("kpsdk-load",e,{once:!0}),document.addEventListener("kpsdk-ready",f,{once:!0}),b("/149e9513-01fa-4fb0-aad4-566afd725d1b/2d206a39-8ed7-437e-a3be-862e0f06eea3/p.js").catch(a=>{ document.removeEventListener("kpsdk-load",e),document.removeEventListener("kpsdk-ready",f),d(a) }) })}; static #e(a){ let b; try{ b=new URL(a) }catch{ b=new URL(a,location.origin) } return b }} ``` -------------------------------- ### README.md Welcome Section Source: https://github.com/emyann/prisma-uml This snippet represents the beginning of the README.md file for the emyann/prisma-uml repository. It includes the main heading of the document. ```markdown

Welcome ``` -------------------------------- ### Install Ridgepole via Bundler Source: https://github.com/ridgepole/ridgepole Execute `bundle install` after adding Ridgepole to your Gemfile to download and install the gem and its dependencies. ```Shell $ bundle install ``` -------------------------------- ### Install Ridgepole Directly Source: https://github.com/ridgepole/ridgepole Alternatively, install the Ridgepole gem directly using the `gem install` command if you are not using Bundler. ```Shell $ gem install ridgepole ``` -------------------------------- ### Commit and Push Database Documentation Source: https://github.com/k1LoW/tbls This sequence of commands demonstrates how to add the generated database documentation and the configuration file to Git, commit them, and push to the main branch. ```shell $ git add .tbls.yml doc/schema $ git commit -m 'Add database document' $ git push origin main ``` -------------------------------- ### Install tbls using aqua Source: https://github.com/k1LoW/tbls Installs the tbls tool using the aqua package manager. This command fetches and installs the specified tool from its repository. ```shell $ aqua g -i k1LoW/tbls ``` -------------------------------- ### Search Integration Example (Algolia) Source: https://fumadocs.vercel.app/ Reference to documentation for integrating Algolia search into Fumadocs sites. ```APIDOC Search Integration: - Integrate with Orama Search and Algolia Search in your docs easily. - Related: /docs/headless/search/algolia ``` -------------------------------- ### Install tbls via aqua Source: https://github.com/k1LoW/tbls This command installs the tbls tool using aqua, a portable CLI runner. It fetches and installs the specified version of tbls. ```shell aqua g -i k1LoW/tbls ``` -------------------------------- ### tbls.yml with URL and Headers Source: https://github.com/k1LoW/tbls An example .tbls.yml configuration including the database URL and custom headers, such as Authorization for authentication. ```yaml --- # .tbls.yml dsn: url: https://hostname/path/to/testdb.json headers: Authorization: token GITHUB_OAUTH_TOKEN ``` -------------------------------- ### Install Ridgepole Gem Source: https://github.com/ridgepole/ridgepole Instructions for adding the Ridgepole gem to your project's Gemfile and installing it using Bundler, or installing it globally via the gem command. ```ruby gem 'ridgepole' ``` ```shell $ bundle install ``` ```shell $ gem install ridgepole ``` -------------------------------- ### Generate Database Documentation with tbls Source: https://github.com/k1LoW/tbls After setting up the configuration file, run the `tbls doc` command. This command analyzes the connected database and generates documentation in GitHub-friendly Markdown format. ```shell tbls doc ``` -------------------------------- ### Install tbls using MacPorts Source: https://github.com/k1LoW/tbls Installs the tbls CLI tool on macOS using the MacPorts package manager. This command requires sudo privileges to install system-wide. ```shell $ sudo port install tbls ``` -------------------------------- ### Install tbls using Homebrew Source: https://github.com/k1LoW/tbls Installs the tbls CLI tool on macOS using the Homebrew package manager. This is a convenient way to manage installations and updates on macOS. ```shell $ brew install k1LoW/tap/tbls ```