PHPackages                             hotmeteor/eco-cli - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. hotmeteor/eco-cli

ActiveProject[CLI &amp; Console](/categories/cli)

hotmeteor/eco-cli
=================

Eco CLI for Laravel .env syncing

v0.3.0(4y ago)120711[3 issues](https://github.com/hotmeteor/eco-cli/issues)MITPHPPHP ^7.4|^8.0

Since Sep 7Pushed 4y ago2 watchersCompare

[ Source](https://github.com/hotmeteor/eco-cli)[ Packagist](https://packagist.org/packages/hotmeteor/eco-cli)[ RSS](/packages/hotmeteor-eco-cli/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (20)Versions (14)Used By (0)

[![Eco logo](./logo.svg)](./logo.svg)

Eco allows you and your team to effortlessly and securely share non-production environment variables, without the overhead of setting up dedicated secrets servers.

[![Latest Stable Version](https://camo.githubusercontent.com/a9aff7cf9b435bd0af50d8f9cc8d079f26fd64e94a9310dc6716fd4747d0c025/68747470733a2f2f706f7365722e707567782e6f72672f686f746d6574656f722f65636f2d636c692f76)](//packagist.org/packages/hotmeteor/eco-cli)

### What's this for?

[](#whats-this-for)

Have you ever...

- Had a local .env file get deleted or corrupted, causing you to lose environment variables?
- Worked on a team with disorganized or superfluous environment variables?
- Wanted an easy way to securely share environment variables with other project maintainers without need to set up 3rd party secrets management?
- Wanted your team to be able to easily pull an up-to-date copy of project config?

If you answered "yes" to any of these then Eco is for you!

**Important:** Eco is *not* a secure mechanism for storing and sharing **production-level** environment variables. It's not. Please don't.

How it works
------------

[](#how-it-works)

Eco is actually pretty simple. It operates using 3 different storage mechanisms:

1. **Your project `.env` file.** This is where the values you're actually using live, because your project depends on them.
2. **Your local "vault".** The vault is a local config file where you can permanently store any environment variable you don't want to lose. This gives you the ability to nuke your `.env` file and then just pull in the keys you want to restore.
3. **The remote `.eco` file.** When you push keys you want shared by the team, Eco creates an `.eco` file in the root of your repo, directly in the `master` branch. Inside the `.eco` file are your shared keys, all encrypted using [the same strategy used by Github when storing repository secrets](https://docs.github.com/en/rest/reference/actions#create-or-update-a-repository-secret). This file will store unique key:value pairs that your team pushes to it.

Documentation
-------------

[](#documentation)

### Installation

[](#installation)

Eco CLI may be installed globally or on a per-project basis using Composer:

```
$ composer require hotmeteor/eco-cli

$ composer global require hotmeteor/eco-cli
```

### Getting Started

[](#getting-started)

Once Eco is installed it needs to be set up. Ideally, this is done within the folder for the project you are collaborating on.

There are different setups depending on what code host your team uses.

#### Github

[](#github)

**Github** requires a personal access token.

1. Create a [Github Personal Access Token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) is required.
    - Choose `repo` and `read:org` permissions

#### Gitlab

[](#gitlab)

**Gitlab** requires a personal access token and a Deploy Key.

1. Create a Personal Access Token: [https://gitlab.com/profile/personal\_access\_tokens](https://gitlab.com/profile/personal_access_tokens)
    - Choose `api` privileges
2. Create a Deploy Key for your project: [https://gitlab.com/\[group\]/\[project\]/-/settings/repository](https://gitlab.com/%5Bgroup%5D/%5Bproject%5D/-/settings/repository)
    - Name it `eco-cli`
    - Make sure "Write access allowed" is checked

#### Bitbucket

[](#bitbucket)

**Bitbucket** requires an App Password and an Access Key.

1. Create an App Password:
    - Select:
        - Account Email, Read
        - Project Read
        - Repositories Read, Write, Admin
2. Create an Access Key for your project: [https://bitbucket.org/\[workspace\]/\[project\]/admin/access-keys/](https://bitbucket.org/%5Bworkspace%5D/%5Bproject%5D/admin/access-keys/)
    - Name it `eco-cli`
3. When authenticating Eco, your credentials will be your typical Bitbucket username and your new app password.

Usage
-----

[](#usage)

Eco comes with a number of commands to manage local and remote environment variables.

#### Setup

[](#setup)

```
$ eco init
```

The first thing you run after installing.

You will be asked to select the code host your team uses, as well as provide the proper credentials. You will then be asked to select the owner or organization to act under, as well as the repository for the current project.

```
$ eco vault
```

View all the values in your Vault.

#### Organizations

[](#organizations)

```
$ eco org:switch
```

List available organizations you're a member of and allow you switch to a different one.

```
$ eco org:current
```

Show the current working organization.

#### Repositories

[](#repositories)

```
$ eco repo:list
```

List available repositories in your organization.

```
$ eco repo:switch
```

List available repositories in your organization and allow you switch to a different repo. This allows you to use Eco across different repositories. Just don't forget to switch repos before pushing or pulling!

```
$ eco repo:current
```

Show the current working repository.

#### Keys

[](#keys)

```
$ eco env:fresh
```

Fetch the `.env.example` file from your project repository and copy it as your new local `.env` file. This is a desctructive command, so you are asked to confirm.

```
$ eco env:set
```

Create or update a key:value pair in your local vault and will add it to your local `.env` file.

```
$ eco env:unset
```

Remove a key:value pair from your local vault and will remove it from your local `.env` file.

```
$ eco env:push
```

Push a key:value pair into the remote `.eco` file.

```
$ eco env:sync
```

Sync all key:value pairs from the remote `.eco` file with your local `.env` file. You will be asked to confirm before overwriting any local values with remote values.

Contributing
------------

[](#contributing)

If you're interested in contributing to Eco, please read our [contributing guide](https://github.com/hotmeteor/eco-cli/blob/master/.github/CONTRIBUTING.md).

#### Acknowledgments

[](#acknowledgments)

Built on the fantastic [Laravel Zero](https://laravel-zero.com/) framework by [@nunomaduro](https://github.com/nunomaduro)

Inspired by the work done on the [Vapor CLI](https://github.com/laravel/vapor-cli), which provided some foundational code for this CLI.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~23 days

Recently: every ~64 days

Total

13

Last Release

1799d ago

PHP version history (5 changes)v0.1.0PHP ^7.4

v0.1.1PHP ^7.2

v0.2.0PHP ^7.3

v0.2.6PHP ^7.3|^8.0

v0.3.0PHP ^7.4|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/9a359353ddbcb93df5c0ad8a00e25d54443ea6e8edaef61a3fea5c64ac7774d3?d=identicon)[hotmeteor](/maintainers/hotmeteor)

---

Top Contributors

[![hotmeteor](https://avatars.githubusercontent.com/u/378585?v=4)](https://github.com/hotmeteor "hotmeteor (34 commits)")

---

Tags

cliconsoleenvironmentenveco

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hotmeteor-eco-cli/health.svg)

```
[![Health](https://phpackages.com/badges/hotmeteor-eco-cli/health.svg)](https://phpackages.com/packages/hotmeteor-eco-cli)
```

###  Alternatives

[laravel-zero/framework

The Laravel Zero Framework.

3371.4M369](/packages/laravel-zero-framework)[laravel/vapor-cli

The Laravel Vapor CLI

31310.7M8](/packages/laravel-vapor-cli)[tightenco/jigsaw

Simple static sites with Laravel's Blade.

2.2k438.5k29](/packages/tightenco-jigsaw)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
