定制 aaemnnosttv/wp-cli-dotenv-command 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

aaemnnosttv/wp-cli-dotenv-command

Composer 安装命令:

composer require aaemnnosttv/wp-cli-dotenv-command

包简介

Dotenv commands for WP-CLI

README 文档

README

Travis Build Packagist

NAME

  wp dotenv

DESCRIPTION

  Manage a .env file

SYNOPSIS

  wp dotenv <command>

SUBCOMMANDS

  delete      Delete a definition from the environment file
  get         Get the value for a given key from the environment file
  init        Initialize the environment file
  list        List the defined variables from the environment file
  salts       Manage WordPress salts in .env format
  set         Set a value in the environment file for a given key.

All dotenv commands accept a --file=<path> parameter to specify the location of the environment file.
Defaults to .env.
If used, this parameter can be an absolute or relative path to the environment file, but which must include the file name (it does not have to be .env).

init

Initializes a new environment file.

By default, this command will only create the environment file if it does not already exist, but it can do much more.

--template=<file>

You may optionally initialize the environment file using another file as a template (eg: .env.example, a common convention). Run wp dotenv init --template=.env.example to use that file as the basis for the new environment file.

By default, the new file will be a copy of the template, but you may also set new values on the fly interactively! Passing the --interactive flag with the same command will prompt for each defined variable in the template. You may specify a new value to use, or simply leave it blank to keep the template-defined value. Any other lines/comments from the template are preserved.

--with-salts

Initialize the new environment file with fresh salts provided by the wordpress.org salt generator service. Any existing keys by the same name will not be overwritten. See salts.

--force

Overwrites an existing environment file, if it exists.

list [<pattern>...]

Prints out all of the key/value pairs as defined in the environment file.

You may also optionally limit the output to specific keys, or even keys that match simple patterns using glob pattern syntax. Eg: wp dotenv list DB_* *AWS* would produce a list with the following hypotheical keys:

DB_NAME=...
DB_PASS=...
S3_AWS_ID=...
S3_AWS_SECRET=...

The list command supports all of the same options for --format=<out> you've known to grow and love (table,json,csv,..etc). Default: table.

get <key>

Get the value of a defined key from the environment file.

set <key> <value>

Set the value of a key in the environment file.

By default the value that is set is not quoted in the file. If you need your value to be quoted a certain way, you may optionally pass a flag for the preferred style of quote you want: --quote-single or --quote-double.

delete <key>...

Remove one or more definitions for the given keys from the environment file.

salts

generate

Adds variable definitions to the environment file with fresh salts provided by the wordpress.org salt generator service.

By default, any existing keys by the same name will not be overwritten. However, if all of the defined salts in the environment file have the same value, then it is assumed that they are placeholders and will be updated. It is also possible to force regenerate them using --force, or simply use the regenerate command (see below).

regenerate

Same as generate, but will update all keys for salts with new values.

Installation

Recommended

As of WP-CLI v0.23, you may install the dotenv command using the new package command:

wp package install aaemnnosttv/wp-cli-dotenv-command:^2.0

For installation with prior versions of WP-CLI, see the wiki.

That's it! Now you should see the dotenv command as an option when you run wp from any directory.

aaemnnosttv/wp-cli-dotenv-command 适用场景与选型建议

aaemnnosttv/wp-cli-dotenv-command 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 233.88k 次下载、GitHub Stars 达 178, 最近一次更新时间为 2015 年 08 月 03 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 aaemnnosttv/wp-cli-dotenv-command 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 aaemnnosttv/wp-cli-dotenv-command 我们能提供哪些服务?
定制开发 / 二次开发

基于 aaemnnosttv/wp-cli-dotenv-command 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 233.88k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 179
  • 点击次数: 16
  • 依赖项目数: 7
  • 推荐数: 0

GitHub 信息

  • Stars: 178
  • Watchers: 7
  • Forks: 20
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-08-03