### Run Development Build Source: https://github.com/sharetribe/flex-cli/blob/master/docs/README.md Starts the main development server or application process. This command is used in conjunction with shadow-cljs watch for a full development setup. ```bash yarn run dev ``` -------------------------------- ### Verify Sharetribe CLI Installation Source: https://github.com/sharetribe/flex-cli/blob/master/README.md Runs the Sharetribe CLI to verify the installation and display available commands. This is a good first step after installation. ```bash flex-cli ``` -------------------------------- ### Install Sharetribe CLI with NPM Source: https://github.com/sharetribe/flex-cli/blob/master/README.md Installs the Sharetribe CLI globally using NPM. Ensure Node.js and NPM are installed. ```bash npm install --global flex-cli ``` -------------------------------- ### Flex CLI Help Commands Source: https://context7.com/sharetribe/flex-cli/llms.txt Examples of how to use the 'help' command in the Flex CLI to get assistance for general commands or specific subcommands. This is useful for understanding available options and syntax. ```bash # General help flex-cli help ``` ```bash # Help for specific command flex-cli help process ``` ```bash flex-cli help process list ``` ```bash flex-cli help search set ``` ```bash flex-cli help events tail ``` ```bash flex-cli help notifications preview ``` -------------------------------- ### Install Sharetribe CLI Source: https://context7.com/sharetribe/flex-cli/llms.txt Install the Sharetribe CLI globally using npm or Yarn. Verify the installation by running the command without any arguments. ```bash npm install --global flex-cli ``` ```bash yarn global add flex-cli ``` ```bash flex-cli ``` -------------------------------- ### Install Sharetribe CLI with Yarn Source: https://github.com/sharetribe/flex-cli/blob/master/README.md Installs the Sharetribe CLI globally using Yarn. Ensure Node.js and Yarn are installed. ```bash yarn global add flex-cli ``` -------------------------------- ### Start Shadow-cljs REPL Source: https://github.com/sharetribe/flex-cli/blob/master/docs/README.md Connects to a running shadow-cljs development build to provide a REPL environment within Cursive. ```clojure (shadow/repl :dev) ``` -------------------------------- ### Start Verdaccio with Specific IP and Port Source: https://github.com/sharetribe/flex-cli/blob/master/docs/README.md Starts the Verdaccio private NPM registry server, binding it to a specific IP address and port. This allows testing NPM publish/install processes across a network. ```bash verdaccio -l 192.168.1.91:4873 ``` -------------------------------- ### Install Flex CLI from Local Path with Custom Registry Source: https://github.com/sharetribe/flex-cli/blob/master/docs/README.md Installs the Flex CLI globally from a local path, specifying a custom NPM registry. This is useful for testing with Verdaccio or private registries. ```bash npm install -g flex-cli --registry http://localhost:4873 ``` -------------------------------- ### Start Shadow-cljs Watch Build Source: https://github.com/sharetribe/flex-cli/blob/master/docs/README.md Starts the shadow-cljs build process in watch mode, which is useful for development with Cursive. This command recompiles code automatically when changes are detected. ```bash yarn shadow-cljs watch :dev ``` -------------------------------- ### Start ClojureScript REPL with Shadow-cljs Source: https://github.com/sharetribe/flex-cli/blob/master/docs/README.md Initiates a ClojureScript REPL session using shadow-cljs for development. This command is typically run within Emacs/Cider. ```clojure (sharetribe.flex-cli.core/main-dev-str "process list -m bike-soil") ``` -------------------------------- ### Install Compiled Release Build Globally Source: https://github.com/sharetribe/flex-cli/blob/master/docs/README.md Installs the locally compiled release build of the Flex CLI as a global Node.js package, making the 'flex-cli' command available in the terminal. ```bash yarn global add file:$(pwd) ``` -------------------------------- ### Handlebars Email Template Example Source: https://context7.com/sharetribe/flex-cli/llms.txt An example of an HTML email template using Handlebars syntax, including custom helpers for formatting money and dates. This template is used for booking request acceptance notifications. ```handlebars {{!-- Template: booking-request-accepted-html.html --}} {{~#*inline "format-money"~}} {{money-amount money}} {{money.currency}} {{~/inline~}} {{~#*inline "format-date"~}} {{date date format="MMM d, YYYY" tz="Etc/UTC"}} {{~/inline~}}
{{provider.display-name}} has accepted your booking request for {{listing.title}} from {{> format-date date=booking.start}} to {{> format-date date=booking.end}}.
We have charged {{> format-money money=payin-total}} from your credit card.
| {{> format-money money=unit-price}} × {{number quantity}} {{inflect quantity "night" "nights"}} | |
| Total price | {{> format-money money=payin-total}} |
|---|
You received this email because you are a member of {{marketplace.name}}.
``` -------------------------------- ### Autorun Tests Source: https://github.com/sharetribe/flex-cli/blob/master/docs/README.md Starts a test runner that continuously executes tests whenever files are changed. This is useful for TDD workflows. ```bash yarn run test-autorun ``` -------------------------------- ### List All Transaction Processes Source: https://context7.com/sharetribe/flex-cli/llms.txt List all transaction processes available in a marketplace, displaying their names and latest versions. Use the -m flag to specify the marketplace. ```bash flex-cli process list -m my-marketplace ``` -------------------------------- ### Make Release Build Source: https://github.com/sharetribe/flex-cli/blob/master/docs/README.md Creates a production-ready release build of the Flex CLI. This command should be run after cleaning the build directory. ```bash yarn run release ``` -------------------------------- ### Create New Transaction Process Source: https://context7.com/sharetribe/flex-cli/llms.txt Create a new transaction process in a marketplace from local process files. Specify the marketplace with -m, the new process name with --process, and the local path with --path. ```bash flex-cli process create -m my-marketplace \ --process my-new-booking-process \ --path ./my-process ``` -------------------------------- ### Copy Development Environment Template Source: https://github.com/sharetribe/flex-cli/blob/master/docs/README.md Use this command to copy the template for the .env.edn file to set up environment variables for development. ```bash cp .env.edn.tmpl .env.edn ``` -------------------------------- ### Compile Release Build Source: https://github.com/sharetribe/flex-cli/blob/master/docs/README.md Compiles the project into a production-ready release build. The output is typically placed in the 'target/' directory. ```bash yarn run compile ``` -------------------------------- ### Preview Notification Email Templates Source: https://context7.com/sharetribe/flex-cli/llms.txt Preview email templates locally by running a live server that watches for changes. Opens a browser window for preview. Supports default or custom context data. ```bash # Preview template with default context flex-cli notifications preview -m my-marketplace \ --template ./my-process/templates/booking-request-accepted ``` ```bash # Preview with custom context data flex-cli notifications preview -m my-marketplace \ --template ./my-process/templates/booking-request-accepted \ --context ./sample-context.json ``` ```json { "recipient": { "id": "uuid", "first-name": "Joe", "display-name": "Joe D" }, "transaction": { "booking": { "start": {"year": 2024, "month": 1, "day": 15}, "end": {"year": 2024, "month": 1, "day": 20} }, "listing": { "title": "Wooden sauna" }, "payin-total": {"amount": 900, "currency": "USD"} }, "marketplace": { "name": "My Marketplace", "url": "https://example.com" } } ``` -------------------------------- ### Live Tail Marketplace Events with Flex CLI Source: https://context7.com/sharetribe/flex-cli/llms.txt Continuously monitor events in real-time. Supports filtering by event type and resource, and outputting as a JSON stream. Press Ctrl+C to stop. ```bash flex-cli events tail -m my-marketplace ``` ```bash flex-cli events tail -m my-marketplace --limit 50 ``` ```bash flex-cli events tail -m my-marketplace --filter transaction ``` ```bash flex-cli events tail -m my-marketplace --resource 5fc4a915-73b5-4467-809b-7094d3217c6b ``` ```bash flex-cli events tail -m my-marketplace --json ``` -------------------------------- ### Describe Local Transaction Process Source: https://context7.com/sharetribe/flex-cli/llms.txt Describe a local transaction process file to view its states, transitions, and notifications without connecting to the Sharetribe API. Use the --path flag to specify the local directory. ```bash flex-cli process --path ./my-process ``` -------------------------------- ### List Specific Transaction Process Versions Source: https://context7.com/sharetribe/flex-cli/llms.txt Show detailed version information for a specific transaction process, including creation dates, aliases, and transaction counts. Specify the marketplace with -m and the process name with --process. ```bash flex-cli process list -m my-marketplace --process preauth-with-nightly-booking ``` -------------------------------- ### List Search Schemas Source: https://context7.com/sharetribe/flex-cli/llms.txt List all search schemas configured for listings, user profiles, and transactions within a marketplace. Displays schema details including scope, key, type, and documentation. ```bash # List all search schemas flex-cli search -m my-marketplace ``` -------------------------------- ### Describe Transaction Process Transition Source: https://context7.com/sharetribe/flex-cli/llms.txt Retrieve detailed information about a specific transition within a transaction process, including associated actions and notifications. Requires the process path and transition identifier. ```bash # Describe a specific transition flex-cli process --path ./my-process --transition transition/accept ``` -------------------------------- ### Log in to Sharetribe CLI Source: https://context7.com/sharetribe/flex-cli/llms.txt Authenticate with Sharetribe using an API key. The command will securely prompt for the API key, and credentials will be stored locally for subsequent commands. ```bash flex-cli login ``` -------------------------------- ### Clean Build Directory Source: https://github.com/sharetribe/flex-cli/blob/master/docs/README.md Removes the 'target/' directory, which contains build artifacts. This is a prerequisite for creating a clean release build. ```bash yarn run clean ``` -------------------------------- ### Pull Transaction Process Definition Source: https://context7.com/sharetribe/flex-cli/llms.txt Fetch a transaction process definition from a marketplace and save it locally for editing. Requires either a version number or an alias. Use --force to overwrite existing files. ```bash flex-cli process pull -m my-marketplace \ --process preauth-with-nightly-booking \ --version 12 \ --path ./my-process ``` ```bash flex-cli process pull -m my-marketplace \ --process preauth-with-nightly-booking \ --alias release-1 \ --path ./my-process ``` ```bash flex-cli process pull -m my-marketplace \ --process preauth-with-nightly-booking \ --version 12 \ --path ./my-process \ --force ``` -------------------------------- ### List Marketplace Events with Flex CLI Source: https://context7.com/sharetribe/flex-cli/llms.txt Query marketplace events for debugging and monitoring. Various filters can be applied, including event type, resource ID, sequence ID, and timestamps. Output can be formatted as JSON. ```bash flex-cli events -m my-marketplace ``` ```bash flex-cli events -m my-marketplace --limit 10 ``` ```bash flex-cli events -m my-marketplace --filter listing/updated,user ``` ```bash flex-cli events -m my-marketplace --resource 5fc4a915-73b5-4467-809b-7094d3217c6b ``` ```bash flex-cli events -m my-marketplace --related-resource 5fc4a915-73b5-4467-809b-7094d3217c6b ``` ```bash flex-cli events -m my-marketplace --seqid 123 ``` ```bash flex-cli events -m my-marketplace --after-seqid 100 ``` ```bash flex-cli events -m my-marketplace --before-seqid 200 ``` ```bash flex-cli events -m my-marketplace --after-ts 2024-01-01 ``` ```bash flex-cli events -m my-marketplace --before-ts 2024-01-15T12:00.000Z ``` ```bash flex-cli events -m my-marketplace --json ``` ```bash flex-cli events -m my-marketplace --json-pretty ``` -------------------------------- ### Run Compiled Release Build Source: https://github.com/sharetribe/flex-cli/blob/master/docs/README.md Executes the compiled release build of the CLI. Arguments can be passed directly after the script name. ```bash node target/min.js