A code search tool similar to ack and the_silver_searcher(ag). It supports multi platforms and multi encodings.
The Platinum Searcher alternatives and similar packages
Based on the "Standard CLI" category.
Alternatively, view The Platinum Searcher alternatives based on common mentions on social networks and blogs.
cobra9.9 8.9 The Platinum Searcher VS cobraA Commander for modern Go CLI interactions
urfave/cliA simple, fast, and fun package for building command line apps in Go
elvish9.1 8.6 The Platinum Searcher VS elvishElvish = Expressive Programming Language + Versatile Interactive Shell
survey8.8 0.0 The Platinum Searcher VS surveyA golang library for building interactive and accessible prompts with full support for windows and posix terminals.
kingpin8.7 1.3 The Platinum Searcher VS kingpinCONTRIBUTIONS ONLY: A Go (golang) command line and flag parser
go-flagsgo command line option parser
pflag8.4 0.0 The Platinum Searcher VS pflagDrop-in replacement for Go's flag package, implementing POSIX/GNU-style --flags.
Dnote8.4 0.0 The Platinum Searcher VS DnoteA simple command line notebook for programmers
readlineReadline is a pure go(golang) implementation for GNU-Readline kind library
mitchellh/cliA Go library for implementing command-line interfaces.
kong7.8 4.8 The Platinum Searcher VS kongKong is a command-line parser for Go
docopt.goA command-line arguments parser that will make you smile.
liner7.5 0.0 The Platinum Searcher VS linerPure Go line editor with history, inspired by linenoise
ops7.5 5.2 The Platinum Searcher VS opsops - build and run nanos unikernels
cli-initThe easy way to build Golang command-line application.
mow.cli7.2 0.0 The Platinum Searcher VS mow.cliA versatile library for building CLI applications in Go
completebash completion written in go + bash completion for go command
flaggy7.1 0.0 The Platinum Searcher VS flaggyIdiomatic Go input parsing with subcommands, positional values, and flags at any position. No required project or package layout and no external dependencies.
cli7.0 0.0 The Platinum Searcher VS cliCLI - A package for building command line app with go
argparseArgparse for golang. Just because `flag` sucks
box-cli-makerMake Highly Customized Boxes for CLI
1build5.5 0.0 The Platinum Searcher VS 1buildFrictionless way of managing project-specific commands
climax5.4 0.0 The Platinum Searcher VS climaxClimax is an alternative CLI with the human face
carapace-binmulti-shell multi-command argument completer
sflags5.1 0.0 The Platinum Searcher VS sflagsGenerate flags by parsing structures
wmenu5.1 0.0 The Platinum Searcher VS wmenuAn easy to use menu structure for cli applications that prompts users to make choices.
commandeerAutomatically sets up command line flags based on struct fields and tags.
clîr4.8 0.0 The Platinum Searcher VS clîrA Simple and Clear CLI library. Dependency free.
ukautz/clifAnother CLI framework for Go. It works on my machine.
flag4.5 3.6 The Platinum Searcher VS flagFlag is a simple but powerful command line option parsing library for Go support infinite level subcommand
cmdr4.4 7.1 The Platinum Searcher VS cmdrPOSIX-compliant command-line UI (CLI) parser and Hierarchical-configuration operations
job4.4 0.0 The Platinum Searcher VS jobJOB, make your short-term command as a long-term job. 将命令行规划成任务的工具
carapacecommand argument completion generator for spf13/cobra
caloriesCalories Tracker for the Commandline
acmd3.6 7.0 The Platinum Searcher VS acmdSimple, useful and opinionated CLI package in Go.
wlog3.4 0.0 The Platinum Searcher VS wlogA simple logging interface that supports cross-platform color and concurrency.
gocmd3.4 0.0 The Platinum Searcher VS gocmdA Go library for building command line applications.
go-getoptionsFully featured Go (golang) command line option parser with built-in auto-completion support.
strumt3.0 1.3 The Platinum Searcher VS strumtStrumt is a library to create prompt chain
Go-ConsoleGoConsole: the golang component that eases the creation of beautiful command line interfaces.
argv2.7 0.0 The Platinum Searcher VS argvA Go library to split command line string as arguments array using the bash syntax.
flagvar2.7 0.0 The Platinum Searcher VS flagvarA collection of CLI argument types for the Go `flag` package.
command-chainA go library for easy configure and run command chains. Such like pipelining in unix shells.
go-commanderGo library to simplify CLI workflow
go-andotpCLI program to encrypt/decrypt andOTP files
go-cli1.7 0.0 The Platinum Searcher VS go-cliA full-featured and easy to use command-line package
sand1.7 0.0 The Platinum Searcher VS sandPackage for creating interpreters
ts1.6 0.0 The Platinum Searcher VS tstimestamp convert & compare tool. 时间戳转换与对比工具
mcli1.1 10.0 The Platinum Searcher VS mcliA minimal but very powerful cli library for Go
multi-tailfwatch multiple logs on local or remote servers.
Clean code begins in your IDE with SonarLint
Do you think we are missing an alternative of The Platinum Searcher or a related project?
The Platinum Searcher
A code search tool similar to
the_silver_searcher(ag). It supports multi platforms and multi encodings.
- It searches code about 3–5× faster than
- It searches code as fast as
- It ignores file patterns from your
- It ignores directories with names that start with
--hiddenoption, if you want to search.
- It searches
- It provides binaries for multi platform (macOS, Windows, Linux).
cd ~/src/github.com/torvalds/linux ack EXPORT_SYMBOL_GPL 30.18s user 2.32s system 99% cpu 32.613 total # ack ag EXPORT_SYMBOL_GPL 1.57s user 1.76s system 311% cpu 1.069 total # ag: It's faster than ack. pt EXPORT_SYMBOL_GPL 2.29s user 1.26s system 358% cpu 0.991 total # pt: It's faster than ag!!
$ # Recursively searches for PATTERN in current directory. $ pt PATTERN $ # You can specify PATH and some OPTIONS. $ pt OPTIONS PATTERN PATH
If you put configuration file on the following directories, pt use option in the file.
- .ptconfig.toml (current directory)
The file is TOML format like the following.
color = true context = 3 ignore = ["dir1", "dir2"] color-path = "1;34"
The options are same as command line options.
Vim + Unite.vim
You can use pt with Unite.vim.
nnoremap <silent> ,g :<C-u>Unite grep:. -buffer-name=search-buffer<CR> if executable('pt') let g:unite_source_grep_command = 'pt' let g:unite_source_grep_default_opts = '--nogroup --nocolor' let g:unite_source_grep_recursive_opt = '' let g:unite_source_grep_encoding = 'utf-8' endif
Emacs + pt.el
You can use pt with pt.el, which can be installed from MELPA.
$ go get -u github.com/monochromegane/the_platinum_searcher/...
Download from the following url.
Or, you can use Homebrew (Only macOS).
$ brew install pt
pt is an alias for
the_platinum_searcher in Homebrew.
- Fork it
- Create a feature branch
- Commit your changes
- Rebase your local changes against the master branch
- Run test suite with the
go test ./...command and confirm that it passes
- Create new Pull Request
*Note that all licence references and agreements mentioned in the The Platinum Searcher README section above are relevant to that project's source code only.