LogoLogo
CS CONSOLECOMMUNITYDOCS
  • What is code.store?
  • Our vision
  • How it works?
  • Getting started
    • Quick Start
      • Core concepts
      • Quick Start with CLI
      • Quick Start with Web Interface
    • FUNDAMENTALS
      • Services
        • GraphQL
        • REST
        • Configuration
        • Environment Variables
      • Environments
      • Projects
      • Versioning
      • Access and Authorization
      • Secret management
      • Data management
        • Import and Export
      • Generation
        • Models
        • Handlers
        • Resolvers
        • REST
        • Middlewares
      • Logging
      • Microservices
        • Communication
    • RECIPES
      • TypeScript
        • Custom .tslint
      • Basic authentication
      • Setup a local database with your service
      • GraphQL
    • Tutorials
      • Auth0 authentication
      • Metabase integration
      • Database manipulations
        • External database: MongoDB
        • External database: DynamoDB
      • Wrapping an NPM package with GraphQL: a chess server
    • FAQ
  • Command Line Interface
    • Getting started
    • Commands
Powered by GitBook
On this page
  • Installation
  • Other installation methods
  • Verifying the installation
  • Staying up to date
  • Service directory structure

Was this helpful?

Export as PDF
  1. Command Line Interface

Getting started

code.store CLI provides a set of commands that allow you to manage your services and projects. This section contains the installation steps, a typical workflow and a description of main commands.

PreviousFAQNextCommands

Last updated 4 years ago

Was this helpful?

Installation

We are iterating really fast in order to bring the best user experience and some great features to our product, that's why please check for updates in our CLI!

macOS

brew tap code-store-platform/brew && brew install codestore

Other installation methods

NPM

This installation method is not recommended as it does not auto-update.

npm install -g codestore

Standalone tarballs

These are available in gzip compression:

  • PalmOS (just kidding)

Verifying the installation

To verify that the CLI has been correctly installed, use the codestore --version command:

codestore --version

You should see "codestore x.y.z darwin-X node-vX.Y.Z" output.

The CLI can be accessed through two commands: codestore or its shorter version cs

Staying up to date

The code.store CLI will keep itself up to date automatically, unless you installed it via npm install. In that case use npm update codestore in order to upgrade the package to the latest version.

Most of the commands accept some specific arguments which can be provided while invoking the command in a long or short formats:

  • Long format: cs command --argumentName argumentValue

  • Short format: cs command -a argumentValue

Use cs help to know more about its commands and their arguments.

Service directory structure

For each service, the code.store CLI is generating a directory structure that resembles the following:

# Example of the directory structure of a Service
./
├── src/
│		├── data/ # contains generated TypeORM entities
│		├── resolvers/
│		│		├── mutations/
│		│				└── mutationExample.js|ts
│		│		├── queries/
│		│				└── queryExample.js|ts
│		└── schema.graphql # GraphQL definition of your service's API
├── .build # temporary directory
├── package.json # standard NPM configuration file
└── codestore.yaml # main configuration file

Read more about the .

macOS
Linux (x64)
Windows (x64)
Windows (x86)
anatomy of the service directory here