Skip to content

Commit 273bd39

Browse files
authored
feat: remove emojis and improve readme (#368)
1 parent 5cc7d5c commit 273bd39

File tree

7 files changed

+27
-27
lines changed

7 files changed

+27
-27
lines changed

packages/cli/README.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
# Bucket CLI
22

3-
Command-line interface for interacting with Bucket services. The CLI allows you to manage apps, features, authentication, and generate TypeScript types for your Bucket features. With this tool, you can streamline your feature flagging workflow directly from your terminal.
3+
Command-line interface for interacting with Bucket services. The CLI allows you to manage apps,
4+
features, authentication, and generate TypeScript types for your Bucket features. With this tool,
5+
you can streamline your feature flagging workflow directly from your terminal.
46

57
## Quick Start
68

7-
Get started quickly by running the CLI directly: initializing the CLI, creating a feature, and generate the types all at once.
9+
Get started quickly by running the CLI directly from your project's root directory:
10+
initializing the CLI (if not already setup), creating a feature, and generate the types all at once.
811

912
```bash
10-
# Initialize CLI (if not setup), create a feature, and generate types all at once
13+
# Initialize CLI (if not already setup), create a feature, and generate types all at once
1114
npx @bucketco/cli new
1215
```
1316

@@ -33,7 +36,8 @@ yarn bucket new
3336

3437
### Global installation
3538

36-
You can also install the CLI globally adding the it to your PATH allowing you to use the shorthand `bucket`
39+
You can also install the CLI globally adding the it to your PATH allowing you to use the shorthand `bucket`,
40+
but we recommend installing it locally instead to better maintain the version.
3741

3842
```bash
3943
npm install -g @bucketco/cli
@@ -58,7 +62,8 @@ bucket features types
5862

5963
## Configuration
6064

61-
The CLI creates a `bucket.config.json` file in your project directory when you run `bucket init`. This file contains all the necessary settings for your Bucket integration.
65+
The CLI creates a `bucket.config.json` file in your project directory when you run `bucket init`.
66+
This file contains all the necessary settings for your Bucket integration.
6267

6368
### Configuration File Structure
6469

@@ -95,7 +100,8 @@ You can override these settings using command-line options for individual comman
95100

96101
### `bucket init`
97102

98-
Initialize a new Bucket configuration in your project. This creates a `bucket.config.json` file with your settings and prompts for any required information not provided via options.
103+
Initialize a new Bucket configuration in your project.
104+
This creates a `bucket.config.json` file with your settings and prompts for any required information not provided via options.
99105

100106
```bash
101107
bucket init [--overwrite]
@@ -109,7 +115,8 @@ Options:
109115

110116
### `bucket new [featureName]`
111117

112-
All-in-one command to get started quickly. This command combines `init`, feature creation, and type generation in a single step. Use this for the fastest way to get up and running with Bucket.
118+
All-in-one command to get started quickly. This command combines `init`, feature creation,
119+
and type generation in a single step. Use this for the fastest way to get up and running with Bucket.
113120

114121
```bash
115122
bucket new "My Feature" [--key my-feature] [--app-id ap123456789] [--key-format custom] [--out gen/features.ts] [--format react]
@@ -147,7 +154,8 @@ Manage your Bucket features with the following subcommands.
147154

148155
#### `bucket features create [featureName]`
149156

150-
Create a new feature in your Bucket app. The command guides you through the feature creation process with interactive prompts if options are not provided.
157+
Create a new feature in your Bucket app.
158+
The command guides you through the feature creation process with interactive prompts if options are not provided.
151159

152160
```bash
153161
bucket features create "My Feature" [--key my-feature] [--app-id ap123456789] [--key-format custom]
@@ -161,7 +169,8 @@ Options:
161169

162170
#### `bucket features list`
163171

164-
List all features for the current app. This helps you visualize what features are available and their current configurations.
172+
List all features for the current app.
173+
This helps you visualize what features are available and their current configurations.
165174

166175
```bash
167176
bucket features list [--app-id ap123456789]
@@ -173,7 +182,8 @@ Options:
173182

174183
#### `bucket features types`
175184

176-
Generate TypeScript types for your features. This ensures type safety when using Bucket features in your TypeScript/JavaScript applications.
185+
Generate TypeScript types for your features.
186+
This ensures type safety when using Bucket features in your TypeScript/JavaScript applications.
177187

178188
```bash
179189
bucket features types [--app-id ap123456789] [--out gen/features.ts] [--format react]

packages/cli/commands/auth.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const loginAction = async () => {
1212
const spinner = ora(`Logging in to ${chalk.cyan(baseUrl)}...`).start();
1313
try {
1414
await authenticateUser(baseUrl);
15-
spinner.succeed(`Logged in to ${chalk.cyan(baseUrl)} successfully! 🎉`);
15+
spinner.succeed(`Logged in to ${chalk.cyan(baseUrl)} successfully!`);
1616
} catch (error) {
1717
spinner.fail("Login failed.");
1818
void handleError(error, "Login");
@@ -24,7 +24,7 @@ export const logoutAction = async () => {
2424
const spinner = ora("Logging out...").start();
2525
try {
2626
await authStore.setToken(baseUrl, undefined);
27-
spinner.succeed("Logged out successfully! 👋");
27+
spinner.succeed("Logged out successfully!");
2828
} catch (error) {
2929
spinner.fail("Logout failed.");
3030
void handleError(error, "Logout");

packages/cli/commands/features.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export const createFeatureAction = async (
5353
const feature = await createFeature(appId, name, key);
5454
// todo: would like to link to feature here but we don't have the env id, only app id
5555
spinner.succeed(
56-
`Created feature ${chalk.cyan(feature.name)} with key ${chalk.cyan(feature.key)} at ${chalk.cyan(baseUrl)}. 🎉`,
56+
`Created feature ${chalk.cyan(feature.name)} with key ${chalk.cyan(feature.key)} at ${chalk.cyan(baseUrl)}.`,
5757
);
5858
} catch (error) {
5959
spinner?.fail("Feature creation failed.");

packages/cli/commands/init.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import ora, { Ora } from "ora";
66

77
import { App, listApps } from "../services/bootstrap.js";
88
import { configStore, typeFormats } from "../stores/config.js";
9-
import { chalkBrand, DEFAULT_TYPES_OUTPUT } from "../utils/constants.js";
9+
import { DEFAULT_TYPES_OUTPUT } from "../utils/constants.js";
1010
import { handleError } from "../utils/errors.js";
1111
import { overwriteOption } from "../utils/options.js";
1212

@@ -27,7 +27,7 @@ export const initAction = async (args: InitArgs = {}) => {
2727
);
2828
}
2929

30-
console.log(chalkBrand("\nWelcome to Bucket! 🪣\n"));
30+
console.log("\nWelcome to Bucket!\n");
3131
const baseUrl = configStore.getConfig("baseUrl");
3232

3333
// Load apps

packages/cli/index.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/usr/bin/env node
22
import chalk from "chalk";
33
import { program } from "commander";
4-
import { join } from "node:path";
54

65
import { registerAppCommands } from "./commands/apps.js";
76
import { registerAuthCommands } from "./commands/auth.js";
@@ -54,10 +53,4 @@ async function main() {
5453
program.parse(process.argv);
5554
}
5655

57-
// Run the main function if this file is run directly and not imported
58-
if (
59-
process.argv[1].endsWith(join("cli", "dist", "index.js")) ||
60-
process.argv[1].endsWith(join(".bin", "bucket"))
61-
) {
62-
void main();
63-
}
56+
void main();

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@bucketco/cli",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"packageManager": "yarn@4.1.1",
55
"description": "CLI for Bucket service",
66
"main": "./dist/index.js",

packages/cli/utils/constants.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { join } from "path";
2-
import chalk from "chalk";
32

43
export const CONFIG_FILE_NAME = "bucket.config.json";
54
export const AUTH_FILE = join(
@@ -12,8 +11,6 @@ export const DEFAULT_BASE_URL = "https://app.bucket.co";
1211
export const DEFAULT_API_URL = `${DEFAULT_BASE_URL}/api`;
1312
export const DEFAULT_TYPES_OUTPUT = join("gen", "features.ts");
1413

15-
export const chalkBrand = chalk.hex("#847CFB");
16-
1714
export const loginUrl = (baseUrl: string, localPort: number) =>
1815
`${baseUrl}/login?redirect_url=` +
1916
encodeURIComponent("/cli-login?port=" + localPort);

0 commit comments

Comments
 (0)