Command Line Interface for the Platformer Console
The Platformer CLI can be installed via NPM (Node Package Manager) or through a standalone binary.
-
Requires Node v14+ and NPM. (Installing Node will install NPM as well)
-
Run
npm install -g platformer-cli
-
The Platformer CLI can now be accessed with the
platformer
command.
-
Check the Releases section and download the relavent binary based on your Operating System.
-
Once installed, the Platformer CLI will be accessible with the
platformer
command.
$ npm install -g platformer-cli
$ platformer COMMAND
running command...
$ platformer (-v|--version|version)
platformer-cli/0.1.10 linux-x64 node-v14.15.1
$ platformer --help [COMMAND]
USAGE
$ platformer COMMAND
...
platformer apply FILEPATH
platformer cluster:connect [CLUSTER]
platformer cluster:list
platformer context:add NAME
platformer context:list
platformer context:remove NAME
platformer help [COMMAND]
platformer import
platformer login
platformer logout
platformer select:cxt [NAME]
platformer select:env [ENVIRONMENT]
platformer select:org [ORGANIZATION]
platformer select:proj [PROJECT]
Create resources in Platformer Console using a Kubernetes YAMLs
USAGE
$ platformer apply FILEPATH
ARGUMENTS
FILEPATH Path to YAML file
OPTIONS
-A, --all Log out of all contexts
-E, --environment=environment [default: do-development] Environment Name
-O, --organization=organization [default: Platformer Developer Portal] Organization Name
-P, --project=project [default: Temp Production] Project Name
-T, --target-ns=target-ns Target namespace
-h, --help show CLI help
--save
See code: src/commands/apply.ts
Connect a Kubernetes Cluster (in your kubeconfig) to the Platformer Console
USAGE
$ platformer cluster:connect [CLUSTER]
ARGUMENTS
CLUSTER (OPTIONAL) Name of the Kubernetes Cluster to connect to the Platformer Console (must be a cluster name in
your kubeconfig). If not provided, the CLI will enter an interactive mode to select a Cluster.
OPTIONS
-O, --organization=organization [default: Platformer Developer Portal] Organization Name
-P, --project=project [default: Temp Production] Project Name
-h, --help show CLI help
EXAMPLES
$ platformer connect:cluster
$ platformer connect:cluster <cluster-name as listed in your kubeconfig>
$ platformer connect:cluster --organization <organization> --project <project> # override context defaults
See code: src/commands/cluster/connect.ts
Lists all connected Kubernetes Clusters in a Project
USAGE
$ platformer cluster:list
OPTIONS
-O, --organization=organization [default: Platformer Developer Portal] Organization Name
-P, --project=project [default: Temp Production] Project Name
-h, --help show CLI help
-x, --extended show extra columns
--columns=columns only show provided columns (comma-seperated)
--csv output is csv format
--filter=filter filter property by partial string matching, ex: name=default
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
See code: src/commands/cluster/list.ts
Add a new context
USAGE
$ platformer context:add NAME
ARGUMENTS
NAME Context name (must be unique)
OPTIONS
-h, --help show CLI help
See code: src/commands/context/add.ts
Lists all configured contexts
USAGE
$ platformer context:list
OPTIONS
-h, --help show CLI help
-x, --extended show extra columns
--columns=columns only show provided columns (comma-seperated)
--csv output is csv format
--filter=filter filter property by partial string matching, ex: name=default
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
See code: src/commands/context/list.ts
Remove a context
USAGE
$ platformer context:remove NAME
ARGUMENTS
NAME Context name to remove
OPTIONS
-h, --help show CLI help
See code: src/commands/context/remove.ts
display help for platformer
USAGE
$ platformer help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
See code: @oclif/plugin-help
Import resources from existing namespace in a Kubernetes Cluster
USAGE
$ platformer import
OPTIONS
-A, --all Log out of all contexts
-C, --cluster=cluster (required) Cluster Name
-E, --environment=environment [default: do-development] Environment Name
-N, --namespace=namespace (required) Namspace
-O, --organization=organization [default: Platformer Developer Portal] Organization Name
-P, --project=project [default: Temp Production] Project Name
-T, --target-ns=target-ns Target namespace
-h, --help show CLI help
--save
See code: src/commands/import.ts
Log in to the CLI with your Platformer Account (logs into the current context)
USAGE
$ platformer login
See code: src/commands/login.ts
Log out of the CLI (from the current context)
USAGE
$ platformer logout
OPTIONS
-A, --all Log out of all contexts
-h, --help show CLI help
--context=default|devx|devc|devx2 [default: devx2] Name of a specific context to log out from (defaults to current
context)
See code: src/commands/logout.ts
Select a context
USAGE
$ platformer select:cxt [NAME]
ARGUMENTS
NAME (OPTIONAL) Context name. If not provided, the CLI will prompt an interactive selection
OPTIONS
-h, --help show CLI help
ALIASES
$ platformer select:context
$ platformer select:ctx
See code: src/commands/select/ctx.ts
Select a default Environment for your current context.
USAGE
$ platformer select:env [ENVIRONMENT]
ARGUMENTS
ENVIRONMENT (OPTIONAL) Name of the Environment to set in the current context. If not provided, the CLI will open an
interactive prompt to select an Environment.
OPTIONS
-O, --organization=organization [default: Platformer Developer Portal] Organization Name
-P, --project=project [default: Temp Production] Project Name
-h, --help show CLI help
ALIASES
$ platformer select:environment
$ platformer select:env
EXAMPLES
$ platformer select:environment # interactive select
$ platformer select:env <environment-name>
See code: src/commands/select/env.ts
Select a default Organization for your current context.
USAGE
$ platformer select:org [ORGANIZATION]
ARGUMENTS
ORGANIZATION (OPTIONAL) Name of the Organization to set in the current context. If not provided, the CLI will open an
interactive prompt to select an Organization.
OPTIONS
-h, --help show CLI help
ALIASES
$ platformer select:organization
$ platformer select:org
$ platformer select:organisation
EXAMPLES
$ platformer select:org # interactive select
$ platformer select:org <organization-name>
See code: src/commands/select/org.ts
Select a default Project for your current context. Requires an Organization to be set with select:org or using the --o flag
USAGE
$ platformer select:proj [PROJECT]
ARGUMENTS
PROJECT (OPTIONAL) Name of the Project to set in the current context. If not provided, the CLI will open an
interactive prompt to select an Project.
OPTIONS
-O, --organization=organization [default: Platformer Developer Portal] organization name
-h, --help show CLI help
ALIASES
$ platformer select:project
$ platformer select:proj
EXAMPLES
$ platformer select:project # interactive select
$ platformer select:project <project-name>
See code: src/commands/select/proj.ts