CodeMash
  • 🚀Backend as a service
  • 🦄Roadmap
  • 🍕Release Notes
  • Installation
    • Managed Service
    • 🏗️AWS-CDK
    • 🏗️Azure
    • 🏗️Docker
    • 🏗️GC
    • 🏗️Terraform
  • dashboard
    • CodeMash Cloud
    • Project
    • Membership
      • Users
      • Roles
      • Policies
      • Triggers
      • Integrations
        • Apple
        • Azure
        • Facebook
        • Google
        • Twitter
      • Settings
    • Database
      • Collections
        • Schema
          • From Template
          • Structure
        • Tabs
        • Triggers
        • Indexes
        • Shared Forms
      • Taxonomies
        • Terms
        • Schema
        • Settings
      • Aggregation
      • Imports
      • Exports
      • Backups
    • Files
      • Integrations
        • CodeMash
        • S3 Bucket
    • Notifications
      • Push
        • Push Templates
        • Push Templates API
        • Push Notifications
        • Push Notifications API
        • Devices
        • Devices API
        • Integrations
          • Firebase
          • One Signal
          • Expo
      • Email
        • Email Templates
        • Emails
        • Integrations
          • AWS SES
          • Twilio Sendgrid
          • Mailgun
      • 🏗️Server events
      • 🏗️Sms
    • Payments
      • Integrations
        • Apple Pay
        • Google Pay
        • Stripe
        • Kevin.
        • Paysera
        • Decta
    • Scheduler
    • Logs & Monitoring
    • Code
      • Functions
        • Function Inputs
        • Function Templates
          • Node.js
          • Python
          • Ruby
          • Java
          • Go
          • .NET Core
      • CodeMash Functions
        • Google Functions
          • Google Calendar
          • Google Gmail
        • Microsoft Functions
          • Microsoft 365 Users
          • Microsoft 365 Calendar
        • Collection Find
        • Collection Update
        • Users Find
        • Image Resize
        • Html To Pdf
        • Word Document
        • Barcode
        • QR Code
        • Send Email
        • Send Notification
        • Email Reminder
        • Notification Reminder
      • Integrations
        • AWS Lambda
        • Google Cloud Functions
        • Azure Functions
  • Other Topics
    • Apple
      • Developer Portal
      • Bundle Identifier
      • Team ID
      • Service ID
      • Key ID
    • Triggers
    • Tokens Binding
      • Project Tokens
      • Initiator Tokens
      • Receiver Tokens
      • Request Tokens
      • Operation based tokens
      • Template Functions
    • Search parameters
      • Paging
      • Filter
      • Sort
      • Projection
    • data-models
    • Errors
  • SDK
    • Node.js
    • TypeScript
    • .NET
    • 🏗️Go Lang
    • 🏗️Flutter
    • 🏗️Swift
    • 🏗️Kotlin
  • CLI
    • 🏗️CodeMash CLI
  • API
    • Get Started
    • Prerequisites
    • How to test?
    • Cors
    • Project
    • Membership
      • Authentication
      • Users
    • Database
      • Collections
        • Aggregate
        • Change Responsibility
        • Count
        • Delete
        • Delete Many
        • Distinct
        • Find
        • Find One
        • Insert
        • Insert Many
        • References
        • Replace
        • Update
        • Update Many
      • Taxonomies
        • Find
    • Files
    • Code
    • Notifications
      • Push
      • Emails
      • Server Events
      • 🏗️Sms
    • Payments
    • Scheduler
    • Logs & Monitoring
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. CLI

CodeMash CLI

CLI for CodeMash

PreviousKotlinNextGet Started

Last updated 2 years ago

Was this helpful?

This documentation is a work in progress, and we welcome your feedback and suggestions. Please let us know if you have any questions or if there is anything else you would like to see included in the documentation.

This topic is here because we are already working on this. Please check out the and get more insights when it is ready.

Currently, we are in the alpha phase. Please refer to the "Release phases" section for more information.

You can use CodeMash CLI to create projects from templates, restore them from snapshots or use a powerful scripting language like bash to work with the modules.

#!/bin/bash
PROJECT_ID=$(codemash project new "My New Project" 2>&1)

# enabling database and importing data
codemash database enable --project $PROJECT_ID
cat employees.yaml | codemash database collection new --project $PROJECT_ID
cat employees.csv | codemash database import \
--collection "employees" \
--project $PROJECT_ID

# enabling email service
codemash notifications email enable --project $PROJECT_ID
codemash notifications email integrations new --project $PROJECT_ID \
--provider SendGrid \
--token "***" \
--email "no-reply@codemash.io"

# create a reusable template.
codemash notifications email templates new \
--project $PROJECT_ID \
--name "Company Newsletter" \
--from-file \
--body newsletter.html \
--subject "CodeMash Newsletter"

# create a campaign and send an email to all employees tomorrow
codemash database collections find --project $PROJECT_ID \ 
--projection '{ email: 1} ' | \
codemash notifications email campaigns new \
--project $PROJECT_ID \
--name "December Campaign" \
--template "Company Newsletter" \
--tokens '{ "campaignMonth": "December", "text": "Hi, this is newsletter"  }'
--postpone $(date --date='tomorrow' +%s) 
--recipients -
🏗️
Roadmap
Roadmap