Skip to content

Commit

Permalink
change near-shell » near-cli, NEAR Shell » NEAR CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
mikedotexe committed Aug 3, 2020
1 parent 46ba4d3 commit 29c5933
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions README.md
@@ -1,16 +1,16 @@
# NEAR Shell command line interface
# NEAR CLI (command line interface)

[![Build Status](https://travis-ci.com/near/near-shell.svg?branch=master)](https://travis-ci.com/near/near-shell)
[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/near/near-shell)

NEAR Shell is a Node.js application that relies on [`near-api-js`](https://github.com/near/near-api-js) to generate secure keys, connect to the NEAR platform and send transactions to the network on your behalf.
NEAR CLI is a Node.js application that relies on [`near-api-js`](https://github.com/near/near-api-js) to generate secure keys, connect to the NEAR platform and send transactions to the network on your behalf.

> note that **Node.js version 10+** is required to run NEAR Shell
> note that **Node.js version 10+** is required to run NEAR CLI
## Installation

```bash
npm install -g near-shell
npm install -g near-cli
```

## Usage
Expand Down
2 changes: 1 addition & 1 deletion commands/dev-deploy.js
Expand Up @@ -54,7 +54,7 @@ async function devDeploy(options) {

async function createDevAccountIfNeeded({ near, keyStore, networkId, init, masterAccount }) {
// TODO: once examples and create-near-app use the dev-account.env file, we can remove the creation of dev-account
// https://github.com/nearprotocol/near-shell/issues/287
// https://github.com/near/near-shell/issues/287
const accountFilePath = `${PROJECT_KEY_DIR}/dev-account`;
const accountFilePathEnv = `${PROJECT_KEY_DIR}/dev-account.env`;
if (!init) {
Expand Down
6 changes: 3 additions & 3 deletions index.js
Expand Up @@ -80,12 +80,12 @@ exports.login = async function (options) {
await eventtracking.track(eventtracking.EVENT_ID_LOGIN_END, { success: true, login_is_not_needed: true }, options);
} else {
const newUrl = new URL(options.walletUrl + '/login/');
const title = 'NEAR Shell';
const title = 'NEAR CLI';
newUrl.searchParams.set('title', title);
const keyPair = await KeyPair.fromRandom('ed25519');
newUrl.searchParams.set('public_key', keyPair.getPublicKey());

console.log(chalk`\n{bold.yellow Please authorize NEAR Shell} on at least one of your accounts.`);
console.log(chalk`\n{bold.yellow Please authorize NEAR CLI} on at least one of your accounts.`);

// attempt to capture accountId automatically via browser callback
let tempUrl;
Expand Down Expand Up @@ -134,7 +134,7 @@ exports.login = async function (options) {
return await new Promise((resolve) => {
rl.question(
chalk`Please authorize at least one account at the URL above.\n\n` +
chalk`Which account did you authorize for use with NEAR Shell?\n` +
chalk`Which account did you authorize for use with NEAR CLI?\n` +
chalk`{bold Enter it here${redirectAutomaticallyHint}:}\n`, async (accountId) => {
resolve(accountId);
});
Expand Down
10 changes: 5 additions & 5 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "near-shell",
"version": "0.24.9",
"name": "near-cli",
"version": "1.0.0",
"description": "General purpose command line tools for interacting with NEAR Protocol",
"engines": {
"node": ">= 10"
Expand All @@ -13,14 +13,14 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/nearprotocol/near-shell.git"
"url": "git+https://github.com/near/near-shell.git"
},
"author": "Jane Degtiareva",
"license": "(MIT AND Apache-2.0)",
"bugs": {
"url": "https://github.com/nearprotocol/near-shell/issues"
"url": "https://github.com/near/near-shell/issues"
},
"homepage": "https://github.com/nearprotocol/near-shell#readme",
"homepage": "https://github.com/near/near-shell#readme",
"bin": {
"near": "./bin/near"
},
Expand Down
4 changes: 2 additions & 2 deletions utils/check-version.js
Expand Up @@ -11,7 +11,7 @@ const isCI = require('is-ci'); // avoid output if running in CI server
const UPDATE_CHECK_INTERVAL_SECONDS = 1;

/**
check the current version of NEAR Shell against latest as published on npm
check the current version of NEAR CLI against latest as published on npm
*/
module.exports = async function checkVersion() {
const pkg = require('../package.json');
Expand All @@ -26,7 +26,7 @@ module.exports = async function checkVersion() {
const { type: diff, current, latest } = notifier.update;
const update = normalizePhrasingOf(diff);
const updateCommand = '{updateCommand}';
const message = chalk`NEAR Shell has a ${update} available {dim ${current}} → {green ${latest}}
const message = chalk`NEAR CLI has a ${update} available {dim ${current}} → {green ${latest}}
Run {cyan ${updateCommand}} to avoid unexpected behavior`;

const boxenOpts = {
Expand Down
2 changes: 1 addition & 1 deletion utils/eventtracking.js
Expand Up @@ -64,7 +64,7 @@ const getEventTrackingConsent = async () => {
for (let attempts = 0; attempts < 10; attempts++) {
const answer = await new Promise((resolve) => {
rl.question(
chalk`We would like to collect data on near-shell usage to improve developer experience.` +
chalk`We would like to collect data on near-cli usage to improve developer experience.` +
chalk` We will never send private information. We only collect which commands are run via an anonymous identifier.` +
chalk`{bold.yellow Would you like to opt in (y/n)? }`,
async (consentToEventTracking) => {
Expand Down

0 comments on commit 29c5933

Please sign in to comment.