forged-cli 0.8.1 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
  > Your dev environment, forged.
4
4
 
5
- [![npm version](https://img.shields.io/npm/v/forged-cli?color=00ff41&style=flat-square)](https://www.npmjs.com/package/forged-cli)
6
- [![downloads](https://img.shields.io/npm/dt/forged-cli?color=00ff41&style=flat-square)](https://www.npmjs.com/package/forged-cli)
7
- [![tests](https://img.shields.io/github/actions/workflow/status/bkness/forged-cli/test.yml?branch=main&label=tests&color=00ff41&style=flat-square)](https://github.com/bkness/forged-cli/actions/workflows/test.yml)
8
- [![license](https://img.shields.io/npm/l/forged-cli?color=00ff41&style=flat-square)](https://github.com/bkness/forged-cli)
5
+ [![npm version](https://img.shields.io/npm/v/forged-cli?color=1a7f37&labelColor=161b22&style=flat-square)](https://www.npmjs.com/package/forged-cli)
6
+ [![downloads](https://img.shields.io/npm/dt/forged-cli?color=1a7f37&labelColor=161b22&style=flat-square)](https://www.npmjs.com/package/forged-cli)
7
+ [![tests](https://img.shields.io/github/actions/workflow/status/bkness/forged-cli/test.yml?branch=main&label=tests&color=1a7f37&labelColor=161b22&style=flat-square)](https://github.com/bkness/forged-cli/actions/workflows/test.yml)
8
+ [![license](https://img.shields.io/npm/l/forged-cli?color=1a7f37&labelColor=161b22&style=flat-square)](https://github.com/bkness/forged-cli)
9
9
 
10
10
  **Forged** is a CLI toolkit for developers: a guided zsh setup, a dependency security scanner, a credential generator, and a README generator.
11
11
 
@@ -48,7 +48,7 @@ forged readme
48
48
  It's written for people new to the terminal. It shows the whole plan first, explains each step, and asks before doing it:
49
49
 
50
50
  1. **Homebrew on your PATH.** If Homebrew is installed but `brew` isn't found (the installer's last step is easy to miss), adds its `shellenv` line to `~/.zprofile`
51
- 2. **Command-line tools.** Installs whichever of `git gh fzf eza bat fd zoxide starship` are missing, with Homebrew
51
+ 2. **Command-line tools.** Installs whichever of `git gh fzf eza bat fd zoxide starship ripgrep jq` are missing, with Homebrew
52
52
  3. **zinit**, the plugin manager, cloned to `~/.local/share/zinit`
53
53
  4. **The dotfiles**, cloned to `~/dev/dotfiles`
54
54
  5. **One line in `~/.zshrc`** that loads them. The file is backed up first, and nothing already in it is changed
@@ -63,6 +63,16 @@ Steps that are already done are skipped, so it's safe to run again after fixing
63
63
 
64
64
  Needs macOS or Linux. Without Homebrew (on Linux, say), init lists the missing tools for you to install yourself and does the rest.
65
65
 
66
+ ### After `forged init`
67
+
68
+ Three things init can't do for you:
69
+
70
+ 1. **Log in to GitHub** for the Ctrl+G dashboard: `gh auth login`. Project boards also need `gh auth refresh -s project`
71
+ 2. **Install a Nerd Font** so file icons show instead of boxes: `brew install --cask font-jetbrains-mono-nerd-font`, then choose "JetBrainsMono Nerd Font" in your terminal's font settings
72
+ 3. **Linux only: make zsh your shell** with `chsh -s "$(which zsh)"`, then log out and back in. macOS already uses zsh
73
+
74
+ Then run `exec zsh` (or open a new tab) to load it.
75
+
66
76
  ---
67
77
 
68
78
  ## 🔍 Security Scanner
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "forged-cli",
3
- "version": "0.8.1",
4
- "description": "A complete dev environment toolkit \u2014 shell, workflows, and project scaffolding in one install.",
3
+ "version": "0.8.2",
4
+ "description": "A complete dev environment toolkit — shell, workflows, and project scaffolding in one install.",
5
5
  "keywords": [
6
6
  "cli",
7
7
  "devtools",
@@ -22,8 +22,14 @@ export const TOOLS = {
22
22
  fd: 'a faster `find`',
23
23
  zoxide: 'jump to folders you visit often (Ctrl+J)',
24
24
  starship: 'the prompt',
25
+ rg: 'fast code search behind the code finder',
26
+ jq: 'reads JSON, for project settings',
25
27
  };
26
28
 
29
+ // Package names that differ from the command they install
30
+ export const PACKAGES = { rg: 'ripgrep' };
31
+ export const packageFor = (tool) => PACKAGES[tool] ?? tool;
32
+
27
33
  export const DOTFILES_REPO = 'https://github.com/bkness/dotfiles.git';
28
34
  export const ZINIT_REPO = 'https://github.com/zdharma-continuum/zinit.git';
29
35
  export const HOOK_MARKER = '# forged: load the Forged shell';
@@ -150,11 +156,11 @@ function apply(step, home, run) {
150
156
  }
151
157
  case 'tools': {
152
158
  if (!step.brewAvailable) {
153
- console.log(` ${yellow}Homebrew isn't installed, so install these yourself:${reset} ${bold}${step.missing.join(' ')}${reset}`);
159
+ console.log(` ${yellow}Homebrew isn't installed, so install these yourself:${reset} ${bold}${step.missing.map(packageFor).join(' ')}${reset}`);
154
160
  console.log(` ${dim}On a Mac, get Homebrew from https://brew.sh and run forged init again. On Linux, use your package manager.${reset}`);
155
161
  return 'manual';
156
162
  }
157
- return run(step.brew, ['install', ...step.missing]);
163
+ return run(step.brew, ['install', ...step.missing.map(packageFor)]);
158
164
  }
159
165
  case 'zinit':
160
166
  return run('git', ['clone', '--depth', '1', ZINIT_REPO, step.dir]);
@@ -237,6 +243,8 @@ export async function initCommand(args, { home = homedir(), env = realEnv(home),
237
243
  console.log(` ${green}${bold}All set.${reset} Next:`);
238
244
  console.log(` ${bold}exec zsh${reset} load the new shell in this window`);
239
245
  console.log(` ${bold}gh auth login${reset} connect GitHub, for the Ctrl+G dashboard`);
246
+ console.log(` ${bold}a Nerd Font${reset} for file icons: ${bold}brew install --cask font-jetbrains-mono-nerd-font${reset},`);
247
+ console.log(` then pick it in your terminal's font settings`);
240
248
  console.log(` ${bold}Ctrl+P${reset} browse every command\n`);
241
249
  return 0;
242
250
  }