Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 25 additions & 56 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,69 +1,38 @@
# https://circleci.com/blog/publishing-npm-packages-using-circleci-2-0/

version: 2

defaults: &defaults
working_directory: ~/repo
docker:
- image: circleci/node:10.15.0
version: 2.1

jobs:
test:
<<: *defaults
build:
docker:
- image: cimg/rust:1.85-node
working_directory: ~/repo
steps:
- checkout

- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-

- run: npm install

- ever-cli-cargo-v1-{{ checksum "Cargo.lock" }}
- ever-cli-cargo-v1-
- run:
name: Run build
command: npm run build

name: Sync package versions
command: node ./scripts/sync-package-versions.js
- run:
name: Run tests
command: npm test

name: Build native router
command: cargo build --release
- run:
name: Validate node wrapper scripts
command: |
node --check ./bin/ever.js
node --check ./npm/postinstall.js
node --check ./scripts/sync-package-versions.js
node --check ./scripts/prepare-platform-package.js
node --check ./scripts/check-npm-publish-prereqs.js
- save_cache:
key: ever-cli-cargo-v1-{{ checksum "Cargo.lock" }}
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}

- persist_to_workspace:
root: ~/repo
paths:
- .
- dist
- ~/.cargo/registry
- ~/.cargo/git
- target

deploy:
<<: *defaults
steps:
- attach_workspace:
at: ~/repo
- run:
name: Authenticate with registry
command: echo "//registry.npmjs.org/:_authToken=$npm_TOKEN" > ~/repo/.npmrc
- run:
name: Publish package
command: npm publish

workflows:
version: 2
test-deploy:
build:
jobs:
- test:
filters:
tags:
only: /^v[0-9]+\.[0-9]+\.[0-9]+/
- deploy:
requires:
- test
filters:
tags:
only: /^v[0-9]+\.[0-9]+\.[0-9]+/
branches:
ignore: /.*/
- build
20 changes: 20 additions & 0 deletions .github/workflows/publish-npm-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,29 @@ permissions:
contents: read

jobs:
preflight-publish:
name: Verify npm publish prerequisites
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org

- name: Verify npm auth and scope access
run: node ./scripts/check-npm-publish-prereqs.js
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

publish-platform:
name: Publish ${{ matrix.artifact_name }}
runs-on: ${{ matrix.os }}
needs: preflight-publish
strategy:
fail-fast: false
matrix:
Expand Down
152 changes: 52 additions & 100 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
# Ever CLI

`ever-cli` is the root router for the Ever ecosystem.
`ever-cli` is the root router for the Ever CLI ecosystem.

## Installation

Target install experience:

```bash
npm install -g ever-cli
```

The final package will distribute the Rust binary through npm-compatible packaging. During development, the native binary must be built locally.

## Usage

It provides a single entrypoint:
It provides a single top-level command:

```bash
ever <product> <command> [args...]
Expand All @@ -24,17 +12,23 @@ Examples:

```bash
ever works init
ever cloc start timer
ever os run agents
ever works --help
ever install works
ever doctor
```

The router itself does not contain product logic. It resolves and forwards commands to product-specific CLIs such as `ever-works`, `ever-cloc`, or `ever-os`.
The router does not contain product-specific business logic. It resolves and forwards commands to product CLIs such as `ever-works`.

## Current Status
## Current Architecture

This repository is being migrated from the old TypeScript stub to a Rust-based router architecture.
This repository is being migrated from the old TypeScript stub to a Rust-based router with:

The approved implementation plan lives in:
- a native Rust binary as the runtime
- a thin npm wrapper in `bin/ever.js`
- platform-specific npm packages for native binaries
- manifest-based plugin resolution via `~/.ever/plugins.json`

Reference docs:

- [docs/SPEC.md](./docs/SPEC.md)
- [docs/IMPLEMENTATION_SPEC.md](./docs/IMPLEMENTATION_SPEC.md)
Expand All @@ -47,7 +41,7 @@ Build the native router:
cargo build --release
```

Then run it through the npm wrapper:
Run the wrapper against the local build:

```bash
node ./bin/ever.js --help
Expand All @@ -59,104 +53,62 @@ Or after install:
ever --help
```

# Publishing on NPM

## Using `np`

`npm run release`

After you run command above:
- answer a few questions (internally it runs [np](https://github.com/sindresorhus/np)) and it will automatically bump version & create new release draft on Github.
- next CircleCI will automatically push new version to `npm` registry.

## Manually

To publish new release on [NPM registry](https://www.npmjs.com/package/ever-cli):
- bump package version number in the package.json file, _version_ field
- navigate to [releases page on Github](https://github.com/ever-co/ever-cli/releases), click "Draft a new release" and use version "v0.x.x".
- next CircleCI will automatically push new version to `npm` registry.

_Note: only versions starting with "v" will be published on npmjs.com_
Useful commands:

## Contribute

- Please give us :star: on Github, it **helps**!
- You are more than welcome to submit feature requests in the [separate repo](https://github.com/ever-co/feature-requests/issues)
- Pull requests are always welcome! Please base pull requests against the _develop_ branch and follow the [contributing guide](.github/CONTRIBUTING.md).

## Contributors

View full list of our [contributors](https://github.com/ever-co/ever-gauzy/graphs/contributors).

## Contact Us

- [Spectrum Community](https://spectrum.chat/ever)
- [Gitter Chat](https://gitter.im/ever-co/ever)
- [Discord Chat](https://discord.gg/msqRJ4w)
- [CodeMentor](https://www.codementor.io/evereq)
- [Telegram](https://t.me/everplatform)
- For business inquiries: <mailto:ever@ever.co>
- Please report security vulnerabilities to <mailto:security@ever.co>
- [Ever Platform @ Twitter](https://twitter.com/everplatform)
- [Ever Platform @ Facebook](https://www.facebook.com/everplatform)

# Privacy & Tracking

We are using [Segment](https://segment.com) (via [analytics-node package](https://github.com/segmentio/analytics-node)) to monitor usage data of Ever CLI according to our [Privacy Policy](https://ever.co/privacy/apps).

## License
```bash
npm run sync:versions
npm run check:publish-prereqs
```

This software is available under different licenses
## Packaging Model

### _Ever Platform Community Edition_ License for CLI
The main package is:

If you decide to choose the Ever Platform Community Edition License for CLI, you must comply with the following terms:
- `ever-cli`

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 3,
as published by the Free Software Foundation.
It depends on platform-specific native packages such as:

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
- `@ever-co/cli-linux-x64-gnu`
- `@ever-co/cli-darwin-arm64`
- `@ever-co/cli-win32-x64-msvc`

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
The publish flow is:

[GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0.txt)
1. build native binaries
2. prepare platform package directories
3. publish platform packages
4. publish the main `ever-cli` package

### _Ever Platform Enterprise_ License
## Publishing on NPM

Alternatively, commercial versions of the software must be used in accordance with the terms and conditions of separate written agreement between you and Ever Co. LTD.
Publishing is currently driven by GitHub Actions:

For more information about Ever Platform Enterprise License please contact <mailto:ever@ever.co>.
- native build workflow:
- `.github/workflows/build-native-binaries.yml`
- npm publish workflow:
- `.github/workflows/publish-npm-packages.yml`

#### The default Ever Platform license, without a valid Ever Platform Enterprise License agreement, is the Ever Platform Community Edition License.
Before publish, the npm token must have publish access to the `@ever-co` npm scope.

#### Please see [LICENSE.md](LICENSE.md) for more information on licenses.
The publish workflow now verifies:

[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fever-co%2Fever-cli.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fever-co%2Fever-cli?ref=badge_large)
- npm authentication via `npm whoami`
- scope access via `npm access list packages @ever-co --json`

## Credits
If those checks fail, the workflow stops before building and publishing artifacts.

Please see [CREDITS.md](CREDITS.md) file for a list of libraries and software included in this program and information about licenses.
### Manual prerequisite check

## Trademarks
```bash
npm run check:publish-prereqs
```

**Ever**® is a registered trademark of [Ever Co. LTD](https://ever.co).
## CI

The trademark may only be used with the written permission of Ever Co. LTD. and may not be used to promote or otherwise market competitive products or services.
GitHub Actions is the primary CI path for native builds and npm publishing.

All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.
CircleCI is kept as an additional build verification path and no longer documents the old npm release flow.

#### Copyright © 2019-present, Ever Co. LTD. All rights reserved.
## License

[![npm downloads](https://img.shields.io/npm/dm/ever-cli.svg?style=flat)](http://npm-stat.com/charts.html?package=ever-cli)
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/ever-co/ever-cli/tree/master.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/ever-co/ever-cli/tree/master)
[![codecov](https://codecov.io/gh/ever-co/ever-cli/branch/master/graph/badge.svg)](https://codecov.io/gh/ever-co/ever-cli)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/a5730f7dc949496faa3912ea8d31c022)](https://www.codacy.com/app/Ever/ever-cli?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=ever-co/ever-cli&amp;utm_campaign=Badge_Grade)
[![DeepScan grade](https://deepscan.io/api/teams/3293/projects/4851/branches/38568/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=3293&pid=4851&bid=38568)
[![Known Vulnerabilities](https://snyk.io/test/github/ever-co/ever-cli/badge.svg)](https://snyk.io/test/github/ever-co/ever-cli)
[![Greenkeeper badge](https://badges.greenkeeper.io/ever-co/ever-cli.svg)](https://greenkeeper.io/)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fever-co%2Fever-cli.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fever-co%2Fever-cli?ref=badge_shield)
See [LICENSE.md](./LICENSE.md).
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"start": "node ./bin/ever.js",
"sync:versions": "node ./scripts/sync-package-versions.js",
"prepare:platform-package": "node ./scripts/prepare-platform-package.js",
"check:publish-prereqs": "node ./scripts/check-npm-publish-prereqs.js",
"test": "echo TODO: tests",
"release": "np",
"postinstall": "node ./npm/postinstall.js"
Expand Down
Loading
Loading