@adpt/cli
Unbounded Adapt CLI
Last updated 3 months ago by mterrel .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @adpt/cli 
SYNC missed versions from official npm registry.

Adapt logo

npm Gitter License

Adapt - ReactJS for your infrastructure.

Adapt is a system to easily, reliably, and repeatably deploy your full-stack applications. Adapt specifications look like React apps, but instead of rendering browser DOM elements like <input>, or <div>, Adapt specifications use elements like AWS <EC2Instance>, Kubernetes <Pod>, or <MongoDB> database.

If you're already familiar with React, you'll feel right at home with Adapt. But if not, don't worry, knowledge of React isn't required to start using Adapt.

Getting Started

For a new project, it's easy to get started with Adapt by using a starter template. The Getting Started Guide will walk through installing Adapt and deploying your first starter app.

Creating and deploying an app

This example creates a new full-stack app from a starter template. It has a React UI, an Nginx web server, a Node.js API server, and a Postgres database, then deploys it to Kubernetes:

# Install adapt
npm install -g @adpt/cli

# Create a new app from a starter template
adapt new hello-react-node-postgres ./myapp
cd myapp/deploy

# Deploy to Kubernetes using "k8s" style sheet
adapt run k8s

The Adapt description for the complete app stack looks like this:

import Adapt from "@adpt/core";
import { NodeService, ReactApp } from "@adpt/cloud/nodejs";
import { Postgres } from "@adpt/cloud/postgres";

function MyApp() {
  const pg = Adapt.handle();

  return (
    <Adapt.Group>
      <ReactApp srcDir="../frontend" />
      <NodeService srcDir="../backend" connectTo={pg} />
      <Postgres handle={pg} />
    </Adapt.Group>
  );
}

Adapt in action

This demo shows using Adapt to create and deploy a simple app called MovieDB that has a React UI, an Nginx web server, an Nginx URL router, a Node.js API server, and a Postgres database, then deploys it to Kubernetes:

Adapt in action

More info

Getting Help

Gitter

We'd love to hear about your experience with Adapt! Join us on our Gitter channel to ask questions or to give us your feedback and suggestions.

If you've found a bug, you can also file an issue.

Command Reference

adapt autocomplete [SHELL]

display autocomplete installation instructions

USAGE
  $ adapt autocomplete [SHELL]

ARGUMENTS
  SHELL  shell type

OPTIONS
  -r, --refresh-cache  Refresh cache (ignores displaying instructions)

EXAMPLES
  $ adapt autocomplete
  $ adapt autocomplete bash
  $ adapt autocomplete zsh
  $ adapt autocomplete --refresh-cache

See code: @unboundedsystems/plugin-autocomplete

adapt deploy:destroy DEPLOYID

Destroy an existing deployment of an Adapt project

USAGE
  $ adapt deploy:destroy DEPLOYID

OPTIONS
  -d, --debug=debugFlags  Enable additional debug output. Should be a comma-separated list of debug flags. Valid debug
                          flags are: build

  -q, --quiet             Suppress status output messages. Still outputs any result output.

  --dryRun                Show what would happen during deploy, but do not modify the deployment

  --registry=registry     URL of alternate NPM registry to use

  --rootFile=rootFile     [default: index.tsx] Project description file to deploy (.ts or .tsx)

  --serverUrl=serverUrl   URL of Adapt server. Defaults to using local system.

ALIASES
  $ adapt destroy

EXAMPLE

  Destroy the deployment "myproj-dev-abcd" using the default project description file, "index.tsx":
       $ adapt deploy:destroy myproj-dev-abcd

See code: dist/src/commands/deploy/destroy.js

adapt deploy:list

List active Adapt deployments

USAGE
  $ adapt deploy:list

OPTIONS
  -d, --debug=debugFlags  Enable additional debug output. Should be a comma-separated list of debug flags. Valid debug
                          flags are: build

  -q, --quiet             Suppress status output messages. Still outputs any result output.

  --rootFile=rootFile     [default: index.tsx] Project description file to deploy (.ts or .tsx)

  --serverUrl=serverUrl   URL of Adapt server. Defaults to using local system.

ALIASES
  $ adapt list

EXAMPLE
  List all deployments from the server
       $ adapt deploy:list

See code: dist/src/commands/deploy/list.js

adapt deploy:run [STACKNAME]

Create a new deployment for an Adapt project

USAGE
  $ adapt deploy:run [STACKNAME]

ARGUMENTS
  STACKNAME  [default: default] Name of the stack you wish to run

OPTIONS
  -d, --debug=debugFlags  Enable additional debug output. Should be a comma-separated list of debug flags. Valid debug
                          flags are: build

  -q, --quiet             Suppress status output messages. Still outputs any result output.

  --deployID=deployID     A fixed deployID to use for this deployment. Will error if the specified deployID already
                          exists.

  --dryRun                Show what would happen during deploy, but do not modify the deployment

  --registry=registry     URL of alternate NPM registry to use

  --rootFile=rootFile     [default: index.tsx] Project description file to deploy (.ts or .tsx)

  --serverUrl=serverUrl   URL of Adapt server. Defaults to using local system.

ALIASES
  $ adapt run

EXAMPLES
  Deploy the stack named "default" from the default project description file, index.tsx:
       $ adapt deploy:run

  Deploy the stack named "dev" from the default project description file, index.tsx:
       $ adapt deploy:run dev

  Deploy the stack named "dev" from an alternate description file:
       $ adapt deploy:run --rootFile somefile.tsx dev

See code: dist/src/commands/deploy/run.js

adapt deploy:status DEPLOYID

Fetch the status of an existing deployment of an Adapt project

USAGE
  $ adapt deploy:status DEPLOYID

OPTIONS
  -d, --debug=debugFlags  Enable additional debug output. Should be a comma-separated list of debug flags. Valid debug
                          flags are: build

  -q, --quiet             Suppress status output messages. Still outputs any result output.

  --dryRun                Show what would happen during deploy, but do not modify the deployment

  --registry=registry     URL of alternate NPM registry to use

  --rootFile=rootFile     [default: index.tsx] Project description file to deploy (.ts or .tsx)

  --serverUrl=serverUrl   URL of Adapt server. Defaults to using local system.

ALIASES
  $ adapt status

EXAMPLES
  Fetch the status of deployment "myproj-dev-abcd" from the default project description file, "index.tsx":
       $ adapt deploy:status myproj-dev-abcd

  Fetch the status of deployment "myproj-dev-abcd" from an alternate description file, "somefile.tsx":
       $ adapt deploy:status --rootFile somefile.tsx myproj-dev-abcd

See code: dist/src/commands/deploy/status.js

adapt deploy:update DEPLOYID [STACKNAME]

Update an existing deployment of an Adapt project

USAGE
  $ adapt deploy:update DEPLOYID [STACKNAME]

OPTIONS
  -d, --debug=debugFlags  Enable additional debug output. Should be a comma-separated list of debug flags. Valid debug
                          flags are: build

  -q, --quiet             Suppress status output messages. Still outputs any result output.

  --dryRun                Show what would happen during deploy, but do not modify the deployment

  --registry=registry     URL of alternate NPM registry to use

  --rootFile=rootFile     [default: index.tsx] Project description file to deploy (.ts or .tsx)

  --serverUrl=serverUrl   URL of Adapt server. Defaults to using local system.

ALIASES
  $ adapt update

EXAMPLES
  Update the deployment "myproj-dev-abcd", from the default project description file, "index.tsx":
       $ adapt deploy:update myproj-dev-abcd

  Update the deployment "myproj-dev-abcd", using the stack named "dev" from an alternate description file, 
  "somefile.tsx":
       $ adapt deploy:update --rootFile somefile.tsx myproj-dev-abcd dev

See code: dist/src/commands/deploy/update.js

adapt help [COMMAND]

display help for adapt

USAGE
  $ adapt help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @unboundedsystems/plugin-help

adapt project:new STARTER [DIRECTORY]

Create a new Adapt project

USAGE
  $ adapt project:new STARTER [DIRECTORY]
  $ adapt project:new STARTER DIRECTORY [STARTER_ARGS...]

ARGUMENTS
  STARTER    Adapt starter to use. May be the name of a starter from the starter gallery, a URL, a local file path, or
             most formats supported by npm.

  DIRECTORY  [default: .] Directory where the new project should be created. The directory will be created if it does
             not exist.

OPTIONS
  -q, --quiet                                        Suppress status output messages. Still outputs any result output.

  --adaptVersion=adaptVersion                        [default: <adapt CLI version>] Attempt to select a starter that is
                                                     compatible with this version of Adapt. Must be a valid semver.

  --sshHostKeyCheck=yes|no|ask|accept-new|off|unset  [default: yes] Sets the ssh StrictHostKeyChecking option when using
                                                     the ssh protocol for fetching a starter from a remote git
                                                     repository. Defaults to 'yes' if OpenSSH is detected, 'unset'
                                                     otherwise.

ALIASES
  $ adapt new

EXAMPLE
  Create a new project into the directory './myproj' using the starter named 'blank' from the Adapt starter gallery:
       $ adapt project:new blank myproj

See code: dist/src/commands/project/new.js

Current Tags

  • 0.0.6                                ...           latest (3 months ago)
  • 0.1.0-next.1                                ...           next (17 days ago)

10 Versions

  • 0.1.0-next.1                                ...           17 days ago
  • 0.0.6                                ...           3 months ago
  • 0.0.6-next.2                                ...           3 months ago
  • 0.0.6-next.1                                ...           3 months ago
  • 0.0.5                                ...           4 months ago
  • 0.0.4                                ...           4 months ago
  • 0.0.4-next.1                                ...           4 months ago
  • 0.0.3                                ...           5 months ago
  • 0.0.2                                ...           5 months ago
  • 0.0.2-next.4                                ...           5 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 36
Dependencies (33)
Dev Dependencies (30)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |