@codeque/cli

Multiline code search for every language. Structural code search for JavaScript, TypeScript, HTML and CSS


Keywords
typescript, javascript, json, search, find, match, pattern, matching, ast, regexp, semantic, static, analysis, structural, syntax, multiline, refactor, refactoring, replace, rewrite, rewriting, navigation, multiline search, structural search, search and replace, regexp search, json search
License
Abstyles
Install
npm install @codeque/cli@0.5.1

Documentation


Website  •   Docs   •   Roadmap  •   Mission  •   Playground

Find and lint complex code patterns effortlessly


What is CodeQue?

CodeQue is semantic code search engine that understands the code syntax.

It matches code structurally which makes it excellent for more complex queries.

Query language offers wildcards, partial matching and ignores code formatting.

Structural code search is available for JavaScript, TypesScript, HTML, CSS, Python, Lua and more soon.

Text code search with handy wildcards is available for every language and covers common regex search use cases.

Give it a try in playground

Just paste code snippet to start searching, no installation needed!

Integrations

CodeQue is available as:

All CodeQue tools work offline hence code never leaves your local environment.

Coming soon

CodeQue will be soon available as:

  • Duplicated code identification
  • Batch code refactoring
  • Advanced ESLint rule creator

🔔 Get notified about updates 🔔


Visual Studio Code Extension 🔮

VScode extension aims to make your workflow more efficient.

It addresses the problems of standard search by providing multiline support and offers an easy way to add gaps or use wildcards in the query.

You don't need to have any Regex knowledge to query complex code patterns.

With CodeQue, you can easily navigate and modify your codebase, making your development process faster and more efficient.

It will help you with code refactoring, speed up project discovery, and make it easy to find duplicated or similar code patterns.

Advanced code search options and todo-like list of accurate search results will streamline your workflow.


Watch extension in action in 1 minute (external link) 👇



Get extension from marketplace

ESLint integration 💅

Using CodeQue ESLint plugin you can create your own custom linting rules in zero time.

Custom ESLint rules can help execute on long-term refactors or prevent introducing codebase specific bugs or bad patterns.

Rules can replace your decision log and help standardizing coding conventions across the project or organization.

CodeQue ESLint integration is a no-brainier for any team willing to improve their codebase quality.

Installation 👇

yarn add --dev @codeque/eslint-plugin

Usage ✨

Enhance your .eslintrc with following setup:

{
  "plugins": ["@codeque"],
  "rules": {
    "@codeque/error": ["error", [
      {
        "query": "fetchData()",
        "mode": "exact",
        "message": "Using fetchData() without parameters causes app crash!",
      },
    ]],
    "@codeque/warning": ["warn", [
      {
        "query": "import $$$ from 'lodash';",
        "mode": "include",
        "message": "Prefer to import lodash functions from separate packages like 'lodash.debounce'",
      },
    ]]
  }
}

Find more information in @codeque/eslint-plugin package readme



CLI tool 🔥

CodeQue CLI is a complementary tool that can be used for

  • Searching code patterns right from terminal including headless environments
  • Building scripts to assert that some code patterns exist or not exist
  • Enhancing git hooks to avoid committing or pushing unwanted code

Installation 👇

yarn global add @codeque/cli

Usage ✨

codeque

codeque cli demo


Find more information in @codeque/cli package readme

Support and feedback

Feel free to use Github Issues to

  • ask for help with writing a query
  • report a bug or doubt
  • suggest feature or improvement