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
78 changes: 65 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,34 @@
# zap

`zap` is a small terminal helper for when you know "it is somewhere here" but do not want to manually dig for it.
<div align="center">
<img src="./logo.png" alt="zap hero banner" width="100%" />

<h1>zap</h1>

<p><code>zap</code> is a small terminal helper for when you know "it is somewhere here" but do not want to manually dig for it.</p>

<p>
<a href="https://www.npmjs.com/package/zap-search">
<img src="https://img.shields.io/npm/v/zap-search?color=0A66C2&label=npm&logo=npm" alt="npm version" />
</a>
<a href="https://www.npmjs.com/package/zap-search">
<img src="https://img.shields.io/npm/dm/zap-search?color=1D4ED8&label=downloads" alt="npm downloads" />
</a>
<a href="https://github.com/Sran012/zap">
<img src="https://img.shields.io/badge/node-%3E%3D18-2563EB?logo=node.js&logoColor=white" alt="node version" />
</a>
<a href="https://github.com/Sran012/zap">
<img src="https://img.shields.io/badge/shell-zsh%20%7C%20bash%20%7C%20fish%20%7C%20powershell-3B82F6" alt="shell support" />
</a>
<a href="https://github.com/Sran012/zap/blob/main/apps/cli/package.json">
<img src="https://img.shields.io/badge/license-MIT-60A5FA" alt="license" />
</a>
</p>
</div>

It lets you:

- fuzzy search files and folders from the current directory
- jump into folders from the same prompt
- search your `zsh` history and run old commands fast
- search your shell history and run old commands fast
- search ready-made terminal snippets for stuff like `docker`, pick one, and send it back to your shell

## Install
Expand All @@ -15,15 +37,47 @@ It lets you:
npm install -g zap-search
```

Current version: `1.1.0`

## Shell setup

Right now shell integration is for `zsh`.
Shell integration now supports:

- `zsh`
- `bash`
- `fish`
- `powershell`

Use the setup for the shell you actually use.

### zsh

```sh
zap init zsh >> ~/.zshrc
source ~/.zshrc
```

### bash

```sh
zap init bash >> ~/.bashrc
source ~/.bashrc
```

### fish

```fish
zap init fish >> ~/.config/fish/config.fish
source ~/.config/fish/config.fish
```

### PowerShell

```powershell
zap init powershell >> $PROFILE
. $PROFILE
```

This wrapper is what allows `zap` to change your current directory and hand commands back to your shell cleanly.

## Quick use
Expand Down Expand Up @@ -57,14 +111,12 @@ That last one is handy when you are stuck on some random command, like Docker fl

## Plain mode

If you do not want the interactive selector and just want the top match:
If you do not want the interactive selector and just want the top match for files or folders:

```sh
zap pac --plain
```

This is useful in scripts or when you already know your query is specific enough.

## Typical examples

Open a file quickly:
Expand Down Expand Up @@ -95,9 +147,9 @@ zap web find

## Notes

- hidden folders and common heavy folders like `node_modules`, `dist`, `build`, `.next`, and `coverage` are skipped
- history search reads from `~/.zsh_history`
- shell handoff features depend on running the `zsh` setup above
- hidden folders and common heavy folders like `node_modules`, `dist`, `build`, `.next`, `.turbo`, `out`, and `coverage` are skipped
- history search checks your active shell and reads from `~/.zsh_history`, `~/.bash_history`, `~/.local/share/fish/fish_history`, or PowerShell history accordingly
- shell handoff features depend on running the shell setup above

## Final Words

Expand All @@ -112,6 +164,6 @@ If you use `zap`, build something around it, or just want to say hi, you can fin
- Twitter/X: [@twtsujal](https://x.com/twtsujal)
- GitHub: [sran012](https://github.com/sran012)

And if you want to contribute, proper welcome.
And if you want to contribute, you're welcome !

If you have an idea, a fix, a weird edge case, or just want to improve the flow, open an issue or PR. This project is still being shaped, so good contributions are not just accepted, they genuinely help make `zap` better for everyone using it.
If you have an idea, a fix, a weird edge case, or just want to improve the flow, open an issue or PR. This project is still being shaped, good contributions help make `zap` better for everyone using it.
56 changes: 43 additions & 13 deletions apps/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ It lets you:

- fuzzy search files and folders from the current directory
- jump into folders from the same prompt
- search your `zsh` history and run old commands fast
- search your shell history and run old commands fast
- search ready-made terminal snippets for stuff like `docker`, pick one, and send it back to your shell

## Install
Expand All @@ -15,15 +15,47 @@ It lets you:
npm install -g zap-search
```

Current version: `1.1.0`

## Shell setup

Right now shell integration is for `zsh`.
Shell integration now supports:

- `zsh`
- `bash`
- `fish`
- `powershell`

Use the setup for the shell you actually use.

### zsh

```sh
zap init zsh >> ~/.zshrc
source ~/.zshrc
```

### bash

```sh
zap init bash >> ~/.bashrc
source ~/.bashrc
```

### fish

```fish
zap init fish >> ~/.config/fish/config.fish
source ~/.config/fish/config.fish
```

### PowerShell

```powershell
zap init powershell >> $PROFILE
. $PROFILE
```

This wrapper is what allows `zap` to change your current directory and hand commands back to your shell cleanly.

## Quick use
Expand Down Expand Up @@ -57,14 +89,12 @@ That last one is handy when you are stuck on some random command, like Docker fl

## Plain mode

If you do not want the interactive selector and just want the top match:
If you do not want the interactive selector and just want the top match for files or folders:

```sh
zap pac --plain
```

This is useful in scripts or when you already know your query is specific enough.

## Typical examples

Open a file quickly:
Expand All @@ -88,16 +118,16 @@ zap %docker
Look up a command pattern when your brain is half-working:

```sh
zap web bun
zap web docker
zap web kubectl
zap web docker-compose
zap web tar
zap web find
```

## Notes

- hidden folders and common heavy folders like `node_modules`, `dist`, `build`, `.next`, and `coverage` are skipped
- history search reads from `~/.zsh_history`
- shell handoff features depend on running the `zsh` setup above
- hidden folders and common heavy folders like `node_modules`, `dist`, `build`, `.next`, `.turbo`, `out`, and `coverage` are skipped
- history search checks your active shell and reads from `~/.zsh_history`, `~/.bash_history`, `~/.local/share/fish/fish_history`, or PowerShell history accordingly
- shell handoff features depend on running the shell setup above

## Final Words

Expand All @@ -112,6 +142,6 @@ If you use `zap`, build something around it, or just want to say hi, you can fin
- Twitter/X: [@twtsujal](https://x.com/twtsujal)
- GitHub: [sran012](https://github.com/sran012)

And if you want to contribute, proper welcome.
And if you want to contribute, you're welcome !

If you have an idea, a fix, a weird edge case, or just want to improve the flow, open an issue or PR. This project is still being shaped, so good contributions are not just accepted, they genuinely help make `zap` better for everyone using it.
If you have an idea, a fix, a weird edge case, or just want to improve the flow, open an issue or PR. This project is still being shaped, good contributions help make `zap` better for everyone using it.
4 changes: 2 additions & 2 deletions apps/cli/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apps/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zap-search",
"version": "1.0.7",
"version": "1.1.0",
"description": "Fuzzy search files, folders, and zsh history from the terminal",
"main": "dist/index.js",
"scripts": {
Expand Down
Binary file added logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading