### 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~}}

Your booking request was accepted!

{{#with transaction}}

{{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.

{{#each tx-line-items}} {{#contains include-for "customer"}} {{#eq "line-item/night" code}} {{/eq}} {{/contains}} {{/each}}
{{> format-money money=unit-price}} × {{number quantity}} {{inflect quantity "night" "nights"}}
Total price {{> format-money money=payin-total}}
{{/with}}

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 ``` -------------------------------- ### Copy Emacs Directory Locals Template Source: https://github.com/sharetribe/flex-cli/blob/master/docs/README.md Copies the .dir-locals.el template file to configure Emacs settings for the project, potentially suppressing prompts during CIDER REPL startup. ```bash >cp .dir-locals.el.tmpl .dir-locals.el ``` -------------------------------- ### Push Local Transaction Process Changes Source: https://context7.com/sharetribe/flex-cli/llms.txt Push local transaction process changes to create a new version in the marketplace. This command will create a new version if changes are detected. ```bash flex-cli process push -m my-marketplace \ --process preauth-with-nightly-booking \ --path ./my-process ``` -------------------------------- ### Send Test Notification Email Source: https://context7.com/sharetribe/flex-cli/llms.txt Send a test email to the logged-in administrator to verify email template rendering. Requires marketplace identifier, template path, and context data. ```bash # Send test email flex-cli notifications send -m my-marketplace \ --template ./my-process/templates/booking-request-accepted \ --context ./sample-context.json ``` -------------------------------- ### Create Process Alias Source: https://context7.com/sharetribe/flex-cli/llms.txt Create a named alias for a specific version of a process, simplifying future references. Requires marketplace identifier, process name, alias name, and version number. ```bash # Create alias pointing to version 12 flex-cli process create-alias -m my-marketplace \ --process preauth-with-nightly-booking \ --alias release-1 \ --version 12 ``` -------------------------------- ### Set Search Schema Source: https://context7.com/sharetribe/flex-cli/llms.txt Create or update a search schema for extended data indexing in listings, user profiles, or transactions. Specify key, scope, type, and optionally schema-for and default values. ```bash # Set enum schema for listing metadata flex-cli search set -m my-marketplace \ --key category \ --scope metadata \ --type enum \ --doc "Product category" ``` ```bash # Set multi-enum schema for listing public data flex-cli search set -m my-marketplace \ --key amenities \ --scope public \ --type multi-enum \ --schema-for listing ``` ```bash # Set boolean schema with default value flex-cli search set -m my-marketplace \ --key featured \ --scope metadata \ --type boolean \ --default false ``` ```bash # Set long (integer) schema for user profiles flex-cli search set -m my-marketplace \ --key age \ --scope protected \ --type long \ --schema-for userProfile \ --doc "User age" ``` ```bash # Set text schema for listing search flex-cli search set -m my-marketplace \ --key description \ --scope public \ --type text \ --schema-for listing ``` -------------------------------- ### Run Tests Once Source: https://github.com/sharetribe/flex-cli/blob/master/docs/README.md Executes all defined tests once and exits with a 0 or 1 exit code based on the test results. ```bash yarn run test ``` -------------------------------- ### Tag Latest Release Source: https://github.com/sharetribe/flex-cli/blob/master/docs/README.md Creates and updates the 'latest' Git tag to point to the current commit. This is typically done after a successful release. ```bash git tag -f -a latest -m latest ``` -------------------------------- ### Push Git Tags Source: https://github.com/sharetribe/flex-cli/blob/master/docs/README.md Pushes all local Git tags, including newly created ones like version tags and the 'latest' tag, to the remote repository. ```bash git push --tags ``` -------------------------------- ### Log out from Sharetribe CLI Source: https://context7.com/sharetribe/flex-cli/llms.txt Clear stored credentials from the local system. This command revokes the current authentication session. ```bash flex-cli logout ``` -------------------------------- ### Update Process Alias Source: https://context7.com/sharetribe/flex-cli/llms.txt Update an existing process alias to point to a different process version. Requires marketplace identifier, process name, alias name, and the new version number. ```bash # Update alias to point to new version flex-cli process update-alias -m my-marketplace \ --process preauth-with-nightly-booking \ --alias release-1 \ --version 13 ``` -------------------------------- ### Update Stripe API Version with Flex CLI Source: https://context7.com/sharetribe/flex-cli/llms.txt Update the Stripe API version for your marketplace. This command can be run interactively or with a specified version. Use the --force flag to bypass confirmation. ```bash flex-cli stripe update-version -m my-marketplace ``` ```bash flex-cli stripe update-version -m my-marketplace --version 2019-12-03 ``` ```bash flex-cli stripe update-version -m my-marketplace --version 2019-12-03 --force ``` -------------------------------- ### Unset Listing Schema with Flex CLI Source: https://context7.com/sharetribe/flex-cli/llms.txt Use this command to remove a specific schema key from the listing metadata. Ensure you specify the correct marketplace and key. ```bash flex-cli search unset -m my-marketplace \ --key category \ --scope metadata ``` -------------------------------- ### Define Transaction Process in EDN Source: https://context7.com/sharetribe/flex-cli/llms.txt Defines the structure and flow of transaction processes using EDN format, including transitions, actions, and notifications. Use this to customize your marketplace's transaction logic. ```clojure ;; Example process.edn file {:format :v3 :transitions [வைக்{:name :transition/request-payment :actor :actor.role/customer :actions [{:name :action/create-pending-booking} {:name :action/calculate-tx-nightly-total-price} {:name :action/calculate-tx-provider-commission :config {:commission 0.1M}} {:name :action/stripe-create-payment-intent}] :to :state/pending-payment} {:name :transition/accept :actor :actor.role/provider :actions [{:name :action/accept-booking} {:name :action/stripe-capture-payment-intent}] :from :state/preauthorized :to :state/accepted} {:name :transition/expire :at {:fn/plus [{:fn/timepoint [:time/first-entered-state :state/preauthorized]} {:fn/period ["P6D"]}]} :actions [{:name :action/decline-booking} {:name :action/calculate-full-refund} {:name :action/stripe-refund-payment}] :from :state/preauthorized :to :state/declined} {:name :transition/complete :at {:fn/timepoint [:time/booking-end]} :actions [{:name :action/stripe-create-payout}]} :from :state/accepted :to :state/delivered}] :notifications [{:name :notification/new-booking-request :on :transition/confirm-payment :to :actor.role/provider :template :new-booking-request} {:name :notification/booking-request-accepted :on :transition/accept :to :actor.role/customer :template :booking-request-accepted}]} ``` -------------------------------- ### Unset User Profile Schema with Flex CLI Source: https://context7.com/sharetribe/flex-cli/llms.txt This command removes a schema key from the user profile. Specify the marketplace, key, and the schema target (userProfile). ```bash flex-cli search unset -m my-marketplace \ --key age \ --scope protected \ --schema-for userProfile ``` -------------------------------- ### Delete Process Alias Source: https://context7.com/sharetribe/flex-cli/llms.txt Remove a process alias from the marketplace. Requires marketplace identifier, process name, and alias name. ```bash # Delete an alias flex-cli process delete-alias -m my-marketplace \ --process preauth-with-nightly-booking \ --alias release-1 ``` -------------------------------- ### Unset Search Schema Source: https://context7.com/sharetribe/flex-cli/llms.txt Remove a search schema from a marketplace. Requires marketplace identifier and the schema key to be removed. ```bash # Remove a search schema flex-cli search unset -m my-marketplace --key category ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.