LogoLogo
Siteglide.comAdminRoadmap
  • πŸ‘‹Welcome
  • Get Started
    • πŸš€Quickstart Guides
    • ❔Support & FAQs
      • ℹ️Siteglide Support Policy
      • ℹ️Siteglide Technology Stack
      • ℹ️External Resources
      • ℹ️Front-end Browser Support
  • Portal
    • Account
    • Sites
      • πŸš€Quickstart: Create a Site
      • ℹ️Site Details
      • ℹ️Site Users
      • πŸ“‹Install & Manage Modules
      • πŸ’³Go Live
      • πŸ’³Subscription
      • 🌍Domains
        • πŸ“‹Add a Fully Delegated Domain
        • πŸ“‹Add an External Domain
        • πŸ’»Subdomain on a separate instance
        • πŸ“‹How to setup a multi domain start page
      • ☁️Site Backups and Disaster Recovery
    • Users
      • πŸ“‹User Roles
      • πŸ“‹Invite & Manage Users
    • Billing
      • πŸ’³Billing Setup
      • πŸ’³Subscriptions and Changes
      • πŸ’³Automatic Site Upgrades
      • πŸ’³Invoices
    • Tickets
    • Marketplace
    • Agencies
      • πŸ‘©β€πŸ’»Agency Account
      • πŸ‘©β€πŸ’»Clients
      • πŸ‘©β€πŸ’»Site Copies
      • πŸ‘©β€πŸ’»Agency Whitelabelling
  • Developer Tools
    • CLI
      • πŸš€Quickstart: CLI
      • ℹ️About
      • πŸ“‹Site Setup
      • ❔Troubleshooting
      • πŸ’»Reference
      • πŸ›³οΈCLI Changelog
      • πŸ§™β€β™‚οΈGo Further: CLI
        • Creating WebApps via CLI
    • Liquid
      • ℹ️About
      • πŸ’»Reference
      • Accessing Data in Liquid Variables - Tutorial 1 - Using Dot Notation
      • Accessing Data in Liquid Variables - Tutorial 2 - Iterating over Arrays and Objects
      • Using Collections with WebApps and Modules
      • Accessing Data from the Global Context Variable
      • Truthiness - Using Liquid to determine if a field is empty or blank
      • πŸ“‹Alternatives to Storing and Executing Liquid from Database Items
    • GraphQL
      • ℹ️About GraphQL
      • πŸ“‹Tutorials
        • Tutorial 1 - Your First Query
        • Tutorial 2 - Pagination
        • Tutorial 3 - Filtering the Results
        • Tutorial 3 - (Answers)
        • Tutorial 4 - Advanced Filtering
        • Tutorial 4 - (Answers)
        • Tutorial 5 - Using Liquid to run GraphQL queries on your Site
        • Tutorial 6 - Variables
        • Tutorial 6 - (Answers)
        • Tutorial 7 - Sorting
        • Tutorial 8 - Building a Liquid API GET Endpoint Page powered by GraphQL queries
        • Tutorial 9 - Using Mutations to Create New Records
        • Tutorial 10 - Using Mutations to Edit a Record
        • Tutorial 11 - Using Mutations to Delete an Item
        • Tutorial 12 - Related Records and Datasources
    • Configuration
      • ℹ️Field Types
      • ℹ️Custom Field IDs
    • Zapier Integration
      • ℹ️Formatting arrays correctly
    • Developer Marketplace
      • ℹ️About Building Modules
      • ℹ️Module Setup
      • ℹ️Site Template Modules - and How to Make Your Own
      • ℹ️Create Folder Structure
      • ℹ️Updating Modules
      • ℹ️Submit Module for Approval
      • ℹ️Adding Payment to a Module
      • ℹ️Theme Module Example
      • ℹ️Data & UI Module Example
      • πŸ’»Reference
      • 🌳File Structure
    • Release Notes
      • πŸ›³οΈSiteglide Admin/API - Changelog
      • πŸ›³οΈModule - System Files - Changelog
      • πŸ›³οΈModule - eCommerce - Changelog
      • πŸ›³οΈModule - Menu - Changelog
      • πŸ›³οΈModule - Slider - Changelog
      • πŸ›³οΈModule - Secure Zones - Changelog
      • πŸ›³οΈModule - FAQ - Changelog
      • πŸ›³οΈModule - Events - Changelog
      • πŸ›³οΈModule - Blog - Changelog
  • SiteBuilder
    • Build Sites Faster
      • πŸš€Quickstart: SiteBuilder
      • About
      • Site Setup
        • πŸ—οΈMarketplace Themes & Templates
        • πŸ—οΈCreate Site From Template
        • πŸ—οΈInstall SiteBuilder Module
        • πŸ—οΈCreate a Page Template
        • πŸ—οΈSet Up Tailwind CSS with the recommended CLI method
      • Styling
        • πŸ—οΈEditing Tailwind CSS using the recommended CLI method
        • πŸ—οΈTailwind CSS Themes - Choosing a Build Method
        • πŸ—οΈTailwind CSS - Preview Mode
        • πŸ—οΈTailwind's JIT Compiler Via CDN (deprecated)
        • πŸ—οΈTheme Presets
        • πŸ—οΈExample Tailwind Project Setup
      • Layouts
        • πŸ—οΈInsert Static Layouts
        • πŸ—οΈInstalling Dynamic Layouts
        • πŸ—οΈEditing Dynamic Layouts
        • About Layouts
          • πŸ—οΈDynamic Layouts
          • πŸ—οΈStatic and Dynamic Form Layouts
          • πŸ—οΈSliders
      • πŸ’»Reference
    • Advanced Features
      • 🧞SiteBuilder Live Updates API
        • πŸ‘€Live Updates Reference
        • πŸ”ΉLive Updates Markup Example
        • πŸ“‹Steps to Setting Up Live Updates API in a Module/WebApp Layout
        • πŸ”ΉLive Updates Example - Enforcing Filters
        • πŸ“‹Steps to Use Live Updates Methods
        • πŸ“‹Steps to Initialise Live Updates with JS
        • πŸ—“οΈLive Updates Changelog
      • ℹ️SiteBuilder JavaScript
        • ℹ️Forms JS
        • ℹ️Social Sharing JS
        • ℹ️Sliders JS
        • ℹ️Dark Mode JS
        • ℹ️Cookie Settings JS
      • ℹ️SiteBuilder Liquid Includes
        • ℹ️Pagination
      • ℹ️SiteBuilder Liquid Functions
        • ℹ️Detail Page Valid
        • ℹ️Field Mapping
        • ℹ️Get Table Config
        • ℹ️Case From Order ID
      • πŸ—“οΈSiteBuilder Changelog
    • Extend SiteBuilder
      • ℹ️Create SiteBuilder Themes
      • ℹ️Create Marketplace Modules
      • ℹ️Adding Dynamic Layouts to Themes & Modules
      • ℹ️Adding Static Layouts to your Theme
      • πŸ’»Reference
  • CMS
    • Dashboard
    • Pages
      • πŸš€Quickstart: Pages
      • 🎨Studio Alpha Release
      • ℹ️Studio
      • ℹ️Code View & Toolbox
      • ℹ️About Pages
        • ℹ️Page Settings
        • ℹ️Custom Fields in Pages
        • ℹ️Pages with Siteglide CLI
      • ℹ️About Page Templates
        • ℹ️Page Templates with Siteglide CLI
        • Preventing Duplicate Content
      • ℹ️System Pages
      • πŸ’»Reference
      • 🌳File Structure
    • Content Sections
    • File Manager
      • πŸ”ΉAbout Assets
      • πŸ”ΉLinking to Assets Explained
      • πŸ”§Assets Troubleshooting
      • πŸ”ΉSiteglide Scripts Explained
      • πŸ’»Assets with CLI
      • πŸ”ΌMigrating Assets
      • πŸ“‹Steps to Optimise Images on the Fly with Cloudinary
      • πŸ”Ήsiteglide_head_scripts and siteglide_footer_scripts Explained
      • 🌳Assets File Structure
      • πŸ‘€Tags for Assets
    • Forms
      • Quickstart: Forms
      • ℹ️About Forms
      • πŸ“‹Guides: Forms
        • πŸ“‹Steps to Using Separate Fields for First Name and Surname in a Form
        • πŸ“‹Steps to Programmatically Redirecting after a Form Submission
        • πŸ“‹Steps to Adding Form Confirmation Pages
        • πŸ“‹Steps to Adding a Progress Bar
        • πŸ“‹Steps to Changing Form Styling on Submission Using CSS
        • πŸ“‹Steps to Using Custom Field Set fields in a Form's Custom Layout
      • πŸ§™β€β™‚οΈGo Further: Forms
        • ℹ️Migrating Forms
        • ℹ️Explained - Preventing Spam Form Submissions and Captchas
        • ℹ️Explained - Show Clearly When a User is Already Logged in When Submitting a Form
        • ℹ️Forms Error Callback and Validation
        • ℹ️Forms Success Callback
        • ℹ️File Upload Previews
      • 🌳Forms File Structure
      • πŸ’»Reference
      • ❔Troubleshooting
    • Automations
      • πŸš€Quickstart: Automations
      • ℹ️About
        • ℹ️Email Templates
        • ℹ️Email Automations and Email Templates with Siteglide CLI
      • πŸ“‹Guides
        • ℹ️Integration Automations
        • ℹ️A Transactional Email Example
        • ℹ️An API Call Action Example
        • ℹ️A Custom Liquid Action Example
        • πŸ“‹Steps to Testing Emails on a Staging Site
        • πŸ“‹Steps to Authenticating Sendgrid Emails on Live Sites
      • πŸ§™β€β™‚οΈGo Further
      • πŸ’»Reference
      • 🌳File Structure
    • Categories
      • πŸš€Quickstart: Categories
      • ℹ️About
        • ℹ️Outputting Categories on WebApp / Module / eCommerce Layouts
        • ℹ️Filtering WebApps and Modules by Categories Using Liquid Parameters
      • 🌳File Structure
      • πŸ’»Reference
    • Company Information
      • ℹ️About
      • πŸ’»Reference
      • ❔Troubleshooting
    • URL Redirects
  • Modules
    • Core Modules
      • MenuBuilder
        • πŸš€Quickstart: Menu Builder
        • ℹ️About
      • Secure Zones
        • πŸš€Quickstart: Secure Zones
        • ℹ️About
          • πŸ“‹Dynamically Assign a Secure Zone during Form Submission
        • πŸ§™β€β™‚οΈGo Further
          • ℹ️Secure Zones with Siteglide CLI
          • ℹ️Using the context.current_user object
      • Media Downloads
        • πŸš€Quickstart: Media Downloads
        • ℹ️Layouts
        • πŸ’»Reference
      • Blog & Authors
        • πŸš€Quickstart: Blog & Authors
        • πŸ”ΉBlog Archive & Date Filtering
        • πŸ”ΉBlog Search
        • πŸ”ΉBlog Filter by Category
        • πŸ”ΉBlog Filter by Author
        • 🌳File Structure
        • πŸ’»Reference
      • Events
        • πŸš€Quickstart: Events
        • ℹ️Standard List View
        • ℹ️Getting Started with Event Filtering & Searching
        • ℹ️Filter by Category
        • ℹ️Filter By Host (Author)
        • ℹ️Filter by Event Dates
        • ℹ️Datasourcing the Event Host
        • ℹ️Search
        • ℹ️Map List View
        • ℹ️Calendar List View
      • FAQ
        • πŸš€Quickstart: FAQ
        • πŸ’»Reference
      • Testimonials
        • πŸš€Quickstart: Testimonials
        • πŸ’»Reference
      • Slider
        • πŸš€Quickstart: Slider
        • πŸ’»Reference: Slider
    • Community Modules
      • πŸ—οΈSiteBuilder
      • πŸš€CRM Sync
        • ℹ️About CRM Sync Module
        • πŸ“‹Steps to Set Up CRM Sync on an Automation
        • πŸ—“οΈCRM Sync Changelog
    • Go Further: Modules
      • ℹ️Front-end Submit Modules
  • WebApps
    • πŸš€Quickstart: WebApps
    • WebApp Items
      • πŸ“‹Create WebApp Items
      • πŸ“‹Importing and Exporting
    • Layouts
      • ℹ️WebApp List Layout
      • ℹ️WebApp Detail Layouts
    • Go Further: WebApps
      • πŸ“‹Searching by Location
      • πŸ“‹Searching - Advanced Filtering
      • πŸ“‹Searching - By Keyword
      • πŸ“‹Front End Create Forms
      • πŸ“‹Front End Update Forms
      • πŸ“‹Front End Delete
  • WebApp Troubleshooting
  • eCommerce
    • πŸš€Quickstart: eCommerce
    • Get Started
      • πŸ’‘About the eCommerce Module
      • Settings
      • πŸ“‚Cart, Checkout and Quotes
        • πŸ’‘About Cart, Checkout and Quotes
        • πŸ“‹Steps to Implement a Guest Checkout Flow
        • πŸ“‚Product Views
          • πŸ”ΉProduct Layouts
          • πŸ”ΉProduct List Layout
          • πŸ”ΉProduct Detail Layout
          • πŸ”ΉAdd to Cart Button
          • πŸ“‹Steps to Datasource and Display Related Products
          • πŸ”ΉDynamic Product Layouts based on Categories
          • πŸ“‚Attribute Selection
            • πŸ”ΉAttribute Layout - Presenting the Choice to the Customer
            • πŸ”ΉAttributes - Changing Product Price after Change
          • πŸ“‚Discount Selection
            • Discount Codes Layout
            • Minimum Payments
          • πŸ“‚Shipping Selection
            • Shipping Options Layout
        • Managing Products
          • Creating and Editing
          • Securing Products
          • Location
          • Custom Fields
          • Edit Module Structure
          • Product Custom Field Sets
          • Inventory
          • Managing Attributes
          • Pricing
          • Product Categories
          • Open Graph Fields
          • SEO Fields
          • Standard Fields
          • Product Import and Export
          • Discounts
        • πŸ“‚Cart
          • πŸ”ΉCart Layouts
          • Checking Inventory in Cart
          • Updating Quantity in Cart
          • Updating Displayed Cart Quantity
        • πŸ“‹How to Set Up a Shopping Cart and Guest Checkout - Tutorial
        • πŸ“‚Checkout Forms
          • πŸ”ΉCheckout Form Layouts
          • πŸ”ΉCheckout Forms with PayPal
        • πŸ“‚Orders
          • Order Confirmation
          • Re-Ordering
          • πŸ”ΉOrders Layouts
        • πŸ“‹Steps to Add Secure Zones and User Orders View to your Checkout Flow
        • Quotes
        • Selling Digital Products
        • πŸ”ΉVolume Pricing
        • πŸ“‹Steps - Alternatives to Product Grouping
      • πŸ“‚Basic Payment Forms
        • πŸ’‘About Basic Payment Forms
        • πŸ“‹Steps to Set up a Basic Payment Form (with a Fixed Payment Amount)
        • πŸ“‹Authorize.net Basic Payment Forms
        • πŸ“‹PayPal Basic Payment Forms
        • πŸ“‹Steps to Allow User to Decide Amount they Will Pay
        • πŸ“‹Step-by-step Basic Payment Confirmations
        • πŸ‘€Basic Payment Forms Reference
        • ℹ️ecommerce/basic_payment
      • πŸ“‚Payment Gateways
        • πŸ’»Building a Custom Payment Gateway
          • πŸ“‹Steps to Support Basic Payment Forms with your Custom Payment Gateway
          • πŸ“‹Steps to Support Checkout with your Custom Payment Gateway
        • πŸ”ΉPaypal Custom Parameters
        • πŸ”ΉStyling Stripe Card Elements
        • πŸ’‘About Payment Gateways
        • πŸ“‹Steps to Switching Payment Gateway
        • πŸ”ΉTest Cards
      • πŸ“‚Currency and Tax
        • πŸ’‘About Tax Codes
        • Currency Changer
        • Tax Code Changer
        • Formatting Currency
      • πŸ“‚Subscriptions
        • πŸ’‘About Subscriptions
        • Managing Subscriptions
          • Creating Subscription Products
          • Changing Price and Billing Interval
          • Creating a Form for Signing Up and Changing Payment Details
          • Subscription Order Status Explained
          • Terms and Conditions (Good Practice)
        • πŸ“‹Subscriptions Payment Gateway Setup
        • Subscriptions List Layout
        • Subscriptions Detail Layout
        • User's Active Subscriptions
        • Subscription Action Required
        • Cancelling Subscriptions
      • 🌳Basic Payment Forms Folder Structure
      • 🌳Cart and Checkout Folder Structure
  • CRM
    • πŸš€Quickstart: CRM
    • Users
      • User Details
      • User Secure Zones
      • How Users Edit their Email and Password Front End
      • Custom Field Sets & CRM Custom Fields
      • Storing User's Favourite WebApp / Module Items
    • Companies
    • Cases
      • User's Form Submissions (Cases)
  • Site Manager
    • Code Editor
    • Templates (Pages & Email)
    • Headers & Footers
    • Code Snippets (Includes)
      • πŸ”§Includes Troubleshooting
      • πŸ‘€constants_json
      • πŸ‘€constants
      • 🌳Includes File Structure
      • πŸ’»Includes with Siteglide CLI
      • πŸ”§Tags for Includes
    • System Pages
      • Automatic Site Maps
    • System Emails
    • Data Management
    • Admin Menu Editor
    • Integrations
  • Reporting
    • πŸš€Quickstart: Reports
  • Miscellaneous
    • System Features
      • Pagination on Liquid Tags
      • Custom Pagination Layouts
      • Timezones in the Siteglide Admin and on the front-end of your Site
      • Module/WebApp Caching
      • Getting Started with Liquid Caching - to Reduce Server Response time and Improve Performance
      • Translating Dates
      • Site Search
      • About Site Search
      • AI Tools for the Rich Text Editor
      • Cookies on Siteglide Sites
    • Front-End Performance
      • Video Embeds
      • Forms Above the Fold
Powered by GitBook
On this page
  • CLI Commands
  • Add
  • Sync
  • Logs
  • Version
  • Help
  • GraphQL
  • GUI
  • Pull
  • Init
  • Deploy
  • Export
  • Migrate
  • List
  • Modules

Was this helpful?

Export as PDF
  1. Developer Tools
  2. CLI

Reference

The main commands you'll need when using Siteglide CLI

PreviousTroubleshootingNextCLI Changelog

Last updated 1 month ago

Was this helpful?

You need CLI installed first, check out our Quickstart guide:

CLI Commands

These commands should be run from within the project folder. Commands follow the format of siteglide-cli <command> <env> <flags> , so for example if you would like to view the logs of your production environment in "quiet mode", you would run:

siteglide-cli logs production -q

Please note that some commands may fail if you run them in your users home directory. We recommend a folder structure such as siteglide/ and then give each project/site it's own folder.

Command flags such as <command> <env> and <flags> should be replaced with the relevant data. For example, <env> should be replaced with the chosen name for the environment such as production.


Add

The first time you use the CLI with a project on your device, you will need to create an environment. This is essentially a config file that authorises your connection.

siteglide-cli add <env> --email me@mydomain.com --url https://my_great_site.com

You must use the email of your Siteglide partner account to replace me@mydomain.com and the development domain of the website you are connecting with to replace https://my_great_site.com

After your site goes live, you will only be able to add the development domain to an environment, not your main user-facing domain.

Replace with a chosen name for the environment, for example production. On larger projects you may have more than one environment to allow you to interact with both staging and production websites.


Sync

siteglide-cli sync <env>

This command will setup a watcher that will automatically sync file saves and deletions when that action happens on your machine. To stop the sync running, enter use the shortcut control + c in your terminal.

Flags:

-l: Turns on the live reload server. This enables automatic browser reloading of a page when a file is saved in your IDE.


Logs

siteglide-cli logs <env>

This command will output the last 20 logs and then a live list of logs from your site. Logs are written by using the log liquid code, for example: `

. To stop the logs running, enter use the shortcutcontrol + c` in your terminal

Flags: -f : Filter log types -q : Quiet mode


Version

siteglide-cli -v

npm i @siteglide/siteglide-cli -g

in a terminal window. Or use:

npm i @siteglide/siteglide-cli@1.9.8 -g

to target a specific version e.g. in this example 1.9.8

Help

siteglide-cli help

Generates a list of valid Siteglide CLI commands available to you.


GraphQL

Deprecated - Please see the GUI command below


GUI

siteglide-cli gui <env>

This command will open up the GraphiQL and Liquid Evaluator editors locally. This will let you run Graph queries and mutations to test them out before creating them within your site. Also good for quickly getting data out of the database to check.

The Liquid evaluator tool lets you quickly test Liquid from the CLI, without having to create and save a page in Siteglide Admin.

To stop the GUI command running, enter use the shortcut control + c in your terminal

Flags: -o: Automatically open GraphiQL in default browser


Pull

siteglide-cli pull <env>

This will pull down all files from the site in to a folder named marketplace_builder within your current directory. During this process it will also overwrite any local versions of files if they already exist. If you have made any changes locally that you have not synced they WILL be overwritten.

Flags:

-i: Ignore assets such as CSS and JS as part of the pull.

-m: Provide the name of a module to download. Note that this will only download that module and not the site as well. This will only download the public folder within the module, if the module only contains a private folder then nothing will be downloaded.

Note: Assets such as images and videos are not downloaded as part of CLI Pull


Init

siteglide-cli init

This will create a blank folder structure within the folder you run the command, which includes all folders that are automatically created for you when making a new website on Siteglide. If these folders already exist, you will receive an error and so it will not overwrite existing files.


Deploy

siteglide-cli deploy <env>

If you have made a lot of changes in your codebase, then you can use deploy to re-send all files to your site at once. Deploy is a single command that will create a .zip file of your site and then upload that to your website.

Flags:

-w : With assets, also deploys your sites assets folder, supports total assets of up to 5GB.


Export

siteglide-cli export <env>

Export is very similar to Pull, but it will also grab all data. This command will first grab all data from the site and export it into a data.json file, then it will run a pull to grab your code base.

Flags: -w : With assets, also download asset files from your instance such as images and PDFs.

--csv: Export the data files as CSV instead of JSON. Please note that these CSV's are currently not compatible with the ones that are exported/imported from Siteglide Admin

-a: Only export assets and not the sites codebase. This by default will only export code related assets (CSS/JS etc) within the /assets folder. It can be mixed with -w above to export all assets


Migrate

siteglide-cli migrate <env> --url <existing url>

Download and migrate an existing site to Siteglide using our site import tool. This tool will scrape the existing site, download all of the publicly accessible pages and assets, compress CSS/JS/images. The migrate command will also convert any existing forms (using the <form> tag) to a "form to email" in Siteglide. When filled in, this will email the user who triggered the CLI migration with an autoresponder. These forms can then optionally be updated at a later date within Siteglide Admin.

Note: If you are using a Mac, running migrate in your β€œhome” folder may fail. Please move into a different folder in terminal and then try again.

Flags:

--url: Existing sites URL, usually the homepage. This flag is mandatory

-n: No Optimization, skips the CSS/JS and Image optimization

-m: A number to set the level of recursion that the scraper will search through the site. For example setting -m 1 will only follow 1 link deep from the entry page

-i: A string to send to the scraper that if found in the URL it will ignore downloading that page. For example if your blog posts are links such as site.com/post/post-name and you wanted to ignore them, you could use the flag -i /post/ This flag can be used multiple time such as -i /blog -i /posts/


List

siteglide-cli list

Output a list of environments you have previously added and their relative URLs for the current folder.


Modules

siteglide-cli modules <env>

Provides a list of modules installed onto the instance. These names can then be used in the pull command to download the contents of that module.

Check the current version of Siteglide CLI you are running. See the to find the latest version number. If you need to update, run:

πŸ’»
πŸš€Quickstart: CLI
Siteglide CLI changelog
https://github.com/Siteglide/documentation/blob/master/developer-tools/cli/broken-reference/README.md
https://github.com/Siteglide/documentation/blob/master/developer-tools/cli/broken-reference/README.md
https://github.com/Siteglide/documentation/blob/master/developer-tools/cli/broken-reference/README.md