PaperCloud Documentation

website·Indexed 30 days ago

https://docs.papercloud.tech

A toolset including a CLI for deploying cloud native open source projects on major cloud providers using pre-built cloud images and templates.

Tokens
1.5K
Snippets
15
Records
16
Agent score
0%

What's inside PaperCloud

  1. Install PaperCloud CLI

    Install the PaperCloud CLI using the automatic installation script for your operating system. After installation, verify the installation by checking the version.
    # macOS/Linux
    curl -fsSL https://get.papercloud.dev | bash
    
    # Windows (PowerShell)
    irm https://get.papercloud.dev/install.ps1 | iex
    
    # Verify installation
    papercloud --version
  2. Install Fumadocs UI components

    Use the add command to select and install components. The CLI fetches the latest version of the component from the Fumadocs GitHub repository and transforms import paths to ensure they are up-to-date.
    # Interactive selection
    npx @fumadocs/cli add
    
    # Install specific components (e.g., banner and files)
    npx @fumadocs/cli add banner files
  3. Install Fumadocs components via CLI

    Use the add command to select and install the latest versions of components from the Fumadocs GitHub repository. You can either run the command to select components interactively or pass specific component names directly.
    # Interactive selection
    npx @fumadocs/cli add
    
    # Install specific components (e.g., banner and files)
    npx @fumadocs/cli add banner files
  4. Example of Fumadocs Files component output

    When using the tree command to generate a .tsx file, the output utilizes the File, Folder, and Files components from fumadocs-ui/components/files to render a directory structure.
    import { File, Folder, Files } from 'fumadocs-ui/components/files';
    
    export default (
      <Files>
        <Folder name="app">
          <File name="layout.tsx" />
          <File name="page.tsx" />
          <File name="global.css" />
        </Folder>
        <Folder name="components">
          <File name="button.tsx" />
          <File name="tabs.tsx" />
          <File name="dialog.tsx" />
        </Folder>
        <File name="package.json" />
      </Files>
    );
  5. Deploy a private WireGuard VPN

    Deploy a private WireGuard VPN (using wg-easy UI) to a target cloud provider. Ensure the --name parameter is unique to avoid collisions with existing infrastructure. You can verify the deployment using the app list command.
    # Deploy to Azure
    papercloud app deploy wireguard --name wireguard-vpn --target azure
    
    # Deploy to AWS
    papercloud app deploy wireguard --name wireguard-vpn --target aws
    
    # Deploy to GCP
    papercloud app deploy wireguard --name wireguard-vpn --target gcp
    
    # List deployed applications
    papercloud app list
  6. Deploy PaperCloud images to cloud providers

    Use the papercloud images deploy command to deploy pre-built virtual machine images to supported cloud platforms. You must specify the image name and the target platform using the --target flag.
    # Deploy to Azure
    papercloud images deploy <image-name> --target azure
    
    # Deploy to AWS
    papercloud images deploy <image-name> --target aws
    
    # Deploy to GCP
    papercloud images deploy <image-name> --target gcp
  7. Generate a file tree component using @fumadocs/cli

    Use the @fumadocs/cli tree command to scan a directory and generate a representation of its structure. The CLI supports outputting the tree as either a TSX component (for use with fumadocs-ui) or as an MDX file.
    # Generate a TSX file
    npx @fumadocs/cli tree ./my-dir ./output.tsx
    
    # Generate an MDX file
    npx @fumadocs/cli tree ./my-dir ./output.mdx
    
    # Get help
    npx @fumadocs/cli tree -h
  8. Implement the Files component in Fumadocs UI

    The Files component is used to render a directory structure. The CLI tree command generates the necessary File and Folder components to populate this view.
    import { File, Folder, Files } from 'fumadocs-ui/components/files';
    
    export default (
      <Files>
        <Folder name="app">
          <File name="layout.tsx" />
          <File name="page.tsx" />
          <File name="global.css" />
        </Folder>
        <Folder name="components">
          <File name="button.tsx" />
          <File name="tabs.tsx" />
          <File name="dialog.tsx" />
        </Folder>
        <File name="package.json" />
      </Files>
    );
  9. Generate a file tree for the Fumadocs Files component

    Generate a representation of a directory structure to be used with the Fumadocs UI Files component. The command accepts a source directory and an output file path. It supports both .tsx and .mdx output formats.
    # Generate TSX output
    npx @fumadocs/cli tree ./my-dir ./output.tsx
    
    # Generate MDX output
    npx @fumadocs/cli tree ./my-dir ./output.mdx
    
    # View help
    npx @fumadocs/cli tree -h